jenkins-bot has submitted this change and it was merged.

Change subject: Internationalisation for the metadata dialog
......................................................................


Internationalisation for the metadata dialog

Change-Id: Iefb6d5c90583f0684cb9548d38b83048b43d3c81
---
M VisualEditor.i18n.php
M VisualEditor.php
M modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
M modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js
M modules/ve/ui/widgets/ve.ui.MWCategoryPopupWidget.js
5 files changed, 43 insertions(+), 20 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 5b6d8e6..d18f410 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -25,8 +25,6 @@
        'visualeditor-ca-createsource' => 'Create source',
        'visualeditor-ca-ve-edit' => 'VisualEditor',
        'visualeditor-ca-ve-create' => 'VisualEditor',
-       'visualeditor-category-input-placeholder' => 'Add category',
-       'visualeditor-category-settings-label' => 'Category settings',
        'visualeditor-dialog-meta-title' => 'Page settings',
        'visualeditor-dialog-content-title' => 'Content settings',
        'visualeditor-dialog-media-title' => 'Media settings',
@@ -81,6 +79,16 @@
        'visualeditor-historybutton-redo-tooltip' => 'Redo',
        'visualeditor-inspector-close-tooltip' => 'Close',
        'visualeditor-inspector-remove-tooltip' => 'Remove',
+       'visualeditor-dialog-meta-categories-section' => 'Categories',
+       'visualeditor-dialog-meta-categories-data-label' => 'Categories',
+       'visualeditor-dialog-meta-categories-settings-label' => 'Category 
settings',
+       'visualeditor-dialog-meta-categories-input-placeholder' => 'Add 
category',
+       'visualeditor-dialog-meta-categories-input-newcategorylabel' => 'New 
category',
+       'visualeditor-dialog-meta-categories-input-movecategorylabel' => 'Move 
this category here',
+       'visualeditor-dialog-meta-categories-input-matchingcategorieslabel' => 
'Matching categories',
+       'visualeditor-dialog-meta-categories-sortkey-label' => 'Page name in 
category',
+       'visualeditor-dialog-meta-categories-defaultsort-label' => 'Default 
page name on category page',
+       'visualeditor-dialog-meta-langlinks-section' => 'Languages',
        'visualeditor-viewpage-savewarning' => 'Are you sure you want to go 
back to view mode without saving first?',
        'visualeditor-loadwarning' => 'Error loading data from server: $1. 
Would you like to retry?',
        'visualeditor-loadwarning-token' => 'Error loading edit token from 
server: $1. Would you like to retry?',
@@ -145,9 +153,6 @@
        'visualeditor-ca-ve-create' => '
        Link text of the dedicated VisualEditor Create tab.
 {{Identical|visualeditor}}',
-       'visualeditor-category-input-placeholder' => 'Placeholder text for 
category input
-{{Identical|Add category}}',
-       'visualeditor-category-settings-label' => 'Title of category settings 
popup menu',
        'visualeditor-dialog-meta-title' => 'MetaData dialog title text',
        'visualeditor-dialog-content-title' => 'Content dialog title text',
        'visualeditor-dialog-media-title' => 'Title for the editing dialog to 
set how a media item is displayed on the page',
@@ -216,6 +221,17 @@
 {{Identical|Redo}}',
        'visualeditor-inspector-close-tooltip' => 'Tooltip for the button to 
close an inspector',
        'visualeditor-inspector-remove-tooltip' => 'Tooltip for the button to 
