Amire80 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/108016
Change subject: Language labels under the headings
......................................................................
Language labels under the headings
Change-Id: I080360d002ed1b35b2b3e19b98194f7580290e0c
---
M modules/base/styles/ext.cx.base.less
M modules/source/ext.cx.source.js
M modules/translation/ext.cx.translation.js
3 files changed, 38 insertions(+), 10 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/16/108016/1
diff --git a/modules/base/styles/ext.cx.base.less
b/modules/base/styles/ext.cx.base.less
index a29bc45..f7554fc 100644
--- a/modules/base/styles/ext.cx.base.less
+++ b/modules/base/styles/ext.cx.base.less
@@ -1,9 +1,13 @@
@import "grid/agora-grid";
-@grey: #222222;
+@gray-darker: #252525;
+@gray-dark: #565656;
+@gray: #C9C9C9;
+@gray-light: #f0f0f0;
+@gray-lighter: #fbfbfb;
h2 {
- color: @grey;
+ color: @gray-darker;
}
/**
@@ -11,7 +15,7 @@
*/
.cx-widget {
.mw-ui-grid;
- color: @grey;
+ color: @gray-darker;
}
.cx-widget__header {
@@ -20,6 +24,10 @@
.mw-ui-palm-one-whole;
}
+.cx-column__language-label {
+ color: @gray-dark;
+}
+
.cx-column {
.mw-ui-item;
.mw-ui-one-third;
diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index b68779a..a5e3649 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -46,6 +46,16 @@
this.$container.append(
$( '<div>' )
+ .addClass( 'cx-column__sub-heading' )
+ .append(
+ $( '<span>' )
+ .addClass(
'cx-column__language-label' )
+ .text( $.uls.data.getAutonym(
contentLanguage ) )
+ )
+ );
+
+ this.$container.append(
+ $( '<div>' )
.addClass( 'cx-column__content' )
.text( mw.msg( 'cx-source-loading', this.page )
)
);
diff --git a/modules/translation/ext.cx.translation.js
b/modules/translation/ext.cx.translation.js
index ba9e7d2..c98daf7 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -31,13 +31,6 @@
ContentTranslationEditor.prototype.render = function () {
var $content;
- if ( this.lang ) {
- this.$container.prop( {
- lang: this.lang,
- dir: $.uls.data.getDir( this.lang )
- } );
- }
-
this.$container.append(
$( '<h2>' )
.attr( 'contenteditable', true )
@@ -45,6 +38,23 @@
.text( 'Translated title' )
);
+ if ( this.lang ) {
+ this.$container.prop( {
+ lang: this.lang,
+ dir: $.uls.data.getDir( this.lang )
+ } );
+
+ this.$container.append(
+ $( '<div>' )
+ .addClass( 'cx-column__sub-heading' )
+ .append(
+ $( '<span>' )
+ .addClass(
'cx-column__language-label' )
+ .text(
$.uls.data.getAutonym( this.lang ) )
+ )
+ );
+ }
+
$content = $( '<div>' )
.attr( 'contenteditable', true )
.addClass( 'cx-column__content' )
--
To view, visit https://gerrit.wikimedia.org/r/108016
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I080360d002ed1b35b2b3e19b98194f7580290e0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits