Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/106664
Change subject: Consistant use of cx as abbreviated prefix ...................................................................... Consistant use of cx as abbreviated prefix Change-Id: Ic1d64ead13e30db028137b4276e56112824b7513 --- M ContentTranslation.hooks.php M Resources.php M i18n/en.json M i18n/qqq.json R modules/base/ext.cx.base.js R modules/base/ext.cx.header.js R modules/base/styles/ext.cx.base.less R modules/base/styles/ext.cx.header.less R modules/source/ext.cx.source.js R modules/tools/ext.cx.tools.js R modules/translation/ext.cx.translation.js M specials/SpecialContentTranslation.php 12 files changed, 53 insertions(+), 53 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/64/106664/1 diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php index 6c49949..c62ece1 100644 --- a/ContentTranslation.hooks.php +++ b/ContentTranslation.hooks.php @@ -19,7 +19,7 @@ * Hook: BeforePageDisplay */ public static function onBeforePageDisplay( &$output, &$skin ) { - $output->addModules( 'ext.ct.base' ); + $output->addModules( 'ext.cx.base' ); return true; } } diff --git a/Resources.php b/Resources.php index d72a778..f6c717f 100644 --- a/Resources.php +++ b/Resources.php @@ -11,41 +11,41 @@ $resourcePaths = array( 'localBasePath' => $dir . '/modules', 'remoteExtPath' => 'ContentTranslation/modules', - 'group' => 'ext.ct', + 'group' => 'ext.cx', ); -$wgResourceModules['ext.ct.base'] = array( - 'scripts' => 'base/ext.ct.base.js', +$wgResourceModules['ext.cx.base'] = array( + 'scripts' => 'base/ext.cx.base.js', 'styles' => array( - 'base/styles/ext.ct.base.less', + 'base/styles/ext.cx.base.less', ), 'dependencies' => array( 'mediawiki.ui', - 'ext.ct.header', - 'ext.ct.source', - 'ext.ct.translation', - 'ext.ct.tool', + 'ext.cx.header', + 'ext.cx.source', + 'ext.cx.translation', + 'ext.cx.tool', ), ) + $resourcePaths; -$wgResourceModules['ext.ct.header'] = array( - 'scripts' => 'base/ext.ct.header.js', +$wgResourceModules['ext.cx.header'] = array( + 'scripts' => 'base/ext.cx.header.js', 'styles' => array( - 'base/styles/ext.ct.header.less', + 'base/styles/ext.cx.header.less', ), ) + $resourcePaths; -$wgResourceModules['ext.ct.source'] = array( - 'scripts' => 'source/ext.ct.source.js', +$wgResourceModules['ext.cx.source'] = array( + 'scripts' => 'source/ext.cx.source.js', 'dependencies' => array( 'mediawiki.Uri', ), ) + $resourcePaths; -$wgResourceModules['ext.ct.translation'] = array( - 'scripts' => 'translation/ext.ct.translation.js', +$wgResourceModules['ext.cx.translation'] = array( + 'scripts' => 'translation/ext.cx.translation.js', ) + $resourcePaths; -$wgResourceModules['ext.ct.tool'] = array( - 'scripts' => 'tools/ext.ct.tools.js', +$wgResourceModules['ext.cx.tool'] = array( + 'scripts' => 'tools/ext.cx.tools.js', ) + $resourcePaths; diff --git a/i18n/en.json b/i18n/en.json index 879d202..cc3c4f3 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,6 +4,6 @@ "Santhosh.thottingal" ] }, - "cot": "Translate page", - "cot-desc": "A tool that allows editors to translate pages from one language to another with the help of machine translation and other translation aids" + "cx": "Translate page", + "cx-desc": "A tool that allows editors to translate pages from one language to another with the help of machine translation and other translation aids" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 3d8fd28..f63a5eb 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -4,6 +4,6 @@ "Santhosh.thottingal" ] }, - "cot": "Title for [[Special:ContentTranslation]]", - "cot-desc": "{{desc|name=ContentTranslation|url=http://www.mediawiki.org/wiki/Extension:ContentTranslation}}" + "cx": "Title for [[Special:ContentTranslation]]", + "cx-desc": "{{desc|name=ContentTranslation|url=http://www.mediawiki.org/wiki/Extension:ContentTranslation}}" } diff --git a/modules/base/ext.ct.base.js b/modules/base/ext.cx.base.js similarity index 83% rename from modules/base/ext.ct.base.js rename to modules/base/ext.cx.base.js index fc70229..c05b388 100644 --- a/modules/base/ext.ct.base.js +++ b/modules/base/ext.cx.base.js @@ -22,7 +22,7 @@ this.$header = null; this.$source = null; this.$tools = null; - this.options = $.extend( true, {}, $.fn.ct.defaults, options ); + this.options = $.extend( true, {}, $.fn.cx.defaults, options ); this.init(); } @@ -33,10 +33,10 @@ ContentTranslation.prototype.initComponents = function () { // Initialize the components - this.$header.ctHeader(); - this.$source.ctSource(); - this.$translation.ctTranslation(); - this.$tools.ctTools(); + this.$header.cxHeader(); + this.$source.cxSource(); + this.$translation.cxTranslation(); + this.$tools.cxTools(); }; ContentTranslation.prototype.render = function () { @@ -56,13 +56,13 @@ this.$tools = this.$container.find( '.tools' ); }; - $.fn.ct = function ( options ) { + $.fn.cx = function ( options ) { return this.each( function () { var $this = $( this ), - data = $this.data( 'ct' ); + data = $this.data( 'cx' ); if ( !data ) { - $this.data( 'ct', + $this.data( 'cx', ( data = new ContentTranslation( this, options ) ) ); } @@ -72,9 +72,9 @@ } } ); }; - $.fn.ct.defaults = {}; + $.fn.cx.defaults = {}; $( document ).ready( function () { - $( 'body' ).ct(); + $( 'body' ).cx(); } ); }( jQuery ) ); diff --git a/modules/base/ext.ct.header.js b/modules/base/ext.cx.header.js similarity index 82% rename from modules/base/ext.ct.header.js rename to modules/base/ext.cx.header.js index 7d9eb73..0511d18 100644 --- a/modules/base/ext.ct.header.js +++ b/modules/base/ext.cx.header.js @@ -18,7 +18,7 @@ */ function ContentTranslationHeader( element, options ) { this.$container = $( element ); - this.options = $.extend( true, {}, $.fn.ctHeader.defaults, options ); + this.options = $.extend( true, {}, $.fn.cxHeader.defaults, options ); this.init(); } @@ -32,13 +32,13 @@ ); }; - $.fn.ctHeader = function ( options ) { + $.fn.cxHeader = function ( options ) { return this.each( function () { var $this = $( this ), - data = $this.data( 'ctHeader' ); + data = $this.data( 'cxHeader' ); if ( !data ) { - $this.data( 'ctHeader', + $this.data( 'cxHeader', ( data = new ContentTranslationHeader( this, options ) ) ); } @@ -48,5 +48,5 @@ } } ); }; - $.fn.ctHeader.defaults = {}; + $.fn.cxHeader.defaults = {}; }( jQuery ) ); diff --git a/modules/base/styles/ext.ct.base.less b/modules/base/styles/ext.cx.base.less similarity index 100% rename from modules/base/styles/ext.ct.base.less rename to modules/base/styles/ext.cx.base.less diff --git a/modules/base/styles/ext.ct.header.less b/modules/base/styles/ext.cx.header.less similarity index 100% rename from modules/base/styles/ext.ct.header.less rename to modules/base/styles/ext.cx.header.less diff --git a/modules/source/ext.ct.source.js b/modules/source/ext.cx.source.js similarity index 86% rename from modules/source/ext.ct.source.js rename to modules/source/ext.cx.source.js index 32ede9f..9af49cb 100644 --- a/modules/source/ext.ct.source.js +++ b/modules/source/ext.cx.source.js @@ -18,7 +18,7 @@ */ function ContentTranslationSource( element, options ) { this.$container = $( element ); - this.options = $.extend( true, {}, $.fn.ctSource.defaults, options ); + this.options = $.extend( true, {}, $.fn.cxSource.defaults, options ); this.init(); } @@ -45,13 +45,13 @@ mw.log( 'Loading ' + title ); }; - $.fn.ctSource = function ( options ) { + $.fn.cxSource = function ( options ) { return this.each( function () { var $this = $( this ), - data = $this.data( 'ctSource' ); + data = $this.data( 'cxSource' ); if ( !data ) { - $this.data( 'ctSource', + $this.data( 'cxSource', ( data = new ContentTranslationSource( this, options ) ) ); } @@ -61,5 +61,5 @@ } } ); }; - $.fn.ctSource.defaults = {}; + $.fn.cxSource.defaults = {}; }( jQuery, mediaWiki ) ); diff --git a/modules/tools/ext.ct.tools.js b/modules/tools/ext.cx.tools.js similarity index 90% rename from modules/tools/ext.ct.tools.js rename to modules/tools/ext.cx.tools.js index 84e8f45..c73b548 100644 --- a/modules/tools/ext.ct.tools.js +++ b/modules/tools/ext.cx.tools.js @@ -18,7 +18,7 @@ */ function ContentTranslationTools( element, options ) { this.$container = $( element ); - this.options = $.extend( true, {}, $.fn.ctTools.defaults, options ); + this.options = $.extend( true, {}, $.fn.cxTools.defaults, options ); this.init(); } @@ -64,13 +64,13 @@ return $content; }; - $.fn.ctTools = function ( options ) { + $.fn.cxTools = function ( options ) { return this.each( function () { var $this = $( this ), - data = $this.data( 'ctTools' ); + data = $this.data( 'cxTools' ); if ( !data ) { - $this.data( 'ctTools', + $this.data( 'cxTools', ( data = new ContentTranslationTools( this, options ) ) ); } @@ -80,5 +80,5 @@ } } ); }; - $.fn.ctTools.defaults = {}; + $.fn.cxTools.defaults = {}; }( jQuery ) ); diff --git a/modules/translation/ext.ct.translation.js b/modules/translation/ext.cx.translation.js similarity index 83% rename from modules/translation/ext.ct.translation.js rename to modules/translation/ext.cx.translation.js index 5e86773..327b59c 100644 --- a/modules/translation/ext.ct.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -18,7 +18,7 @@ */ function ContentTranslationEditor( element, options ) { this.$container = $( element ); - this.options = $.extend( true, {}, $.fn.ctTranslation.defaults, options ); + this.options = $.extend( true, {}, $.fn.cxTranslation.defaults, options ); this.init(); } @@ -40,13 +40,13 @@ this.$container.append( $content ); }; - $.fn.ctTranslation = function ( options ) { + $.fn.cxTranslation = function ( options ) { return this.each( function () { var $this = $( this ), - data = $this.data( 'ctTranslation' ); + data = $this.data( 'cxTranslation' ); if ( !data ) { - $this.data( 'ctTranslation', + $this.data( 'cxTranslation', ( data = new ContentTranslationEditor( this, options ) ) ); } @@ -56,5 +56,5 @@ } } ); }; - $.fn.ctTranslation.defaults = {}; + $.fn.cxTranslation.defaults = {}; }( jQuery ) ); diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php index f3ce78b..5b3ca65 100644 --- a/specials/SpecialContentTranslation.php +++ b/specials/SpecialContentTranslation.php @@ -18,7 +18,7 @@ } public function getDescription() { - return $this->msg( 'cot' )->text(); + return $this->msg( 'cx' )->text(); } public function execute( $parameters ) { -- To view, visit https://gerrit.wikimedia.org/r/106664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1d64ead13e30db028137b4276e56112824b7513 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits