-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translations: Use substitutions instead of concatenations #1114
Comments
Hmm, even HTML concatenations may lead to inconsistent spacing: jamulus/src/clientsettingsdlg.cpp Line 223 in 41be42d
In this case, it's a double space and will most like not matter in practice as I assume it will be condensed to one as it would be in ordinary HTML. But still... |
Which would have to become something like...
... I think... And the the translator sees Would providing |
I don't think so. :(
As long as we stick to simple HTML (I guess bold formatting and line breaks are the most common reason for using it?), this would be way more readable (although we would have to check translation PRs thoroughly for them not to break HTML).
Don't know / haven't tried. I'm not currently working on this and I'm therefore removing myself as the assignee. |
@BLumia since you we’re the last person doing a full translation of the software. How many places do need to be updated in order not to have split out tr()? I think this issue should also be documented in the style guide in CONTRIBUTING.md |
I think that is probably the best idea in this issue :). |
jamulus/src/clientsettingsdlg.cpp Line 223 in 41be42d
This should also be avoided. If using HTML markup is a must, just also include HTML tags in the source strings. Letting translators see these markup tags is not a bad thing. e.g.
I already updated those I can find that have this issue, there might still be some strings that need to be corrected but I'm not sure about the amount.
Totally agree since there are some strings with this issue introduced in new commits, contributors should be aware this can be an issue when they want to add new strings to the program. |
That's certainly good to know. Currently we still support older Qt versions though. |
Yes, agree 100%, and Qt Linguist fully supports this too. It recognises and highlights embedded HTML: Although it doesn't appear to warn the user if the translated string differs in the HTML markup. It might be quite an undertaking to change this project-wide though (although probably worthwhile). It would need to be done while other activity is fairly quiet and then included without delay, or rebasing could be very arduous! |
That's not necessarily bad -- if, say, there was a German translation of the qJackCtl documentation, changing the |
Ok: See #2561 which added a style note related to this issue. |
Since I think we have it documented, can we close this? I think
Could be run by someone. |
Files to be checked:
|
Fixes: jamulussoftware#1114 Co-Authored-By: Peter L Jones <pljones@users.noreply.github.com> Co-Authored-By: Gary Wang <wzc782970009@gmail.com>
Fixes: jamulussoftware#1114 Co-Authored-By: Peter L Jones <pljones@users.noreply.github.com> Co-Authored-By: Gary Wang <wzc782970009@gmail.com>
Describe the improvement
Some strings currently use concatenations. Example:
jamulus/src/clientsettingsdlg.cpp
Line 183 in 41be42d
To Reproduce
Could probably use something like
grep -Po 'tr\s*\(.*\).*\+.*' src/*
to find other places (this will still yield false positives such as HTML concatenation, which should be OK I think).Expected behavior
This was suggested by @pljones in #1097 (comment):
Additional context
Must only be changed after 3.7.0 is completed.
The text was updated successfully, but these errors were encountered: