Make bootscripts more POSIX compliant

Alexander E. Patrakov patrakov at ums.usu.ru
Tue Feb 20 00:56:08 PST 2007


Dan Nicholson wrote:
> On 2/20/07, Alexander E. Patrakov <patrakov at ums.usu.ru> wrote:
>> Dan Nicholson wrote:
>>
>>> How would an implementation of translated messages work in general? gettext?
>> Yes - but the use of $"Message to be translated" syntax requires
>> #!/bin/bash. The only difference from the original bootscript would be to
>> change the interpreter, add $ before every translatable string (in one case,
>> this requires making the string translatable), and add *.po files. Russian
>> and Spanish po files already exist for old bootscripts.
> 
> In the Advanced Bash Scripting Guide they seem to suggest using $"..."
> is deprecated and gettext should be used directly.
> 
> http://tldp.org/LDP/abs/html/localization.html

Yes - but Fedora still uses this old syntax.

> So, any localization might be best done in a portable manner anyway.

I will try this.

> That would require moving gettext to /bin, though.

No, because the required gconv libraries and locale data are in /usr anyway. 
Thus, there is no choice except falling back to untranslated English strings 
until /usr is mounted. So, the functions file should define the gettext 
function that functions like echo, if /usr/bin/gettext is missing.

-- 
Alexander E. Patrakov



More information about the lfs-dev mailing list