remove an annotation in an inspector',
+       'visualeditor-dialog-meta-categories-section' => 'Label for the 
categories dialog section',
+       'visualeditor-dialog-meta-categories-data-label' => 'Label for the 
categories sub-section',
+       'visualeditor-dialog-meta-categories-settings-label' => 'Label for the 
category settings sub-section',
+       'visualeditor-dialog-meta-categories-input-placeholder' => 'Placeholder 
text for category input
+{{Identical|Add category}}',
+       'visualeditor-dialog-meta-categories-input-newcategorylabel' => 'Label 
for suggested categories for an uncreated category',
+       'visualeditor-dialog-meta-categories-input-movecategorylabel' => 'Label 
for moving a given category to end of list',
+       'visualeditor-dialog-meta-categories-input-matchingcategorieslabel' => 
'Label for matching suggested categories',
+       'visualeditor-dialog-meta-categories-sortkey-label' => 'Label for 
setting the page\'s sort key for a given category',
+       'visualeditor-dialog-meta-categories-defaultsort-label' => 'Label for 
field setting the category default sort',
+       'visualeditor-dialog-meta-langlinks-section' => 'Label for the language 
links dialog section',
        'visualeditor-viewpage-savewarning' => 'Text shown when the user tries 
to leave the editor without saving their changes',
        'visualeditor-loadwarning' => 'Text (JavaScript confirm()) shown when 
the editor fails to load properly.
 
diff --git a/VisualEditor.php b/VisualEditor.php
index c43ffd1..18f607d 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -516,8 +516,16 @@
                        'visualeditor-dialog-action-apply',
                        'visualeditor-dialog-action-cancel',
                        'visualeditor-dialog-action-close',
-                       'visualeditor-category-input-placeholder',
-                       'visualeditor-category-settings-label'
+                       'visualeditor-dialog-meta-categories-section',
+                       'visualeditor-dialog-meta-categories-data-label',
+                       'visualeditor-dialog-meta-categories-settings-label',
+                       'visualeditor-dialog-meta-categories-input-placeholder',
+                       
'visualeditor-dialog-meta-categories-input-newcategorylabel',
+                       
'visualeditor-dialog-meta-categories-input-movecategorylabel',
+                       
'visualeditor-dialog-meta-categories-input-matchingcategorieslabel',
+                       'visualeditor-dialog-meta-categories-sortkey-label',
+                       'visualeditor-dialog-meta-categories-defaultsort-label',
+                       'visualeditor-dialog-meta-langlinks-section',
                ),
        ),
        'ext.visualEditor.experimental' => $wgVisualEditorResourceTemplate + 
