[pacman-dev] A quiestion on translation

Xavier shiningxc at gmail.com
Mon Oct 27 05:38:53 EDT 2008


On Mon, Oct 27, 2008 at 10:03 AM, Lyman <lymanrb at gmail.com> wrote:
> Hi,
>
> I noticed some translation flaw of pacman and wish to correct it. I
> followed the instruction as this link
>
> http://www.archlinux.org/pacman/translation-help.html
>
> and get the updated po file (to be exact, zh_CN.po).
>
> Here's the problem when I open this po file: I don't know how to
> identify parameter with sequence. For example, when I need to translate
> a sentence
>
> msgid ":: Replace %s with %s/%s?"
>
> into the form of
>
> msgstr ":: Use %s/%s to replace %s?"
>
> How could tell which %s is which. This does happens when translating
> English into Chinese and there are such bugs in zh_CN.po right now.
>
> I've searched for a while and found that different projects might use
> different policies.
>
> In KDE people uses
>
> msgid "%1 articles match rule %2"
> msgstr "匹配规则 %2 的文章有 %1 个"
>
> and in Gnome people uses
>
> msgid "%d articles match rule %d"
> msgstr "匹配规则 %2$d 的文章有 %1$d 个"
>
> What about pacman? Thanks.
>

If these two projects also use gettext, then both ways should be possible.
However, in the first case, you have to modify the original message
(msgid), and you as a translator have no control over it.
You can only modify the translated message (msgstr) which only leaves
you with the second option.

I found only one example of its usage, in lib/libalpm/po/hu.po but
well it should be a good sign that it works as intended :
#, c-format
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "nem sikerült a(z) \"%2$s\" csomag \"%1$s\" függőségét feloldani\n"


More information about the pacman-dev mailing list