After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 344471 - Surgery with translateable strings in LSR
Surgery with translateable strings in LSR
Status: RESOLVED FIXED
Product: lsr
Classification: Deprecated
Component: misc
unspecified
Other All
: Normal normal
: 0.3.0
Assigned To: Peter Parente
LSR maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-10 11:07 UTC by Christian Rose
Modified: 2006-06-19 19:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Rose 2006-06-10 11:07:21 UTC
The following type of translateable messages are causing problems in LSR:

#: ../src/LSRMain.py:179
#, python-format
msgid "A %s with name %s was removed from profile %s"

The second and third specifier should not be a problem here, I think.
I assume that they are filled with the name and then the name of the
profile, respectively. If you want to help translators with their
assumptions, please use translator comments; they would be good to
have in either case.

Anyway, the problem is the first specifier in this sentence: "A %s with..."
It seems like a noun will get inserted there. Please do not insert
nouns into sentences with specifiers. I doubt this will even work with
English; if the noun was "apple", "A apple with..." would be wrong.
The problem gets much worse with other languages that may use
different genders for different nouns, and then prefixes or even whole
sentences may have to be rewritten depending on the gender of the
noun.

Please use full sentences instead:

"A parameter with name %s was removed from profile %s"
"An attribute with name %s was removed from profile %s"
"A tag with name %s was removed from profile %s"

etc.
Comment 1 Peter Parente 2006-06-10 13:24:12 UTC
Thanks for opening this bug.

What exactly are translator comments and how do I use them? I'd love to give more hints on what the specifiers are.

The trick here is that the first specifier in the sentence "A %s with name ..." is determined dynamically at run time from a potentially infinite set of nouns. It's probably not practical to provide separate strings for each noun. Since that message is only used as an error message anyways, what about leaving out the article:

"%s with name %s was removed from profile %s"

It's quite alright if the error message is terse and not a complete sentence in this case.
Comment 2 Peter Parente 2006-06-19 19:30:36 UTC
Removed all offending English articles. Added some comments for translators. Removed unncessary translations of exception messages for developers. Cleaned up translatable exception message for users.

Thanks for the bug report. Please let me know if there are further problems. We will add more translator comments as we approach our 0.3.0 release.