r46484 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46483‎ | r46484 | r46485 >
Date:20:46, 28 January 2009
Author:malafaya
Status:deferred
Tags:
Comment:
Extended transactions features i18n
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/Editor.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/forms.php (modified) (history)
  • /trunk/extensions/Wikidata/SpecialLanguages.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/SpecialLanguages.i18n.php
@@ -76,9 +76,20 @@
7777 'ow_none_selected' => 'None selected',
7878
7979 'transaction' => 'Wikidata: Transaction log',
 80+ 'ow_transaction_from_transaction' => 'From transaction:',
 81+ 'ow_transaction_count' => 'Count:',
 82+ 'ow_transaction_user' => 'User name:',
 83+ 'ow_transaction_show_rollback' => 'Show roll back controls:',
 84+ 'ow_transaction_rollback_button' => 'Roll back',
 85+ 'ow_transaction_rollback_header' => 'Roll back',
 86+ 'ow_transaction_no_action' => 'Do nothing',
 87+ 'ow_transaction_previous_version' => 'Previous version',
 88+ 'ow_transaction_restore' => 'Restore',
 89+ 'ow_transaction_remove' => 'Remove',
8090 'ow_transaction_operation' => 'Operation',
8191 'ow_transaction_is_latest' => 'Is latest',
8292 'ow_transaction_class_member' => 'Class member',
 93+ 'ow_transaction_object' => 'Object',
8394
8495 'conceptmapping' => 'Wikidata: Concept mapping',
8596 'ow_conceptmapping_title' => 'Concept Mapping',
Index: trunk/extensions/Wikidata/OmegaWiki/forms.php
@@ -156,7 +156,7 @@
157157 '<div class="suggest-drop-down" style="position: relative"><div id="'. $name .'-suggest-div" style="position: absolute; left: 0px; top: 0px; border: 1px solid #000000; display: none; background-color: white; padding: 4px">' .
158158 '<div><table><tr><td>' .
159159 // '<input type="text" id="'. $name .'-suggest-text" autocomplete="off" onkeyup="suggestTextChanged(this)" style="width: 300px"></input>' .
160 - '</td><td><a id="'. $name .'-suggest-clear" href="javascript:void(0)" onclick="suggestClearClicked(event, this)">Clear</a></td><td><a id="'. $name .'-suggest-close" href="#'. $name . '-suggest-link" onclick="suggestCloseClicked(event, this)">[X]</a></td></tr></table></div>' .
 160+ '</td><td><a id="'. $name .'-suggest-clear" href="javascript:void(0)" onclick="suggestClearClicked(event, this)">' . wfMsg('ow_suggest_clear') . '</a></td><td><a id="'. $name .'-suggest-close" href="#'. $name . '-suggest-link" onclick="suggestCloseClicked(event, this)">[X]</a></td></tr></table></div>' .
161161 '<div>' . $suggestions .
162162 //<table id="'. $name .'-suggest-table"><tr><td></td></tr></table>
163163 '</div>'.
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php
@@ -80,10 +80,10 @@
8181 '<div class="option-panel">'.
8282 '<table cellpadding="0" cellspacing="0">' .
8383 '<tr>' .
84 - '<th>' . wfMsgSc("summary") . ': </th>' .
 84+ '<th>' . wfMsg("summary") . ': </th>' .
8585 '<td class="option-field">' . getTextBox("summary") .'</td>' .
8686 '</tr>' .
87 - '<tr><th/><td>'. getSubmitButton("roll-back", "Roll back") .'</td></tr>'.
 87+ '<tr><th/><td>'. getSubmitButton("roll-back", wfMsg('ow_transaction_rollback_button')) .'</td></tr>'.
8888 '</table>' .
8989 '</div>'.
9090 '</form>'
@@ -105,7 +105,7 @@
106106
107107 return getOptionPanel(
108108 array(
109 - "From transaction:" =>
 109+ wfMsg('ow_transaction_from_transaction') =>
110110 getSuggest(
111111 'from-transaction',
112112 'transaction',
@@ -114,13 +114,13 @@
115115 getTransactionLabel($fromTransactionId),
116116 array(0, 2, 3)
117117 ),
118 - "Count:" =>
 118+ wfMsg('ow_transaction_count') =>
119119 getSelect('transaction-count',
120120 $countOptions,
121121 $transactionCount
122122 ),
123 - "User name:" => getTextBox('user-name', $userName),
124 - "Show roll back controls:" => getCheckBox('show-roll-back-options', $showRollBackOptions)
 123+ wfMsg('ow_transaction_user') => getTextBox('user-name', $userName),
 124+ wfMsg('ow_transaction_show_rollback') => getCheckBox('show-roll-back-options', $showRollBackOptions)
125125 )
126126 );
127127 }
@@ -133,7 +133,7 @@
134134 $o->isLatest = new Attribute('is-latest', wfMsg('ow_transaction_is_latest'), 'boolean');
135135
136136 $o->rollBackStructure = new Structure($o->isLatest, $o->operation);
137 - $o->rollBack = new Attribute('roll-back', 'Roll back', $o->rollBackStructure);
 137+ $o->rollBack = new Attribute('roll-back', wfMsg('ow_transaction_rollback_header'), $o->rollBackStructure);