array(
diff --git a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js 
b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
index dd016ca..5dfa2eb 100644
--- a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
+++ b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
@@ -56,10 +56,10 @@
 
        // Properties
        this.categoriesFieldset = new ve.ui.FieldsetLayout( {
-               '$$': this.frame.$$, 'label': 'Categories', 'icon': 'tag'
+               '$$': this.frame.$$, 'label': ve.msg( 
'visualeditor-dialog-meta-categories-data-label' ), 'icon': 'tag'
        } );
        this.categorySettingsFieldset = new ve.ui.FieldsetLayout( {
-               '$$': this.frame.$$, 'label': 'Category settings', 'icon': 
'settings'
+               '$$': this.frame.$$, 'label': ve.msg( 
'visualeditor-dialog-meta-categories-settings-label' ), 'icon': 'settings'
        } );
        this.categoryWidget = new ve.ui.MWCategoryWidget( {
                '$$': this.frame.$$, '$overlay': this.surface.$globalOverlay
@@ -70,7 +70,7 @@
        this.defaultSortLabel = new ve.ui.InputLabelWidget( {
                '$$': this.frame.$$,
                'input': this.defaultSortInput,
-               'label': 'Default page name on category page'
+               'label': ve.msg( 
'visualeditor-dialog-meta-categories-defaultsort-label' )
        } );
 
        // Events
@@ -84,14 +84,13 @@
 
        // Initialization
        this.categoryWidget.addItems( this.getCategoryItems() );
-       this.addPage( 'categories', 'Categories', 'tag' );
+       this.addPage( 'categories', ve.msg( 
'visualeditor-dialog-meta-categories-section' ), 'tag' );
        // TODO: Implement language editing. Load page with:
-       // .addPage( 'languages', 'Languages', 'language' );
+       // .addPage( 'languages', ve.msg( 
'visualeditor-dialog-meta-langlinks-section' ), 'language' );
+
        this.pages.categories.$.append( this.categoriesFieldset.$, 
this.categorySettingsFieldset.$ );
        this.categoriesFieldset.$.append( this.categoryWidget.$ );
-       this.categorySettingsFieldset.$.append(
-               this.defaultSortLabel.$, this.defaultSortInput.$
-       );
+       this.categorySettingsFieldset.$.append( this.defaultSortLabel.$, 
this.defaultSortInput.$ );
 };
 
 /**
diff --git a/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js 
b/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js
index 3c0ccd1..324adca 100644
--- a/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js
@@ -22,7 +22,7 @@
 ve.ui.MWCategoryInputWidget = function VeUiMWCategoryInputWidget( 
categoryWidget, config ) {
        // Config intialization
        config = ve.extendObject( {
-               'placeholder': ve.msg( 
'visualeditor-category-input-placeholder' )
+               'placeholder': ve.msg( 
'visualeditor-dialog-meta-categories-input-placeholder' )
        }, config );
 
        // Parent constructor
@@ -134,7 +134,7 @@
        // Add sections for non-empty groups
        if ( newCategoryItems.length ) {
                items.push( new ve.ui.MenuSectionItemWidget(
-                       'newCategory', { '$$': menu$$, 'label': 'New category' }
+                       'newCategory', { '$$': menu$$, 'label': ve.msg( 
'visualeditor-dialog-meta-categories-input-newcategorylabel' ) }
                ) );
                for ( i = 0, len = newCategoryItems.length; i < len; i++ ) {
                        item = newCategoryItems[i];
@@ -143,7 +143,7 @@
        }
        if ( existingCategoryItems.length ) {
                items.push( new ve.ui.MenuSectionItemWidget(
-                       'inArticle', { '$$': menu$$, 'label': 'Move this 
category here' }
+                       'inArticle', { '$$': menu$$, 'label': ve.msg( 
'visualeditor-dialog-meta-categories-input-movecategorylabel' ) }
                ) );
                for ( i = 0, len = existingCategoryItems.length; i < len; i++ ) 
{
                        item = existingCategoryItems[i];
@@ -152,7 +152,7 @@
        }
        if ( matchingCategoryItems.length ) {
                items.push( new ve.ui.MenuSectionItemWidget(
-                       'matchingCategories', { '$$': menu$$, 'label': 
'Matching categories' }
+                       'matchingCategories', { '$$': menu$$, 'label': ve.msg( 
'visualeditor-dialog-meta-categories-input-matchingcategorieslabel' ) }
                ) );
                for ( i = 0, len = matchingCategories.length; i < len; i++ ) {
                        item = matchingCategories[i];
diff --git a/modules/ve/ui/widgets/ve.ui.MWCategoryPopupWidget.js 
b/modules/ve/ui/widgets/ve.ui.MWCategoryPopupWidget.js
index d3191ad..e0350d5 100644
--- a/modules/ve/ui/widgets/ve.ui.MWCategoryPopupWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.MWCategoryPopupWidget.js
@@ -30,7 +30,7 @@
        } );
        this.sortKeyInput = new ve.ui.TextInputWidget( { '$$': this.$$ } );
        this.sortKeyLabel = new ve.ui.InputLabelWidget(
-               { '$$': this.$$, '$input': this.sortKeyInput, 'label': 'Page 
name in category' }
+               { '$$': this.$$, '$input': this.sortKeyInput, 'label': ve.msg ( 
'visualeditor-dialog-meta-categories-sortkey-label' ) }
        );
        this.$sortKeyForm = this.$$( '<form>' ).addClass( 
've-ui-mwCategorySortkeyForm' )
                .append( this.sortKeyLabel.$, this.sortKeyInput.$ );

-- 
To view, visit https://gerrit.wikimedia.org/r/65413
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iefb6d5c90583f0684cb9548d38b83048b43d3c81
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to