Closed HutsulCoder closed 1 year ago
Sure, the easiest way right now is:
Copy app/src/main/res/values/strings.xml
to app/src/main/res/values-uk/strings.xml
and then replace all the English text with Ukrainian text.
Add uk
to this list:
and this list:
Submit a pull request with your changes here on Github and if everything looks good, I'll merge it and include it in the next version of BCR. If you're not familiar with how to submit a PR, feel free to just upload your strings.xml
here and I'll do it.
I can't commit and push changes. I do this with using VS code
Git add . Git commit -m "Added Ukrainian language" Git pull origin master Git push origin master
Maybe, need to add new branch?
Ahh, that's expected because you're trying to push directly to this repo (https://github.com/chenxiaolong/BCR). You'll want to fork this repo (button in top right), change the URL git remote set-url origin <your fork of the repo>
), and push there. Then, you'll be able to create a pull request.
EDIT: fixed typo in git command
Thanks! Can you make a couple changes?
Android uses uk
instead of the normal ua
for Ukrainian. Please rename ua
(or else Android won't be able to detect the translations).
The build currently fails due to:
BCR/app/src/main/res/values-uk/strings.xml:46: Error: For locale "uk" (Ukrainian) the following quantities should also be defined: few (e.g. "2 дні"), many (e.g. "5 днів") [MissingQuantity]
<plurals name="retention_days">
I think this is because the translations currently have:
<plurals name="retention_days">
<item quantity="one">Зберегти %d день</item>
<item quantity="other">Зберегти %d днів</item>
</plurals>
I'm not familiar with the language, but it seems that additionally quantity="few"
and quantity="many"
are required for Ukrainian.
I fix my mistakes)
Thanks for the updates! The retention_days
is still not quite right:
<plurals name="retention_days">
<item quantity="one">Зберегти %d день</item>
<item quantity="two">Зберегти %d дні</item>
<item quantity="three">Зберегти %d дні</item>
<item quantity="four">Зберегти %d дні</item>
<item quantity="other">Зберегти %d днів</item>
</plurals>
Android doesn't accept three
and four
, but the rest are okay. few
and many
are required:
<plurals name="retention_days">
<item quantity="one">Зберегти %d день</item>
<item quantity="two">Зберегти %d дні</item>
<item quantity="few">?</item>
<item quantity="many">?</item>
<item quantity="other">Зберегти %d днів</item>
</plurals>
Thanks for the updates! The
retention_days
is still not quite right:<plurals name="retention_days"> <item quantity="one">Зберегти %d день</item> <item quantity="two">Зберегти %d дні</item> <item quantity="three">Зберегти %d дні</item> <item quantity="four">Зберегти %d дні</item> <item quantity="other">Зберегти %d днів</item> </plurals>
Android doesn't accept
three
andfour
, but the rest are okay.few
andmany
are required:<plurals name="retention_days"> <item quantity="one">Зберегти %d день</item> <item quantity="two">Зберегти %d дні</item> <item quantity="few">?</item> <item quantity="many">?</item> <item quantity="other">Зберегти %d днів</item> </plurals>
Ohh, i understand. I fix this now
Thanks! Merged in #356
Hello i can translate this app, how can i do it?