patzly / doodle-android

Colorful live wallpapers with auto dark mode and power-efficient animations
https://patrickzedler.com/doodle/
647 stars 37 forks source link

Fix unenclosed line break tag in ru translations #85

Closed danielh4t closed 1 year ago

patzly commented 1 year ago

@danielh4t Hi and thanks! The change has to be done directly in Transifex, so I removed the
there (it has to be completely removed, in English there is no tag there. I don't know why some people on Transifex add
tags somewhere). But if you speak Russian, please take a look on Transifex and the plurals in Doodle. There are some errors with the plural for one quantity:

The quantity 'one' matches more than one specific number in this locale (1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …), but the message did not include a formatting argument (such as %d). This is usually an internationalization error.

These are the affected strings:

<plurals name="appearance_random_interval_minutes">
    <item quantity="one">Каждую минуту </item> <!-- error as mentioned above -->
    <item quantity="few">Каждые %1$d минуты</item>
    <item quantity="many">Каждые %1$d минут</item>
    <item quantity="other">Каждые %1$d минут</item>
</plurals>
<plurals name="appearance_random_interval_hours">
    <item quantity="one">Каждый час</item> <!-- error as mentioned above -->
    <item quantity="few">Каждые %1$d часа</item>
    <item quantity="many">Каждые %1$d часов</item>
    <item quantity="other">Каждые %1$d часов</item>
</plurals>
<plurals name="appearance_random_interval_days">
    <item quantity="one">Каждый день</item> <!-- error as mentioned above -->
    <item quantity="few">Каждые %1$d дня</item>
    <item quantity="many">Каждые %1$d дней </item>
    <item quantity="other">Каждые %1$d дней</item>
</plurals>

On Transifex you can search for "Every" to find the 3 plurals. On the right side you have to select the quantity "one" to edit the affected string. Thanks!

danielh4t commented 1 year ago

Thanks @patzly for the detailed response. I will have a look at it.

danielh4t commented 1 year ago

@patzly looked into in some languages like Russian it, 1 photo, 101 photo is correct instead of the English way of 1 photo 101 photos

In Transifex, there is a warning The expression '%1$d' is not present in the original phrase.

I believe this relates to the original string resources not having the %d According to the docs: Always include %d in "one" because translators will need to use %d for languages where "one

Therefore, adding %1$d to the one in the strings.xml for the three plurals should resolve that, I could submit a PR if you want or the change could be done on Transifex or on your end :smile:

  <plurals name="appearance_random_interval_minutes">
    <item quantity="one">Every %1$d minute</item>
    <item quantity="other">Every %1$d minutes</item>
  </plurals>
  <plurals name="appearance_random_interval_hours">
    <item quantity="one">Every %1$d hour</item>
    <item quantity="other">Every %1$d hours</item>
  </plurals>
  <plurals name="appearance_random_interval_days">
    <item quantity="one">Every %1$d day</item>
    <item quantity="other">Every %1$d days</item>
  </plurals>
patzly commented 1 year ago

That's a very important fact you mentioned, thanks! I added the placeholder and now you (and every other translator) have to translate the plurals again I think.