[pacman-dev] Localization issues (Attention Developers)
Hi. I' m an experienced translator from Turkey. Contributing Arch turkish translations for a while. I have noticed today; some strings in pacman-scripts are very hard to translate. You see, Turkic languages are very differ from Latin origin languages; structure of sentence is almost reversed. So, using multiple "%s" variables in source string makes a lot of trouble. It is hard to translate and translated strings are hard to understand for native Turkish speakers. For example; "Running %s as an unprivileged user will result in non-root\nownership of the packaged files. Try using the %s environment by\nplacing %s in the %s array in %s." will translated into turkish properly, if second, third, fourth and fifth %s variables are supposed to %d, %n, %f, %z : "%s uygulamasını yetkisiz kullanıcı olarak çalıştırmak paketlenmiş dosyaların kök olmayan sahiplik almasına yol açacaktır. %z dosyası içindeki %f satırına %n değerini yerleştirerek %d ortamını kullanmayı deneyin." You see, how variables reversed? So if you, developers, mind to and if it is possible use only one %s in a string it will be much appreciated. Also, if you, developers, mind to add comments what is %s (a command, an application, what??) it will be great help to translators. Greetings...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 25.11.2011. 14:03, atilla ontas wrote:
Hi. I' m an experienced translator from Turkey. Contributing Arch turkish translations for a while. I have noticed today; some strings in pacman-scripts are very hard to translate. You see, Turkic languages are very differ from Latin origin languages; structure of sentence is almost reversed. So, using multiple "%s" variables in source string makes a lot of trouble. It is hard to translate and translated strings are hard to understand for native Turkish speakers. For example;
"Running %s as an unprivileged user will result in non-root\nownership of the packaged files. Try using the %s environment by\nplacing %s in the %s array in %s."
will translated into turkish properly, if second, third, fourth and fifth %s variables are supposed to %d, %n, %f, %z :
"%s uygulamasını yetkisiz kullanıcı olarak çalıştırmak paketlenmiş dosyaların kök olmayan sahiplik almasına yol açacaktır. %z dosyası içindeki %f satırına %n değerini yerleştirerek %d ortamını kullanmayı deneyin."
You see, how variables reversed? So if you, developers, mind to and if it is possible use only one %s in a string it will be much appreciated. Also, if you, developers, mind to add comments what is %s (a command, an application, what??) it will be great help to translators. Greetings...
Hi, Would this help? http://tinyurl.com/7gmv54r Best regards, -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EAREIAAYFAk7P0VEACgkQJlCTC65LCjmf1QD/YELCngzbwb15bG/yZ63ZOuFv kYSrSo85ykIRqq68PSsA/A2G3Rgh21n18Zs+lqtppf6cB6qNbzXrjh6ZqKBKQo1v =nkM5 -----END PGP SIGNATURE-----
2011/11/25 Slobodan Terzić <githzerai06@gmail.com>:
Hi, Would this help?
Best regards,
May be... I think the page you mentioned here is for developers not translators. But i'm in doubt. Do you mean using like; "%2$d Zeichen lang ist die Zeichenkette `%1$s'" as told on that page? Nevertheless there is one %d and one %s variables in the example, as you can see... But thank you anyway. :)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 25.11.2011. 21:01, atilla ontas wrote:
May be... I think the page you mentioned here is for developers not translators. But i'm in doubt. Do you mean using like;
"%2$d Zeichen lang ist die Zeichenkette `%1$s'"
as told on that page? Nevertheless there is one %d and one %s variables in the example, as you can see... But thank you anyway. :)
As I understood, it's intended for translators as well. "If the word order in the above German translation would be correct one would have to write "%2$d Zeichen lang ist die Zeichenkette `%1$s'" The routines in msgfmt know about this special notation. " msgfmt is used to produce mo files from po files, so I guess translators could also benefit from it. (to be honest, I haven't tried it yet, as I found out about it just recently, but if it does work, that would be awesome) Anyway, though I agree with you on most parts (especially about more comments), AFAIK, changing from c-format to something else would require major changes in code, so I think we should explore all features of current translation system before anything else. Also, I'm no coder, so I might be (very) wrong. Best regards, -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EAREIAAYFAk7P+HwACgkQJlCTC65LCjl6NwEAh3oo7zeFvmZtySNb0T9OYn2C pfAqhejiRpUi5py1KrkA/jwfHQ9OuBr9ofUBsQ3ytOz6q2fCBsokzTs8a79cq2PC =tSCF -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 25.11.2011. 21:20, Slobodan Terzić wrote:
(to be honest, I haven't tried it yet, as I found out about it just recently, but if it does work, that would be awesome)
So, now I had to test it. :) #, c-format msgid "%s is owned by %s %s\n" msgstr "%2$s %3$s sadrži %1$s\n" Adn the result is: $ pacman -Qo /usr/bin/pacman pacman 4.0.1-1 sadrži /usr/bin/pacman (back in english it's "pacman 4.0.1-1 owns /usr/bin/pacman") So it does work, and it is awesome. :) Best regards, -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EAREIAAYFAk7P/v4ACgkQJlCTC65LCjn3sgEAgvMAeHALDcKjgacVKgh23Krl NEHvY9pEE8gbkuEYvYcA/j6x64yuyDF+GT6CntLHTjjKENxk6Jg+F98AVUU0//5+ =lsJr -----END PGP SIGNATURE-----
2011/11/25 Slobodan Terzić <githzerai06@gmail.com>:
msgid "%s is owned by %s %s\n" msgstr "%2$s %3$s sadrži %1$s\n"
OK. Thanks for clarification and help. I think i'll do it as suggested. Thanks again.
On 26/11/11 06:48, Slobodan Terzić wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 25.11.2011. 21:20, Slobodan Terzić wrote:
(to be honest, I haven't tried it yet, as I found out about it just recently, but if it does work, that would be awesome)
So, now I had to test it. :)
#, c-format msgid "%s is owned by %s %s\n" msgstr "%2$s %3$s sadrži %1$s\n"
Adn the result is:
$ pacman -Qo /usr/bin/pacman pacman 4.0.1-1 sadrži /usr/bin/pacman
(back in english it's "pacman 4.0.1-1 owns /usr/bin/pacman")
So it does work, and it is awesome. :)
That only works for libalpm/pacman (written in C), not for makepkg/pacman-key etc (written in bash...) Allan
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 25.11.2011. 23:34, Allan McRae wrote:
That only works for libalpm/pacman (written in C), not for makepkg/pacman-key etc (written in bash...)
Allan
Huh, I thought it's all C. That makes things a lot harder. :( Thanks for the clarification. Any suggestions about this? I belive that no matter how you change the string, it just wouldn't fit all languages out there. Also, I think that rewriting scripts in C (or anything else) instead of bash wouldn't be an option either. At least not a quick one. Best regards, -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EAREIAAYFAk7QKRwACgkQJlCTC65LCjlhbAEAg55H8IoJq88GI0BZ9mhR7kK4 AdfKT4F5UP+4UnHDJmIA/ReYISYY+3yZiOCH9DTrk7ub5mt3vMbbHGWB6udDyCr2 =MPnE -----END PGP SIGNATURE-----
2011/11/26 Slobodan Terzić <githzerai06@gmail.com>:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 25.11.2011. 23:34, Allan McRae wrote:
That only works for libalpm/pacman (written in C), not for makepkg/pacman-key etc (written in bash...)
Allan
Huh, I thought it's all C. That makes things a lot harder. :( Thanks for the clarification.
Any suggestions about this? I belive that no matter how you change the string, it just wouldn't fit all languages out there. Also, I think that rewriting scripts in C (or anything else) instead of bash wouldn't be an option either. At least not a quick one.
Best regards, -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iF4EAREIAAYFAk7QKRwACgkQJlCTC65LCjlhbAEAg55H8IoJq88GI0BZ9mhR7kK4 AdfKT4F5UP+4UnHDJmIA/ReYISYY+3yZiOCH9DTrk7ub5mt3vMbbHGWB6udDyCr2 =MPnE -----END PGP SIGNATURE-----
So? I don't know any programming language but a bit bash scripting. It is hard to understand for me. Should i look into source code and try to understand if source is written in C, C++, Perl, Python etc.? It is not an ideal solution. What about differing variables. I mean, as written in first post, instead of four %s variables putting %d, %f etc.? Is it possible from the developer view?
On 27/11/11 22:25, atilla ontas wrote:
2011/11/26 Slobodan Terzić<githzerai06@gmail.com>:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 25.11.2011. 23:34, Allan McRae wrote:
That only works for libalpm/pacman (written in C), not for makepkg/pacman-key etc (written in bash...)
Allan
Huh, I thought it's all C. That makes things a lot harder. :( Thanks for the clarification.
Any suggestions about this? I belive that no matter how you change the string, it just wouldn't fit all languages out there. Also, I think that rewriting scripts in C (or anything else) instead of bash wouldn't be an option either. At least not a quick one.
Best regards, -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iF4EAREIAAYFAk7QKRwACgkQJlCTC65LCjlhbAEAg55H8IoJq88GI0BZ9mhR7kK4 AdfKT4F5UP+4UnHDJmIA/ReYISYY+3yZiOCH9DTrk7ub5mt3vMbbHGWB6udDyCr2 =MPnE -----END PGP SIGNATURE-----
So? I don't know any programming language but a bit bash scripting. It is hard to understand for me. Should i look into source code and try to understand if source is written in C, C++, Perl, Python etc.? It is not an ideal solution. What about differing variables. I mean, as written in first post, instead of four %s variables putting %d, %f etc.? Is it possible from the developer view?
We have already separated the bash translations from the C translations. You can use positional arguments for the "pacman" and "libalpm" modules but not the "pacman-scripts" one. Allan
participants (3)
-
Allan McRae
-
atilla ontas
-
Slobodan Terzić