Uh oh!
There was an error while loading. Please reload this page.
Do not use QObject::tr plural syntax for numbers with a unit symbol - #296
Conversation
This is useless and unnecessarily burdensome for translators.
jarolrod
left a comment
There was a problem hiding this comment.
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.
…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
luke-jr
commented
Jun 12, 2021
Hopefully this won't disrupt some non-Latin language... |
hebasto
commented
Jun 12, 2021
In which way? |
luke-jr
commented
Jun 12, 2021
eg, if 300 GB and 400 GB are written using different characters. |
hebasto
commented
Jun 12, 2021
In such case we could expect a comment from a translator here or on transifex.com, right? |
luke-jr
commented
Jun 12, 2021
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. |
luke-jr
commented
Oct 15, 2021
I think we should revert this...
|
flack
commented
Nov 4, 2021
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. |
luke-jr
commented
Nov 4, 2021
Even if possible, we should go back to |
kybl
commented
Nov 5, 2021
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. |
westoleaboat
commented
Nov 6, 2021
In Spanish you may differentiate as follows: (similar as difference between 'is' and 'are' in English)
|
hebasto
commented
Nov 6, 2021
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? |
hebasto
commented
Nov 6, 2021
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 :)