jenkins-bot has submitted this change and it was merged.

Change subject: Open the published article in new tab when clicked on success 
message
......................................................................


Open the published article in new tab when clicked on success message

Redoing I0666ccb6481

Change-Id: Iacc91c2eb7c62939c7fc730f28b1d974ea48ad41
---
M Resources.php
M i18n/en.json
M i18n/qqq.json
M modules/header/ext.cx.header.js
M modules/publish/ext.cx.publish.js
5 files changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  Siebrand: Looks good to me, but someone else must approve
  Jsahleen: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Resources.php b/Resources.php
index 851c43e..ce05d07 100644
--- a/Resources.php
+++ b/Resources.php
@@ -391,7 +391,7 @@
                'mediawiki.cookie',
        ),
        'messages' => array(
-               'cx-publish-page',
+               'cx-publish-page-success',
                'cx-publish-page-error',
                'cx-publish-button-publishing',
                'cx-publish-captcha-title',
diff --git a/i18n/en.json b/i18n/en.json
index 5e8e0d2..25e8cd4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -15,7 +15,7 @@
        "cx-header-progressbar-text-mt": "($1% from machine translation)",
        "cx-header-translation-center": "Translation center",
        "cx-source-view-page": "view page",
-       "cx-publish-page": "Page published at [$1 $2]",
+       "cx-publish-page-success": "Page published at $1",
        "cx-publish-page-error": "Error while saving page.",
        "cx-publish-button": "Publish translation",
        "cx-publish-button-publishing": "Publishing...",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 6b5c1da..05589e5 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -20,7 +20,7 @@
        "cx-header-progressbar-text-mt": "Text to be shown with the progress 
bar in [[Special:ContentTranslation]]. $1 is the estimated percent of 
machine-translated text out of all the translation text that was written so 
far.",
        "cx-header-translation-center": "Text for the translation center 
title.",
        "cx-source-view-page": "A link that points to the source page under the 
heading of the source article.\n{{Identical|View page}}",
-       "cx-publish-page": "Link to the published page. Parameters:\n* $1 - 
URL\n* $2 - link text -  a MediaWiki page title of a user subpage, such as 
\"User:Nike/Rabbit\"",
+       "cx-publish-page-success": "Message shown when page is published 
successfully. Parameters:\n* $1 - Link to the published page",
        "cx-publish-page-error": "Error message to display when page saving 
fails.",
        "cx-publish-button": "Publish button text in 
[[Special:ContentTranslation]].\n\nAlso used in 
{{msg-mw|Cx-tools-instructions-text6}}.",
        "cx-publish-button-publishing": "Publish button text in 
[[Special:ContentTranslation]], shown while publishing is in progress. Replaces 
{{msg-mw|cx-publish-button}}.\n{{Identical|Publishing}}",
diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js
index 06f1a1c..bb884d8 100644
--- a/modules/header/ext.cx.header.js
+++ b/modules/header/ext.cx.header.js
@@ -97,8 +97,7 @@
                this.$infoBar
                        .removeClass( 'cx-success cx-error' )
                        .addClass( type )
-                       .show()
-                       .find( 'a' ).attr( 'target', '_blank' );
+                       .show();
        };
 
        /**
diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index 441ccdd..3c84e3f 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -142,10 +142,11 @@
                        sourcerevision: mw.cx.sourceRevision,
                        categories: categories
                } ).done( function () {
-                       mw.hook( 'mw.cx.success' ).fire( mw.message(
-                               'cx-publish-page',
-                               mw.util.getUrl( targetTitle ),
-                               targetTitle
+                       mw.hook( 'mw.cx.success' ).fire( mw.message( 
'cx-publish-page-success',
+                               $( '<a>' ).attr( {
+                                       href: mw.util.getUrl( targetTitle ),
+                                       target: '_blank'
+                               } ).text( targetTitle )[ 0 ].outerHTML
                        ) );
                        mw.hook( 'mw.cx.translation.published' ).fire(
                                mw.cx.sourceLanguage,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iacc91c2eb7c62939c7fc730f28b1d974ea48ad41
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Jsahleen <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to