[openstack-dev] [oslo] log message translations

Ben Nemec openstack at nemebean.com
Tue Jan 28 22:46:38 UTC 2014


On 2014-01-27 14:12, CARVER, PAUL wrote:
> 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.
> 

I see a number of technical hurdles to implementing such a thing, but in 
theory I think it would be possible.  The big issue I see is that if I'm 
debugging a problem on a server I want to be tailing the logs live, not 
waiting for all the logging to be complete and then dumping them into a 
tool to make them readable to me and trying to figure out which entries 
correspond to the operation I'm interested in.  Maybe in the real world 
it wouldn't be as much of a problem as I think, but it's not a workflow 
I expect people to be happy with.

-Ben



More information about the OpenStack-dev mailing list