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

Change subject: Use "all translations" link on the translation view when drafts 
enabled
......................................................................


Use "all translations" link on the translation view when drafts enabled

Bug: T75976
Change-Id: I7e70d7941b3faf0a36ad4f960b9adebc89858e4f
---
M Resources.php
M i18n/en.json
M i18n/qqq.json
M modules/header/ext.cx.header.js
4 files changed, 9 insertions(+), 2 deletions(-)

Approvals:
  Jsahleen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Resources.php b/Resources.php
index 87f1323..e7123a0 100644
--- a/Resources.php
+++ b/Resources.php
@@ -99,6 +99,7 @@
                'cx-error-server-connection',
                'cx-error-page-not-found',
                'cx-header-new-translation',
+               'cx-header-all-translations',
                'cx-publish-button',
                'cx-save-draft-button',
                'cx-special-login-error',
diff --git a/i18n/en.json b/i18n/en.json
index d6a712e..3f9f26f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -17,6 +17,7 @@
        "cx-header-progressbar-text-mt": "($1% from machine translation)",
        "cx-header-translation-center": "Translation center",
        "cx-header-new-translation": "New translation",
+       "cx-header-all-translations": "All translations",
        "cx-source-view-page": "view page",
        "cx-publish-page-success": "Page published at $1",
        "cx-publish-page-error": "Error while saving page.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 2c61b1b..66c2574 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -21,6 +21,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-header-new-translation": "A link at the top of the translation 
interface to the main Special:ContentTranslation page that creates a new 
translation.\n{{Identical|New translation}}",
+       "cx-header-all-translations":  "A link at the top of the translation 
interface to the main Special:ContentTranslation page that lists all 
translations by the user.\n{{Identical|New translation}}",
        "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-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.",
diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js
index a3ce082..a5320b3 100644
--- a/modules/header/ext.cx.header.js
+++ b/modules/header/ext.cx.header.js
@@ -175,10 +175,14 @@
                        .append( $logo, $titleText );
 
                $translationCenterLink = $( '<a>' )
-               // TODO update the text when the dashboard is ready
-               .text( mw.msg( 'cx-header-new-translation' ) )
                        .attr( 'href', mw.util.getUrl( 
'Special:ContentTranslation' ) );
 
+               if ( mw.config.get( 'wgContentTranslationDatabase' ) !== null ) 
{
+                       $translationCenterLink.text( mw.msg( 
'cx-header-all-translations' ) );
+               } else {
+                       $translationCenterLink.text( mw.msg( 
'cx-header-new-translation' ) );
+               }
+
                $translationCenter = $( '<div>' )
                        .addClass( 'cx-header__translation-center' )
                        .append( $translationCenterLink );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e70d7941b3faf0a36ad4f960b9adebc89858e4f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Jsahleen <[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