[opensuse-translation] i18n developer recomendations
Hail to you, noble translators! =) Not that much time ago I faced an irritating thing in yast_webclient_software.po at following lines: "Repository will be %s." "Autorefresh will be %s." "Keep packages option will be %s." This %s is meant to be replaced with "enabled" or "disabled", but the problem is that in each line russian translation for those words will have a separate (unique) form, so that three lines make three different forms of translation. That's the unsolvable-by-translator thing, cause the developer who wrote this is unaware of other languages specific rules (some time ago we already faced this problem with numbers and placeholders for software.opensuse.org). For example, KDE project has a bunch of rules for developers about what they can and can not push to translation: the main part there is "You cannot make grammar suggestions and guesses". I find this very useful =) What do you think of creating some rules of that kind for openSUSE project (maybe, just accepting KDE ones, cause they are reasonable and work for years), so that all translators can use them as a reference when filing a bug against such po-files? Cause at the moment I feel really uncomfortable and not sure about reporting such an issue to Bugzilla, since there's nothing wrong with the software or the file itself, it is just untranslatable for russian language. Please tell what you think about all this. -- Regards, Minton. -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
Dne So 10. dubna 2010 21:41:21 Александр Мелентьев napsal(a):
Hail to you, noble translators! =) Not that much time ago I faced an irritating thing in yast_webclient_software.po at following lines: "Repository will be %s." "Autorefresh will be %s." "Keep packages option will be %s." This %s is meant to be replaced with "enabled" or "disabled", but the problem is that in each line russian translation for those words will have a separate (unique) form, so that three lines make three different forms of translation. That's the unsolvable-by-translator thing, cause the developer who wrote this is unaware of other languages specific rules (some time ago we already faced this problem with numbers and placeholders for software.opensuse.org). For example, KDE project has a bunch of rules for developers about what they can and can not push to translation: the main part there is "You cannot make grammar suggestions and guesses". I find this very useful =)
What do you think of creating some rules of that kind for openSUSE project (maybe, just accepting KDE ones, cause they are reasonable and work for years), so that all translators can use them as a reference when filing a bug against such po-files? Cause at the moment I feel really uncomfortable and not sure about reporting such an issue to Bugzilla, since there's nothing wrong with the software or the file itself, it is just untranslatable for russian language.
Please tell what you think about all this.
Could You, please, provide link to the KDE rules? It would IMHO be useful. If someone makes language bug in Bugzilla and it is assigned to me, I have to say I do not know how to fix it. I can only repair the string in SVN. Is it enough? Such rules and how tos would save everyone's time :-) Best regards, -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu / Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://web.natur.cuni.cz/~zeisek/
2010/4/11 Vojtěch Zeisek <Vojtech.Zeisek@opensuse.org>:
Could You, please, provide link to the KDE rules? It would IMHO be useful. If someone makes language bug in Bugzilla and it is assigned to me, I have to say I do not know how to fix it. I can only repair the string in SVN. Is it enough? Such rules and how tos would save everyone's time :-) Best regards, -- Vojtěch Zeisek Oh, forgot to post the link in the first mail, thanks for the reminder. Now it is reffered as mistakes, but the idea is the same: http://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes
P.S. Actually, repairing the SVN string is really enough. =) -- Regards, Minton. -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LSU.2.00.1004110003200.15631@nimrodel.valinor> On Sunday, 2010-04-11 at 00:27 +0400, Александр Мелентьев wrote:
Oh, forgot to post the link in the first mail, thanks for the reminder. Now it is reffered as mistakes, but the idea is the same: http://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes
Notice some thing. In <http://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes#Pitfall_.232:_Word_Puzzles> it says to use strings like: "Do you want to replace %1 with %2?" such that translators can change the order of parameters. This is valid for KDE, I understand, not in general. Well, gettext has another method, explained in "File: gettext.info, Node: c-format": a string like: "'%s' has only %d bytes free." can be reordered by the translator as: "Only %2$d bytes free on '%1$s'." - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkvA9bcACgkQtTMYHG2NR9VYGwCfbxMSqVloZL6nA/LbDQCyYYI7 9SUAn3oMRmA+IdjvvIGoRJOUqoev2lGC =fjCA -----END PGP SIGNATURE-----
2010/4/11 Carlos E. R. <robin.listas@telefonica.net>:
Well, gettext has another method, explained in "File: gettext.info, Node: c-format": a string like:
"'%s' has only %d bytes free."
can be reordered by the translator as:
"Only %2$d bytes free on '%1$s'."
- -- Cheers, Carlos E. R. Emm, does it refer to translations only? Cause libstorage has plently of constructions like %1$s in msgid's. Is it correct?
-- Regards, Minton. -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday, 2010-04-11 at 13:22 +0400, Александр Мелентьев wrote:
2010/4/11 Carlos E. R. <>:
Well, gettext has another method, explained in "File: gettext.info, Node: c-format": a string like:
"'%s' has only %d bytes free."
can be reordered by the translator as:
"Only %2$d bytes free on '%1$s'."
Emm, does it refer to translations only? Cause libstorage has plently of constructions like %1$s in msgid's. Is it correct?
I'll copy the info page, which is all I know. I personally haven't used this feature (but a colleague did, it was she who told me of this feature). Aparently, it is available to translators in any case, but also to some programmers depending on the platform. +--****************** File: gettext.info, Node: c-format, Next: objc-format, Prev: Translators for other Languages, Up: Translators for other Languages 15.3.1 C Format Strings - ----------------------- C format strings are described in POSIX (IEEE P1003.1 2001), section XSH 3 fprintf(), `http://www.opengroup.org/onlinepubs/007904975/functions/fprintf.html'. See also the fprintf() manual page, `http://www.linuxvalley.it/encyclopedia/ldp/manpage/man3/printf.3.php', `http://informatik.fh-wuerzburg.de/student/i510/man/printf.html'. Although format strings with positions that reorder arguments, such as "Only %2$d bytes free on '%1$s'." which is semantically equivalent to "'%s' has only %d bytes free." are a POSIX/XSI feature and not specified by ISO C 99, translators can rely on this reordering ability: On the few platforms where `printf()', `fprintf()' etc. don't support this feature natively, `libintl.a' or `libintl.so' provides replacement functions, and GNU `<libintl.h>' activates these replacement functions automatically. As a special feature for Farsi (Persian) and maybe Arabic, translators can insert an `I' flag into numeric format directives. For example, the translation of `"%d"' can be `"%Id"'. The effect of this flag, on systems with GNU `libc', is that in the output, the ASCII digits are replaced with the `outdigits' defined in the `LC_CTYPE' locale category. On other systems, the `gettext' function removes this flag, so that it has no effect. Note that the programmer should _not_ put this flag into the untranslated string. (Putting the `I' format directive flag into an MSGID string would lead to undefined behaviour on platforms without glibc when NLS is disabled.) ******************--- If you search the files, you might find examples. Like: gnome-packagekit.es.po #. TRANSLATOR: "%i %s %i %s" are "%i minutes %i seconds" #. * Swap order with "%2$s %2$i %1$s %1$i if needed #. TRANSLATOR: "%i %s %i %s" are "%i hours %i minutes" #. * Swap order with "%2$s %2$i %1$s %1$i if needed #: ../src/gpk-common.c:355 ../src/gpk-common.c:374 #, c-format msgid "%i %s %i %s" msgstr "%i %s %i %s" But then, some programmers use that syntax, which confuses things for us: libstorage.es.po #. displayed text before action, %1$s is replaced by mount point e.g. /home #. %2$s is replaced by a pathname e.g. /etc/fstab #: ../storage/EtcFstab.cc:917 #, c-format msgid "Add entry for mount point %1$s to %2$s" msgstr "Añadir entrada para el punto de montaje %1$s a %2$s" Ah, I see what you meant. libstorage is indeed full of those constructions used by the programmer; no idea why, because he doesn't reorder. Maybe to signal to us that we can reorder as needed, but the purpose is confused. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkvBtfsACgkQtTMYHG2NR9W+LwCaAmIxvfzeIneR35gXG1T6UYV6 xq0An3FEjVhR1yM7Z0gUOkpwDSt9cquF =OGfv -----END PGP SIGNATURE-----
participants (3)
-
Carlos E. R.
-
Vojtěch Zeisek
-
Александр Мелентьев