Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing locales and locale-gen? #2

Closed
Andy2244 opened this issue Dec 31, 2017 · 15 comments
Closed

missing locales and locale-gen? #2

Andy2244 opened this issue Dec 31, 2017 · 15 comments

Comments

@Andy2244
Copy link

I'm getting some errors/warnings regarding missing locales like:
smbd dos charset 'CP850' unavailable - using ASCII
cockpit invalid or unusable locale: en_DE.UTF-8

I guess this could be solved via locale-gen, but its missing from clearlinux?

@ahkok
Copy link
Contributor

ahkok commented Jan 10, 2018

en_DE is pertinently incorrect though, there's no such thing as german english.

I'm not yet sure what needs to be done to be able to get more locales though, yet.

@fenrus75
Copy link
Contributor

fenrus75 commented Jan 10, 2018 via email

@Andy2244
Copy link
Author

Supposedly its fixed this way:
fix

The problem is that from windows en_DE is valid, aka english language and german date/time format. The fix uses locale-gen/localedef to generate and remap, which i cant find in clearlinux.

@iphutch
Copy link
Contributor

iphutch commented Apr 30, 2018

@matthewrsj can you look into adding localedef

@matthewrsj
Copy link

/usr/bin/localedef is already provided by both the c-basic and os-core-dev bundles.

@phmccarty
Copy link
Contributor

@matthewrsj is correct. The localedef program is provided by two bundles, as discovered by running sudo swupd search /usr/bin/localedef.

@Andy2244 There are many locales you can define, but of out the box, the only defined locale is en_US.UTF-8. I recommend to define the locales you need using localedef, and set them using localectl set-locale ...

@phmccarty
Copy link
Contributor

phmccarty commented Apr 30, 2018

After further tests, localectl set-locale ... appears buggy, so you can modify /etc/locale.conf directly instead. For example, here's how you can define and set the fr_FR.UTF-8 locale:

sudo localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
sudo sh -c 'echo LANG="fr_FR.UTF-8" > /etc/locale.conf'

For settings to take effect, log out and log back in.

@ahkok
Copy link
Contributor

ahkok commented Apr 30, 2018

Is this something we need to include in a more logical bundle? like, sysadmin-basic ? Having it in c-basic and os-core-dev is missing the point I think

@phmccarty
Copy link
Contributor

Also, for reference, the available locale data from glibc are stored in /usr/share/i18n/locales/. You'll see that en_DE is not present, so trying to localedef -i en_DE ... does not work.

However, you are always free to create locale data for en_DE, and then define a new locale using that data:

  1. Copy a locale data file from /usr/share/i18n/locales to use as a starting point for your new locale. You can store it anywhere, e.g. /usr/local/share/en_DE.
  2. Modify /usr/local/share/en_DE as needed.
  3. Run localedef -i /usr/local/share/en_DE -f UTF-8 en_DE.UTF-8
  4. Set LANG=en_DE.UTF-8 in /etc/locale.conf
  5. Log out / log back in

@Andy2244
Copy link
Author

Andy2244 commented Apr 30, 2018

Having it in c-basic and os-core-dev is missing the point I think

yeah that's really "strange"

I never had this particular problem on any of the "big" linux distro, so something seems off regarding clear-linux.

@matthewrsj
Copy link

@ahkok localedef is provided by glibcwhich is why it is in those particular bundles. Do we want to add glibc to sysadmin-basic? Seems like a weird fit. Maybe a new locale-focused bundle?

@bryteise
Copy link
Member

bryteise commented Apr 30, 2018

Well it sits in glibc-locale currently (per the spec). It has a note mentioning spit on the section though. I'm pretty happy to add glibc-locale to sysadmin-basic. @phmccarty do you think opening an issue for localectl would make sense too?

@Andy2244
Copy link
Author

Andy2244 commented May 1, 2018

Oki as noticed "en_DE.UTF-8" does not exist in the default linux world, strangely enough most distro's with a GUI setup, let me setup English language and German formats/time, similar to what Windows does.

So i just did localedef -i en_DK -f UTF-8 en_DE.UTF-8, since DK formats are similar and exists.

I'm closing this, since it seems linux in general deems it "strange" that this combination exists, while windows does not. So its not the fault of clear-linux, however "locale-gen/localedef" should exist in the same basic admin/locales package, both handle advanced locales.

@Andy2244 Andy2244 closed this as completed May 1, 2018
@phmccarty
Copy link
Contributor

phmccarty commented May 2, 2018

As of the 22210 release, localedef is now present in the sysadmin-basic bundle, along with all of the locale data from /usr/share/i18n/.

@ahkok
Copy link
Contributor

ahkok commented May 4, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants