You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while translating to german i noticed a couple of issues:
highlighting substrings
highlighting of substrings is achieved by concatenating multiple translations. this assumes that the translations follow the approximately the same syntactical structure as the original code.
e.g. the string
Enter host address as shown below the QR code.
is split into two substrings ("Enter host address as shown" and "below the QR code"), where the 2nd one is highlighted.
my preferred German translation would look like:
Geben Sie die Hostadresse an, wie sie unter dem QR Code angezeigt wird.
however, this is not possible (as the highlighted string must be at the end).
I'm not fully sure what would be the best approach here, but most likely some explicit markup within the translation string.
e.g.
Enter host address as shown \<below the QR code\>.
and Geben Sie die Hostadresse an, wie sie \<unter dem QR Code\> angezeigt wird.
and then replace the \< and \> markers to highlight-begin resp highlight-end at runtime.
punctuation
right now the final punctuation mark in a translatable is hardcoded and cannot be translated.
e.g. here the displayed string is forced to have a terminal .:
"confirmExport3": "If your export falls into the wrong hands, all your information saved in Passy will be endangered",
i think this is wrong:
it makes the translation process slightly awkward, as i constantly have to wonder whether the missing trailing . in the template translation is a typo. and the correct translation does not look like a correct (full) sentence.
it does not allow for translated trailing punctuation. (this is not a real problem with my German translation. but there are so many differences in how various languages use punctuation marks, that i wouldn't be surprised if a trailing . would be a problem somewhere.
"noFavorites1": "You may add favorites by pressing the ",
"noFavorites2": " button at the top bar of any entry screen",
"@noFavorites1": { "description": "noFavorites, noFavorites1 and noFavorites2 make up a single message used in the Favorites search screen. noFavorites1 is followed by a star icon." },
"@noFavorites2": { "description": "noFavorites, noFavorites1 and noFavorites2 make up a single message used in the Favorites search screen. noFavorites1 is followed by a star icon." },
i think this should be handled via an explicit placeholder:
e.g.
Current username is %s.
resp.
You may add favorites by pressing the %s button at the top bar of any entry screen.
there are two pros:
it allows the dynamic string at an arbitrary place (e.g. displaying the current username in the middle of the string)
it requires less explanations in comments about how strings must be interpreted.
Submission checklist
I have specified my suggestion in the issue title
The text was updated successfully, but these errors were encountered:
Thanks for letting me know, I will consider implementing HTML-style string formatting, as well as variable placeholders. (<b> for bold, %x, %y, %z... for placeholders)
Regarding the punctuation marks, this is simply due to my lack of attention. Thanks for finding these, I will take care of them until the next update.
I have implemented text formatting in the exact manner I mentioned in my message above. You may now implement changes to your localization as you desire. Please let me know if I've made any mistakes during re-formatting or if there's any formatting errors that need fixing.
I thank you very much for providing wonderful suggestions and helping out with localization!
Suggestion
while translating to german i noticed a couple of issues:
highlighting substrings
highlighting of substrings is achieved by concatenating multiple translations. this assumes that the translations follow the approximately the same syntactical structure as the original code.
e.g. the string
is split into two substrings ("Enter host address as shown" and "below the QR code"), where the 2nd one is highlighted.
my preferred German translation would look like:
however, this is not possible (as the highlighted string must be at the end).
I'm not fully sure what would be the best approach here, but most likely some explicit markup within the translation string.
e.g.
and then replace the
\<
and\>
markers to highlight-begin resp highlight-end at runtime.punctuation
right now the final punctuation mark in a translatable is hardcoded and cannot be translated.
e.g. here the displayed string is forced to have a terminal
.
:Passy/lib/screens/export_screen.dart
Line 47 in f69bf2b
and the translation must take care to not include this dot:
Passy/lib/l10n/app_en.arb
Line 111 in f69bf2b
i think this is wrong:
.
in the template translation is a typo. and the correct translation does not look like a correct (full) sentence..
would be a problem somewhere.placeholders
also, some text requires placeholders. e.g.
Passy/lib/l10n/app_en.arb
Lines 34 to 35 in f69bf2b
where there's an implicit placeholder at the end of the translation string.
or
Passy/lib/l10n/app_en.arb
Lines 196 to 199 in f69bf2b
i think this should be handled via an explicit placeholder:
e.g.
resp.
there are two pros:
Submission checklist
The text was updated successfully, but these errors were encountered: