lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.06k stars 2.23k forks source link

Translation / string localization system v2 #957

Closed Unihedro closed 7 years ago

Unihedro commented 9 years ago

An optimal and very much preferred system would be to automate as much of to collect, translate, and deliver, while having the process rely on someone that isn't ornicar (who, to quote, barely speak three languages).

Unihedro commented 8 years ago

Transifex seems to be a decent candidate, but not sure how it integrates with the existing systems

https://www.transifex.com/

ghost commented 8 years ago

My one tip is, I would avoid the Gettext format. It doesn't use translation keys, so if you change a string in upstream, it will change across all languages. Thankfully there are lots of alternatives, like XLIFF (sadly XML) and many more standard formats that support all the stuff we need, like translation contexts..

I'm a longtime regular of the FOSS translation community and have dozens of translations to my name. http://translatewiki.net/ has the highest skill level and most reliable translators (at least, once someone starts translating your project), but at the tradeoff of a higher barrier to entry: you have to write a message saying what languages you want to be allowed to translate. However, it's used by two colossal projects, Wikipedia and OpenStreetMap, so it makes up for it in critical mass. Overall, translatewiki.net would be my top pick as a very experienced volunteer translator.

Finally, a big feature request: multiline translations. Instead of breaking them up sentence by sentence, put them all in one string. So yeah, it's a bigger chore than one might think. :) Don't be afraid to include HTML markup in your strings--within reason.

Another feature request -- Thibault said this is technically viable when I asked him two years ago: instead of using %s as a catch-all for string substitution, number them %1 and %2 (as Wikipedia does, successfully), so translators can mix and match them to fit the grammatical structure of their language, and generally be less confused about which %s is which.

Unihedro commented 8 years ago

IIRC Lichess uses string.format for the substitution parameters, so %2$s commented %1$s should work.

I've just seen translationwiki but I'm not sure if it integrates as well into the site itself for crowdsourcing.

Unihedro commented 8 years ago

Transifex seems to be really good. It support multiline translations, named parameters, built-in support for translation instructions (kind of like the translation contexts we have) and tagging translation keys. It also has a better form of voting than duckduckgo and isn't hard to use:

image

ornicar commented 8 years ago

:+1:

niklasf commented 7 years ago

There's been a lot of progress using https://crowdin.com/project/lichess.

Issues:

My personal wishlist for client side translation would be: