LWN.net Logo

A report from OSCON 2007

A report from OSCON 2007

Posted Aug 3, 2007 7:36 UTC (Fri) by tzafrir (subscriber, #11501)
In reply to: A report from OSCON 2007 by joey
Parent article: A report from OSCON 2007

Actually the help message is surely somethng that needs translation. Hence there is a point in looking at LC_MESSAGES for the translation just for running cat --help .

Error messages cat spits out in case it can't find your file can also be translated.


(Log in to post comments)

A report from OSCON 2007

Posted Aug 3, 2007 17:56 UTC (Fri) by ajross (subscriber, #4563) [Link]

strace -eopen cat /dev/null

It reads the (non-existent) locale files even when no output is generated.

A report from OSCON 2007

Posted Aug 4, 2007 12:10 UTC (Sat) by tzafrir (subscriber, #11501) [Link]

right, so you want to complicate the code of every program:

if(open failed) {
get_translations();
error message
}

print_help_message(){
get_translations();
help message
}

A report from OSCON 2007

Posted Aug 4, 2007 20:36 UTC (Sat) by madscientist (subscriber, #16861) [Link]

That's not required. Every time a program needs to translate a message, it calls a function to do the translation. It should not be too difficult to modify the code for "lazy evaluation", where the locale catalog is not set up until the first time a message needs to be translated, and hide this inside the i18n libraries.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds