Do not use QObject::tr plural syntax for numbers with a unit symbol #296

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:210425-plurals changing 1 files +3 −3
  1. hebasto commented at 6:45 pm on April 25, 2021: member
    Working on translation, I found this is useless and unnecessarily burdensome for translators. I guess, this statement is correct internationally wide :)
  2. qt: Do not use QObject::tr plural syntax for numbers with a unit symbol
    This is useless and unnecessarily burdensome for translators.
    3adde72bc9
  3. hebasto added the label Translations on Apr 25, 2021
  4. jarolrod commented at 5:52 pm on April 30, 2021: member

    ACK 3adde72bc99215062c8dabd38f8c34ad093452b5

    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.

  5. hebasto requested review from laanwj on May 8, 2021
  6. promag commented at 1:15 pm on May 10, 2021: contributor
    Code review ACK 3adde72bc99215062c8dabd38f8c34ad093452b5. Agree with OP, looks reasonable to me.
  7. hebasto merged this on May 10, 2021
  8. hebasto closed this on May 10, 2021

  9. hebasto deleted the branch on May 10, 2021
  10. sidhujag referenced this in commit 156108152d on May 10, 2021
  11. luke-jr commented at 8:21 pm on June 12, 2021: member
    Hopefully this won’t disrupt some non-Latin language…
  12. hebasto commented at 8:33 pm on June 12, 2021: member

    Hopefully this won’t disrupt some non-Latin language…

    In which way?

  13. luke-jr commented at 8:50 pm on June 12, 2021: member
    eg, if 300 GB and 400 GB are written using different characters.
  14. hebasto commented at 8:54 pm on June 12, 2021: member

    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?

  15. luke-jr commented at 11:58 pm on June 12, 2021: member
    I’m not sure. Have we ever had any feedback of that sort from translators?
  16. hebasto commented at 0:56 am on June 13, 2021: member

    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.

  17. luke-jr commented at 11:39 pm on October 15, 2021: member

    I think we should revert this…

    bg had different strings: (%n GB е нужен) vs (%n GB са нужни)

    ca: Un GB d'espai lliure disponible vs %1 GB d'espai lliure disponibles; and (Un GB necessari) vs (de %n GB necessàris)

    eo: %n gigabajto de libera loko disponeble vs %n gigabajtoj de libera loko disponebla.

    es_CL: (de %n GB requerido) vs (de %n GB requeridos)

    fr: %n Go d’espace libre disponible vs %n Go d’espace libre disponibles; and (%n Go nécessaire pour la chaîne complète) vs (%n Go nécessaires pour la chaîne complète)

    he: ג״ב של מקום פנוי זמין vs %n ג״ב של מקום פנוי זמינים

    hr: (od potrebnog prostora od %n GB) vs (od potrebnog %n GB); and (potreban je %n GB za cijeli lanac) vs (potrebna su %n GB-a za cijeli lanac) vs (potrebno je %n GB-a za cijeli lanac)

    pl: (%n GB potrzebny na pełny łańcuch) vs (%n GB potrzebne na pełny łańcuch) vs (%n GB potrzebnych na pełny łańcuch)

    ro: (din %n GB necesar) vs (din %n GB necesari)

    sk: (z %n GB potrebného) vs (z %n GB potrebných); and (%n GB potrebný pre plný reťazec) vs (%n GB potrebné pre plný reťazec) vs (%n GB potrebných pre plný reťazec)

    sl: (%n GB potreben za celotno verigo blokov) vs (%n GB potrebna za celotno verigo blokov) vs (%n GB potrebni za celotno verigo blokov) vs (%n GB potrebnih za celotno verigo blokov)

    sv: %n GB fritt utrymme kvar vs %n GB ledigt utrymme kvar; and (av %n GB behövs) vs (av de %n GB som behövs)

    szl: (z %n GB przidajnego) vs (z %n GB przidajnych)

  18. flack commented at 7:53 pm on November 4, 2021: contributor

    just squinting at the above examples, it seems the logic of the ones I can somewhat decipher is like this:

    01 GB free space is available
    12 GB free space are available
    2
    31 GB is necessary for (...)
    42 GB are necessary for (...)
    

    I guess the question then is if all those languages have a way that covers both in cases in one phrase.

  19. luke-jr commented at 10:05 pm on November 4, 2021: member

    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 %n if forcing %1 would make the translation weirder.

  20. kybl commented at 7:20 am on November 5, 2021: none

    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:

    • 0 GB potrebných <– 0 and 5+ case
    • 1 GB potrebný <– 1 case
    • 2 GB potrebné <– 2-4 case
    • 3 GB potrebné <– 2-4 case
    • 4 GB potrebné <– 2-4 case
    • 5 GB potrebných <– 0 and 5+ 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.

  21. westoleaboat commented at 12:14 pm on November 6, 2021: none

    In Spanish you may differentiate as follows: (similar as difference between ‘is’ and ‘are’ in English)

    • 0 GB requeridos for zero it is plural
    • 1 GB requerido for one it is singular
    • 2 GB requeridos for >1 follows plural, same as zero
  22. hebasto commented at 5:12 pm on November 6, 2021: member

    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?

  23. hebasto commented at 5:16 pm on November 6, 2021: member
    A relevant announcement on Transifex.com
  24. GChuf commented at 10:05 pm on November 6, 2021: contributor

    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.

  25. hebasto referenced this in commit 31b1c67cf6 on Apr 3, 2022
  26. sidhujag referenced this in commit a8830ac048 on Apr 3, 2022
  27. gwillen referenced this in commit 655a4393b2 on Jun 1, 2022
  28. bitcoin-core locked this on Nov 6, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-23 00:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me