Re: [Bashburn-info] Gettext support
Brought to you by:
bashburn
|
From: Markus K. <mar...@on...> - 2008-09-11 22:55:17
|
Anders Lindén wrote:
> tor 2008-09-11 klockan 10:11 -0400 skrev Steven W. Orr:
>
>> On Thursday, Sep 11th 2008 at 03:11 -0000, quoth Nick Warne:
>>
>> =>On Wed, 10 Sep 2008 22:30:05 -0400 (EDT)
>> =>"Steven W. Orr" <st...@sy...> wrote:
>> =>
>> =>> >From bash however, we are given an extra obstacle. There are two
>> =>> >printf's.
>> =>> One is the builtin inside bash:
>> =>>
>> =>> 1519 > printf 'number1 is %2$s, and number2 is %1$s.\n' number2,
>> =>> number1 bash: printf: `$': invalid format character
>> =>> number1 is 1520 >
>> =>>
>> =>> The other is the binary that's seperate from the builtin:
>> =>>
>> =>> 1520 > /usr/bin/printf 'number1 is %2$s, and number2 is %1$s.\n' \
>> =>> number2 number1
>> =>> number1 is /usr/bin/printf: %$: invalid directive
>> =>> 1521 >
>> =>>
>> =>> So we can see that they both don't work. Don't let that bother you.
>> =>> Just pretend that the functionality is really there. Worst case I can
>> =>> write a printf that does what we want. z.b.,
>> =>>
>> =>> awk 'BEGIN {printf "number1 is %2$s, and number2 is %1$s.\n",
>> =>> "number2", "number1"}'
>> =>> number1 is number1, and number2 is
>> =>> number2.
>> =>>
>> =>
>> =>I just found this:
>> =>
>> =>http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/localization.html
>> =>
>> =>I don't know if it helps here.
>>
>> Nick, you're so modest! This is officially sexy. :-)
>>
>>
> I agree. This is awesome.
>
> A question for you guys. Do you think we should release 3.0 before or
> after we have gettextified BashBurn? I'm thinking that this translation
> might take a while and so it will be quite some time before a new
> version is released.
> On the other hand we want 3.0 to be as good as it can get, and this new
> translation system would make our baby kick ass.
>
> So what do you think? Stabilize what we have now and wait with the new
> translation system for 3.1, or wait with a release until the translation
> system is in place and then release 3.0?
>
> I'm leaning towards waiting but I'd like to hear your opinions as well.
>
>
Yes Nick, this is better then every "hello_world" or "Hallo_Welt" script
I could make (because even the gettext maintainer gives his comments). ;-)
This is a good question Anders.
I personally think (like Nick), we should improve bashburn with the old
translation system to get a working system.
There are many things that have to be done - even after the great work
that already has been done.
Then like Nick said, we need time to test and fix errors. After that we
could release "bashburn 3.0".
And version 3.1 or so could be the one with gettext (since we and the
translators first must be familiar with the gettext system).
gettext short summary:
Yes the gettext system for bash has mainly 3 steps.
The existing SOURCE_FILE (bashburn) is source for:
1. SOURCE.POT (bashburn)
2. SOURCE.PO (german), SOURCE.PO (lang_xy), ...
3. SOURCE.MO (german), SOURCE.MO (lang_xy), ...
I' m currently working on a simple makefile/infrastructure where we can
generate this files automatically (e.g. by calling "make mo") for a
little gettext translation system.
But I think it is not usefull to check it into the current bashburn
branch in. Is this the moment we should create a new branch or so, for
the bashburn version 3.1?
So one part can work on the current version 3.0, and parallel we have
the future version 3.1 with gettext support.
Markus
|