FS#10425 - add i18n (gettext) support to installer
Attached to Project:
Release Engineering
Opened by 甘露(Lu Gan) (ganlu) - Friday, 16 May 2008, 05:46 GMT
Last edited by Gerhard Brauer (GerBra) - Thursday, 30 July 2009, 06:47 GMT
Opened by 甘露(Lu Gan) (ganlu) - Friday, 16 May 2008, 05:46 GMT
Last edited by Gerhard Brauer (GerBra) - Thursday, 30 July 2009, 06:47 GMT
|
Details
Description:
Currently there is no way to translate our installer, which potentially prevents Archlinux from adopting in foreign (non English spoken) country. Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: |
This task depends upon
Closed by Gerhard Brauer (GerBra)
Thursday, 30 July 2009, 06:47 GMT
Reason for closing: Won't implement
Thursday, 30 July 2009, 06:47 GMT
Reason for closing: Won't implement
This is not a bug but a feature request ...
2. The x,y coordinates of the dialog boxes are currently hardcoded. Since the translation will cause change
in the string length, it will cause the dialog text to go off-center.
If #1 could be done, then I would change the functions dodialog and msg and incorporate
gettext into them, so that I wouldn't have to go on putting gettext at every
invocation of dodialog/msg.
#echo items 1 through 3
$ echo ${foo[@]:1:3}
b c d
#And more complex!
#echo items 1 through length-1
$ echo ${foo[@]:1:$((${#foo[@]} - 1))}
b c d e f g h i
I found that directly modifying dodialog could lead to problems later on... so
I added a new function i18n() which works in a manner similar to error() in makepkg
Also I changed the msg() function so that it called i18n, so I didn't have change much
of the msg invocations.
I've attached the patch against the latest HEAD of installer.git
I'll look at it closely later to see if there are any typos that might have creeped in.
Since it's an installer, a typo here could be disastrous :)
I don't know how I can test this other than to build an ISO with this /arch/setup file
and do a install. Is there any other way of testing whether it works properly?
Removing from 2008.06 blockers.
When this patch is applied, how do we generate the base po files for translations? I had an email today regarding Chinese translations, so I'd like to be able to send off something to see if people could begin translating things.
Cheers,
Aaron
Try:
xgettext -L Shell setup
It will generate a messages.po file. You can rename it to messages.pot.
BTW: if we enable translations for the installer, does that mean we do it for all other Arch tools too?
In my point of view, all tools could stay in English. I would recommend everyone would at least get a basic notion of English, but I'm okay with having *documentation* in other languages (but all tools still in English)
If you translate one tool, you probably should translate other tools too. (and I think all of that would be too complicated)
I see no need to translate these into other languages. Our clientele should be able to read enough English to perform the installation.
If one will see this absolutely as a feature a new request should be filed to aif..