greasyfork-org / greasyfork

An online repository of user scripts.
https://greasyfork.org
GNU General Public License v3.0
1.47k stars 441 forks source link

Add i18n #87

Closed jixunmoe closed 10 years ago

jixunmoe commented 10 years ago

As a feature request with low importance, thanks ^^

JasonBarnabe commented 10 years ago

http://support.transifex.com/customer/portal/articles/1070366-support-for-plurals

Transifex knows how many plural forms each language has and asks the translator to fill in all of them.

Does it?

jerone commented 10 years ago

Does it?

Yes. See https://github.com/JasonBarnabe/greasyfork/issues/87#issuecomment-47425523

JasonBarnabe commented 10 years ago

Yeah, but both English, Dutch, and the source file are all doing "one" vs "other". What I want to know is if it automatically asks for more (or less) for languages that need it, like Russian.

JasonBarnabe commented 10 years ago

I guess it does, considering the latest translation for Russian has one/few/other, while Chinese and Japanese just have other.

JasonBarnabe commented 10 years ago

@Owyn, there's still a problem with Russian. I'm getting

translation data {:one=>"Посмотреть %{count} другой скрипт для %{site}", :few=>"Посмотреть %{count} других скриптов для %{site}", :other=>"Посмотреть %{count} других скриптов для %{site}"} can not be used with :count => 9

Because I assume there's no "many" defined. See also http://support.transifex.com/customer/portal/questions/1438193-russian-plural-rules-incorrect

JasonBarnabe commented 10 years ago

Site will fallback to English if a key is missing, but not for this pluralization issue - see https://github.com/svenfuchs/i18n/issues/123

JasonBarnabe commented 10 years ago

And this prevents us from properly (not blowing up when) handling flawed translations: https://github.com/rails/rails/issues/13429

JasonBarnabe commented 10 years ago

@jerone

missing interpolation argument :plaats in "Zie %{count} andere scripts voor %{plaats}" ({:count=>15, :site=>"kingdomsofcamelot.com"} given)

Don't translate the keys :)

jerone commented 10 years ago

Don't translate the keys :)

Fixed

JasonBarnabe commented 10 years ago

I think the general process here is working. Keep an eye on Transifex and if you have any problems please create a new ticket.