-
Notifications
You must be signed in to change notification settings - Fork 309
Wrap up translating all strings #1325
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
Conversation
28486b4
to
1d6275a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Comments below.
This also doesn't yet complete #277 — there are four more sites that need translations, as found at #277 (comment) , in addition to the sites that need new or updated TODO markers which I've just sent in #1332.
lib/widgets/content.dart
Outdated
text: "(unimplemented: DOM node type ${htmlNode.nodeType})", | ||
text: zulipLocalizations.errorUnimplementedPlaceholder(htmlNode.nodeType), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one is covered by the TODO comments above, so we can leave it out.
(I'm not sure I've ever seen this case happen, so there's no urgency to ask our translators to translate it before we have a solution for its neighbors. The is dom.Element
case above is by far the most common.)
lib/licenses.dart
Outdated
// This does not need to be translated, as it is just a small fragment | ||
// of text surrounded by a large quantity of English text that isn't | ||
// translated anyway. | ||
return '$licenseFileText\n\nAUTHORS file follows:\n\n$authorsFileText'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, this is helpful.
The other key piece of the reasoning is the fact that it wouldn't be easy to translate — if it were, we should translate it rather than try to think through whether this is a corner we can get away with cutting. So, drawing on that chat thread you linked earlier:
// This does not need to be translated, as it is just a small fragment | |
// of text surrounded by a large quantity of English text that isn't | |
// translated anyway. | |
return '$licenseFileText\n\nAUTHORS file follows:\n\n$authorsFileText'; | |
// This does not need to be translated, as it is just a small fragment | |
// of text surrounded by a large quantity of English text that isn't | |
// translated anyway. | |
// (And it would be logistically tricky to translate, as this code is | |
// called from the `main` function before the [ZulipApp] widget is built, | |
// let alone has updated [GlobalLocalizations].) | |
return '$licenseFileText\n\nAUTHORS file follows:\n\n$authorsFileText'; |
Updated the PR to include the missed strings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the revision! Comments below.
assets/l10n/app_en.arb
Outdated
"zulipAppTitle": "Zulip", | ||
"@zulipAppTitle": { | ||
"description": "Title of the application that appears above the task manager's app snapshot when the user presses the \"recent apps\" button on Android. This is not used for iOS." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"zulipAppTitle": "Zulip", | |
"@zulipAppTitle": { | |
"description": "Title of the application that appears above the task manager's app snapshot when the user presses the \"recent apps\" button on Android. This is not used for iOS." | |
"zulipAppTitle": "Zulip", | |
"@zulipAppTitle": { | |
"description": "The name of Zulip. This should be either 'Zulip' or a transliteration." |
The title right now is just "Zulip", which on its own should translate to
"Zulip" in other languages. But because this is user-visible, we make it
translatable, as we can always change it to a phrase or anything else.
Yeah, I don't anticipate the title changing. Even if it might, that doesn't make a reason to ask our translators to pick translations for it now. The reason to translate it is that translators for some languages will want to enter translations for it 🙂
In the zulip-mobile repo, try this search:
$ gr '^(?!.*Zulip.*Zulip).*Zulip' static/translations/
to find examples where the string "Zulip" appears just once on a line, in translation files that have the English version and translated version of each string on one line.
In some of those cases, it's because the translators reworded so that a mention of Zulip by name was removed (or added) relative to the English. But you'll see that translators for Arabic, Persian, Sinhala, Serbian, and in one case Gujarati have chosen to transliterate the name into their respective scripts.
Anyway: given that the point is to be just the name "Zulip", I think the context details become unneeded for translators and we can simplify what we ask of them by leaving those out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Зулип"
Ah, I see.
assets/l10n/app_en.arb
Outdated
@@ -155,13 +155,21 @@ | |||
"filename": {"type": "String", "example": "file.txt"} | |||
} | |||
}, | |||
"filenameAndSizeInMiB": "{filename}: {size} MiB", | |||
"@filenameAndSizeInMiB": { | |||
"description": "Message to display the name of a file and its size on a single line.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"description": "Message to display the name of a file and its size on a single line.", | |
"description": "The name of a file, and its size in mebibytes.", |
The abbreviation "MiB" may not be recognizable to all translators, so spelling it out gives them a better shot at successfully looking it up.
(That unit's name is one of the things translators will edit — for example in French it'll be "Mio", for "mébioctets".)
assets/l10n/app_en.arb
Outdated
"loginServerUrlHint": "your-org.zulipchat.com", | ||
"@loginServerUrlHint": { | ||
"description": "Hint text in login page for Zulip server URL entry." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… Hmm. I started writing in my head a bit more for this description (the translation should keep the ".zulipchat.com" part), then realized: we actually can't have translators substituting their own translations of the phrase "your org" either.
That's because it's important that an example like this be a name we've reserved so that it won't be some actual Zulip organization.
So I'll drop this commit and instead write a comment saying why this isn't translated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. TIL!
Signed-off-by: Zixuan James Li <[email protected]>
Signed-off-by: Zixuan James Li <[email protected]>
Thanks for the review! I have updated the PR. |
Signed-off-by: Zixuan James Li <[email protected]>
The string is used at the end of the "errorFilesTooLarge" message, which includes a list of files with its size that are too large. Signed-off-by: Zixuan James Li <[email protected]>
The message, when used in lib/widgets/compose_box.dart, substitutes `listMessage` with newline separated lines of filenames with size. Update the example to match this usage. Signed-off-by: Zixuan James Li <[email protected]>
to match the labels for the other fields (loginEmailLabel, loginPasswordLabel, etc.) This also updates existing translations in other languages to match. Signed-off-by: Zixuan James Li <[email protected]>
Thanks for the revision! Merging, after updating a couple of the commit messages to match:
|
This fixed #277, but didn't cause that issue to be closed because the issue description didn't use the special GitHub syntax for it: I've edited the description and will close the issue. |
Fixes: #277