FS#16568 - Greek translation single character Y/N responses are not correct

Attached to Project: Pacman
Opened by Papadopoulos, Mihail (scarecrow) - Sunday, 11 October 2009, 07:40 GMT
Last edited by Allan McRae (Allan) - Wednesday, 21 October 2009, 04:05 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Xavier (shining)
Allan McRae (Allan)
Architecture i686
Severity High
Priority Normal
Reported Version 3.3.2
Due in Version 3.3.3
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

After upgrade to 3.3.2-1 pacman does not accept input if the system locale in rc.conf is not set to US english (en_US.utf8)

Steps to Reproduce:
With my locale set as "el_GR.utf8" it just exits after pressing "y" for processing. It works only with en_US.utf8 locale.
I have tried regenerating locales ( # locale-gen ) but it didn't solve the problem.
3.3.1 has no issues.
This task depends upon

Closed by  Allan McRae (Allan)
Wednesday, 21 October 2009, 04:05 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commit da5fb3ee. Will be in pacman 3.3.3.
Comment by Allan McRae (Allan) - Sunday, 11 October 2009, 08:04 GMT
Hmmm... there was a new greek translation:

#, c-format
msgid "Y"
msgstr "Y-ΝΑΙ"

#, c-format
msgid "N"
msgstr "N-ΟΧΙ"

I have no idea what the "-NAI" and "-OXI" bit is but that seems to be the issue.

Try using "LANG=C pacman ..." for the mean time.
Comment by Papadopoulos, Mihail (scarecrow) - Sunday, 11 October 2009, 08:12 GMT
NAI=yes
OXI=no
I tried all possible keyboard layouts, uppercase and lowercase- no dice.
OK, waiting for a fix. Thanks.
Comment by Allan McRae (Allan) - Sunday, 11 October 2009, 08:44 GMT
So what should the signle letter abbreviations be? Something like this?

#, c-format
msgid "Y"
msgstr "N"

#, c-format
msgid "N"
msgstr "O"
Comment by Giorgos (ranger) - Sunday, 11 October 2009, 09:08 GMT
Yes, N and O looks the most logical solution.

Now it works only when I put "Y-ΝΑΙ" instead of yes, with written Y in latin an NAI written in Greek.
Comment by Papadopoulos, Mihail (scarecrow) - Sunday, 11 October 2009, 09:39 GMT
Ν and O should be just fine, I think.
Comment by Allan McRae (Allan) - Sunday, 11 October 2009, 10:15 GMT
This is the patch I propose. Do the upper/lower case answers look fine?
Comment by Xavier (shining) - Sunday, 11 October 2009, 10:31 GMT
That's also the change I would propose. And yeah I also hope the case-insensitive comparisons will work right.
Comment by Dan McGee (toofishes) - Sunday, 11 October 2009, 20:25 GMT
Some quick tests with tr on the command line don't look good:
$ echo "NO" | LANG=el_GR.UTF-8 tr "[:upper:]" "[:lower:]"
no
$ echo "νό" | LANG=el_GR.UTF-8 tr "[:lower:]" "[:upper:]"
νό
Comment by Christos Nouskas (nous) - Sunday, 11 October 2009, 21:36 GMT
@Dan: tr was not utf8 aware (at least not for the greek segment) a few months ago and it seems it still isn't.
This -------------
#include <stdio.h>
#include <strings.h>
int main(void) {
if (!strcasecmp("ν", "Ν")) {
printf("match\n");
} else {
printf("no match\n");
}
}
------- yields a 'no match' too.

I fixed my .po and generated a new .mo to test it and it works, partially. It's not case insensitive. So, until glibc gets fixed, we could either leave these untranslated (and save ourselves a layout switch) or demand from users to observe the letter's case after they switch the keyboard layout.

If you choose the latter, it would be better to substitute msgstr "[Ν/ό]" with msgstr "[Ν/ο]", since the former requires 2 keystrokes, the first one for the accent (though any character except 'Ν' would abort).

Which road do other non-ascii users follow?
Comment by Dan McGee (toofishes) - Sunday, 11 October 2009, 21:54 GMT
Chinese, Kazakh, Russian, and Ukrainian all leave Y/N untranslated. Turkish translates, although the translations appear to be latin/ascii characters.
Comment by Christos Nouskas (nous) - Sunday, 11 October 2009, 22:50 GMT
I suggest then we do the same, there's little visual gain translating these compared to the fuss it creates.
Comment by Allan McRae (Allan) - Sunday, 11 October 2009, 22:54 GMT
The patch on my working branch now uses Y/n/y/N's

Loading...