Re: Translation ldm rc.d messages

Vagrant Cascadian <[email protected]>
Newsgroups gmane.linux.terminal-server.devel
Message-ID <[email protected]>
On Sat, Jan 24, 2009 at 12:51:01AM -0500, Stéphane Graber wrote:
> As you probably noticed based on the massive amount of commits caused by
> it, I updated the various translation files tonight.
> 
> My initial goal was to have all ldm rc.d scripts showing messages to the
> user (mainly ldm-dialog) to use gettext.
 
> But there is one main issue, we are using autotools to generate our
> Makefile that in turn generate the .pot by calling xgettext and a few
> other tools. The problem is that gettext relies on the file extensions
> to guess the language it has to parse and our rc.d scripts have no
> extensions making it to fail. So until this is fixed, we don't have
> translations for ldm rc.d scripts ....

evil. very evil.
 
> I see a few options there:
> 1) Find the magic fix that I didn't discover that would make all rc.d
> scripts to be parsed as shell script by xgettext.

well, in ltsp-trunk/po/Makefile it calls:

  $(shell xgettext -L Shell -o $(DOMAIN).pot $(GETTEXTFILES))

though i don't know how to make an autotools generated makefile do the same...

> 2) Rename our rc.d scripts to add the file extension .sh
> 
> I personally don't like 2) but if nobody knows of a better way, we'll
> have to do it that way as I really need ldm rc.d scripts to use gettext
> (my users need their dialogs translated in french)

i really dislike this idea, as we would have to change the code that handles
valid filenames. and leaving out '.' is used to prevent .old and .bak and such
from getting executed. it would be ugly to modify the code to allow '.sh' only,
and filename extensions are just kind of ugly anyways.
 
> Let's hope we have some autotools masters in the room :)

alternately, we stop using autotools for the generation of the .po and .pot
files. i would much prefer that to rewriting a bunch of code to handle file
extensions.

live well,
  vagrant

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_____________________________________________________________________
Ltsp-developer mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help,   try #ltsp channel on irc.freenode.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.