[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [HELP]: apt-setup/tzsetup l10n idea



Kenshi Muto wrote:
> I'm trying better l10n (localization) around base-config (mainly
> apt-setup, tzsetup).
> 
> I wrote a patch Bug#233995 against apt-setup.
> This patch provides to get country list from iso-codes (if iso-codes
> doesn't exist, apt-setup simply shows in English).
> 
> I have a question.
> 
> 1. Everyone, do you accept to install iso-codes for all environment?
>    iso-codes needs around 2Mbytes. For better l10n, iso-codes is
>    really good database. But for native English users, this looks just
>    big disk eater.

We could also install it only for non-English. I have no particular
opinion.

> I'm looking tzsetup, but it seems more challenging...
> tzsetup needs l10nize for city list (area list is already l10nized by
> tzsetup itself).
> 
> tzsetup.templates shows:
> 
> Template: tzconfig/select_zone
> Type: select
> Choices: ${choices}
> Description: ...
> 
> This means if I simply l10nize choices, $RET value from this debconf
> is l10nized string. This is not useful for tzsetup routine.

First of all, note that that is only displayed if the user breaks out of
the simplified time zone selector to the full list. The simplified time
zone selector uses gettext to internationalise the choices, but
currently no po file is constructed for that, so it cannot be
translated.

        for line in $(grep -i "^$code$TAB" /usr/share/zoneinfo/zone.tab); do
                zone=$(echo "$line" | cut -d "$TAB" -f 3)
                comment=$(echo "$line" | cut -d "$TAB" -f 4 | sed "s/, /; /g")
                # Mangle the time zone for display.
                if [ -z "$comment" ]; then
                        choice="$zone"
                else
                        choice="$zone ($comment)"
                fi
                # This gettext is freaky, since the text is
                # completly dynamic. To construct the po file entries
                # for this, extract all the time zones and comments 
                # from zone.tab and mangle the same way it's done above.
                choice=$(gettext "$choice")
                echo "$choice$TAB$zone" >> "$ZONEMAPPING"


-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: