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

Re: [RFR] Major localechooser revamp



Quoting Frans Pop (elendil@planet.nl):
> Hi,
> 
> This weekend has been rather dedicated to localechooser. Although there's 
> more in the pipeline, I think these changes are ready to be committed.

I really welcome this.

localechooser suffers from a very long time of being:

-basically a merge of languagechooser and countrychooser, both being
 initially a split of a locale-based language choice system
 Most parts of the coding was done by /me with Colin and Frans
 improving things here and there but not dramatically changing
 the code strucutre. So that was spaghetti code

-not scalable. Each minor change had to be carefully tested and
 generally introduced regressions.


> * Bring main code under state engine to allow backup to earlier questions
> 
>   This is the main change. It means that it now possible to back up between
>   questions within localechooser.

Great enhancement. I guess this also makes the code easier to enhance.

> * Make sure language list is displayed correctly
> * Factor out new function refine_locale

Great. That part was one of the messiest parts..:-)

> * Clean up languagemap script
> * Display message when language switch is no longer possible
> 
>   This is implemented, but disabled because there seems to be a bug in the
>   way cdebconfs sets the translations-dropped template.

Long-awaited change that could allow us to drop translations at some
moment for the installer. This is good the the overall scalability.


> 
> * Move explanation of different display levels to the README
> * Merge languagelist and languagelist.l10n
> 
>   It seemed to me there was very little point in maintaining two separate
>   lists for this. Values not needed inside D-I are filtered out by d/rules.


Yes, that was historical stuff.

> 
> * Identify languages by language code instead of language name
> 
>   This is a major technical change. I've added a Choices-C field that
>   contains the language code (including country for pt_BR and zh_*).
>   The functions locale2langname and locale2langcode have been dropped.
>   This change simplifies localechooser a lot and makes some additional
>   changes I'm considering possible.

Here also, identifying languages by language names was historical. It
is good that you changed this.


> * Fix mistake in sort order in languagelist
> * Build language list for the current display level at runtime (#365307)
> 
>   Again a major technical change. It means we no longer have 4 different
>   templates with different language lists for different frontends, but
>   instead a single (gzipped) file with all data needed to build the
>   different lists at runtime. Disadvantage is that it takes a little bit
>   longer before the first localechooser dialog is displayed.

Also, that part of the code was messy ans basically an inheritance of
days here we introduced the graphical installer. My code and something
that was suboptimal.

> In addition to the changes listed above I have prepared one other change 
> that needs a bit more work and for which I'd appreciate comments.
> This is the addition of warnings when translations are incomplete, based on 
> the translation statistics from the new sublevels and using data from the 
> script scripts/l10n/calc-translation-stats. I've distinguished five levels 
> of "incompleteness" with (hopefully) appropriate warnings.
> Please have a look at the attached patch. 

Frans and I discussed this option when the sublevels were introduced
and I really welcome this.


General summary: I'd say "go for it". I'm not sure I really can (and
want) review all changes. Some might introduced regressions, I don't
know, but I think that the benefit is enough for Frans changes to be
applied as is.

So, I'll just review templates.

> +Template: localechooser/translation/incomplete
> +Type: boolean
> +Default: false
> +Description: Continue the installation in the selected language?
> + The translation for the language you selected is incomplete.

The installer is incompletely translated for the language you selected

Rationale: say that the translation we're talking about is D-I translation


> + .
> + This means that there is a significant chance that some dialogs will be
> + displayed in a different language, in most cases in English.
> + .
> + Unless you have a good understanding of the alternative language,
> + you are recommended to either select a different language or abort
> + the installation.

Fine by me.

> +Template: localechooser/translation/normal_ok
> +Type: boolean
> +Default: false
> +Description: Continue the installation in the selected language?
> + The translation for the language you selected is incomplete.
> + .
> + If you do anything other than a purely default installation, there is a
> + real chance that some dialogs will be displayed in a different language,
> + in most cases in English.
> + .
> + Unless you have a good understanding of the alternative language,
> + you are recommended to either select a different language or abort
> + the installation.
> +
> +Template: localechooser/translation/partial
> +Type: boolean
> +Default: false
> +Description: Continue the installation in the selected language?
> + The translation for the language you selected is not fully complete.
> + .
> + If you continue the installation in the selected language, most dialogs
> + should be displayed correctly but - especially if you use the more
> + advanced options of the installer - some may be displayed in a different
> + language, in most cases in English.
> + .
> + If you chose not to continue, you will be given the option of selecting
> + a different language, or you can abort the installation.


Fine

> +
> +Template: localechooser/translation/mostly
> +Type: boolean
> +Default: true
> +Description: Continue the installation in the selected language?
> + The translation for the language you selected is not fully complete.
> + .
> + If you continue the installation in the selected language, dialogs
> + should normally be displayed correctly but - especially if you use the
> + more advanced options of the installer - there is a slight chance some
> + may be displayed in a different language, in most cases in English.


Fine. I guess that the absence of the final paragraph is on purpose:
we don't really want to discourage users to choose that language
anyway, right?

> +
> +Template: localechooser/translation/exceptions
> +Type: boolean
> +Default: true
> +Description: Continue the installation in the selected language?
> + The translation for the language you selected is not fully complete.
> + .
> + The chance that you will actually encounter a dialog that is not
> + translated into the selected language is extremely small, but it cannot
> + be ruled out completely.
> +

Fine



Frans, I'm really amazed by this work and I want to take this occasion
to thank you for stepping back in D-I development the way you did in
last months.




Attachment: signature.asc
Description: Digital signature


Reply to: