Page MenuHomePhabricator

Offer Korean Locales "ko_KR.euckr" and "ko_KR.utf8" on Tool Labs
Closed, ResolvedPublic

Description

Hi,
The following locales need to be installed because I am not able to use Korean characters properly.
I'd be grateful if you can install them.

ko_KR
ko_KR.euckr
ko_KR.utf8
korean
korean.euc

Thank you.

Event Timeline

What software/system are you using that needs these installed?

I am using a Perl script that I created for TedBot on ko-wiki.
However, in the current circumstance, I won't be able to directly type Korean characters on the shell prompt.

For example, some user accounts in Korean Wikipedia may include Korean characters.
It does not allow me to type something like this.

$ perl wiki.pl --botid=사용자이름 --password=XXXXXX

So you need locales installed on your local machine?

No, I am talking about the login.tools.wmflabs.org.
According to the output from "locale -a", I don't find any Korean-related charsets.

Okay, in future please say which system you are using instead of leaving everyone else to guess.

Thanks, Krenair.
From now on I will follow your advice before creating a task.

I can limit my request to the locales as follows:

  • ko_KR.euckr : cp949 and its extension are compatible with this charset. My application depends on this charset.
  • ko_KR.utf8 : For unicode compatibility.

Thank you.

Aklapper renamed this task from Korean Locale Installation to Offer Korean Locales "ko_KR.euckr" and "ko_KR.utf8" on Tool Labs.Mar 22 2016, 9:54 AM

How long will it take for my request to be processed?
Please let me know if you need any additional information.

Change 308439 had a related patch set uploaded (by Merlijn van Deen):
toollabs: install korean locales

https://gerrit.wikimedia.org/r/308439

Change 308439 merged by Dzahn:
toollabs: install korean locales

https://gerrit.wikimedia.org/r/308439

merged on prod puppetmaster, ran puppet on tools-exec-1401, tried to confirm that ko locales package is installed now, but not yet...

root@tools-exec-1401:~# puppet agent -tv
..
Info: Caching catalog for tools-exec-1401.tools.eqiad.wmflabs
Info: Applying configuration version '1481697626'
Notice: /Stage[main]/Toollabs::Exec_environ/Package[language-pack-ko]/ensure: ensure changed 'purged' to 'latest'

..

root@tools-exec-1401:~# dpkg -l | grep language-pack-k
ii  language-pack-ko                                            1:14.04+20160720                        all          translation updates for language Korean
ii  language-pack-ko-base                                       1:14.04+20160720                        all          translations for language Korean

@Ykhwong @Krenair I hope that helped ^ can you confirm?

Thanks for your help. ko_KR.utf8 could be found.
However, I still cannot find EUC-KR for my application. Could you consider to add it as well?

$ locale-gen ko_KR.EUC-KR
$ dpkg-reconfigure locales

I could generate it and then it appeared in the list of locales afterwards: Doesn't that solve it?

root@tools-exec-1401:~# locale-gen ko_KR.EUC-KR
Generating locales...
  ko_KR.EUC-KR... done
Generation complete.

root@tools-exec-1401:~# locale -a | grep ko
ko_KR.euckr
ko_KR.utf8

I've just opened a new session for testing, but I don't see the euckr when running locale -a.
Have you tried "dpkg-reconfigure locales" that I mentioned above after running the locale-gen?
That is because the locale-gen alone will not affect the environment globally without reboot, AFAIK.

Thanks again.

@Ykhwong i am on tools-exec-1401 , maybe it's because you are on another exec node / we have to generate them on multiple nodes?

