1

While in /usr/share/i18n/locales I execute the following (the first line is because I do not want en_US to be messed up):

cp ./en_US ./en_SN
sudo localedef -i en_SN -f UTF-8 -vc ./en_SN.UTF-8

The output is as follows (after two or three seconds):

[warning] LC_NAME: field `name_gen' not defined
[verbose] LC_CTYPE: table for class "upper": 18446744073709551615 bytes
[verbose] LC_CTYPE: table for class "lower": 18446744073709551615 bytes
[verbose] LC_CTYPE: table for class "alpha": 18446744073709551615 bytes
[verbose] LC_CTYPE: table for class "digit": 18446744073709551615 bytes
[verbose] LC_CTYPE: table for class "xdigit": 18446744073709551615 bytes
[verbose] LC_CTYPE: table for class "space": 2551210574417 bytes
[verbose] LC_CTYPE: table for class "print": 2645699854951 bytes
[verbose] LC_CTYPE: table for class "graph": 18446744069414584944 bytes
[verbose] LC_CTYPE: table for class "blank": 18446744073709551615 bytes
[verbose] LC_CTYPE: table for class "cntrl": 18446744073709551615 bytes
[verbose] LC_CTYPE: table for class "punct": 18446744069414584981 bytes
[verbose] LC_CTYPE: table for class "alnum": 18446744073709551615 bytes
[verbose] LC_CTYPE: table for class "combining": 2856153252504 bytes
[verbose] LC_CTYPE: table for class "combining_level3": 273 bytes
[verbose] LC_CTYPE: table for map "toupper": 16777334 bytes
[verbose] LC_CTYPE: table for map "tolower": 0 bytes
[verbose] LC_CTYPE: table for map "totitle": 0 bytes
[verbose] LC_CTYPE: table for width: 0 bytes

The directory en_SN.UTF-8 is created, though. The OS is Lubuntu 20.04 64-bit. I spent a lot of time browsing through various threads of different forums. In the end it is always either «I gave up on this» or «The problems is somehow gone» (my favourite!) or it is something I do not understand because it is close, but not exactly my case (needless to say, I have tried anyway, no dice). Any suggestions will be appreciated.


Addition: Per request by @Marcus Müller (seems to be quite a resonable one) I need to add that the compilation ends without error messages, but the new locale does not appear in the locale list of LXQt Locale configuration dialogue upon rebooting. Also, it is mentioned in some threads (I can't find them again now, but those are not really old ones, some thing like a couple of years old that locale compilation normally takes place longer than 2-3 seconds which makes me suspect the compilation process ends prematurely).

S. N.
  • 287
  • neither warnings nor verbose log messages are errors. So, does the locale you generated work? – Marcus Müller Mar 13 '24 at 12:26
  • @MarcusMüller Were it so, I would not ask ;-). Yes, there are no error messages, you are right, but the locale can not be used. For example, should I switch to LXQt Locale configuration dialogue (upon rebooting, not sure whether this step is needed, but I did it just in case), I don't see it in the list of available locales. Also, I read that locale compilation normally requires much more than 2-3 second. From that I draw conclusion the compilation ends prematurely. – S. N. Mar 13 '24 at 12:53
  • ah, but the locale not being found doesn't mean the generation failed; so your question is a bit of a "decoy". Can you edit your question and state all the things you're writing here. Aside: be careful inferring from the "generation should take longer", unless you know that whoever wrote that used a modern computer as fast as yours (most information you find on this is 20 to 35 years old). – Marcus Müller Mar 13 '24 at 12:59
  • @MarcusMüller I believe you are right, thank you for pointing at that, I did edits you requested. As for the threads I was referring to, I see your point, but no it was not something really archaic. Something two or three years old (it would be difficult for me to find them again, but those people seemed to understand what they were talking about, it just was not exactly my case). – S. N. Mar 13 '24 at 13:18
  • Since Unix-like systems are multi-user systems, execution times tell nothing of the success of the commands. As per localedef(1p) "EXIT STATUS" section, that command returns exit code 0 if it succeeded, 1 in the case of warnings (but with locales successfully generated), and >1 in the case of errors which prevented the generation of locales. You can test the exit status of the command with something like sudo localedef -i ...; if [ $? -gt 1 ]; then printf "Not generated!\n"; else printf "All OK\n"; fi – Vilinkameni Mar 14 '24 at 16:29

0 Answers0