Some translatable messages (POTMsgSets) are special. They are not
really translatable; they represent translation credits and their
"translations" are generated on-demand.
In order to stop these messages from showing up as untranslated, we
create special, "fake" translation messages for them.
But every time we create a TranslationMessage, the fact is recorded as a
contribution made by the message's translator. In this case, the last
translator for the POFile was recorded as the translator for the credits
message; or failing that, its owner.
So we had phantom "contributions" based on these automatically generated
messages. This branch fixes that by:
1. Making the Rosetta Experts team the translator for these messages.
2. Never listing Rosetta Experts as a contributor. Translations are
made by persons, not teams, and this team isn't for translation as such
anyway.
The tests for ownership are simplified; a new test shows explicitly that
the Rosetta Experts team is ignored in the contributors list. You'll
note a small drive-by there as well.
Then visit a (still blank) translation of the template, and log out from
there. This will create (because of a known, low-priority bug) a POFile
for that translation.
Log back in and look at your personal Translations page, under Activity.
There should be no reference to the POFile you just created; without
this branch, there is.
Also look at the translation credits message. Both before and after, it
will show your username. But previously it would show you as the
translator; now it will show Rosetta Administrators as the translator.
Finally, there turned out to be an oops waiting to happen when visiting
the Translations page for rosetta_experts, because the browser code
recognized that the team is now active as a translator, and was trying
to list translations the team could help complete. Teams should not be
considered translators in that context. I added a bit of pagetest.
= Bug 488218 =
Some translatable messages (POTMsgSets) are special. They are not
really translatable; they represent translation credits and their
"translations" are generated on-demand.
In order to stop these messages from showing up as untranslated, we
create special, "fake" translation messages for them.
But every time we create a TranslationMessage, the fact is recorded as a
contribution made by the message's translator. In this case, the last
translator for the POFile was recorded as the translator for the credits
message; or failing that, its owner.
So we had phantom "contributions" based on these automatically generated
messages. This branch fixes that by:
1. Making the Rosetta Experts team the translator for these messages.
2. Never listing Rosetta Experts as a contributor. Translations are
made by persons, not teams, and this team isn't for translation as such
anyway.
The tests for ownership are simplified; a new test shows explicitly that
the Rosetta Experts team is ignored in the contributors list. You'll
note a small drive-by there as well.
To test: to-complete
{{{
./bin/test -vv -t pofile.txt -t test_pofile -t test_potmsgset -t translations-
}}}
To Q/A: import a template with a translation credits message. For
example:
msgid "" Transfer- Encoding: 8bit\n"
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-
msgid "Text"
msgstr ""
msgid "translation- credits"
msgstr ""
Then visit a (still blank) translation of the template, and log out from
there. This will create (because of a known, low-priority bug) a POFile
for that translation.
Log back in and look at your personal Translations page, under Activity.
There should be no reference to the POFile you just created; without
this branch, there is.
Also look at the translation credits message. Both before and after, it
will show your username. But previously it would show you as the
translator; now it will show Rosetta Administrators as the translator.
Finally, there turned out to be an oops waiting to happen when visiting
the Translations page for rosetta_experts, because the browser code
recognized that the team is now active as a translator, and was trying
to list translations the team could help complete. Teams should not be
considered translators in that context. I added a bit of pagetest.
Jeroen