-
Notifications
You must be signed in to change notification settings - Fork 281
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
Do not use QObject::tr plural syntax for numbers with a unit symbol #296
Conversation
This is useless and unnecessarily burdensome for translators.
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.
ACK 3adde72
This makes sense as 1 GB and 20 GB should be translated the same. It would make sense to use the plural syntax if instead of the GB
unit we had the word Gigabyte
.
Did a quick grep search for %n
, ignoring the *.ts
files, and these are all occurrences of such a case that I could find.
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.
Code review ACK 3adde72. Agree with OP, looks reasonable to me.
…numbers with a unit symbol 3adde72 qt: Do not use QObject::tr plural syntax for numbers with a unit symbol (Hennadii Stepanov) Pull request description: Working on translation, I found this is useless and unnecessarily burdensome for translators. I guess, this statement is correct internationally wide :) ACKs for top commit: jarolrod: ACK 3adde72 promag: Code review ACK 3adde72. Agree with OP, looks reasonable to me. Tree-SHA512: bde65c122ca0feb7771d932cce63fd1aef1e7a9dda0188d19c577d57b279172204ac1bfcb6106a78b2c4d55d628e6dc0967051e064ec40d3c5aeafd4a48f0589
Hopefully this won't disrupt some non-Latin language... |
In which way? |
eg, if 300 GB and 400 GB are written using different characters. |
In such case we could expect a comment from a translator here or on transifex.com, right? |
I'm not sure. Have we ever had any feedback of that sort from translators? |
Translators can open issues on transifex.com that are associated to the translatable strings. There are some of them open now. |
I think we should revert this...
|
just squinting at the above examples, it seems the logic of the ones I can somewhat decipher is like this:
I guess the question then is if all those languages have a way that covers both in cases in one phrase. |
Even if possible, we should go back to |
From the languages above, I can understand Slavic ones. There, it matters not even if the number is 1 or more, but if the number is 1, or (2, 3, or 4), or (5 and more, or 0). For example, in the Slovak language case:
I found a very informative source here: https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html Not sure if it can be somehow easily implementable in Transifex. In the current case, the translator probably tries to guess the typical number it will be there (impossible) and put form of such number. |
In Spanish you may differentiate as follows: (similar as difference between 'is' and 'are' in English)
|
If a subject or an object is measured in some units, it is wrong to substitute it with units. Therefore, a phrase "%n GB needed for full chain" is bad worded, because a free space needed, not gigabytes. Anyway, if this PR appeared so controversial, why do not just to open a new PR and revert these changes? |
A relevant announcement on Transifex.com |
I can confirm for slovenian and other slavic languages that we do have 3 or 4 different ways of saying "%n GB needed%, depending on the actual number of gigabytes. Similar to english "is/are". There's no way to cover all cases ... this is exactly why transifex allows you to have more than 2 options. Maybe? you could cover all cases in all languages by saying something like "Amount of GB needed: %n", but I don't think this was ever broken to begin with, and you only translate this once. |
…ers with a unit symbol" 0c64401 Revert "qt: Do not use QObject::tr plural syntax for numbers with a unit symbol" (Luke Dashjr) Pull request description: Apparently this got forgotten. Maybe too late for 23.x (it's a bugfix, but changes translation strings). This reverts commit 3adde72 (#296) per [GChuf](#296 (comment)) >I can confirm for slovenian and other slavic languages that we do have 3 or 4 different ways of saying "%n GB needed%, depending on the actual number of gigabytes. Similar to english "is/are". There's no way to cover all cases ... this is exactly why transifex allows you to have more than 2 options. ACKs for top commit: hebasto: ACK 0c64401, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: c01bae44a32b3ec324f2f9b8e4923bbb2e83bbd1460b745c5c911b98a9b2806fcbf815cfb19a1f1a7038c5c14312e102e7df8744c9002ef784b36d158e08eb14
… syntax for numbers with a unit symbol" 0c64401 Revert "qt: Do not use QObject::tr plural syntax for numbers with a unit symbol" (Luke Dashjr) Pull request description: Apparently this got forgotten. Maybe too late for 23.x (it's a bugfix, but changes translation strings). This reverts commit 3adde72 (#296) per [GChuf](bitcoin-core/gui#296 (comment)) >I can confirm for slovenian and other slavic languages that we do have 3 or 4 different ways of saying "%n GB needed%, depending on the actual number of gigabytes. Similar to english "is/are". There's no way to cover all cases ... this is exactly why transifex allows you to have more than 2 options. ACKs for top commit: hebasto: ACK 0c64401, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: c01bae44a32b3ec324f2f9b8e4923bbb2e83bbd1460b745c5c911b98a9b2806fcbf815cfb19a1f1a7038c5c14312e102e7df8744c9002ef784b36d158e08eb14
Working on translation, I found this is useless and unnecessarily burdensome for translators. I guess, this statement is correct internationally wide :)