Skip to content
Snippets Groups Projects
Unverified Commit 248bc220 authored by Ryan Senior's avatar Ryan Senior Committed by GitHub
Browse files

Merge pull request #7267 from joebordes/i18n_trstr_021

i18n(backend) translating some strings
parents 1070bbf2 066eb4c2
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
[metabase.models.setting :as setting :refer [defsetting]]
[metabase.util :as u]
[metabase.util.schema :as su]
[puppetlabs.i18n.core :refer [tru]]
[schema.core :as s]))
(defn- valid-json?
......@@ -63,8 +64,7 @@
:builtin true}})
(defsetting custom-geojson
"JSON containing information about custom GeoJSON files for use in map visualizations instead of the default US
State or World GeoJSON."
(tru "JSON containing information about custom GeoJSON files for use in map visualizations instead of the default US State or World GeoJSON.")
:type :json
:default {}
:getter (fn [] (merge (setting/get-json :custom-geojson) builtin-geojson))
......
......@@ -5,16 +5,17 @@
[metabase.models
[interface :as mi]
[setting :refer [defsetting]]]
[puppetlabs.i18n.core :refer [tru]]
[toucan.db :as db]))
(defsetting getting-started-things-to-know
"'Some things to know' text field for the Getting Started guide.")
(tru "''Some things to know'' text field for the Getting Started guide."))
(defsetting getting-started-contact-name
"Name of somebody users can contact for help in the Getting Started guide.")
(tru "Name of somebody users can contact for help in the Getting Started guide."))
(defsetting getting-started-contact-email
"Email of somebody users can contact for help in the Getting Started guide.")
(tru "Email of somebody users can contact for help in the Getting Started guide."))
(api/defendpoint GET "/"
......
......@@ -19,6 +19,7 @@
[metabase.util
[password :as pass]
[schema :as su]]
[puppetlabs.i18n.core :refer [tru]]
[schema.core :as s]
[throttle.core :as throttle]
[toucan.db :as db]))
......@@ -169,10 +170,10 @@
;; add more 3rd-party SSO options
(defsetting google-auth-client-id
"Client ID for Google Auth SSO. If this is set, Google Auth is considered to be enabled.")
(tru "Client ID for Google Auth SSO. If this is set, Google Auth is considered to be enabled."))
(defsetting google-auth-auto-create-accounts-domain
"When set, allow users to sign up on their own if their Google account email address is from this domain.")
(tru "When set, allow users to sign up on their own if their Google account email address is from this domain."))
(defn- google-auth-token-info [^String token]
(let [{:keys [status body]} (http/post (str "https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=" token))]
......
......@@ -24,6 +24,7 @@
table]
[metabase.sync.interface :as si]
[metabase.util :as u]
[puppetlabs.i18n.core :refer [tru]]
[schema.core :as s]
[puppetlabs.i18n.core :refer [tru]]
[toucan.db :as db])
......
......@@ -3,10 +3,11 @@
[clj-http.client :as http]
[clojure.tools.logging :as log]
[metabase.models.setting :as setting :refer [defsetting]]
[puppetlabs.i18n.core :refer [tru]]
[metabase.util :as u]))
;; Define a setting which captures our Slack api token
(defsetting slack-token "Slack API bearer token obtained from https://api.slack.com/web#authentication")
(defsetting slack-token (tru "Slack API bearer token obtained from https://api.slack.com/web#authentication"))
(def ^:private ^:const ^String slack-api-base-url "https://slack.com/api")
(def ^:private ^:const ^String files-channel-name "metabase_files")
......
......@@ -13,6 +13,7 @@
[clojure.tools.logging :as log]
[metabase.models.setting :as setting :refer [defsetting]]
[metabase.util.infer-spaces :refer [infer-spaces]]
[puppetlabs.i18n.core :refer [tru]]
[toucan.db :as db]))
(def ^:private ^:const acronyms
......@@ -112,8 +113,8 @@
(re-humanize-table-and-field-names!))
(defsetting ^{:added "0.28.0"} humanization-strategy
"Metabase can attempt to transform your table and field names into more sensible, human-readable versions, e.g.
\"somehorriblename\" becomes \"Some Horrible Name\". This doesn’t work all that well if the names are in a language
other than English, however. Do you want us to take a guess?"
(str (tru "Metabase can attempt to transform your table and field names into more sensible, human-readable versions, e.g. \"somehorriblename\" becomes \"Some Horrible Name\".")
(tru "This doesn’t work all that well if the names are in a language other than English, however.")
(tru "Do you want us to take a guess?"))
:default "advanced"
:setter set-humanization-strategy!)
......@@ -9,6 +9,7 @@
[metabase.config :as config]
[metabase.util :as u]
[metabase.util.schema :as su]
[puppetlabs.i18n.core :refer [tru]]
[schema.core :as s]))
(def ^:private ValidToken
......@@ -83,7 +84,7 @@
;; TODO - better docstring
(defsetting premium-embedding-token
"Token for premium embedding. Go to the MetaStore to get yours!"
(tru "Token for premium embedding. Go to the MetaStore to get yours!")
:setter (fn [new-value]
;; validate the new value if we're not unsetting it
(try
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment