From b0b88286b8c2fa697df70863ed4e44fd15fc7de0 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Wed, 22 Sep 2021 18:51:39 +0100 Subject: [PATCH] ui: Add initial i18n docs page (#10888) --- ui/packages/consul-ui/docs/i18n.mdx | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ui/packages/consul-ui/docs/i18n.mdx diff --git a/ui/packages/consul-ui/docs/i18n.mdx b/ui/packages/consul-ui/docs/i18n.mdx new file mode 100644 index 000000000..2fcb891c6 --- /dev/null +++ b/ui/packages/consul-ui/docs/i18n.mdx @@ -0,0 +1,40 @@ +# i18n + +At the time of writing we are currently in the process of +localizing/internationalizing the entire codebase. To help us to do this we +use the [`ember-intl`](https://github.com/ember-intl/ember-intl) ember addon + +Please see [`ember-intl`s documentation](https://ember-intl.github.io/ember-intl/versions/master/docs/quickstart) +for information on how to use this. + +Additionally we have several dev-time only cookie/environment variables to +help engineers see what still requires localizing, to test copy/text using +localizations other than en-us and to view any required interpolation +variables with rendered text, instead of doing the actual interpolation +itself. + +| Link/Bookmarklet | Description | +| ---- | ----------- | +| [Enable Intl Debug](javascript:Scenario('CONSUL_INTL_DEBUG=1')) | Render intl interpolation variable names instead of interpolating them | +| [Intl Lorem Ipsum](javascript:Scenario('CONSUL_INTL_LOCALE=la-fk')) | Render all intl copy as lorem ipsum | +| [Intl Dashes](javascript:Scenario('CONSUL_INTL_LOCALE=-')) | Render all intl copy as `-` | + +## en-us + +If in doubt, or unless specifically directed otherwise, all text should use +sentence case, apart from 'Consul Nouns' which should use capital casing. +'Consul Nouns' here would be things like 'Services', 'Ingress Gateways', 'Nodes' +and other things that are specific 'objects' in Consul. We also use the form +'ACLs' for acronyms instead of 'Acls'. + +```yaml +text: Viewing metrics for Ingress Gateways is not currently supported +text: ACLs are disabled +``` + +instead of: + +```yaml +text: Viewing Metrics for ingress gateways is not currently supported +text: Acls are disabled +```