Transifex and LINGUAS files

Brian J. Tarricone brian at tarricone.org
Tue Aug 18 11:33:57 CEST 2009


On 08/18/2009 01:03 AM, Mike Massonnet wrote:
> 2009/8/18 Brian J. Tarricone <brian at tarricone.org>:
>> On 08/17/2009 04:24 PM, Jannis Pohlmann wrote:
>>> On Tue, 18 Aug 2009 00:54:33 +0200
>>> Mike Massonnet <mmassonnet at gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> When a new translation is submitted with the Transifex form, the
>>>> LINGUAS file is not updated automatically. That's a problem that needs
>>>> to be solved...
>>> I'd vote for dropping the LINGUAS file and instead substituting
>>> @LINGUAS@ in configure.{ac,in.in} with something like this:
>>>
>>>   LINGUAS=$(ls po/*.po | awk 'BEGIN { FS="[./]" } { print $2 }')
>>>   sed -i -e "s;@LINGUAS@;$LINGUAS;g" configure.in.in
>> Fine by me.
> 
> This works for me:
> 
> ls po/*.po | awk 'BEGIN {FS="[./]"} {print $2}' | tr "\n" " "
> 
> The tr makes sure they are in one line, otherwise the sed
> linguas/$linguas fails because it is split in several lines without
> being backspaced. Now if you know a way to do the same tr in awk it's
> welcome ;-)

Sure:

ls po/*.po 2>/dev/null | awk 'BEGIN { FS="[./]"; ORS=" " } { print $2 }'

The 2>/dev/null is to hide errors when there aren't any .po files, like
when we have a new module.  Not necessary, since stderr won't get passed
to the pipe otherwise, but it's neater.

Alternatively, we could use "find po -name '*.po' | sort | ...", but ls
is fine.

	-brian



More information about the Xfce4-dev mailing list