From 2fd9837891434d48d5b6cf8ee6df345103324b40 Mon Sep 17 00:00:00 2001
From: Joe Bordes <joe@tsolucio.com>
Date: Sun, 4 Mar 2018 00:15:29 +0100
Subject: [PATCH] i18n(frontend) caught some missing translations while
 translating

---
 .../components/CreatedDatabaseModal.jsx          |  4 ++--
 .../src/metabase/admin/permissions/selectors.js  |  7 ++++---
 .../settings/components/SettingsXrayForm.jsx     |  2 +-
 .../metabase/components/DatabaseDetailsForm.jsx  |  6 +++---
 .../public/components/widgets/EmbedCodePane.jsx  |  2 +-
 .../src/metabase/pulse/components/PulseEdit.jsx  |  2 +-
 .../components/AlertListPopoverContent.jsx       |  2 +-
 .../query_builder/components/AlertModals.jsx     | 16 +++++++++-------
 .../components/QueryVisualization.jsx            |  4 ++--
 .../components/VisualizationResult.jsx           |  4 ++--
 .../setup/components/PreferencesStep.jsx         |  2 +-
 .../src/metabase/xray/components/InsightCard.jsx |  6 +++---
 .../metabase/xray/components/PreviewBanner.jsx   |  4 ++--
 13 files changed, 32 insertions(+), 29 deletions(-)

