diff --git a/frontend/src/metabase/admin/databases/components/CreatedDatabaseModal.jsx b/frontend/src/metabase/admin/databases/components/CreatedDatabaseModal.jsx index f6eecbacf615870c7721b6f5427aa24a4d0c4700..296d2ed7282ab34fd7932a6072d7a0158743bbcb 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 b4cf5a762c278ace0b1215ce5201dd92e5d0950d..347ae36892f91b0b284cdce1029ebb0464b198cf 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 f426b8de0052ec9160ea87254861a8251230593b..d1cc135aa9c04a0220ece047f73f99eda5df13de 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 a130a7d78673e5afb9d7ba73c072e9c9f05059e2..13c1cfe40e2dde59c369c8553eec45bfd9e26e6e 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 d7b471cb010a8abeb5d4d82c4e488d09b7fde4b3..7d575e5907281513ad5c39a35f1015c77ef5c09f 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 b7c26174a6a28b935652bb9db8acb097c40b27bd..4740b0d3e8bd1ce65162f6fea2419ea619c68c5a 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 4f6cf88b1cbea8914cc0a1aa7d92c83344305573..031dc330b875349400210436ed0deda4e18293d8 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 24d955b8ba7c28c6f1b8d289dac659d5b23985e8..c035d3591c20ed58ef3c188fa008514d7ff72897 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 a6d53f6b3f4075ea5434db93ddcea9f9fd326ebd..afe9679d88377ede4ddf2bbc214e062106b88ceb 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 fc3abe19269981bcaa524db43927fd763e7d5bc8..33008f7be878ceb5c1a16ac9d6db2dfbd248ec08 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/xray/components/InsightCard.jsx b/frontend/src/metabase/xray/components/InsightCard.jsx index 3832837e9939a511156b462e5e1607a0c2c687f2..6b793d3f46c5e2c0bbe1281a1d012a3ff21c6467 100644 --- a/frontend/src/metabase/xray/components/InsightCard.jsx +++ b/frontend/src/metabase/xray/components/InsightCard.jsx @@ -175,17 +175,21 @@ export class VariationTrendInsight extends Component { render() { const { mode } = this.props; + const MODE_ADVERB_STRINGS = { + increasing: t`increasingly`, + decreasing: t`decreasingly` + }; return ( <InsightText> - It looks like this data has grown {mode}ly{" "} + {t`It looks like this data has grown ${MODE_ADVERB_STRINGS[mode]}`}{" "} <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 0c6a6d88d0f68dda1cce95926876ab8615975dfa..f6484916d996a75b31c5ed946a7c57fe496d59c5 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>