138138
139139 $o->addTransactionId = new Attribute('add-transaction-id', 'Add transaction ID', 'identifier');
140140
@@ -143,7 +143,7 @@
144144 $o->translatedContentId = new Attribute('translated-content-id', 'Translated content ID', 'object-id');
145145
146146 $o->rollBackTranslatedContentStructure = new Structure($o->isLatest, $o->operation, $o->translatedContentHistory);
147 - $o->rollBackTranslatedContent = new Attribute('roll-back', 'Roll back', $o->rollBackTranslatedContentStructure);
 147+ $o->rollBackTranslatedContent = new Attribute('roll-back', wfMsg('ow_transaction_rollback_header'), $o->rollBackTranslatedContentStructure);
148148
149149 $o->updatedDefinitionStructure = new Structure(
150150 $o->rollBackTranslatedContent,
@@ -183,7 +183,7 @@
184184 $o->isLatest
185185 );
186186
187 - $o->updatedRelations = new Attribute('updated-relations', 'Relations', $o->updatedRelationsStructure);
 187+ $o->updatedRelations = new Attribute('updated-relations', wfMsg('ow_Relations'), $o->updatedRelationsStructure);
188188
189189 $o->classMember = new Attribute('class-member', wfMsg('ow_transaction_class_member'), $o->definedMeaningReferenceStructure);
190190
@@ -217,7 +217,7 @@
218218
219219
220220
221 - $o->objectId = new Attribute('object-id', 'Object', 'object-id');
 221+ $o->objectId = new Attribute('object-id', wfMsg('ow_transaction_object'), 'object-id');
222222 $o->valueId = new Attribute('value-id', 'Value identifier', 'object-id');
223223 $o->attribute = new Attribute('attribute', wfMsg('ow_ClassAttributeAttribute'), $o->definedMeaningReferenceStructure);
224224
@@ -294,10 +294,10 @@
295295 $o->isLatest
296296 );
297297
298 - $o->updatedClassAttributes = new Attribute('updated-class-attributes', 'Class attributes', $o->updatedClassAttributesStructure);
 298+ $o->updatedClassAttributes = new Attribute('updated-class-attributes', wfMsg('ow_ClassAttributes'), $o->updatedClassAttributesStructure);
299299
300300 $o->alternativeDefinitionText = new Attribute('alternative-definition-text', wfMsg('ow_Definition'), $o->translatedTextStructure);
301 - $o->source = new Attribute('source', 'Source', $o->definedMeaningReferenceStructure);
 301+ $o->source = new Attribute('source', wfMsg('ow_Source'), $o->definedMeaningReferenceStructure);
302302
303303 $o->updatedAlternativeDefinitionsStructure = new Structure(
304304 $o->rollBack,
@@ -310,7 +310,7 @@
311311 $o->isLatest
312312 );
313313
314 - $o->updatedAlternativeDefinitions = new Attribute('updated-alternative-definitions', 'Alternative definitions', $o->updatedAlternativeDefinitionsStructure);
 314+ $o->updatedAlternativeDefinitions = new Attribute('updated-alternative-definitions', wfMsg('ow_AlternativeDefinitions'), $o->updatedAlternativeDefinitionsStructure);
315315
316316
317317 $o->updatedAlternativeDefinitionTextStructure = new Structure(
Index: trunk/extensions/Wikidata/OmegaWiki/Editor.php
@@ -2067,14 +2067,14 @@
20682068 $operation = $value->operation;
20692069
20702070 if ($isLatest) {
2071 - $options = array('do-nothing' => 'Do nothing');
 2071+ $options = array('do-nothing' => wfMsg('ow_transaction_no_action'));
20722072
20732073 if ($this->hasValueFields) {
2074 - $previousVersionLabel = 'Previous version';
 2074+ $previousVersionLabel = wfMsg('ow_transaction_previous_version');
20752075 $rollBackChangeHandler = 'rollBackOptionChanged(this);';
20762076 }
20772077 else {
2078 - $previousVersionLabel = 'Restore';
 2078+ $previousVersionLabel = wfMsg('ow_transaction_restore');
20792079 $rollBackChangeHandler = '';
20802080 }
20812081
@@ -2082,7 +2082,7 @@
20832083 $options['previous-version'] = $previousVersionLabel;
20842084
20852085 if ($operation != 'Removed')
2086 - $options['remove'] = 'Remove';
 2086+ $options['remove'] = wfMsg('ow_transaction_remove');
20872087
20882088 $result = getSelect($idPath->getId(), $options, 'do-nothing', $rollBackChangeHandler);
20892089

Status & tagging log