KartikMistry has submitted this change and it was merged.

Change subject: Additional trigger to add reflist while adding a reference 
manually
......................................................................


Additional trigger to add reflist while adding a reference manually

Before this patch, the reference list was added as a handler of
mw.cx.translation.postMT. This wont work for two cases

(a) language pair with different directionality. For them we don't
give source text as initial translation.

(b) When user opted to not using any initial translation.

Testplan:
Translate the article 
https://he.wikipedia.org/wiki/%D7%92%D7%91%D7%A2%D7%AA_%D7%99%D7%A2%D7%A8%D7%99%D7%9D
from hewiki to English. Click on some sections. You will see empty
initial translation. After that, click on a reference in source section,
press 'Add reference' button from reference tool card.
You will see reference added. At the same time, you should see reference list
added at the bottom of the translation. The publishing of your translation
should succeed too.

Bug: T103502
Change-Id: I2a8d4d99eb8e69c75a35c28b638622a1b477bbf1
(cherry picked from commit 4925aab581f87865ff4c79a0fdf70146f2aafab6)
---
M modules/tools/ext.cx.tools.reference.js
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  KartikMistry: Verified; Looks good to me, approved



diff --git a/modules/tools/ext.cx.tools.reference.js 
b/modules/tools/ext.cx.tools.reference.js
index d40e884..f85293d 100644
--- a/modules/tools/ext.cx.tools.reference.js
+++ b/modules/tools/ext.cx.tools.reference.js
@@ -105,6 +105,8 @@
                        // Mark it readonly
                        .attr( 'contenteditable', false );
 
+               // Make sure we add reference list since we added a reference 
just now.
+               this.addReferenceList();
                this.stop();
        };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a8d4d99eb8e69c75a35c28b638622a1b477bbf1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: wmf/1.26wmf10
Gerrit-Owner: KartikMistry <kartik.mis...@gmail.com>
Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com>
Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com>

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

Reply via email to