jenkins-bot has submitted this change and it was merged.
Change subject: Set dir and lang of insertables to the source messages' values
......................................................................
Set dir and lang of insertables to the source messages' values
Change-Id: I7254a1b17f104ba5f94da775043d1b5f0c86aeaa
---
M resources/js/ext.translate.editor.helpers.js
1 file changed, 11 insertions(+), 0 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/js/ext.translate.editor.helpers.js
b/resources/js/ext.translate.editor.helpers.js
index eed5ce1..75bf452 100644
--- a/resources/js/ext.translate.editor.helpers.js
+++ b/resources/js/ext.translate.editor.helpers.js
@@ -420,11 +420,22 @@
addInsertables: function ( insertables ) {
var i,
count = insertables.length,
+ $sourceMessage = this.$editor.find(
'.sourcemessage' ),
$buttonArea = this.$editor.find(
'.tux-editor-insert-buttons' ),
$textarea = this.$editor.find(
'.tux-textarea-translation' );
for ( i = 0; i < count; i++ ) {
+ // The dir and lang attributes must be set here,
+ // because the language of the insertables is
the language
+ // of the source message and not of the
translation.
+ // The direction may appear confusing, for
example,
+ // in tvar strings, which would appear with the
dollar sign
+ // on the wrong end.
$( '<button>' )
+ .prop( {
+ dir: $sourceMessage.prop( 'dir'
),
+ lang: $sourceMessage.prop(
'lang' )
+ } )
.addClass( 'insertable
shortcut-activated' )
.text( insertables[i].display )
.data( 'iid', i )
--
To view, visit https://gerrit.wikimedia.org/r/105489
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7254a1b17f104ba5f94da775043d1b5f0c86aeaa
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits