Skip to content

Commit

Permalink
docs: Edits to remove jargon
Browse files Browse the repository at this point in the history
  • Loading branch information
TeriGlover committed Jul 26, 2021
1 parent dbae001 commit 6775a35
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
52 changes: 26 additions & 26 deletions aio/content/guide/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ To localize your app, follow these general steps:
6. [Merge translations into the app](#merge).
7. [Deploy multiple locales](#deploy-locales).

While following these steps, you can [explore the translated example app](#app-pre-translation).
While following these steps, [explore the translated example app](#app-pre-translation).

The following are optional practices that may be required in special cases:
The following are optional practices that might be required in special cases:

* [Set the source locale manually](#set-source-manually) if you need to set the [LOCALE_ID](api/core/LOCALE_ID "API reference for LOCALE_ID") token.
* [Import global variants of the locale data](#import-locale) for extra locale data.
Expand All @@ -81,7 +81,7 @@ For more information about `package.json` and polyfill packages, see [Workspace

</div>

If `@angular/localize` is not installed, the Angular CLI may generate an error when you try to build a localized version of your app.
If `@angular/localize` is not installed, the Angular CLI might generate an error when you try to build a localized version of your app.

{@a setting-up-locale}

Expand Down Expand Up @@ -115,7 +115,7 @@ Use a more specific locale ID, such as French for Canada (`fr-CA`), when localiz
Angular by default uses `en-US` (English in the United States) as your app's source locale.

The [Angular repository](https://github.com/angular/angular/tree/master/packages/common/locales "Common locales in the Angular repository") includes common locales.
You can change your app's source locale for the build by setting the source locale in the `sourceLocale` field of your app's [workspace configuration](guide/workspace-config "Angular workspace configuration") file (`angular.json`).
To change your app's source locale for the build, set the source locale in the `sourceLocale` field of your app's [workspace configuration](guide/workspace-config "Angular workspace configuration") file (`angular.json`).
The build process (described in [Merge translations into the app](#merge) in this guide) uses your app's `angular.json` file to automatically set the [`LOCALE_ID`](api/core/LOCALE_ID "API reference for LOCALE_ID") token and load the locale data.

{@a i18n-pipes}
Expand Down Expand Up @@ -173,16 +173,16 @@ After translation, the compiler removes it. It is not an Angular directive.

### Add helpful descriptions and meanings

To translate a text message accurately, the translator may need additional information or context.
To translate a text message accurately, the translator might need additional information or context.
Add a _description_ of the text message as the value of the `i18n` attribute, as shown in the following example:

<code-example path="i18n/doc-files/app.component.html" region="i18n-attribute-desc" header="src/app/app.component.html"></code-example>

The translator may also need to know the meaning or intent of the text message within this particular app context, in order to translate it the same way as other text with the same meaning.
The translator might also need to know the meaning or intent of the text message within this particular app context, in order to translate it the same way as other text with the same meaning.
Start the `i18n` attribute value with the _meaning_ and
separate it from the _description_ with the `|` character: `<meaning>|<description>`.

For example, you can add the meaning that this `<h1>` tag is a site header that needs to be translated the same way not only when used as a header, but also when referred to from another section of text:
For example, to add the meaning that this `<h1>` tag is a site header that needs to be translated the same way, not only when used as a header, but also when referred to from another section of text:

<code-example path="i18n/doc-files/app.component.html" region="i18n-attribute-meaning" header="src/app/app.component.html"></code-example>

Expand Down Expand Up @@ -247,15 +247,15 @@ The ICU clauses adhere to the [ICU Message Format](http://userguide.icu-project.

#### Mark plurals

Use the `plural` clause to mark expressions that may not be meaningful if translated word-for-word.
Use the `plural` clause to mark expressions that might not be meaningful if translated word-for-word.

For example, if you want to display "updated x minutes ago" in English, you may want to display "just now", "one minute ago", or "_x_ minutes ago" (with _x_ as the actual number).
For example, if you want to display "updated x minutes ago" in English, you might want to display "just now", "one minute ago", or "_x_ minutes ago" (with _x_ as the actual number).
Other languages might express this cardinality differently.
The following example shows how to use a `plural` clause to express these three options:

<code-example path="i18n/src/app/app.component.html" region="i18n-plural" header="src/app/app.component.html"></code-example>

In the above example:
In the preceding example:

* The first parameter, `minutes`, is bound to the component property (`minutes`), which determines the number of minutes.

Expand All @@ -265,7 +265,7 @@ In the above example:
* For zero minutes, use `=0 {just now}`.
* For one minute, use `=1 {one minute}`.
* For any unmatched cardinality, use `other {{{minutes}} minutes ago}`.
You can use HTML markup and [interpolations](guide/glossary#interpolation "Definition of interpolation") such as `{{{minutes}}` with the `plural` clause in expressions.
Use HTML markup and [interpolations](guide/glossary#interpolation "Definition of interpolation") such as `{{{minutes}}` with the `plural` clause in expressions.
* After the pluralization category, put the default text (English) within braces (`{}`).

Pluralization categories include (depending on the language):
Expand All @@ -279,7 +279,7 @@ Pluralization categories include (depending on the language):
* `other`

<div class="callout is-important">
<header>Locales may not support some pluralization categories</header>
<header>Locales might not support some pluralization categories</header>

Many locales don't support some of the pluralization categories.
For example, the default locale (`en-US`) and other locales (such as `es`) have very simple `plural()` functions that don't support the `few` category.
Expand Down Expand Up @@ -420,7 +420,7 @@ For example, to create a French translation file, follow these steps:
3. Rename the copy to `messages.fr.xlf` for the French language (`fr`) translation.
Send this translation file to the translator.

Repeat the above steps for each language you want to add to your app.
Repeat the preceding steps for each language you want to add to your app.

{@a translate-text-nodes}

Expand Down Expand Up @@ -474,7 +474,7 @@ To translate a `plural`, translate its ICU format match values as shown in the f

<code-example path="i18n/doc-files/messages.fr.xlf.html" region="translated-plural" header="src/locale/messages.fr.xlf (&lt;trans-unit&gt;)"></code-example>

You can add or remove plural cases as needed for each language.
Add or remove plural cases as needed for each language.

<div class="alert is-helpful">

Expand Down Expand Up @@ -563,7 +563,7 @@ You can then [generate app versions for each locale](#localize-generate) using t

<div class="alert is-helpful">

You can optionally [apply specific build options for just one locale](#localize-build-one-locale) for a custom locale configuration.
Optionally, [apply specific build options for just one locale](#localize-build-one-locale) for a custom locale configuration.

</div>

Expand Down Expand Up @@ -627,7 +627,7 @@ The following example shows the `"localize"` option set to `true` in `angular.js
<div class="alert is-helpful">

Due to the deployment complexities of i18n and the need to minimize rebuild time, the development server only supports localizing a single locale at a time.
Setting the `"localize"` option to `true` will cause an error when using `ng serve` if more than one locale is defined.
Setting the `"localize"` option to `true` causes an error when using `ng serve` if more than one locale is defined.
Setting the option to a specific locale, such as `"localize": ["fr"]`, can work if you want to develop against a specific locale (such as `fr`).

</div>
Expand All @@ -636,13 +636,13 @@ The CLI loads and registers the locale data, places each generated version in a
For each application variant the `lang` attribute of the `html` element is set to the locale.
The CLI also adjusts the HTML base HREF for each version of the app by adding the locale to the configured `baseHref`.

You can set the `"localize"` property as a shared configuration that all the configurations effectively inherit (or can override).
Set the `"localize"` property as a shared configuration that all the configurations effectively inherit (or can override).

{@a localize-build-command}

### Build from the command line

You can also use the `--localize` option with the [`ng build`](/cli/build "CLI reference for ng build") command and your existing `production` configuration.
Use the `--localize` option with the [`ng build`](/cli/build "CLI reference for ng build") command and your existing `production` configuration.
The CLI builds all locales defined in the build configuration, which is similar to setting the `"localize"` option to `true` as described in the previous section.

<code-example language="sh">
Expand All @@ -653,7 +653,7 @@ The CLI builds all locales defined in the build configuration, which is similar

### Apply specific build options for just one locale

To apply specific build options to only one locale, you can create a custom locale-specific configuration by specifying a single locale as shown in the following example:
To apply specific build options to only one locale, create a custom locale-specific configuration by specifying a single locale as shown in the following example:

<code-example language="json" header="angular.json">
"build": {
Expand Down Expand Up @@ -691,7 +691,7 @@ You can use the CLI development server (`ng serve`), but only with a single loca

</div>

For production builds, you can use configuration composition to execute both configurations:
For production builds, use configuration composition to execute both configurations:

<code-example language="sh">
ng build --configuration=production,fr
Expand Down Expand Up @@ -754,7 +754,7 @@ Specify the warning level in the `options` section for the `build` target of you

If `myapp` is the directory containing your app's distributable files, you would typically make available different versions for different locales in locale directories such as `myapp/fr` for the French version and `myapp/es` for the Spanish version.

The HTML `base` tag with the `href` attribute specifies the base URI, or URL, for relative links. If you set the `"localize"` option in `angular.json` to `true` or to an array of locale IDs, the CLI adjusts the base `href` for each version of the app by adding the locale to the configured `"baseHref"`. You can specify the `"baseHref"` for each locale in your workspace configuration file (`angular.json`), as shown in the following example, which sets `"baseHref"` to an empty string:
The HTML `base` tag with the `href` attribute specifies the base URI, or URL, for relative links. If you set the `"localize"` option in `angular.json` to `true` or to an array of locale IDs, the CLI adjusts the base `href` for each version of the app by adding the locale to the configured `"baseHref"`. Specify the `"baseHref"` for each locale in your workspace configuration file (`angular.json`), as shown in the following example, which sets `"baseHref"` to an empty string:

<code-example language="json" header="angular.json">
...
Expand Down Expand Up @@ -877,7 +877,7 @@ The following tabs show the example app and its translation files:

## Optional practices

The following are optional practices that may be required in special cases:
The following are optional practices that might be required in special cases:

* [Set the source locale manually](#set-source-manually) by setting the [LOCALE_ID](api/core/LOCALE_ID "API reference for LOCALE_ID") token.
* [Import global variants of the locale data](#import-locale) for extra locale data.
Expand All @@ -902,7 +902,7 @@ The following example sets the value of `LOCALE_ID` to `fr` (French):

### Import global variants of the locale data

Angular will automatically include locale data if you configure the locale using the `--localize` option with [`ng build`](cli/build "ng build description") CLI command.
Angular automatically includes locale data if you configure the locale using the `--localize` option with [`ng build`](cli/build "ng build description") CLI command.

The [Angular repository](https://github.com/angular/angular/tree/master/packages/common/locales "Common locales in the Angular repository") files (`@angular/common/locales`) contain most of the locale data that you need, but some advanced formatting options require additional locale data.
Global variants of the locale data are available in [`@angular/common/locales/global`](https://github.com/angular/angular/tree/master/packages/common/locales/global "Global locale variants in the Angular repository").
Expand All @@ -928,9 +928,9 @@ Therefore, using a new ID keeps the text change in sync with translations.

However, some translation systems require a specific form or syntax for the ID.
To address this requirement, you can mark text with _custom_ IDs.
While most developers don't need to use custom IDs, some may want to use IDs that have a unique syntax to convey additional metadata (such as the library, component, or area of the app in which the text appears).
While most developers don't need to use custom IDs, some might want to use IDs that have a unique syntax to convey additional metadata (such as the library, component, or area of the app in which the text appears).

Specify a custom ID in the `i18n` attribute by using the prefix `@@`.
To specify a custom ID in the `i18n` attribute using the prefix `@@`.
The following example defines the custom ID `introductionHeader`:

<code-example path='i18n/doc-files/app.component.html' region='i18n-attribute-solo-id' header='app/app.component.html'></code-example>
Expand All @@ -941,7 +941,7 @@ When you specify a custom ID, the extractor generates a translation unit with th

If you change the text, the extractor does *not* change the ID.
As a result, you don't have to take the extra step of updating the translation.
The drawback of using custom IDs is that if you change the text, your translation may be out-of-sync with the newly changed source text.
The drawback of using custom IDs is that if you change the text, your translation might be out-of-sync with the newly changed source text.

#### Use a custom ID with a description

Expand Down
4 changes: 2 additions & 2 deletions aio/content/guide/testing-attribute-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Its name reflects the way the directive is applied: as an attribute on a host el

<div class="alert is-helpful">

For a hands-on experience you can <live-example name="testing" stackblitz="specs" noDownload>run tests and explore the test code</live-example> in your browser as your read this guide.
For a hands-on experience, <live-example name="testing" stackblitz="specs" noDownload>run tests and explore the test code</live-example> in your browser as your read this guide.

If you'd like to experiment with the application that this guide describes, you can <live-example name="testing" noDownload>run it in your browser</live-example> or <live-example name="testing" downloadOnly>download and run it locally</live-example>.
If you'd like to experiment with the application that this guide describes, <live-example name="testing" noDownload>run it in your browser</live-example> or <live-example name="testing" downloadOnly>download and run it locally</live-example>.

</div>

Expand Down
4 changes: 2 additions & 2 deletions aio/content/guide/testing-pipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ You can test [pipes](guide/pipes) without the Angular testing utilities.

<div class="alert is-helpful">

For a hands-on experience you can <live-example name="testing" stackblitz="specs" noDownload>run tests and explore the test code</live-example> in your browser as your read this guide.
For a hands-on experience, <live-example name="testing" stackblitz="specs" noDownload>run tests and explore the test code</live-example> in your browser as your read this guide.

If you'd like to experiment with the application that this guide describes, you can <live-example name="testing" noDownload>run it in your browser</live-example> or <live-example name="testing" downloadOnly>download and run it locally</live-example>.
If you'd like to experiment with the application that this guide describes, <live-example name="testing" noDownload>run it in your browser</live-example> or <live-example name="testing" downloadOnly>download and run it locally</live-example>.

</div>

Expand Down
2 changes: 1 addition & 1 deletion aio/content/guide/testing-utility-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ Here are the most important static methods, in order of likely utility.
The testing shims (`karma-test-shim`, `browser-test-shim`) call it for you
so there is rarely a reason for you to call it yourself.

You may call this method _exactly once_. If you must change
You can call this method _exactly once_. If you must change
this default in the middle of your test run, call `resetTestEnvironment` first.

Specify the Angular compiler factory, a `PlatformRef`, and a default Angular testing module.
Expand Down

0 comments on commit 6775a35

Please sign in to comment.