I just came accros changeset [7682] and wanted to remind you to *please*
do not mark as translated string which are kept in English.
I mean, if i.e. You do not translate a word, or cannot translate it for
some reason (like strings in localflavour) *please* leave the msgstr
*blank* do not copy the msgid over msgstr as this makes it harder to
know what is really translated and what not.
If msgstr's are left blank Django will use the msgid as is the string
was unstralated, which is fine ;)
In the case of [7682], "aljosa" (I don't have your e-mail) you forgot to
run bin/compile-messages.py -l hr and commit the updated .mo files so
the updated .po will have no effect ;) And thanks for keeping Croatian
up-to-date!!
Yours,
Marc
--
http://www.marcfargas.com -- will be finished some day.
Actually, I have been suggesting exactly the opposite, look in this list
archives for a couple of examples.
Two points in favor of copying the msgid value over the msgstr:
1. It actually indicates the fact somebody (another member of a translation
team, yourself) has already reviewed that specific entry and has decided
that the value should be copied verbatim from msgid to msgstr. If you find
a
msgstr ""
there is now way you can if it was left empty on purpose or not. No GNU
gettext tools creates .po files with these valued automatically copied
for you.
2. It skews statistics (the ones you get with msgfmt --statistics) because
in these results an empty msgstr counts as a unstranslated literal.
In the case the translator decided the msgstr value should be equal to the
msgid value, leaving the latter empty means that translations will never
reach 100%.
I guess the real logic behind this reasoning is: If the final string that
the end user is going to see is the same, why not mark it explicitely
on the .po file for the benefit of both human and gettext tools?
Couldn´t find any documentation suggesting one practice over the other. Is
there any experienced translator that can share his thoughts about the
matter?.
Regards,
--
Ramiro Morales
From my POV, I see to kinds of blank msgstr:
* The ones left blank on purpose because, i.e., they cannot be
translated, those could be copied "as-is".
* The others are things you don't know the translation for, or it's
unclear. For those, if you copy the msgid over then you can't
distinguish those from the ones above.
For the first ones I'd be +1 on copying the msgid over msgstr, as anyway
they cannot be translated so better if msgfmt counts them as translated.
But for the others I'd be -1 on copying the msgid, I'd either leave
msgstr blank or, at least, mark them as fuzzy. Because *they're not
translated*, and we need to distinguish them :)
> I guess the real logic behind this reasoning is: If the final string that
> the end user is going to see is the same, why not mark it explicitely
> on the .po file for the benefit of both human and gettext tools?
Because then the human could not distinguish really translated things
from things that were not translated for some reason.
Just my 0.02
On Jun 18, 2008, at 10:05, Marc Fargas wrote:
> El mar, 17-06-2008 a las 21:47 -0300, Ramiro Morales escribió:
>> 1. It actually indicates the fact somebody (another member of a
>> translation
>> team, yourself) has already reviewed that specific entry and has
>> decided
>> that the value should be copied verbatim from msgid to msgstr.
>
> From my POV, I see to kinds of blank msgstr:
> * The ones left blank on purpose because, i.e., they cannot be
> translated, those could be copied "as-is".
> * The others are things you don't know the translation for, or it's
> unclear. For those, if you copy the msgid over then you can't
> distinguish those from the ones above.
>
> For the first ones I'd be +1 on copying the msgid over msgstr, as
> anyway
> they cannot be translated so better if msgfmt counts them as
> translated.
>
> But for the others I'd be -1 on copying the msgid, I'd either leave
> msgstr blank or, at least, mark them as fuzzy. Because *they're not
> translated*, and we need to distinguish them :)
Yeah, have to say I agree with mr. Morales. I used to be of the other
opinion, but thinking about it, it makes more sense to have them
verbatim copied.
Also, if a translator fails to translate a msgid, he or she should
firstly ask the related list (django-i18n, django-se, etc.) IMO. There
should be no case where a translator has to set a translation fuzzy
just because he or she doesn't know of a good translation.
I usually fuzzy out ambiguous translations, like the translations for
doing "3" -> "3rd" etc. in Django.
Maybe we should introduce some new markup for "msgids we've not taken
care of"? I mean something like:
#: foo/bar.py:123
#, unrev,python-format
msgid "Hello %s!"
msgstr ""
Ludvig "toxik" Ericson
ludvig....@gmail.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkhYyLEACgkQXnZ94Kd6KacMvACeJ1cDtCCbIIvmYNQEBQSXynSa
DagAmwXuaM35bMR21xYvElQmUxLi8uzz
=Cnyz
-----END PGP SIGNATURE-----
Kbabel has the option to show you all the strings that have the same
msgstr and msgid, under "Tools->Validation->Translations Containing
English". So you or some other translator can review your choices and
why they were left in English anytime. And the statistics say that
it's 100% translated.
Everybody is happy. :)
So, I also think that it's better to copy msgid to msgstr when the
translator can't decide or when there is no point to translate
something.
--
Glisha
I know on Feb 19th you prefered blank msgstrs ;)
That makes 3 vs 1 hence we should go for the "copy msgid over msgstr"
way.
That also means there are no excuses for not being 100% translated for
1.0!!!!
Yours,
Marc
Ehi, I use KBabel and hadn't seen that, thanks! By any chance, isn't
there a command to automatically fill the empty msgstrs with their
msgids, too? That would have saved me some work. :-)
For the record, while I did already follow Ramiro's suggestion, now I'm
not sure which is the best choice. Also, we probably aren't the first
ones facing this problem: isn't there some best practices already?
--
Nicola Larosa - http://www.tekNico.net/
The next time you see a homeless person, or an addict, don't be fright-
ened, angry, or filled with pathos. You are looking in the mirror.
It is we who are homeless, and addicted. What will it take before
we break the habit, walk away from The Man, and find our way home?
- Dave Pollard, December 2004
How about this?
* translated entries have a non-empty msgstr (including when msgid == msgstr)
* entries that need more work are marked fuzzy
* untranslated entries have an empty msgstr
It's clear what the state of every entry is, msgfmt --statistics
reports are correct and ITSM that this is the way things are intended
to work.
Arien
*ugh*
ITSM should be translated to read ISTM (a.k.a., "it seems to me").
Arien
Te be clear (I think I didn't express myself correctly, should refrain
from replying
late at night when tired) I agree totally with you here. All what I said applies
to the first type of string you mention above (the ones the translator
knows are the same, e.g. for spanish: "No", "AM", "PM").
Fo the second type the msgstr should be left empty because doing so
the individual translator indicates he has (so far) found no translation.
Regards,
--
Ramiro Morales
After this thread and talking on IRC with Ramiro it seams that a good
practice would be, given those two types of untranslatables:
* The ones left blank on purpose because, i.e., they cannot be
translated, those could be copied "as-is".
* The others are things you don't know the translation for, or it's
unclear. For those, if you copy the msgid over then you can't
distinguish those from the ones above.
That for the first ones, msgid's should be copied over msgstr and leave
them *as translated*.
For the other ones, the right thing to do seems to be leaving the msgstr
blank, or either mark the translation as fuzzy (whatever you prefer,
gettext will ignore both). So future translators and gettext know that
those string are *not* translated.
Do you Agree? If so, there are some translations that have to remove
strings :)
On related news, a *complete* translation of Django is formed of 882
translated strings and 92 untranslated. From those 92 a bunch come from
localflavour ;)
Yours,
Marc
PS: Thanks for discussing the issue, translations would be boring
without debating over msgstrs!!
Yeah, guess so. (I like to distinguish between an empty msgstr and
one marked as "fuzzy", but that's a minor point in comparison to the
original issue.)
Arien
"Normal practice" in other projects is to copy untranslated strings
over. It's very, very slightly more efficient on the computation level
(gettext doesn't have to do a failed lookup before returning the
original -- the lookup always works). It also gives better message
translation statistics. It's also a once-off job. It's not like the
string is going to change, and if it does, it shows up in your fuzzy
list.
I think it's bad advice to say "don't do anything there", since it makes
it impossible to tell the difference between "haven't translated it yet"
and "shouldn't translate it". The only strings with empty msgstr entries
are those you haven't got to yet.
Malcolm