diff --git a/frontend/src/metabase/admin/databases/components/CreatedDatabaseModal.jsx b/frontend/src/metabase/admin/databases/components/CreatedDatabaseModal.jsx
index f6eecbacf61..296d2ed7282 100644
--- a/frontend/src/metabase/admin/databases/components/CreatedDatabaseModal.jsx
+++ b/frontend/src/metabase/admin/databases/components/CreatedDatabaseModal.jsx
@@ -22,12 +22,12 @@ export default class CreatedDatabaseModal extends Component {
             {jt`We're analyzing its schema now to make some educated guesses about its
                         metadata. ${(
                           <Link to={`/admin/datamodel/database/${databaseId}`}>
-                            View this database
+                            {t`View this database`}
                           </Link>
                         )} in the Data Model section to see what we've found and to
                         make edits, or ${(
                           <Link to={Urls.question(null, `?db=${databaseId}`)}>
-                            ask a question
+                            {t`ask a question`}
                           </Link>
                         )} about
                         this database.`}
diff --git a/frontend/src/metabase/admin/permissions/selectors.js b/frontend/src/metabase/admin/permissions/selectors.js
index b4cf5a762c2..347ae36892f 100644
--- a/frontend/src/metabase/admin/permissions/selectors.js
+++ b/frontend/src/metabase/admin/permissions/selectors.js
@@ -142,9 +142,10 @@ function getPermissionWarningModal(
   );
   if (permissionWarning) {
     return {
-      title: t`${
-        value === "controlled" ? "Limit" : "Revoke"
-      } access even though "${defaultGroup.name}" has greater access?`,
+      title:
+        (value === "controlled" ? t`Limit` : t`Revoke`) +
+        " " +
+        t`access even though "${defaultGroup.name}" has greater access?`,
       message: permissionWarning,
       confirmButtonText:
         value === "controlled" ? t`Limit access` : t`Revoke access`,
diff --git a/frontend/src/metabase/admin/settings/components/SettingsXrayForm.jsx b/frontend/src/metabase/admin/settings/components/SettingsXrayForm.jsx
index f426b8de005..d1cc135aa9c 100644
--- a/frontend/src/metabase/admin/settings/components/SettingsXrayForm.jsx
+++ b/frontend/src/metabase/admin/settings/components/SettingsXrayForm.jsx
@@ -43,7 +43,7 @@ const SettingsXrayForm = ({ settings, elements, updateSetting }) => {
         </p>
         <p className="text-paragraph">
           <em>{jt`${(
-            <strong>Note:</strong>
+            <strong>{t`Note`}:</strong>
           )} "Extended" is required for viewing time series x-rays.`}</em>
         </p>
 
diff --git a/frontend/src/metabase/components/DatabaseDetailsForm.jsx b/frontend/src/metabase/components/DatabaseDetailsForm.jsx
index f90ae68d623..8cabb427831 100644
--- a/frontend/src/metabase/components/DatabaseDetailsForm.jsx
+++ b/frontend/src/metabase/components/DatabaseDetailsForm.jsx
@@ -260,7 +260,7 @@ export default class DatabaseDetailsForm extends Component {
           <div className="Grid-cell--top">
             {jt`${(
               <a href={credentialsURL} target="_blank">
-                Click here
+                {t`Click here`}
               </a>
             )} to generate a Client ID and Client Secret for your project.`}
             {t`Choose "Other" as the application type. Name it whatever you'd like.`}
@@ -287,7 +287,7 @@ export default class DatabaseDetailsForm extends Component {
             <div className="Grid-cell--top">
               {jt`${(
                 <a href={authURL} target="_blank">
-                  Click here
+                  {t`Click here`}
                 </a>
               )} to get an auth code`}
               {engine === "bigquery" && (
@@ -322,7 +322,7 @@ export default class DatabaseDetailsForm extends Component {
             <div className="Grid-cell--top ml1">
               {jt`${(
                 <a href={enableAPIURL} target="_blank">
-                  Click here
+                  {t`Click here`}
                 </a>
               )} to go to the console if you haven't already done so.`}
             </div>
diff --git a/frontend/src/metabase/public/components/widgets/EmbedCodePane.jsx b/frontend/src/metabase/public/components/widgets/EmbedCodePane.jsx
index d7b471cb010..7d575e59072 100644
--- a/frontend/src/metabase/public/components/widgets/EmbedCodePane.jsx
+++ b/frontend/src/metabase/public/components/widgets/EmbedCodePane.jsx
@@ -100,7 +100,7 @@ export default class EmbedCodePane extends Component {
         <div className="text-centered my2">
           <h4>{jt`More ${(
             <ExternalLink href="https://github.com/metabase/embedding_reference_apps">
-              examples on GitHub
+              {t`examples on GitHub`}
             </ExternalLink>
           )}`}</h4>
         </div>
diff --git a/frontend/src/metabase/pulse/components/PulseEdit.jsx b/frontend/src/metabase/pulse/components/PulseEdit.jsx
index b7c26174a6a..4740b0d3e8b 100644
--- a/frontend/src/metabase/pulse/components/PulseEdit.jsx
+++ b/frontend/src/metabase/pulse/components/PulseEdit.jsx
@@ -88,7 +88,7 @@ export default class PulseEdit extends Component {
           <span key={index}>
             {jt`This pulse will no longer be emailed to ${(
               <strong>
-                {c.recipients.length} {inflect("address", c.recipients.length)}
+                {c.recipients.length} {inflect(t`address`, c.recipients.length)}
               </strong>
             )} ${<strong>{c.schedule_type}</strong>}`}.
           </span>
diff --git a/frontend/src/metabase/query_builder/components/AlertListPopoverContent.jsx b/frontend/src/metabase/query_builder/components/AlertListPopoverContent.jsx
index 4f6cf88b1cb..031dc330b87 100644
--- a/frontend/src/metabase/query_builder/components/AlertListPopoverContent.jsx
+++ b/frontend/src/metabase/query_builder/components/AlertListPopoverContent.jsx
@@ -336,7 +336,7 @@ export class AlertCreatorTitle extends Component {
     const isAdmin = user.is_superuser;
     const isCurrentUser = alert.creator.id === user.id;
     const creator =
-      alert.creator.id === user.id ? "You" : alert.creator.first_name;
+      alert.creator.id === user.id ? t`You` : alert.creator.first_name;
     const text =
       !isCurrentUser && !isAdmin
         ? t`You're receiving ${creator}'s alerts`
diff --git a/frontend/src/metabase/query_builder/components/AlertModals.jsx b/frontend/src/metabase/query_builder/components/AlertModals.jsx
index 24d955b8ba7..c035d3591c2 100644
--- a/frontend/src/metabase/query_builder/components/AlertModals.jsx
+++ b/frontend/src/metabase/query_builder/components/AlertModals.jsx
@@ -215,7 +215,7 @@ export class AlertEducationalScreen extends Component {
             <p
               className={`${classes} ml2 text-left`}
             >{jt`When a raw data question ${(
-              <strong>returns any results</strong>
+              <strong>{t`returns any results`}</strong>
             )}`}</p>
           </div>
           <div
@@ -226,7 +226,7 @@ export class AlertEducationalScreen extends Component {
             <p
               className={`${classes} mr2 text-right`}
             >{jt`When a line or bar ${(
-              <strong>crosses a goal line</strong>
+              <strong>{t`crosses a goal line`}</strong>
             )}`}</p>
           </div>
           <div
@@ -236,7 +236,9 @@ export class AlertEducationalScreen extends Component {
             <RetinaImage src="app/assets/img/alerts/education-illustration-03-progress.png" />
             <p
               className={`${classes} ml2 text-left`}
-            >{jt`When a progress bar ${<strong>reaches its goal</strong>}`}</p>
+            >{jt`When a progress bar ${(
+              <strong>{t`reaches its goal`}</strong>
+            )}`}</p>
           </div>
         </div>
         <Button
@@ -646,15 +648,15 @@ export class RawDataAlertTip extends Component {
 
 export const MultiSeriesAlertTip = () => (
   <div>{jt`${(
-    <strong>Heads up:</strong>
+    <strong>{t`Heads up`}:</strong>
   )} Goal-based alerts aren't yet supported for charts with more than one line, so this alert will be sent whenever the chart has ${(
-    <em>results</em>
+    <em>{t`results`}</em>
   )}.`}</div>
 );
 export const NormalAlertTip = () => (
   <div>{jt`${(
-    <strong>Tip:</strong>
+    <strong>{t`Tip`}:</strong>
   )} This kind of alert is most useful when your saved question doesn’t ${(
-    <em>usually</em>
+    <em>{t`usually`}</em>
   )} return any results, but you want to know when it does.`}</div>
 );
diff --git a/frontend/src/metabase/query_builder/components/QueryVisualization.jsx b/frontend/src/metabase/query_builder/components/QueryVisualization.jsx
index a6d53f6b3f4..afe9679d883 100644
--- a/frontend/src/metabase/query_builder/components/QueryVisualization.jsx
+++ b/frontend/src/metabase/query_builder/components/QueryVisualization.jsx
@@ -145,10 +145,10 @@ export default class QueryVisualization extends Component {
             {result.data.rows_truncated != null
               ? jt`Showing first ${(
                   <strong>{formatNumber(result.row_count)}</strong>
-                )} ${inflect("row", result.data.rows.length)}`
+                )} ${inflect(t`row`, result.data.rows.length)}`
               : jt`Showing ${(
                   <strong>{formatNumber(result.row_count)}</strong>
-                )} ${inflect("row", result.data.rows.length)}`}
+                )} ${inflect(t`row`, result.data.rows.length)}`}
           </div>
         ),
       });
diff --git a/frontend/src/metabase/query_builder/components/VisualizationResult.jsx b/frontend/src/metabase/query_builder/components/VisualizationResult.jsx
index fc3abe19269..33008f7be87 100644
--- a/frontend/src/metabase/query_builder/components/VisualizationResult.jsx
+++ b/frontend/src/metabase/query_builder/components/VisualizationResult.jsx
@@ -66,9 +66,9 @@ export default class VisualizationResult extends Component {
                     <p>
                       {jt`You can also ${(
                         <a className="link" onClick={this.showCreateAlertModal}>
-                          get an alert
+                          {t`get an alert`}
                         </a>
-                      )} when there are any results.`}
+                      )} when there are some results.`}
                     </p>
                   )}
                 <button
diff --git a/frontend/src/metabase/setup/components/PreferencesStep.jsx b/frontend/src/metabase/setup/components/PreferencesStep.jsx
index d6f78e486ef..a802869a409 100644
--- a/frontend/src/metabase/setup/components/PreferencesStep.jsx
+++ b/frontend/src/metabase/setup/components/PreferencesStep.jsx
@@ -103,7 +103,7 @@ export default class PreferencesStep extends Component {
               <div className="Form-field Form-offset">
                 <ul style={{ listStyle: "disc inside", lineHeight: "200%" }}>
                   <li>{jt`Metabase ${(
-                    <span style={{ fontWeight: "bold" }}>never</span>
+                    <span style={{ fontWeight: "bold" }}>{t`never`}</span>
                   )} collects anything about your data or question results.`}</li>
                   <li>{t`All collection is completely anonymous.`}</li>
                   <li
diff --git a/frontend/src/metabase/xray/components/InsightCard.jsx b/frontend/src/metabase/xray/components/InsightCard.jsx
index 3832837e993..6b687a362d2 100644
--- a/frontend/src/metabase/xray/components/InsightCard.jsx
+++ b/frontend/src/metabase/xray/components/InsightCard.jsx
@@ -178,14 +178,14 @@ export class VariationTrendInsight extends Component {
 
     return (
       <InsightText>
-        It looks like this data has grown {mode}ly{" "}
+        {t`It looks like this data has grown ${mode}ly`}{" "}
         <TermWithDefinition
           definition={variationTrendDefinition}
           link={varianceLink}
         >
-          varied
+          {t`varied`}
         </TermWithDefinition>{" "}
-        over time.
+        {t`over time.`}
       </InsightText>
     );
   }
diff --git a/frontend/src/metabase/xray/components/PreviewBanner.jsx b/frontend/src/metabase/xray/components/PreviewBanner.jsx
index 0c6a6d88d0f..f6484916d99 100644
--- a/frontend/src/metabase/xray/components/PreviewBanner.jsx
+++ b/frontend/src/metabase/xray/components/PreviewBanner.jsx
@@ -1,6 +1,6 @@
 import React from "react";
 import Icon from "metabase/components/Icon";
-import { jt } from "c-3po";
+import { t, jt } from "c-3po";
 const SURVEY_LINK =
   "https://docs.google.com/forms/d/e/1FAIpQLSc92WzF76ViiT8l4646lvFSWejNUhh4lhCSMXdZECILVwJG2A/viewform?usp=sf_link";
 
@@ -14,7 +14,7 @@ const PreviewBanner = () => (
     />
     <span>{jt`Welcome to the x-ray preview! We'd love ${(
       <a className="link" href={SURVEY_LINK} target="_blank">
-        your feedback
+        {t`your feedback`}
       </a>
     )}`}</span>
   </div>
-- 
GitLab