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 ^^

jerone commented 10 years ago

I'm willing to help out with the Dutch translation, when the site has a more finished design.

As for the translation tool, I love how easy https://www.transifex.com works.

JasonBarnabe commented 10 years ago

Definitely technically doable, but depends mostly on people willing to contribute. And @jerone is right, it's better to have things more finalized first.

jixunmoe commented 10 years ago

Thanks for the comment, waiting for the day it finishes :+1:

Edit: Client side userscript for Chinese Translation

Owyn commented 10 years ago

ask me for Russian translation when you decide to implement it :+1:

tobbexiv commented 10 years ago

Slap me for German translation if possibility for multilanguage support is ready.

JasonBarnabe commented 10 years ago

I've added preliminary support for internationalization (i18n).

Owyn commented 10 years ago

So, should we help with those locales?

ru: layouts: application:

link to the list of scripts

  script_list: "Скрипты"
  # link to the forum
  forum: "Форум"
  # link to the help docs
  help: "Помощь"
  # link to sign in
  sign_in: "Войти"
  # search placeholder
  search: "Поиск"
JasonBarnabe commented 10 years ago

https://greasyfork.org/ru

Right now it's for seeing what the process is for localization to see if we can make improvements, so yes, if you provide translations (and perhaps suggestions on the process) then you're helping.

JasonBarnabe commented 10 years ago

@jerone or anyone else with experience... How does Transifex or similar systems compare to editing the files on GitHub?

tobbexiv commented 10 years ago

With your last commit it might be clear what is the advantage of having a translation tool like transifex instead of editing the files manually. With such a tool, you change the english language file and upload it to the tool. Then the tool automatically compares the keys to the stored keys of other languages and gives translators the possibility to provide their translations. Afterwards you get the translated files from the tool and upload it to github. The tool automatically checks if all keys have been translated and shows the missing keys.

Without a tool like this, each translator has to check manually for the new keys. If he misses one loca commit, he misses keys that must be translated. So it is much more work to ensure that all keys are translated to all languages.

Also it is possible to set up a small webserver that automatically pushes changes on github to transifex and - if a language is translated 100% - also commits this language file to github. So all you have to do is committing the changes in the english translation to github and then wait for the translators to translate: http://docs.transifex.com/developer/integrations/github

JasonBarnabe commented 10 years ago

OK, let's try it. https://www.transifex.com/projects/p/greasy-fork/

I've added a bunch more strings to translate. I think I'm going to add them in bunches, so up to you if you want to translate as I do it or wait until I'm "done".

I also added a language picker on Greasy Fork in the top right.

jerone commented 10 years ago

@jerone or anyone else with experience... How does Transifex or similar systems compare to editing the files on GitHub?

@JasonBarnabe @tobias-engelmann explained it very clear :+1:

Owyn commented 10 years ago

transifex.com seems very handy, are there hotkeys in there? to save and to go to next entry to translate (textfield focused)?

tobbexiv commented 10 years ago

Yes there are hotkeys. One hotkey for switching to the next string is TAB (SHIFT + TAB is previous). All shortcuts can be found when clicking on the gear next to "Overview" and "Concordance Search" when you are in translation view.

Edit: TAB / SHIFT + TAB automatically saves the changes! If you want to swith without saving, use STRG + UP / DOWN

jixunmoe commented 10 years ago

Request: can you add me to zh-TW member as well? Thanks.

JasonBarnabe commented 10 years ago

Done. You can't do that yourself?

Maybe you guys should put the info for translators on the wiki. You are the ones who will be using it after all, so you'll know how it works.

jixunmoe commented 10 years ago

It only lets join one automatically, I don't know why... Thanks, I'll continue tomorrow >.>

JasonBarnabe commented 10 years ago

When you guys signed up, did it only let you pick from de, nl, ru, zh-CN, and zh-TW, or did it let you pick any language?

jerone commented 10 years ago

When you guys signed up, did it only let you pick from de, nl, ru, zh-CN, and zh-TW, or did it let you pick any language?

To my understanding (have only used this tool as a translator), anyone can be a translator for an existing language. New languages has to be requested and the project coordinators (you) have to approve that new language.

tobbexiv commented 10 years ago

Wiki page created: https://github.com/JasonBarnabe/greasyfork/wiki/Internationalization:-How-to-help%3F Suggestions / Improvements are welcome :D

Also I found a thing that doesn't look that nice when translated. In the script info, the strings for "Daily installs", "Total installs" and "Updated" are too long and therfore in two rows when being translated to Dutch, German or Russian. Maybe it is possible to give the #script-stats dt a width: 11em; instead of width: 8em; to set them to one line again. If you don't want to do so, there should be another change to make clear where the next information starts ;)

l1nus commented 10 years ago

if it is transifex, I can give a hand on Indonesian translation :)

JasonBarnabe commented 10 years ago

Good job @tobias-engelmann, I will make some minor edits but this is pretty much what I wanted.

Yes, @l1nus, that would be helpful. I've added Indonesian as an available language.

l1nus commented 10 years ago

It's already pass midnight (GMT +7), I'll give it a try ASAP. Thx for your response :)

JasonBarnabe commented 10 years ago

https://greasyfork.org/id

JasonBarnabe commented 10 years ago

I made changes and renamed the doc to https://github.com/JasonBarnabe/greasyfork/wiki/Translating-Greasy-Fork

JasonBarnabe commented 10 years ago

