Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation of the mod-ui #30

Open
atilacamurca opened this issue May 28, 2015 · 7 comments
Open

Translation of the mod-ui #30

atilacamurca opened this issue May 28, 2015 · 7 comments

Comments

@atilacamurca
Copy link

What do you people suggest for a translation process, by wiki or by, let's say, a folder in the project like pt_BR/README?

I would like to contribute but before I want your opinion about that.

I'm from Brasil, I would like to translate for portuguese.

@odurc
Copy link
Contributor

odurc commented May 29, 2015

Hello Átila.

Thank you for your effort to try helping but I should say we've no plans to keep translations of the installing instructions in other languages than English.

@odurc odurc closed this as completed May 29, 2015
@atilacamurca
Copy link
Author

How about the UI itself, any plans to enable translation?

@odurc
Copy link
Contributor

odurc commented May 29, 2015

No plans as well. We probably should to use an internationalization framework/library before start doing translations. If you are interested to help, maybe you could validate or improve the text (in English) of the instructions. It would be very appreciated.

@atilacamurca
Copy link
Author

Great! I really miss some links and tips to help the install process.

@boomshop
Copy link
Contributor

It's quite easy to implement, no need for another lib. Use labels like
e.g.:

Setup language files (which can be loaded in whatever way) like e.g.:

languages/en.js


if (!dictionary)
dictionary = {}
dictionary["en"] = {
"whatever_expression" : "Whatever Expression"
}


And add a language selector in your application like e.g.:

this.default_language : "en";
this.set_language : function (lang) {
if (dictionary.hasOwnProperty(lang))
this.language = lang;
else
throw "Invalid language '" + lang + "'";
var def = this.default_language;
$("[lang]").each( function () {
var t = $(this);
var l = t.attr("lang");
t.text(dictionary[lang][l]
|| dictionary[def][l]
|| l);
});
}

Or: instead of throwing load the language asynchronously and call
this.set_language(lang) again.

To make things easy for translators:

$("[lang]").each( function () { $(this).text($(this).attr("lang")); });

Best, Markus.

Update: shall I add it to my branch these days?

@atilacamurca
Copy link
Author

There's a great lib for this called Jed.

Has a great documentation, it's similar to other known libraries (has _(value), support for plurals, etc).

I think it's worth to consider.

@odurc odurc reopened this May 30, 2015
@odurc odurc changed the title Translation of the install instructions Translation of the mod-ui May 30, 2015
@odurc
Copy link
Contributor

odurc commented May 30, 2015

Hey Markus. Better to ask @brunogola and @falkTX they are working in the mod-ui code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants