]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10414 Missing l10n message in Marketplace (#3038)
authorStas Vilchik <stas.vilchik@sonarsource.com>
Fri, 9 Feb 2018 10:24:46 +0000 (11:24 +0100)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 9 Feb 2018 10:36:58 +0000 (11:36 +0100)
server/sonar-web/src/main/js/app/components/nav/settings/SettingsEditionsNotif.tsx
server/sonar-web/src/main/js/app/components/nav/settings/__tests__/__snapshots__/SettingsEditionsNotif-test.tsx.snap
server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index b73c4267239a60cd3c09d084c6d93e29a3cac9a2..e5a5d8dfef4f7316d370b48a1da0f8fb2ca7e1a5 100644 (file)
@@ -55,10 +55,10 @@ export default class SettingsEditionsNotif extends React.PureComponent<Props, St
         <span>
           {edition
             ? translateWithParameters(
-                'marketplace.status_x.' + editionStatus.installationStatus,
+                'marketplace.edition_status_x.' + editionStatus.installationStatus,
                 edition.name
               )
-            : translate('marketplace.status', editionStatus.installationStatus)}
+            : translate('marketplace.edition_status', editionStatus.installationStatus)}
         </span>
       </NavBarNotif>
     );
@@ -71,10 +71,10 @@ export default class SettingsEditionsNotif extends React.PureComponent<Props, St
         <span>
           {edition
             ? translateWithParameters(
-                'marketplace.status_x.' + editionStatus.installationStatus,
+                'marketplace.edition_status_x.' + editionStatus.installationStatus,
                 edition.name
               )
-            : translate('marketplace.status', editionStatus.installationStatus)}
+            : translate('marketplace.edition_status', editionStatus.installationStatus)}
         </span>
         {edition &&
           edition.key === 'datacenter' && (
@@ -95,7 +95,7 @@ export default class SettingsEditionsNotif extends React.PureComponent<Props, St
             </span>
           )}
         {!preventRestart && (
-          <button className="js-restart spacer-left" onClick={this.handleOpenRestart}>
+          <button className="js-restart spacer-left" onClick={this.handleOpenRestart} type="button">
             {translate('marketplace.restart')}
           </button>
         )}
@@ -111,10 +111,10 @@ export default class SettingsEditionsNotif extends React.PureComponent<Props, St
       <NavBarNotif className="alert alert-danger">
         {edition
           ? translateWithParameters(
-              'marketplace.status_x.' + editionStatus.installationStatus,
+              'marketplace.edition_status_x.' + editionStatus.installationStatus,
               edition.name
             )
-          : translate('marketplace.status', editionStatus.installationStatus)}
+          : translate('marketplace.edition_status', editionStatus.installationStatus)}
         <a
           className="spacer-left"
           href={
index dcef4f6806f233b321e8d9dd45a9047661f4ab97..1b1380978bfa844591b774a6ccace29275244850 100644 (file)
@@ -4,7 +4,7 @@ exports[`should display a manual installation notification 1`] = `
 <NavBarNotif
   className="alert alert-danger"
 >
-  marketplace.status_x.MANUAL_IN_PROGRESS.Foo
+  marketplace.edition_status_x.MANUAL_IN_PROGRESS.Foo
   <a
     className="spacer-left"
     href="https://redirect.sonarsource.com/doc/how-to-install-an-edition.html"
@@ -28,11 +28,12 @@ exports[`should display a ready notification 1`] = `
   className="alert alert-success"
 >
   <span>
-    marketplace.status.AUTOMATIC_READY
+    marketplace.edition_status.AUTOMATIC_READY
   </span>
   <button
     className="js-restart spacer-left"
     onClick={[Function]}
+    type="button"
   >
     marketplace.restart
   </button>
@@ -47,7 +48,7 @@ exports[`should display an in progress notif 1`] = `
     className="spinner spacer-right text-bottom"
   />
   <span>
-    marketplace.status.AUTOMATIC_IN_PROGRESS
+    marketplace.edition_status.AUTOMATIC_IN_PROGRESS
   </span>
 </NavBarNotif>
 `;
index 0db83778cf1c74cce211659d07b1404c7081c179..06a9495883505aeb5529bd9bb038bdacddee1a8f 100644 (file)
@@ -21,7 +21,7 @@ import * as React from 'react';
 import DateFormatter from '../../../components/intl/DateFormatter';
 import Tooltip from '../../../components/controls/Tooltip';
 import { Release, Update } from '../../../api/plugins';
-import { translate, translateWithParameters } from '../../../helpers/l10n';
+import { translate } from '../../../helpers/l10n';
 
 interface Props {
   release: Release;
@@ -37,7 +37,7 @@ export default function PluginChangeLogItem({ release, update }: Props) {
             {release.version}
           </span>
         ) : (
-          <Tooltip overlay={translateWithParameters('marketplace.status', update.status)}>
+          <Tooltip overlay={translate('marketplace.update_status', update.status)}>
             <span className="js-plugin-changelog-version badge badge-warning spacer-right">
               {release.version}
             </span>
index fcc1611894af2d1c4a8502abe0ec06d1d65b597a..1bbb18782f27d140248ee8916ebcd427f0de3eaf 100644 (file)
@@ -57,7 +57,7 @@ export default class PluginUpdateItem extends React.PureComponent<Props, State>
           {update.status === 'COMPATIBLE' ? (
             <span className="js-update-version badge badge-success">{release.version}</span>
           ) : (
-            <Tooltip overlay={translate('marketplace.status', update.status)}>
+            <Tooltip overlay={translate('marketplace.update_status', update.status)}>
               <span className="js-update-version badge badge-warning">{release.version}</span>
             </Tooltip>
           )}
index 7a4fef57e0aaaa1bd0b0060a5cde35eb205b480f..f2c3e7f0571e789b5a220419ebd7d472d5dcccbe 100644 (file)
@@ -2140,10 +2140,10 @@ marketplace.install_pending=Install Pending
 marketplace.update_pending=Update Pending
 marketplace.uninstall_pending=Uninstall Pending
 marketplace.updates=Updates
-marketplace.status.COMPATIBLE=Compatible
-marketplace.status.INCOMPATIBLE=Incompatible
-marketplace.status.REQUIRES_SYSTEM_UPGRADE=Requires system update
-marketplace.status.DEPS_REQUIRE_SYSTEM_UPGRADE=Some of dependencies requires system update
+marketplace.update_status.COMPATIBLE=Compatible
+marketplace.update_status.INCOMPATIBLE=Incompatible
+marketplace.update_status.REQUIRES_SYSTEM_UPGRADE=Requires system update
+marketplace.update_status.DEPS_REQUIRE_SYSTEM_UPGRADE=Some of dependencies requires system update
 marketplace.license_preview_status.NO_INSTALL=No installation needed, your license will be updated directly.
 marketplace.license_preview_status.AUTOMATIC_INSTALL=After clicking on "Install", your {0} will be automatically downloaded and installed, and you'll need to restart your server once it's completed.
 marketplace.license_preview_status.MANUAL_INSTALL={0} can't automatically be installed because of internet access issues. A manual installation is required.
@@ -2154,15 +2154,15 @@ marketplace.i_accept_the=I accept the
 marketplace.commercial_edition=Commercial Edition
 marketplace.terms_and_conditions=Terms and Conditions
 marketplace.editions_unavailable=Explore our Commercial Editions on {url}: advanced feature packs brought to you by SonarSource
+marketplace.edition_status.AUTOMATIC_IN_PROGRESS=Installing your new Commercial Edition... Please wait...
+marketplace.edition_status.AUTOMATIC_READY=Commercial Edition successfully installed. Please restart the server to activate your new edition.
+marketplace.edition_status.UNINSTALL_IN_PROGRESS=Commercial Edition successfully downgraded. Please restart the server to remove the features.
+marketplace.edition_status.MANUAL_IN_PROGRESS=Commercial Edition can't automatically be installed because of internet access issues. Please manually install the package.
+marketplace.edition_status_x.AUTOMATIC_IN_PROGRESS=Installing your new {0}... Please wait...
+marketplace.edition_status_x.AUTOMATIC_READY={0} successfully installed. Please restart the server to activate your new edition.
+marketplace.edition_status_x.UNINSTALL_IN_PROGRESS=Successfully downgraded to {0}. Please restart the server to remove the features.
+marketplace.edition_status_x.MANUAL_IN_PROGRESS={0} can't automatically be installed because of internet access issues. Please manually install the package.
 marketplace.release_notes=Release Notes
-marketplace.status.AUTOMATIC_IN_PROGRESS=Installing your new Commercial Edition. Please wait...
-marketplace.status.AUTOMATIC_READY=Commercial Edition successfully installed. Please restart the server to activate your new edition.
-marketplace.status.UNINSTALL_IN_PROGRESS=Commercial Edition successfully downgraded. Please restart the server to remove the features.
-marketplace.status.MANUAL_IN_PROGRESS=Commercial Edition can't automatically be installed because of internet access issues. Please manually install the package.
-marketplace.status_x.AUTOMATIC_IN_PROGRESS=Installing your new {0}. Please wait...
-marketplace.status_x.AUTOMATIC_READY={0} successfully installed. Please restart the server to activate your new edition.
-marketplace.status_x.UNINSTALL_IN_PROGRESS=Successfully downgraded to {0}. Please restart the server to remove the features.
-marketplace.status_x.MANUAL_IN_PROGRESS={0} can't automatically be installed because of internet access issues. Please manually install the package.
 marketplace.how_to_install=How to install it?
 marketplace.see_documentation_to_enable_cluster=See {url} documentation to set up a cluster.
 marketplace.how_to_setup_cluster_url=Further configuration is required to set up a cluster. See {url} documentation.