Mentioned in SAL (#wikimedia-labs) [2016-12-14T18:43:02Z] <mutante> tools-bastion-03 - ran 'locale-gen ko_KR.EUC-KR' for T130532

@Ykhwong I think part of the confusion was i only looked at -exec nodes (because the patch we merged above installs them there), while you tested on -bastion node (tools-bastion-03 aka. login.tools.wmflabs.org) as you said earlier in the ticket.

What i did now was run "locale-gen ko_KR.EUC-KR" on tools-bastion-03, and now i see it in the output of "locale -a" there, please try again and tell me if it works for you now.

Sorry, but I still don't see the ko_KR.EUC-KR on the login.tools.wmflabs.org.

dzahn@tools-bastion-03:~$ sudo locale-gen ko_KR.EUC-KR
Generating locales...
  ko_KR.EUC-KR... done
Generation complete.
dzahn@tools-bastion-03:~$ locale -a | grep ko
ko_KR.euckr
ko_KR.utf8

^ I am a little confused why it wasn't done already, but i definitely see it in the list now after generating it.

Thank you, Dzahn. It's working fine now.
I appreciate your quick support.

@Ykhwong Glad to hear it works and i could help. I'm calling the ticket resolved then :)

Ykhwong removed a project: Cloud-Services.

I've recently noticed that Korean locales are missing.

tools.tedbot@tools-sgebastion-07:/data/project/tedbot /> locale -a | grep -i ko

When typing "locale -a", it outputs nothing.

@Dzahn Could you check the issue again, please? Thank you.

Mentioned in SAL (#wikimedia-operations) [2019-03-15T14:31:44Z] <mutante> tools-sgebastion-07 - generating locales for user request in T130532

Mentioned in SAL (#wikimedia-cloud) [2019-03-15T14:32:22Z] <mutante> tools-sgebastion-07 - generating locales for user request in T130532

@Ykhwong I ran locale-gen again just like in the older comment. This generated a bunch of locales but unfortunately i can't confirm Korean is among them as it used to be. (for some reason)

Mentioned in SAL (#wikimedia-cloud) [2019-03-15T14:40:35Z] <mutante> tools-sgebastion-07 - dpkg-reconfigure locales and adding Korean ko_KR.EUC-KR - T130532

@Ykhwong Should be better now, right?

dzahn@tools-sgebastion-07:~$ locale -a | grep -i kr
ko_KR
ko_KR.euckr
ko_KR.utf8

Thanks for the confirmation, but I don't see the locale yet.

Host 'login.tools.wmflabs.org' resolved to XXX.XX.XX.XX.
Connecting to XXX.XX.XX.XX:22...
Connection established.
To escape to local shell, press Ctrl+Alt+].

Linux tools-sgebastion-07 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3 (2019-02-02) x86_64
Debian GNU/Linux 9.8 (stretch)
tools-sgebastion-07 is a Toolforge bastion (role::wmcs::toolforge::bastion)
======================================================================
_______  _____   _____         _______  _____   ______  ______ _______
   |    |     | |     | |      |______ |     | |_____/ |  ____ |______
   |    |_____| |_____| |_____ |       |_____| |    \_ |_____| |______
======================================================================
This is a server of the tools Cloud VPS project, the home of community
managed bots, webservices, and tools supporting the Wikimedia movement.

Use of this system is subject to the Toolforge Terms of Use,
Code of Conduct, and Privacy Policies:
- https://tools.wmflabs.org/?Rules

General guidance and help can be found at:
- https://tools.wmflabs.org/?Help

The last Puppet run was at Sun Mar 17 09:22:25 UTC 2019 (13 minutes ago). 
Last login: Sun Mar 17 07:01:39 2019 from XXX.XXX.XXX.XX
ykhwong@tools-sgebastion-07:/home/ykhwong /> locale -a | grep -i ko
ykhwong@tools-sgebastion-07:/home/ykhwong /> become tedbot
tools.tedbot@tools-sgebastion-07:/data/project/tedbot /> locale -a | grep -i ko

@Ykhwong I am surprised that you don't see it while i do. Does it change anything if you run locale-gen yourself as your user?

@Dzahn

I don't have locale-gen command as it says "-bash: locale-gen: command not found."

Not sure if the issue is related to /etc/locale.gen

dzahn@tools-sgebastion-07:~$ locale -a | grep -i kr
ko_KR
ko_KR.euckr
ko_KR.utf8

I repeated this today and the ko_KR locales are gone again. I don't know why.

@Ykhwong Sorry, apparently i don't have the solution, even though that worked in the past. I'll have to give this ticket back to the pool for people more specialized in tool labs.

Dzahn removed Dzahn as the assignee of this task.May 3 2019, 6:52 PM

Change 511128 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[operations/puppet@production] locales-extended: Add support for Korean

https://gerrit.wikimedia.org/r/511128

Change 511128 merged by Dzahn:
[operations/puppet@production] locales-extended: Add support for Korean

https://gerrit.wikimedia.org/r/511128

Thanks @bd808 . Merged your change. Ran puppet, i saw it add the new locale. Looks like i just didn't use the "extended" version of the list?

Then ran locale-gen.

Try again now @Ykhwong

dzahn@tools-sgebastion-07:~$ locale -a | grep KR
ko_KR.utf8

@Dzahn @bd808 Thanks, I now see the ko_KR.utf8 in the list. :)

Change 527653 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[operations/docker-images/toollabs-images@master] locales-extended: Add support for Korean

https://gerrit.wikimedia.org/r/527653

Change 527653 merged by jenkins-bot:
[operations/docker-images/toollabs-images@master] locales-extended: Add support for Korean

https://gerrit.wikimedia.org/r/527653