Show More
@@ -1010,7 +1010,7 def filterpatch(ui, headers, operation=N | |||||
1010 | ui.write("\n") |
|
1010 | ui.write("\n") | |
1011 | if r == 8: # ? |
|
1011 | if r == 8: # ? | |
1012 | for c, t in ui.extractchoices(resps)[1]: |
|
1012 | for c, t in ui.extractchoices(resps)[1]: | |
1013 |
ui.write('%s - %s\n' % (c, |
|
1013 | ui.write('%s - %s\n' % (c, encoding.lower(t))) | |
1014 | continue |
|
1014 | continue | |
1015 | elif r == 0: # yes |
|
1015 | elif r == 0: # yes | |
1016 | ret = True |
|
1016 | ret = True |
@@ -878,6 +878,32 Help, quit | |||||
878 | abort: user quit |
|
878 | abort: user quit | |
879 | [255] |
|
879 | [255] | |
880 |
|
880 | |||
|
881 | #if gettext | |||
|
882 | ||||
|
883 | Test translated help message | |||
|
884 | ||||
|
885 | str.lower() instead of encoding.lower(str) on translated message might | |||
|
886 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) | |||
|
887 | as the second or later byte of multi-byte character. | |||
|
888 | ||||
|
889 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) | |||
|
890 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this | |||
|
891 | replacement makes message meaningless. | |||
|
892 | ||||
|
893 | This tests that translated help message is lower()-ed correctly. | |||
|
894 | ||||
|
895 | $ LANGUAGE=ja | |||
|
896 | $ export LANGUAGE | |||
|
897 | ||||
|
898 | $ hg commit -i --encoding cp932 2>&1 <<EOF | grep '^y - ' | |||
|
899 | > ? | |||
|
900 | > q | |||
|
901 | > EOF | |||
|
902 | y - \x82\xb1\x82\xcc\x95\xcf\x8dX\x82\xf0\x8bL\x98^(yes) (esc) | |||
|
903 | ||||
|
904 | $ LANGUAGE= | |||
|
905 | #endif | |||
|
906 | ||||
881 |
|
|
907 | Skip | |
882 |
|
908 | |||
883 | $ hg commit -i <<EOF |
|
909 | $ hg commit -i <<EOF |
General Comments 0
You need to be logged in to leave comments.
Login now