From 6df84eb50c4ddcca4af544154e15280bc869a63c Mon Sep 17 00:00:00 2001 From: Maz Ameli <maz@metabase.com> Date: Mon, 5 Aug 2019 15:26:09 -0700 Subject: [PATCH] Tag untagged strings (#10463) * replace accordian with accordion everywhere (#10449) * a game of tag tagging untagged strings --- frontend/src/metabase-lib/lib/queries/structured/Join.js | 9 +++++---- frontend/src/metabase/components/BrowseApp.jsx | 2 +- frontend/src/metabase/entities/users.js | 1 + .../query_builder/components/notebook/steps/JoinStep.jsx | 3 ++- .../components/notebook/steps/LimitStep.jsx | 4 +++- .../query_builder/components/view/QuestionFilters.jsx | 2 +- .../components/view/sidebars/SummarizeSidebar.jsx | 4 ++-- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/frontend/src/metabase-lib/lib/queries/structured/Join.js b/frontend/src/metabase-lib/lib/queries/structured/Join.js index 695435b67c1..33b913b850d 100644 --- a/frontend/src/metabase-lib/lib/queries/structured/Join.js +++ b/frontend/src/metabase-lib/lib/queries/structured/Join.js @@ -1,6 +1,7 @@ /* @flow */ import { MBQLObjectClause } from "./MBQLClause"; +import { t } from "ttag"; import StructuredQuery from "../StructuredQuery"; import Dimension, { JoinedDimension } from "metabase-lib/lib/Dimension"; @@ -18,10 +19,10 @@ import type { import _ from "underscore"; const JOIN_STRATEGY_OPTIONS = [ - { value: "left-join", name: "Left outer join", icon: "join_left_outer" }, // default - { value: "right-join", name: "Right outer join", icon: "join_right_outer" }, - { value: "inner-join", name: "Inner join", icon: "join_inner" }, - { value: "full-join", name: "Full outer join", icon: "join_full_outer" }, + { value: "left-join", name: t`Left outer join`, icon: "join_left_outer" }, // default + { value: "right-join", name: t`Right outer join`, icon: "join_right_outer" }, + { value: "inner-join", name: t`Inner join`, icon: "join_inner" }, + { value: "full-join", name: t`Full outer join`, icon: "join_full_outer" }, ]; export default class Join extends MBQLObjectClause { diff --git a/frontend/src/metabase/components/BrowseApp.jsx b/frontend/src/metabase/components/BrowseApp.jsx index 575c8c5c8e2..c15e1438883 100644 --- a/frontend/src/metabase/components/BrowseApp.jsx +++ b/frontend/src/metabase/components/BrowseApp.jsx @@ -241,7 +241,7 @@ function BrowseHeader({ crumbs }) { <div className="flex align-center text-medium text-brand-hover"> <Icon className="flex align-center" size={14} name="reference" /> <Link className="ml1 flex align-center text-bold"> - Learn about our data + {t`Learn about our data`} </Link> </div> </Link> diff --git a/frontend/src/metabase/entities/users.js b/frontend/src/metabase/entities/users.js index a5d0c7b3c93..31546423869 100644 --- a/frontend/src/metabase/entities/users.js +++ b/frontend/src/metabase/entities/users.js @@ -47,6 +47,7 @@ const BASE_FORM_FIELDS: FormFieldDefinition[] = [ }, { name: "email", + title: t`Email`, placeholder: "youlooknicetoday@email.com", validate: email => !email && t`Email is required`, }, diff --git a/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.jsx b/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.jsx index e692c520f9b..192b1688ac9 100644 --- a/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.jsx +++ b/frontend/src/metabase/query_builder/components/notebook/steps/JoinStep.jsx @@ -3,6 +3,7 @@ import React from "react"; import { Flex } from "grid-styled"; import cx from "classnames"; import _ from "underscore"; +import { t } from "ttag"; import { NotebookCell, @@ -146,7 +147,7 @@ class JoinClause extends React.Component { icon="table2" inactive={!joinedTable} > - {joinedTable ? joinedTable.displayName() : `Pick a table...`} + {joinedTable ? joinedTable.displayName() : t`Pick a table...`} </NotebookCellItem> } /> diff --git a/frontend/src/metabase/query_builder/components/notebook/steps/LimitStep.jsx b/frontend/src/metabase/query_builder/components/notebook/steps/LimitStep.jsx index 29bea03b2f5..1d2dbd2b687 100644 --- a/frontend/src/metabase/query_builder/components/notebook/steps/LimitStep.jsx +++ b/frontend/src/metabase/query_builder/components/notebook/steps/LimitStep.jsx @@ -1,5 +1,7 @@ import React from "react"; +import { t } from "ttag"; + import Input from "metabase/components/Input"; import { NotebookCell } from "../NotebookCell"; @@ -18,7 +20,7 @@ export default function LimitStep({ className="mb1" type="number" value={query.limit() == null ? "" : query.limit()} - placeholder="Enter a limit" + placeholder={t`Enter a limit`} onChange={e => { const limit = parseInt(e.target.value, 0); if (limit >= 1) { diff --git a/frontend/src/metabase/query_builder/components/view/QuestionFilters.jsx b/frontend/src/metabase/query_builder/components/view/QuestionFilters.jsx index 59ef194422d..5c81d314eee 100644 --- a/frontend/src/metabase/query_builder/components/view/QuestionFilters.jsx +++ b/frontend/src/metabase/query_builder/components/view/QuestionFilters.jsx @@ -61,7 +61,7 @@ export default function QuestionFilters({ ))} </div> ) : ( - <Tooltip tooltip={`Show filters`}> + <Tooltip tooltip={t`Show filters`}> <FilterPill invert icon="filter" onClick={onExpand}> {filters.length} </FilterPill> diff --git a/frontend/src/metabase/query_builder/components/view/sidebars/SummarizeSidebar.jsx b/frontend/src/metabase/query_builder/components/view/sidebars/SummarizeSidebar.jsx index bbc2f6402e4..960c877d093 100644 --- a/frontend/src/metabase/query_builder/components/view/sidebars/SummarizeSidebar.jsx +++ b/frontend/src/metabase/query_builder/components/view/sidebars/SummarizeSidebar.jsx @@ -80,7 +80,7 @@ export default class SummarizeSidebar extends React.Component { </div> {query.hasAggregations() && ( <div className="border-top mt3 pt3 mx1"> - <h3 className="text-heavy mb2 ml2">Group by</h3> + <h3 className="text-heavy mb2 ml2">{t`Group by`}</h3> <SummarizeBreakouts className="mx2" query={query} /> </div> )} @@ -164,7 +164,7 @@ const SummarizeAggregationAdd = ({ className, query }) => { className="flex-full align-center rounded bg-light bg-medium-hover text-green text-bold transition-all" > <Icon className="ml2 mr1" name="add" size="10" /> - <span className="text-small">Add a metric</span> + <span className="text-small">{t`Add a metric`}</span> </Flex> } isInitiallyOpen={!query.hasAggregations()} -- GitLab