[packagekit] Translations: Ambiguous, unclear and other dodgy messages

Nils Philippsen nils at redhat.com
Tue Oct 14 08:18:46 PDT 2008


Hi there,

when Richard asked for help translating PK on fedora-devel-list, I found
some problems when overhauling the German translation. He asked me to go
through the messages and flag those which are hard to translate. Please
copy me on replies as I'm not subscribed to the list.

Some general things so I can make it a little bit shorter later on:

- Translators often just see the message to be translated without any
context, e.g. they don't see the program, which dialog a message is in
and so forth. If the meaning of a message isn't clear if it stands on
its own, simply add a comment with the missing information before the
line where the message is defined. This comment ends up in the po-files
and the tools to edit the po-files should display it along with the
message. If in doubt, add a comment ;-).
- Don't just concatenate messages with strings because some languages
may need reordering these. Use printf-style or similar placeholders
instead.
- Sometimes translators need to reorder parts of messages, so if you
have more than one placeholder in a message passed to printf and the
like, use positional parameters for stuff that's filled in later. In C,
use this notation (see printf(2) for details):

	printf ("One thing: %1$s and another: %2$s", x, y);

In Python use that notation (note: uses a dict, not a list/tuple):

	print "One thing: %(something)s and another: %(another)s" % {"something": x, "another": y}

Again, if it's not clear what a placeholder is for, add a comment.
- Use complete sentences, a sentence usually ends with punctuation ;-),
except maybe in CLI option lists. Then translators don't have to guess
whether the message lacks a placeholder or not.
- Not translation specific, but please use active voice, not passive.
Tell the user what to do, not what is required ;-).

Here we go with the individual messages (I'll only list some examples
for the above, not all):

> #: ../client/pk-console.c:274
> msgid "Update detail"
> msgstr ""

What detail?

> #: ../client/pk-console.c:491
> msgid "A system restart is required"
> msgstr ""

Active voice, e.g. "Please restart the system."

[...]
> #: ../client/pk-console.c:588 ../client/pk-generate-pack.c:126
> msgid "There are multiple package matches"
> msgstr ""

Context?

> #. find out what package the user wants to use
> #: ../client/pk-console.c:595 ../client/pk-generate-pack.c:133
> msgid "Please enter the package number: "
> msgstr ""

I admit I'm not that deep into PK: where would a user have to enter a
"package number", what is this anyway?

> #: ../client/pk-console.c:629
> msgid "Could not find package to install"
> msgstr ""
>
> #: ../client/pk-console.c:735
> msgid "Could not find package to remove"
> msgstr ""

Placeholders missing? Subject missing anyway: "I could not ..." or
"PackageKit could not find package %1$s to remove."?

[...]
> #. get user input
> #: ../client/pk-console.c:803
> msgid "Okay to remove additional packages?"
> msgstr ""

"Shall these additional packages be removed?" followed by list of
packages?

> #: ../client/pk-console.c:807 ../client/pk-generate-pack.c:528
> #: ../client/pk-generate-pack-main.c:131
> msgid "Cancelled!"
> msgstr ""

What is cancelled?

> #: ../client/pk-console.c:841
> msgid "Could not find package to download"
> msgstr ""
>
> #: ../client/pk-console.c:893
> msgid "Could not find package to update"
> msgstr ""
> 
> #: ../client/pk-console.c:915
> msgid "Could not find what packages require"
> msgstr ""
> 
> #: ../client/pk-console.c:936
> msgid "Could not get dependencies for"
> msgstr ""
> 
> #: ../client/pk-console.c:957
> msgid "Could not find details for"
> msgstr ""
> 
> #: ../client/pk-console.c:980
> msgid "Could not find the files for this package"
> msgstr ""

These seem to lack placeholders.

[...]
> #. get user input
> #: ../client/pk-console.c:1140
> msgid "Okay to import key?"
> msgstr ""

"Shall this key be imported?" followed by the key?

[...]
> #. get user input
> #: ../client/pk-console.c:1183
> msgid "Do you agree?"
> msgstr ""

Context?

> #: ../client/pk-console.c:1186
> msgid "Did not agree to licence, task will fail"
> msgstr ""

"You did not agree to the license, therefore I can't continue."?

Perhaps use en_US ("license" not "licence") in the message id, or
alternatively try to recruit some en_US translators ;-P.

[...]
> #: ../client/pk-console.c:1378 ../client/pk-generate-pack-main.c:64
> #: ../client/pk-monitor.c:118 ../src/pk-main.c:192
> msgid "Show extra debugging information"
> msgstr ""
> 
> #: ../client/pk-console.c:1380 ../client/pk-monitor.c:120
> msgid "Show the program version and exit"
> msgstr ""
>
> #: ../client/pk-console.c:1382
> msgid "Set the filter, e.g. installed"
> msgstr ""
> 
> #: ../client/pk-console.c:1384
> msgid "Exit without waiting for actions to complete"
> msgstr ""

Are these some options for the CLI?

[...]
> #: ../client/pk-console.c:1561
> msgid "Directory not found"
> msgstr ""

Which directory?

> #: ../client/pk-console.c:1567
> msgid "You need to specify a eula-id"
> msgstr ""

Context, it's been a long time since I had to accept a EULA for myself
-- where would that message appear and why would a user have to specify
an ID for it?

[...]
> #: ../client/pk-console.c:1592 ../client/pk-console.c:1599
> msgid "You need to specify a repo name"
> msgstr ""

"... repository ..."

> #: ../client/pk-console.c:1606
> msgid "You need to specify a repo name/parameter and value"
> msgstr ""

ditto

[...]
> #: ../client/pk-console.c:1629
> msgid "Failed to get last time"
> msgstr ""

?

[...]
> #: ../client/pk-generate-pack.c:117
> msgid "Could not find a package match"
> msgstr ""

"... matching your search terms."?

> #: ../client/pk-generate-pack.c:151
> msgid "failed to download: invalid package_id and/or directory"
> msgstr ""

Which package id/directory is invalid? Where does this information come
from? E.g. "Failed to download ...: Repository metadata contained an
invalid package ID."?

[...]
> #. get user input
> #: ../client/pk-generate-pack.c:524
> msgid "Okay to download the additional packages"
> msgstr ""

"Shall PackageKit download these additional packages:" followed by the
list?

[...]
> #: ../client/pk-import-specspo.c:185
> msgid "Could not set database readonly"
> msgstr ""

which database? cf. the next message:

> #: ../client/pk-import-specspo.c:192
> #, c-format
> msgid "Could not open database: %s"
> msgstr ""

[...]
> #: ../contrib/packagekit-plugin/src/contents.cpp:304
> #, c-format
> msgid "<span color='#%06x' underline='single' size='larger'>Run %s</span>"
> msgstr ""

While it's a bit unlikely that the order of the placeholders would
change in another language, here's how it would look like with
positional placeholders:

msgid "<span color='#%1$06x' underline='single' size='larger'>Run %2$s</span>"
msgstr ""

> #: ../contrib/packagekit-plugin/src/contents.cpp:308
> #: ../contrib/packagekit-plugin/src/contents.cpp:313
> #: ../contrib/packagekit-plugin/src/contents.cpp:336
> #: ../contrib/packagekit-plugin/src/contents.cpp:340
> #, c-format
> msgid "<big>%s</big>"
> msgstr ""

I'm totally at a loss why this would be translated... is there any text
in it ;-)?

[...]
> #: ../contrib/packagekit-plugin/src/contents.cpp:330
> #, c-format
> msgid ""
> "<span color='#%06x' underline='single' size='larger'>Install %s Now</span>"
> msgstr ""

"... now" (not "... Now")

[...]
> #: ../src/pk-main.c:85
> msgid "Startup failed due to security policies on this machine."
> msgstr ""
> 
> #: ../src/pk-main.c:86
> msgid "This can happen for two reasons:"
> msgstr ""
> 
> #: ../src/pk-main.c:87
> msgid "The correct user is not launching the executable (usually root)"
> msgstr ""
> 
> #: ../src/pk-main.c:88
> msgid ""
> "The org.freedesktop.PackageKit.conf file is not installed in the system /etc/"
> "dbus-1/system.d directory"
> msgstr ""

These 4 messages seem like they could be lumped into one, this would
give some context.

[...]
> #: ../src/pk-main.c:286
> #, c-format
> msgid "Error trying to start: %s\n"
> msgstr ""

I suspect the placeholder is an error message, right?

HTH,
Nils
-- 
Nils Philippsen      "Those who would give up Essential Liberty to
purchase 
Red Hat               a little Temporary Safety, deserve neither Liberty
nils at redhat.com       nor Safety."  --  Benjamin Franklin, 1759
PGP fingerprint:      C4A8 9474 5C4C ADE3 2B8F  656D 47D8 9B65 6951 3011




More information about the PackageKit mailing list