Santhosh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/322857
Change subject: When target template not available use UI language for template
card
......................................................................
When target template not available use UI language for template card
Use UI language for showing 'Not available in LanguageName'
Change-Id: I90498deda2a81d3884415e0f2aa31dada564af44
---
M modules/tools/ext.cx.tools.template.card.js
1 file changed, 10 insertions(+), 4 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/57/322857/1
diff --git a/modules/tools/ext.cx.tools.template.card.js
b/modules/tools/ext.cx.tools.template.card.js
index 22c2e1e..c2a3924 100644
--- a/modules/tools/ext.cx.tools.template.card.js
+++ b/modules/tools/ext.cx.tools.template.card.js
@@ -298,14 +298,20 @@
* Mark the template as Unadaptable template
*/
TemplateControlCard.prototype.markUndaptable = function () {
- var actions = this.actions;
+ var uiLanguage, actions = this.actions;
// Hide the menu item for 'Use equivalent'
if ( !this.templateTool.targetTemplate.title ) {
+ uiLanguage = mw.config.get( 'wgUserLanguage' );
actions = this.actions.slice( 1 );
- this.card.$targetTemplateTitle.text(
- mw.msg( 'cx-template-not-available',
$.uls.data.getAutonym( mw.cx.targetLanguage ) )
- );
+ this.card.$targetTemplateTitle
+ .prop( {
+ lang: uiLanguage,
+ dir: $.uls.data.getDir( uiLanguage )
+ } )
+ .text(
+ mw.msg( 'cx-template-not-available',
$.uls.data.getAutonym( mw.cx.targetLanguage ) )
+ );
}
this.buildActionsMenu( actions );
};
--
To view, visit https://gerrit.wikimedia.org/r/322857
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I90498deda2a81d3884415e0f2aa31dada564af44
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits