New locale #132

Merged
yurtpage merged 4 commits from i18n into main 2025-06-21 06:39:04 +03:00
yurtpage commented 2025-06-18 19:59:59 +03:00 (Migrated from github.com)

Added Russian ru translation.
Thank you for the app.

Added Russian ru translation. Thank you for the app.
TJYSunset commented 2025-06-19 02:20:08 +03:00 (Migrated from github.com)

Pardon my paranoia, but are you sure this is translated by an actual Russian speaker? Russian should have complex plural rules that have a total of four number categories, while your translation is only using two.

Pardon my paranoia, but are you sure this is translated by an actual Russian speaker? Russian should have complex plural rules that have [a total of four number categories](https://www.unicode.org/cldr/charts/46/supplemental/language_plural_rules.html#ru), while your translation is only using two.
yurtpage commented 2025-06-19 20:32:42 +03:00 (Migrated from github.com)

I added the "few" plural form.

of four number categories
Integers only three "one" "few" and "other".

I was confused with the syntax of the inline plural rules. Usually all projects use a separate tags:

    <plurals name="numberOfItems">
        <item quantity="one">%d item</item>
        <item quantity="other">%d items</item>
    </plurals>

See https://info-anikdey003.medium.com/android-quantity-strings-plurals-5ed3d7c62c16

This syntax makes it easier to read, translate but also this is supported by the Weblate that shows three different fields on UI but also have a check to find strings with missing plural forms. So maybe you can use this syntax?

I tried to find the inline plural syntax and only by the code I found that it uses the icu.text.MessageFormat
And a few articles with examples where I found how to add the "few" form:
https://lokalise.com/blog/java-internationalization-learn-the-basics/
https://phrase.com/blog/posts/guide-to-the-icu-message-format/

I added the "few" plural form. > of four number categories Integers only three "one" "few" and "other". I was confused with the syntax of the inline plural rules. Usually all projects use a separate tags: ```xml <plurals name="numberOfItems"> <item quantity="one">%d item</item> <item quantity="other">%d items</item> </plurals> ``` See https://info-anikdey003.medium.com/android-quantity-strings-plurals-5ed3d7c62c16 This syntax makes it easier to read, translate but also this is supported by the Weblate that shows three different fields on UI but also have a check to find strings with missing plural forms. So maybe you can use this syntax? I tried to find the inline plural syntax and only by the code I found that it uses the [icu.text.MessageFormat](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4j/com/ibm/icu/text/MessageFormat.html) And a few articles with examples where I found how to add the "few" form: https://lokalise.com/blog/java-internationalization-learn-the-basics/ https://phrase.com/blog/posts/guide-to-the-icu-message-format/
TJYSunset commented 2025-06-20 15:35:05 +03:00 (Migrated from github.com)

Sorry for the continuous doubt of your effort, but are you actually a Russian speaker? I'd rather not incorporate machine translations into my app, and it's a little strange for a Mongolian (as stated in your GitHub profile) to submit Russian before Mongolian... without asking about the plural syntax before trying to submit incomplete plurals.

TSo maybe you can use this syntax?

Even Google recommends to use MessageFormat instead of their ad hoc syntax. ("On API 24+ you can use the much more powerful ICU MessageFormat class instead.")

this is supported by the Weblate

That's Weblate's problem. I've actually used a local Weblate instance in the early development for "translating" to Chinese and I hated every part of it.

Sorry for the continuous doubt of your effort, but **are you** actually a Russian speaker? I'd rather not incorporate machine translations into my app, and it's a little strange for a Mongolian (as stated in your GitHub profile) to submit Russian before Mongolian... without asking about the plural syntax before trying to submit incomplete plurals. > TSo maybe you can use this syntax? [Even Google](https://developer.android.com/guide/topics/resources/string-resource#Plurals) recommends to use MessageFormat instead of their ad hoc syntax. ("On API 24+ you can use the much more powerful ICU MessageFormat class instead.") > this is supported by the Weblate That's Weblate's problem. I've actually used a local Weblate instance in the early development for "translating" to Chinese and I hated every part of it.
yurtpage commented 2025-06-20 17:23:19 +03:00 (Migrated from github.com)

You may easily ensure this by checking words with character ё ("yo"): auto translators don't use it but instead use a similar character е ("ye") that is phonetically different. This is simply because on old keyboards didn't had ё and even now it's placed far on the place of ~. So many texts and books doesn't use the char so the AI trained translators too.

before trying to submit incomplete plurals

I initially was more about to help with a translation service. The translation I made during a few days when I had a time. The missing "few" plural isn't critical. Something may be changed or reworded later and that's one of the reason why the continuous translation services allows not to burden developers with many small PRs.

Even Google recommends to use MessageFormat instead of their ad hoc syntax.

Thank you, good to know. On the article that you mentioned used separate tags but not the ICU. As for me as a translator this is less convenient, known and difficult to modificate. Hope the Weblate will support this syntax to minimize possible errors.

You may easily ensure this by checking words with character `ё` ("yo"): auto translators don't use it but instead use a similar character `е` ("ye") that is phonetically different. This is simply because on old keyboards didn't had `ё` and even now it's placed far on the place of `~`. So many texts and books doesn't use the char so the AI trained translators too. > before trying to submit incomplete plurals I initially was more about to help with a translation service. The translation I made during a few days when I had a time. The missing "few" plural isn't critical. Something may be changed or reworded later and that's one of the reason why the continuous translation services allows not to burden developers with many small PRs. > [Even Google](https://developer.android.com/guide/topics/resources/string-resource#Plurals) recommends to use MessageFormat instead of their ad hoc syntax. Thank you, good to know. On the article that you mentioned used separate tags but not the ICU. As for me as a translator this is less convenient, known and difficult to modificate. Hope the Weblate will support this syntax to minimize possible errors.
TJYSunset commented 2025-06-21 06:54:18 +03:00 (Migrated from github.com)

OK then, sorry if I wrongfully accused you. Your work is appreciated.

I initially was more about to help with a translation service.

Sorry, still not very convinced - I don't know the service host in person, and it's dangerous to express endorsement for some random guy on the internet these days (especially in China). Also, as someone who has translated a few other projects with different tools, I personally prefer even notepad.exe over Weblate.

I'm planning to just develop a client-side web editor specialized in Phocid that has better support for MessageFormat.

Hope the Weblate will support this syntax to minimize possible errors.

You can actually configure Weblate to check for basic syntax errors (Add icu-message-format to the project's flags), but that's mostly useless because it doesn't actually understand MessageFormat (for example, it enforces plural even for languages that don't have plural forms).

OK then, sorry if I wrongfully accused you. Your work is appreciated. > I initially was more about to help with a translation service. Sorry, still not very convinced - I don't know the service host in person, and it's dangerous to express endorsement for some random guy on the internet these days (especially in China). Also, as someone who has translated a few other projects with different tools, I personally prefer even notepad.exe over Weblate. I'm planning to just develop a client-side web editor specialized in Phocid that has better support for MessageFormat. > Hope the Weblate will support this syntax to minimize possible errors. You can actually configure Weblate to check for basic syntax errors (Add `icu-message-format` to the project's [flags](https://docs.weblate.org/en/latest/admin/checks.html#customizing-behavior-using-flags)), but that's mostly useless because it doesn't actually understand MessageFormat (for example, it enforces `plural` even for languages that don't have plural forms).
yurtpage commented 2025-06-21 10:26:40 +03:00 (Migrated from github.com)

it's dangerous to express endorsement for some random guy

I agree, and importunately same for any other service including the F-Droid itself. In the F-Droid translators chat discussed to create own Weblate instance but they are too busy.

client-side web editor specialize

sounds interesting

I removed the project on the Toolate.

> it's dangerous to express endorsement for some random guy I agree, and importunately same for any other service including the F-Droid itself. In the F-Droid translators chat discussed to create own Weblate instance but they are too busy. > client-side web editor specialize sounds interesting I removed the project on the Toolate.
TJYSunset commented 2025-07-12 00:32:01 +03:00 (Migrated from github.com)

The client-side web editor is now live: https://sunsetware.org/phocid/translate/

(This editor makes several assumptions about strings.xml, so it will likely not work with most other Android apps.)

The client-side web editor is now live: https://sunsetware.org/phocid/translate/ (This editor makes several assumptions about strings.xml, so it will likely not work with most other Android apps.)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
novvux/Blissid!132
No description provided.