[openstack-dev] [oslo] log message translations

CARVER, PAUL pc2929 at att.com
Mon Jan 27 20:12:34 UTC 2014


Jay Pipes wrote:

>Have you ever tried using Google Translate for anything more than very
>simple phrases?

>The results can be... well, interesting ;) And given the amount of
>technical terms used in these messages, I doubt GT or any automated
>translating service would provide a whole lot of value...

Exactly what I wasn't suggesting and why I wasn't suggesting it. I meant
an OpenStack specific translation service taking advantage of the work
that the translators have already done and any work they do in the future.

I haven't looked at any of the current translation code in any OpenStack
project, but I presume there's basically a one to one mapping of English
messages to each other available language (maybe with rearrangement
of parameters to account for differences in grammar?)

I'd be surprised and impressed if the translators are applying some sort
of context sensitivity such that a particular English string could end up
getting translated to multiple different strings depending on something
that isn't captured in the English log message.

So basically instead of doing the "search and replace" of the static text
of each message before writing to the logfile, write the message to
the log in English and then have a separate process (I proposed web
based, but it could be as simple as a CLI script) to "search and replace"
the English with the desired target language after the fact.

If there's still a concern about ambiguity where you couldn't identify the
correct translation based only on knowing the original English static
text, then maybe it would be worth assigning unique ID numbers
to every translatable message so that it can be mapped uniquely
to the corresponding message in the target language.




More information about the OpenStack-dev mailing list