waydabber / BetterDisplay-localization

BetterDisplay-localization
5 stars 17 forks source link

Localization: Polish #22

Open waydabber opened 4 months ago

waydabber commented 4 months ago

This is the thread for the Polish localization.

marcinkardas commented 4 months ago

Hi @waydabber. I will take care of the Polish translation and it will be available soon. :)

waydabber commented 4 months ago

Thank you! :)

MStankiewiczOfficial commented 2 days ago

Hi, can I help with the Polish translation? :)

waydabber commented 2 days ago

Hi @MStankiewiczOfficial - of course! Thank you!

You can simply download the localization file from the repo and attach the updated xcloc file so I can process it. Alternatively, you can fork the repo, work on it as your time allows and then do a Pull Request.

Let me know if you need any assistance or have questions! :)

MStankiewiczOfficial commented 1 day ago

Ok, I have already started the translation, but I ran into a small problem. In Polish, it often happens that we conjugate differently the nouns that occur after the numeral. And I have a bit of a problem with %lld pixels HiDPI (%lld pixels LoDPI), %lld Trial Days Left and %u bits per sample because the translation for different numbers will be different: for %lld pixels HiDPI (%lld pixels LoDPI):

Same for %lld Trial Days Left:

If you'd like, I can translate everything as for most numbers (5-21, 25-31, 35-41 etc.), but I warn that this is usually perceived by users as unprofessional as it sounds like it is translated automatically.

And btw, I suggest in such strings as %@mm x %@mm or %@x%@ to replace x with × symbol so that it is %@mm × %@mm or %@×%@ - in all languages :)"

waydabber commented 1 day ago

Is it possible to translate it differently like "x number of pixels LoDPI", or something like that so you don't have to conjugate the "pixels" word itself? I am not sure if such tricks work in Polish.

An other way would be to use XCode's vary by plural feature for the translation. This should let you define different strings for different numerals like this:

Screenshot 2024-06-27 at 22 06 17

The problem is that the xcloc format does not support this, only xcstrings which is a completely different format and XCode does not support exporting localizations for translators in that. I can provide an xcstrings file which contains all translations combined, but I am not sure how will I be able to import that back to the app easily. And when we add this new feature to the translation, I won't be able to export the translation in xcloc ever again. So this would require a complete rethinking of how to do translations and impact every translator. It would still be possible, but in this case everybody must work on a single shared xcstrings file in this repo and interact with it by forking and doing pull requests, adapting more flexibly when the source text changes.

marcinkardas commented 1 day ago

Hi, can I help with the Polish translation? :)

Cześć! Czy mógłbyś przejrzeć moje tłumaczenie i sprawdzić ewentualne błędy? Jest to trochę skomplikowany temat do tłumaczenia i niektóre rzeczy specjalnie pominąłem, bo nie rozumiałem kontekstu.

Możemy podzielić się elementami do przetłumaczenia - nie zdawałem sobie sprawy z tego ile w tej aplikacji jest linii do tłumaczenia i trochę mnie to przerosło, stąd ostatnio brak progresu. 👀

MStankiewiczOfficial commented 17 hours ago

Hi @waydabber!

Is it possible to translate it differently like "x number of pixels LoDPI", or something like that so you don't have to conjugate the "pixels" word itself? I am not sure if such tricks work in Polish.

Yes, I know this trick, but there is a problem — it doesn't work with all sentences and when I would like to use it, sentences would be very long.

The problem is that the xcloc format does not support this, only xcstrings which is a completely different format and XCode does not support exporting localizations for translators in that.

OK, I understand, but maybe you could just add some additional strings that will not be changing in other languages, but only in Polish and other languages that have that?


Cześć @marcinkardas!

Czy mógłbyś przejrzeć moje tłumaczenie i sprawdzić ewentualne błędy?

Oczywiście. Faktycznie zauważyłem kilka błędów, ale są to naprawdę drobnostki, które szybko się poprawi ;) W ogóle myślałem, że powinniśmy sobie zrobić taki słownik, jaki jest na niemiecki, żebyśmy wiedzieli jakich słów używać dla konkretnych funkcji.

Możemy podzielić się elementami do przetłumaczenia

Myślę, że to świetny pomysł. Czy możemy to obgadać na jakimś komunikatorze? Masz może Matrixa lub Discorda?

waydabber commented 16 hours ago

OK, I understand, but maybe you could just add some additional strings that will not be changing in other languages, but only in Polish and other languages that have that?

The localization and string substitution is entirely transparent so the app and the code actually does not deal with the language variants at all.

But as a test I added a one-few-many-other variant to a Polish string and then tried exporting the xcloc. It seems like the xcloc can actually accommodate the variants properly. The problem is you can't add the variants in the xcloc file, only me.

What we should do is this: you should send me your current progress (a zipped xcloc file) - I'll import it into the app and export an xcstrings file with which you can continue working and add variants as well. When you are done, I'll extract the Polish text from the xcstrings file with some tricks afterwards (it's pure json so it is possible), import it into the project and then can even export an xcloc file which now will have the variants (for existing strings). For future new strings I can add plural variants when needed myself as a placeholder.

As a test, I attached an xcstrings file (this contains all translations). Just open it, select Polish and try to add plural variants and see if it works (right click + Vary by Plural).

Localizable.xcstrings.zip