Comment 1 for bug 1560577

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Well, after having looked at the /usr/sbin/locale-gen script and done some further testing, I see that not *all* arguments are ignored. The synopsis seems to be:

locale-gen [[--keep-existing] LANGUAGE]

where LANGUAGE is the name of a file in /var/lib/locales/supported.d. (If you state multiple LANGUAGE arguments, only the last is recognized.) The --keep-existing option prevents purging of previously generated locales.

So basically you can

* Purge all existing locales and generate all locales in
  /var/lib/locales/supported.d

  sudo locale-gen

* Purge all existing locales and generate the locales of *one* file
  in /var/lib/locales/supported.d

  sudo locale-gen LANGUAGE

* [Re-]generate the locales of *one* file in
  /var/lib/locales/supported.d language-pack without purging

  sudo locale-gen --keep-existing LANGUAGE

This is quite different compared to the way the old locale-gen worked.

* All locales are purged by default

* No simple way to generate locales included in SUPPORTED in addition
  to the locales belonging to installed language packs.

* The man page is pretty useless.

I fear that this will result in a lot user confusion. Possibly there is some point with the new behavior, but at this time I fail to see it. In any case the change should be accompanied by some proper documentation.

I would suggest that we use the old locale-gen script (and the related man page) in 16.04. Then, post Xenial, we could consider more thoroughly what to do going forward.