On Sat, May 22, 2010 at 1:51 PM, Roan Kattouw <[email protected]>wrote:
> This was suggested on foundation-l by Chad, but I'll repeat it here:
> reuse messages as little as possible. If you're using the word
> "foobar" in two slightly different meanings and think other languages
> might want to translate each instance differently, use two different
> messages with the same English content. This allows translators (and
> sysops customizing stuff in the MediaWiki: namespace) to use different
> translations for each of them.
Hi Roan,
Let me make sure I understand your proposal by walking through an example
that's actually in the patch: "revreview-hist-basic"
In an old version, this was "sighted revision". In the current version,
it's "checked revision". In the proposed new version, it's "accepted
revision". That particular message is used in quite a few places in the
code:
./specialpages/ReviewedVersions_body.php:69: : wfMsgHtml(
'revreview-hist-basic' );
./FlaggedRevs.hooks.php:108: 'sightedRev' =>
wfMsgHtml( 'revreview-hist-basic' ),
./FlaggedArticleView.php:635: : 'revreview-hist-basic';
./FlaggedArticleView.php:813: :
'revreview-hist-basic';
./FlaggedArticleView.php:1306: :
'revreview-hist-basic';
./FlaggedArticleView.php:1318: :
'revreview-hist-basic';
./FlaggedArticleView.php:1332: :
'revreview-hist-basic'
This, of course, isn't the norm, but it isn't exceptionally rare, either. A
typical use of this in context:
./FlaggedArticleView.php-1303- if ( $oldRevQ !== false ) {
./FlaggedArticleView.php-1304- $msg = $oldRevQ
./FlaggedArticleView.php-1305- ?
'revreview-hist-quality'
./FlaggedArticleView.php:1306: :
'revreview-hist-basic';
./FlaggedArticleView.php-1307- } else {
./FlaggedArticleView.php-1308- $msg =
'revreview-hist-draft';
./FlaggedArticleView.php-1309- }
./FlaggedArticleView.php-1310- $form .= "<td width='50%'
align='center'>";
It seems what you're suggesting is the following:
Step 1. Simply leave revreview-hist-basic as "checked revision" (or even go
back to "sighted revision")
Step 2. Create a new revreview-hist-accepted, setting it to "accepted
revision"
Step 3. ?
This is where I get a little fuzzy. What would you suggest at this
point (proposal A or B)?
Proposal A:
Step 3. Put in an if($wgYetAnotherGlobal) statement, using
revreview-hist-basic or revreview-hist-accepted based on the value of that
global
...or Proposal B:
Step 3. Replace revreview-hist-basic with revreview-hist-accepted
unconditionally.
Proposal A seems to make the code pretty complicated, and is a pretty big
change in aggregate. There are a lot of strings that need that treatment.
Proposal B doesn't buy us much, and the cost is much higher than simply
replacing the strings.
Rob
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l