r105855 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105854‎ | r105855 | r105856 >
Date:06:40, 12 December 2011
Author:amire80
Status:resolved (Comments)
Tags:i18nreview 
Comment:
Replaced the core message 'sectionlink' with getArrow, which is cleaner and does the right thing in mixed RTL/LTR environment. Removed the message from the messages files, because it doesn't seem to be used elsewhere.
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesAr.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesAry.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesArz.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesAz.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesFa.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesHe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesKm.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesMai.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesMs.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesNe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesRo.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesShi.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesSr_ec.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesUk.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -1134,6 +1134,7 @@
11351135 * @return string
11361136 */
11371137 private static function formatAutocommentsCallback( $match ) {
 1138+ global $wgLang;
11381139 $title = self::$autocommentTitle;
11391140 $local = self::$autocommentLocal;
11401141
@@ -1159,7 +1160,7 @@
11601161 }
11611162 if ( $sectionTitle ) {
11621163 $link = self::link( $sectionTitle,
1163 - htmlspecialchars( wfMsgForContent( 'sectionlink' ) ), array(), array(),
 1164+ $wgLang->getArrow(), array(), array(),
11641165 'noclasses' );
11651166 } else {
11661167 $link = '';
Index: trunk/phase3/languages/messages/MessagesSr_ec.php
@@ -1756,7 +1756,6 @@
17571757 'newpageletter' => 'Н',
17581758 'boteditletter' => 'б',
17591759 'unpatrolledletter' => '!',
1760 -'sectionlink' => '→',
17611760 'number_of_watching_users_pageview' => '[$1 {{PLURAL:$1|корисник надгледа|корисника надгледају|корисника надгледају}}]',
17621761 'rc_categories' => 'Ограничи на категорије (раздвоји с усправном цртом)',
17631762 'rc_categories_any' => 'Све',
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2056,7 +2056,6 @@
20572057 'newpageletter' => 'N',
20582058 'boteditletter' => 'b',
20592059 'unpatrolledletter' => '!', # only translate this message to other languages if you have to change it
2060 -'sectionlink' => '→', # only translate this message to other languages if you have to change it
20612060 'number_of_watching_users_RCview' => '[$1]', # do not translate or duplicate this message to other languages
20622061 'number_of_watching_users_pageview' => '[$1 watching {{PLURAL:$1|user|users}}]',
20632062 'rc_categories' => 'Limit to categories (separate with "|")',
Index: trunk/phase3/languages/messages/MessagesFa.php
@@ -1782,7 +1782,6 @@
17831783 'minoreditletter' => 'جز',
17841784 'newpageletter' => 'نو',
17851785 'boteditletter' => 'ر',
1786 -'sectionlink' => '←',
17871786 'number_of_watching_users_pageview' => '[$1 {{PLURAL:$1|کاربر|کاربر}} پی‌گیری‌کننده]',
17881787 'rc_categories' => 'محدود به این رده‌ها (رده‌ها را با «|» جدا کنید)',
17891788 'rc_categories_any' => 'هر کدام',
Index: trunk/phase3/languages/messages/MessagesArz.php
@@ -1538,7 +1538,6 @@
15391539 'minoreditletter' => 'ص',
15401540 'newpageletter' => 'ج',
15411541 'boteditletter' => 'ب',
1542 -'sectionlink' => '←',
15431542 'number_of_watching_users_pageview' => '[$1 {{PLURAL:$1| يوزر مراقب|يوزر مراقب}}]',
15441543 'rc_categories' => 'حصر لتصنيفات (مفصولة برمز "|")',
15451544 'rc_categories_any' => 'أى',
Index: trunk/phase3/languages/messages/MessagesUk.php
@@ -1589,7 +1589,6 @@
15901590 'newpageletter' => 'Н',
15911591 'boteditletter' => 'б',
15921592 'unpatrolledletter' => '!',
1593 -'sectionlink' => '→',
15941593 'number_of_watching_users_pageview' => '[$1 {{PLURAL:$1|користувач спостерігає|користувачі спостерігають|користувачів спостерігають}}]',
15951594 'rc_categories' => 'Тільки з категорій (разділювач «|»)',
15961595 'rc_categories_any' => 'Будь-який',
Index: trunk/phase3/languages/messages/MessagesRo.php
@@ -1625,7 +1625,6 @@
16261626 'newpageletter' => 'N',
16271627 'boteditletter' => 'b',
16281628 'unpatrolledletter' => '!',
1629 -'sectionlink' => '→',
16301629 'number_of_watching_users_pageview' => '[$1 {{PLURAL:$1|utilizator|utilizatori|de utilizatori}} care urmăresc]',
16311630 'rc_categories' => 'Limitează la categoriile (separate prin "|")',
16321631 'rc_categories_any' => 'Oricare',
Index: trunk/phase3/languages/messages/MessagesShi.php
@@ -774,7 +774,6 @@
775775 'newpageletter' => 'A',
776776 'boteditletter' => 'q',
777777 'unpatrolledletter' => '!',
778 -'sectionlink' => '→',
779778 'number_of_watching_users_pageview' => '[$1 iżŗi {{PLURAL:$1|amsqdac|imsqdacn}}]',
780779 'rc_categories_any' => 'wanna',
781780 'rc-change-size' => '$1',
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -1763,7 +1763,6 @@
17641764 'unpatrolledletter' => '{{optional}}
17651765
17661766 Used in {{msg-mw|Recentchanges-label-legend}}, meaning "unpatrolled".',
1767 -'sectionlink' => '{{optional}}',
17681767 'rc_categories' => "Probably to do with 'recent changes' special page, either in a particular skin, or for a particular user group.
17691768
17701769 I guess that this should appear before an input box where you can specify that recent changes should be shown for pages belonging to certain categories only. You name the categories in the input box, and separate them by a pipe character. If this is right, then you should be able to use 'restrict' instead of 'limit', or even 'show pages in the following categories only'.",
Index: trunk/phase3/languages/messages/MessagesNe.php
@@ -1363,7 +1363,6 @@
13641364 'newpageletter' => 'न',
13651365 'boteditletter' => 'बो',
13661366 'unpatrolledletter' => '!',
1367 -'sectionlink' => '→',
13681367 'number_of_watching_users_pageview' => '[$1 निगरानी गर्दै{{PLURAL:$1|प्रयोगकर्ता|प्रयोगकर्ताहरु}}]',
13691368 'rc_categories' => 'श्रेणीहरुमा सीमित ("|" ले छुट्याउनुहोस्)',
13701369 'rc_categories_any' => 'कुनै',
Index: trunk/phase3/languages/messages/MessagesKm.php
@@ -1578,7 +1578,6 @@
15791579 'minoreditletter' => 'តិច',
15801580 'newpageletter' => 'ថ្មី',
15811581 'boteditletter' => 'រូបយន្ត',
1582 -'sectionlink' => '→',
15831582 'number_of_watching_users_pageview' => '[មាន{{PLURAL:$1|អ្នកប្រើប្រាស់|អ្នកប្រើប្រាស់}}$1នាក់កំពុងមើល]',
15841583 'rc_categories' => 'កម្រិតទីតាំងចំណាត់ថ្នាក់ក្រុម(ខណ្ឌដោយសញ្ញា "|")',
15851584 'rc_categories_any' => 'មួយណាក៏បាន',
Index: trunk/phase3/languages/messages/MessagesHe.php
@@ -1685,7 +1685,6 @@
16861686 'minoreditletter' => 'מ',
16871687 'newpageletter' => 'ח',
16881688 'boteditletter' => 'ב',
1689 -'sectionlink' => '←',
16901689 'number_of_watching_users_pageview' => '[{{PLURAL:$1|משתמש אחד עוקב|$1 משתמשים עוקבים}} אחרי הדף]',
16911690 'rc_categories' => 'הגבלה לקטגוריות (יש להפריד עם "|")',
16921691 'rc_categories_any' => 'הכול',
Index: trunk/phase3/languages/messages/MessagesAr.php
@@ -1794,7 +1794,6 @@
17951795 'minoreditletter' => 'ط',
17961796 'newpageletter' => 'ج‌',
17971797 'boteditletter' => 'ب',
1798 -'sectionlink' => '←',
17991798 'number_of_watching_users_pageview' => '[{{PLURAL:$1|لا مستخدمون يراقبون|مستخدم واحد يراقب|مستخدمان يراقبان|$1 مستخدمين يراقبون|$1 مستخدما يراقب|$1 مستخدم يراقب}}]',
18001799 'rc_categories' => 'حصر لتصنيفات (مفرقة برمز "|")',
18011800 'rc_categories_any' => 'أي',
Index: trunk/phase3/languages/messages/MessagesAz.php
@@ -1229,7 +1229,6 @@
12301230 'minoreditletter' => 'k',
12311231 'newpageletter' => 'Y',
12321232 'boteditletter' => 'b',
1233 -'sectionlink' => '→',
12341233 'number_of_watching_users_pageview' => '[$1 izləyən istifadəçi]',
12351234 'rc_categories' => 'Kateqoriyalara limit qoy ("|" ilə ayır)',
12361235 'rc_categories_any' => 'Hər',
Index: trunk/phase3/languages/messages/MessagesMs.php
@@ -1508,7 +1508,6 @@
15091509 'newpageletter' => 'B',
15101510 'boteditletter' => 'b',
15111511 'unpatrolledletter' => '!',
1512 -'sectionlink' => '→',
15131512 'number_of_watching_users_pageview' => '[$1 pemantau]',
15141513 'rc_categories' => 'Hadkan kepada kategori (asingkan dengan "|")',
15151514 'rc_categories_any' => 'Semua',
Index: trunk/phase3/languages/messages/MessagesAry.php
@@ -1263,7 +1263,6 @@
12641264 'minoreditletter' => 'ṣ',
12651265 'newpageletter' => 'J',
12661266 'boteditletter' => 'b',
1267 -'sectionlink' => '→',
12681267 'number_of_watching_users_pageview' => '[$1 katchof {{PLURAL:$1|mostkhdim|mostkhdimin}}]',
12691268 'rc_categories' => 'limiti tsnifat (frqha b "|")',
12701269 'rc_categories_any' => 'ay wahd',
Index: trunk/phase3/languages/messages/MessagesMai.php
@@ -1357,7 +1357,6 @@
13581358 'newpageletter' => 'न',
13591359 'boteditletter' => 'ब',
13601360 'unpatrolledletter' => '!',
1361 -'sectionlink' => '→',
13621361 'number_of_watching_users_pageview' => '[$1 देखै अछि {{PLURAL:$1|प्रयोक्ता|प्रयोक्ता सभ}}]',
13631362 'rc_categories' => 'संवर्ग सीमित ("|" सँ हटाउ)',
13641363 'rc_categories_any' => 'कोनो',

Follow-up revisions

RevisionCommit summaryAuthorDate
r105857remove message keys from maintenance files too (r105855)raymond07:33, 12 December 2011
r106667Narayam and WebFonts to trunk state...nikerabbit18:16, 19 December 2011
r108367Fix the regression pointed out by Robin in r105855.amire8021:07, 8 January 2012
r109086Follow up to r105855 - now with updated phpunit tests.amire8000:17, 17 January 2012

Comments

#Comment by Nikerabbit (talk | contribs)   17:25, 12 December 2011

You are replacing content language with interface language. Is that intentional and does it make sense?

#Comment by Amire80 (talk | contribs)   18:29, 12 December 2011

Yes, it is intentional. If it is the content language, then when i'm using RTL interface in an LTR wiki, the arrow points the wrong way.

#Comment by Krinkle (talk | contribs)   22:41, 13 January 2012

On a German wiki, most sections will be in German. Just make sure we've tested this language change, I'm not sure which direction makes sense in that scenario.

#Comment by SPQRobin (talk | contribs)   17:40, 13 December 2011

Nice fix! I always thought it was hardcoded in the DB...

#Comment by SPQRobin (talk | contribs)   14:25, 20 December 2011

Actually, when the value of dir="auto" on the <span class="comment"> is correctly parsed, this change is a regression. See https://translatewiki.net/wiki/Support?action=history&uselang=he in Chrome as an example. Ideally the direction of the arrow should be based on that value but I don't see any feasible way to do that.

#Comment by Amire80 (talk | contribs)   15:13, 20 December 2011

Damn it.

Nice catch. Annoying, but possible to fix it.

#Comment by Amire80 (talk | contribs)   21:08, 8 January 2012

I tried to fix it in r108367. Please test mercilessly.

#Comment by Reedy (talk | contribs)   22:27, 13 January 2012

Which has been reverted. (Commenting for completeness, wasn't sure why it had been re-marked as fixme)

#Comment by Reedy (talk | contribs)   01:57, 14 January 2012

Comments left on r108367 as to if that revision is right, and the output for the parser tests is correct, we can fix the tests and fix this fixme :)

#Comment by Amire80 (talk | contribs)   20:38, 15 January 2012

See Bug 33743.

Status & tagging log