Skip to content

Commit

Permalink
Update internationalization enhancement for how to handle login tempates
Browse files Browse the repository at this point in the history
  • Loading branch information
sg00dwin committed Apr 28, 2021
1 parent cef8989 commit 3190a41
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions enhancements/console/internationalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ The desired fallback experience if not all pieces/parts of the UI are translated

We will also modify our existing file conversion tools to handle translation files spread across multiple packages so we can easily export/import translation files.

Translation of the login page will be handled by [oauth-server](https://github.com/openshift/oauth-server), which will check for request `Accept-Language` header. If the header is missing in the request, `oauth-server` will default to English language for localization.

[oauth-server](https://github.com/openshift/oauth-server) contains the default OKD login templates. Custom templates are stored in the [oauth-templates](https://github.com/openshift/oauth-templates) repository and will also need to be updated for the other brands like the OCP and OpenShift Dedicated login pages.
In case of any changes in these repositories, Console-Team will be responsible for syncing those changes between them.

Since there are only a small number of strings that rarely change, the localized strings for each of the supported languages will be directly hardcoded into the `oauth-server`, so we don't have to load them during runtime.
These strings are to be included in the console repository and the i18next-parser will add them into the files sent to the Globalization team for translation. Afterwards the console team will contribute them back to the [oauth-server](https://github.com/openshift/oauth-server).


### Risks and Mitigations

**Risk**: All text is not translated.
Expand Down Expand Up @@ -150,6 +159,7 @@ We will need to make sure that new components with hard-coded strings are marked
* 2020-08-03 - [PR against console](https://github.com/openshift/console/pull/6194) opened
* 2020-04-23 - [UXD exploration of i18next](https://github.com/jschuler/console/pull/1) opened
* 2020-04-13 - [UXD analysis and comparison of libraries](https://github.com/patternfly/patternfly-react/issues/3952#issuecomment-613645855) posted
* 2021-03-25 - [PR against oauth-server](https://github.com/openshift/oauth-server/pull/71) opened

## Drawbacks

Expand Down

0 comments on commit 3190a41

Please sign in to comment.