r46269 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46268‎ | r46269 | r46270 >
Date:17:48, 26 January 2009
Author:malafaya
Status:deferred
Tags:
Comment:
Expression editor i18n support
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/ExpressionPage.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWiki.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataGlobals.php (modified) (history)
  • /trunk/extensions/Wikidata/SpecialLanguages.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/SpecialLanguages.i18n.php
@@ -69,6 +69,7 @@
7070 'ow_AlternativeDefinitions' => 'Alternative definitions',
7171 'ow_Annotation' => 'Annotation',
7272 'ow_ApproximateMeanings' => 'Approximate meanings',
 73+ 'ow_Class' => 'Class',
7374 'ow_ClassAttributeAttribute' => 'Attribute',
7475 'ow_ClassAttributes' => 'Class attributes',
7576 'ow_ClassAttributeLevel' => 'Level',
@@ -90,6 +91,8 @@
9192 'ow_GotoSource' => 'Go to source',
9293 'ow_Language' => 'Language',
9394 'ow_LevelAnnotation' => 'Annotation',
 95+ 'ow_Multiple_meanings' => 'Multiple meanings:',
 96+ 'ow_NewExactMeaning' => 'New exact meaning',
9497 'ow_OptionAttribute' => 'Property',
9598 'ow_OptionAttributeOption' => 'Option',
9699 'ow_OptionAttributeOptions' => 'Options',
Index: trunk/extensions/Wikidata/OmegaWiki/ExpressionPage.php
@@ -136,10 +136,10 @@
137137
138138 public function getTitle() {
139139 global
140 - $wgTitle, $wgExpressionPageTitlePrefix;
 140+ $wgTitle, $wgUseExpressionPageTitlePrefix;
141141
142 - if ($wgExpressionPageTitlePrefix != "")
143 - $prefix = $wgExpressionPageTitlePrefix . ": ";
 142+ if ($wgUseExpressionPageTitlePrefix)
 143+ $prefix = wfMsg('ow_Multiple_meanings') . ' ';
144144 else
145145 $prefix = "";
146146
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataGlobals.php
@@ -153,10 +153,12 @@
154154
155155 global
156156 $wgDefinedMeaningPageTitlePrefix,
157 - $wgExpressionPageTitlePrefix;
 157+ //$wgExpressionPageTitlePrefix;
 158+ $wgUseExpressionPageTitlePrefix;
158159
159160 $wgDefinedMeaningPageTitlePrefix = "";
160 -$wgExpressionPageTitlePrefix = "Multiple meanings";
 161+//$wgExpressionPageTitlePrefix = "Multiple meanings"; # Now it's localizable
 162+$wgUseExpressionPageTitlePrefix = true; # malafaya: Use the expression prefix "Multiple meanings:" from message ow_Multiple_meanings
161163
162164 // Search page
163165
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php
@@ -458,8 +458,8 @@
459459 $o=OmegaWikiAttributes::getInstance();
460460
461461 $dbr =& wfGetDB(DB_SLAVE);
462 - $classAttribute = new Attribute("class", "Class", "short-text");
463 - $collectionAttribute = new Attribute("collection", "Collection", "short-text");
 462+ $classAttribute = new Attribute("class", wfMsg('ow_Class'), "short-text");
 463+ $collectionAttribute = new Attribute("collection", wfMsg('ow_Collection'), "short-text");
464464
465465 $recordSet = new ArrayRecordSet(new Structure($o->id, $classAttribute, $collectionAttribute), new Structure($o->id));
466466
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php
@@ -135,7 +135,7 @@
136136 $t->collectionMembershipStructure = new Structure("collection-membership",$t->collectionId, $t->collectionMeaning, $t->sourceIdentifier);
137137 $t->collectionMembership = new Attribute(null, wfMsgSc("CollectionMembership"), $t->collectionMembershipStructure);
138138 $t->classMembershipId = new Attribute("class-membership-id", "Class membership id", "integer");
139 - $t->class = new Attribute("class", "Class", $t->definedMeaningReferenceStructure);
 139+ $t->class = new Attribute("class", wfMsg('ow_Class'), $t->definedMeaningReferenceStructure);
140140 $t->classMembershipStructure = new Structure("class-membership", $t->classMembershipId, $t->class);
141141 $t->classMembership = new Attribute(null, wfMsgSc("ClassMembership"), $t->classMembershipStructure);
142142
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php
@@ -730,7 +730,7 @@
731731 $definedMeaningEditor = getDefinedMeaningEditor($viewInformation);
732732
733733 $definedMeaningCaptionEditor = new DefinedMeaningHeaderEditor($o->definedMeaningId, new SimplePermissionController(false), true, 75);
734 - $definedMeaningCaptionEditor->setAddText("New exact meaning");
 734+ $definedMeaningCaptionEditor->setAddText(wfMsg('ow_NewExactMeaning'));
735735
736736 $expressionMeaningsEditor = new RecordSetListEditor($attribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController($allowAdd), false, $allowAdd, new ExpressionMeaningController($viewInformation->filterLanguageId), 3, false);
737737 $expressionMeaningsEditor->setCaptionEditor($definedMeaningCaptionEditor);
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWiki.php
@@ -92,10 +92,10 @@
9393
9494 public function getTitle() {
9595 global
96 - $wgTitle, $wgExpressionPageTitlePrefix;
 96+ $wgTitle, $wgUseExpressionPageTitlePrefix;
9797
98 - if ($wgExpressionPageTitlePrefix != "")
99 - $prefix = $wgExpressionPageTitlePrefix . ": ";
 98+ if ($wgUseExpressionPageTitlePrefix)
 99+ $prefix = wfMsg('ow_Multiple_meanings') . ' ';
100100 else
101101 $prefix = "";
102102

Status & tagging log