Open GoogleCodeExporter opened 9 years ago
Automatic translations of other locales of an "exploration" when one locale is
edited is definitely not feasible. First, they will mostly be incorrect,
putting the wrong meaning in front of users just as they're trying to learn
something properly. A second issue is that the editors of the other locales
will update to fix the bad text update, causing automatic translations to
ripple back to the first locale and any others. It _is_ a novel variation of
the zombie infestation algorithm, but I vote against making it a feature ;)
There are two other fundamental things for me that argue against making the
explorations multi-locale. 1) a well-written educational resource should use
the most optimal, native/fluent writing it can. Handcuffing two or more editors
together whilst they make that is a big cost. 2) Don't different language zones
have different school systems and probably different levels of prerequisite
skills they can assume in the students? In these cases the dynamic lesson you
would write in Oppia would take different paths.
So overall I don't think 2 ~ 5 are feasible either.
I originally started writing this reply by saying Yes" to point 1, that is I
thought we should make the _platform_ software multilingual. And I'm keen to
mention that it should be made that way a.s.a.p. if it's to be done at all.
But as I was writing I did some cross-checking about the multilingual resource
system in appengine (+ webapp2 + jinja) and found that the "i18n" extension of
jinja is apparently a gettext lib wrapper
(http://www.gnu.org/software/gettext/). From experience I can say that's not a
good thing.
I'll do some more research and see if a non-gettext option is available. I
don't see why *.yaml can't be used as a resource database, for example.
Original comment by akira.kurogane@gmail.com
on 2 Mar 2014 at 7:29
If you want to see what the jinja i18n (based on gettext) method looks like
there's a very relevant appengine precedent:
https://code.google.com/p/course-builder/wiki/I18n.
Read the wiki page, and checkout that code and look at a *.po file in a
modules/i18n/resources/locale/<some-locale>/LC_MESSAGES/ subdir.
These are quite small *.po files. I guess they've made an effort to avoid text
in the GUI. That would be necessary to survive whilst using gettext. It's based
upon the idea that there is one canonical (human) language and lets developers
use the original language human text as the resource-lookup key. Strings such
as "open", "home" and "property" need to be several different translations in
different contexts. So the gettext() substitutions for those becomes the right
translation in some spots of the GUI and are incorrect ones in others. You'd
have to confirm with them, but the course-builder developers seem to have
avoided this issue so far due to the small number of resources they've used.
Instead the lookup key should be something more unique and lexically
descriptive, e.g. "open.command" v.s. "open.adj.header". We could use gettext()
like that, but then every contributor has to learn Oppia does it that whilst
most gettext-using apps don't.
Also the last time I used a gettext system the *.po resource-file building
system was a big hassle to deal with.
Original comment by akira.kurogane@gmail.com
on 2 Mar 2014 at 7:55
I didn't find any non-gettext alternatives with appengine / python. So far as
python goes I guess this might be because it's standard libs only include a
wrapper for gettext and a wrapper for accessing the OS's locale info.
Original comment by akira.kurogane@gmail.com
on 2 Mar 2014 at 12:30
Updating with further thoughts from Akira (sent via email):
The angular-translate project:
http://pascalprecht.github.io/angular-translate/
looks quite sensible to me. The working demo I used is:
http://jsfiddle.net/PascalPrecht/eUGWJ/3/.
I quite like the fact that they use the convention of a non-human-language
string resource lookup key (e.g. "INTRO_TO_FOO.HEADER_1") instead of an
(invariably) english language string. This will make the errors obvious so
quickly when they happen.
Also Oppia UI developers who need to look up how the i18n works will soon find
and understand this angular module's documentation.
So I think it's the best option I've seen, better than the gettext() way. I
would choose this way to i18nize the platform.
Original comment by s...@seanlip.org
on 16 Mar 2014 at 10:09
Issue 143 has been merged into this issue.
Original comment by s...@seanlip.org
on 21 Mar 2014 at 9:18
we are trying to translate the platform strings to Chinese, if there are any
suggestions. Please telle me about how to finish it expectively.
Original comment by newhuma...@gmail.com
on 22 Mar 2014 at 2:30
Unfortunately, I'm afraid that there is no straightforward system for doing
this yet, and it will be necessary to design and build one. (The difficulty
with simply taking the HTML files and translating them, or doing any other
changes only to a fork of this codebase and not the main Oppia codebase, is
that updates to the main Oppia branch will break your version, and this is
going to end up being a maintenance nightmare.)
So, I think that a good first step is to find the UI strings in the template
files that need to be translated (for pages with small amounts of platform
text), and bring them into a common JavaScript object -- probably app.js or a
new file that's included in each page -- so that we can use angular-translate
(see Akira's email in #4 in this issue thread). Would you be willing to
contribute to the project by helping us with this? If so, please let us know
and I would be happy to explain how to go about this in more detail.
Thanks!
Original comment by s...@seanlip.org
on 23 Mar 2014 at 7:21
+Mili
Original comment by s...@google.com
on 9 Apr 2015 at 5:40
Original issue reported on code.google.com by
s...@seanlip.org
on 28 Feb 2014 at 4:50