In the Indonesian locale, it looks like %{} was changed to %(), which results in stuff like https://greasyfork.org/id/scripts/407-wm-common-library

Owyn commented 10 years ago

can we get notices when there are more strings needed to translate appears?

JasonBarnabe commented 10 years ago

Doesn't "Watch project" do that?

jerone commented 10 years ago

Doesn't "Watch project" do that?

Yes

tobbexiv commented 10 years ago

Transifex allows users to follow projects they help translating and watch them for any updates.

When watching a project, you will receive email notifications, whenever the files of the project are updated and there is translation work to be done:

Owyn commented 10 years ago

So there isn't a way just to watch one language translation for new strings to translate?

I mean "Watch project" is a big button which would send me a lot of notifications I won't need, no?

tobbexiv commented 10 years ago

No. I only received mails for changes on the English file - that there are new keys to translate. No other files.

l1nus commented 10 years ago

@JasonBarnabe change ( to { accordingly Indonesian locale

JasonBarnabe commented 10 years ago

Looks like the stuff I commit is refreshed on Transifex at around UTC 09:30.

JasonBarnabe commented 10 years ago

Announced at https://greasyfork.org/forum/discussion/582/translate-greasy-fork

JasonBarnabe commented 10 years ago

For the user views (sign in, edit, etc.), the project https://github.com/mcasimir/devise-i18n-views looks like it would provide the translations, but it's a little behind and needs https://github.com/mcasimir/devise-i18n-views/pull/41 and https://github.com/mcasimir/devise-i18n-views/pull/48 . I've pinged @mcasimir about it, but if there's no response I think I can manage by myself.

mcasimir commented 10 years ago

Hi, i could add you as a maintainer for devise i18n views and let you push gem releases somehow if you wish. Anyway i’m going to merge PR right now since after a lot of time I working with rails again.


Maurizio Casimirri

cell: +39 3291539153 mail: maurizio.cas@gmail.com pec: maurizio.casimirri@pec.it

P.IVA 01764070676

Il giorno 27/giu/2014, alle ore 04:33, Jason Barnabe notifications@github.com ha scritto:

For the user views (sign in, edit, etc.), the project https://github.com/mcasimir/devise-i18n-views looks like it would provide the translations, but it's a little behind and needs mcasimir/devise-i18n-views#41 and mcasimir/devise-i18n-views#48 . I've pinged @mcasimir about it, but if there's no response I think I can manage by myself.

— Reply to this email directly or view it on GitHub.

Owyn commented 10 years ago

I see a lot of duplicate strings to translate:

Daily installs
Daily installs

Total installs
Total installs
tobbexiv commented 10 years ago

They seem to be the same, but are used in an different context. So there is three times Daily Installs and every time I used a different translation in German as the context was different and so I had to use different translations:

First meaning: Installations today Second meaning: Installations per day (as heading for a diagram) Third meaning: Installations today

Even if the first and the third meaning are the same in English, it is more likely to translate the Second and Third meaning more similar.

So with all those different languages supported, it is not possible to say "this has the same meaning in all languages". Except for those keys that are used for the exactly same thin in different views (like the first key on the detail and script overview page).

JasonBarnabe commented 10 years ago

@Owyn, it is exactly as @tobias-engelmann describes. I'm trying to be wary as I know different languages can act completely differently: the same words in English can be different, the order may change, pluralization is not always just "1 or many"... If anyone sees something that doesn't make sense for their language, let me know and I can rework it.

JasonBarnabe commented 10 years ago

@mcasimir you can add me, of course Devise i18n is not my main interest, but I'll help when I can.

Owyn commented 10 years ago

@JasonBarnabe how long does it take for a translation to go live? I mean now when we transalte things and duplicate english strings especially we have absolutely no idea where would those appear, and to write other "order of words" or "pluralization" we need to know that.

JasonBarnabe commented 10 years ago

Translations go live when I manually update them. I've been checking a couple times a day.

Do you guys not see in Transifex the comments I put in the files? That generally describes what the strings are for and where they are.

JasonBarnabe commented 10 years ago

In the latest commit, there's a string that may change based on the number of scripts it's for:

https://github.com/JasonBarnabe/greasyfork/blob/c6063256c182bad73e5256aa3d702824a78a3d94/config/locales/en.yml#L38

Other languages may need additional keys based on their pluralization rules (see http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html). I'm not sure how Transifex will handle this.

mcasimir commented 10 years ago

@JasonBarnabe i've added you. Do you have a rubygems account? I could add you as Gem owner also.

JasonBarnabe commented 10 years ago

Yes, it's JasonBarnabe.

tobbexiv commented 10 years ago

Do you guys not see in Transifex the comments I put in the files? That generally describes what the strings are for and where they are.

We can see them. They are shown directly beneath the field for your translation. If I find some time, I'll add a description to the FAQ.

Owyn commented 10 years ago

It won't let me save the translation of: See %{count} other scripts for %{site} to Посмотреть %{count} других скриптов для %{site}

says Fill in all plurals to continue

jerone commented 10 years ago

It won't let me save the translation of: See %{count} other scripts for %{site}

There are two translations needed, one for single and one for plurals. See the button one and other.

JasonBarnabe commented 10 years ago

Russian is one example from this where it's not just "one" or "other", but also "few" and "many". If the Russian translation needs "few" and I didn't have that as a key, does Transifex let you add it?