Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Translation tooling/approach #21

Closed
matthew-chirgwin opened this issue Sep 18, 2020 · 4 comments · Fixed by #81
Closed

Translation tooling/approach #21

matthew-chirgwin opened this issue Sep 18, 2020 · 4 comments · Fixed by #81
Assignees

Comments

@matthew-chirgwin
Copy link
Member

The UI should be fully translatable from day 0. This issue is to look into either writing our own translation tooling or using a 3rd party library, and writing supporting documentation to how it works/should be used across the Strimzi-ui

@nictownsend nictownsend self-assigned this Sep 28, 2020
@dlabaj
Copy link
Contributor

dlabaj commented Sep 29, 2020

Most of the projects I have worked on have used https://www.i18next.com/. There's also are react implementation that is optional https://react.i18next.com/. Worth a look.

@nictownsend
Copy link
Contributor

Current concerns over i18next are around the HTML formatted strings:

<Trans i18nKey="userMessagesUnread" count={count}>
      Hello <strong title={t('nameTitle')}>{{name}}</strong>, you have {{count}} unread message. <Link to="/msgs">Go to messages</Link>.
    </Trans>
"userMessagesUnread": "Hello <1>{{name}}</1>, you have {{count}} unread message. <5>Go to message</5>.",
"userMessagesUnread_plural": "Hello <1>{{name}}</1>, you have {{count}} unread messages.  <5>Go to messages</5>.",

In particular - <5> is based off knowing how React renders the contents of the <Trans> - it's the 5th element in the render tree.

Continuing to evaluate the rest of it vs other libraries

@matthew-chirgwin
Copy link
Member Author

And just FYI @dlabaj , we came up with https://github.com/ibm-messaging/kafka-java-vertx-starter/tree/master/ui/src/ReactCustomHooks/useTranslate to address @nictownsend 's point for a previous UI. Its there if we think it might help/be of use, but I am sure there are much more mature 3rd party tools available.

nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 16, 2020
Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 21, 2020
- react-i18next for translation
- example component
- example test
- react-i18n mock and helpers

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 21, 2020
- react-i18next for translation
- example component
- example test
- react-i18n mock and helpers

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 21, 2020
- react-i18next for translation
- example component
- example test
- react-i18n mock and helpers

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
@matthew-chirgwin matthew-chirgwin linked a pull request Oct 22, 2020 that will close this issue
@github-actions
Copy link

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Oct 28, 2020
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 28, 2020
- react-i18next for translation
- example component
- example test
- react-i18n mock and helpers
- fix typing in i18n utils
- remove react proptype eslint on .tsx files
- tsconfig paths instead of custom module mapper in ts-jest config

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 28, 2020
- move i18n directory structure

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 28, 2020
- move i18n directory structure

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 28, 2020
- move i18n directory structure

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 28, 2020
- move i18n directory structure

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 28, 2020
- move i18n directory structure

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 28, 2020
- move i18n directory structure

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 28, 2020
- move i18n directory structure
- handle newly added bundles in bundle calculation action

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 28, 2020
- move i18n directory structure
- handle newly added bundles in bundle calculation action
- add cucumber features to RTL tests

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 29, 2020
- react-i18next for translation
- example component
- example test
- react-i18n mock and helpers
- fix typing in i18n utils
- remove react proptype eslint on .tsx files
- tsconfig paths instead of custom module mapper in ts-jest config
- handle newly added bundles in bundle calculation action
- add cucumber features to RTL tests

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 29, 2020
- seperate tsconfig for client/server
- updated webpack builds
- jest config to use seperate tsconfig for client/server

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 30, 2020
- seperate tsconfig for client/server
- updated webpack builds
- jest config to use seperate tsconfig for client/server

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 30, 2020
- seperate tsconfig for client/server
- updated webpack builds
- jest config to use seperate tsconfig for client/server

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 30, 2020
- seperate tsconfig for client/server
- updated webpack builds
- jest config to use seperate tsconfig for client/server

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 30, 2020
- react-i18next for translation
- example component
- example test
- react-i18n mock and helpers
- fix typing in i18n utils
- remove react proptype eslint on .tsx files
- tsconfig paths instead of custom module mapper in ts-jest config
- handle newly added bundles in bundle calculation action
- add cucumber features to RTL tests

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 30, 2020
- seperate tsconfig for client/server
- updated webpack builds
- jest config to use seperate tsconfig for client/server

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 30, 2020
- seperate tsconfig for client/server
- updated webpack builds
- jest config to use seperate tsconfig for client/server

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 30, 2020
- seperate tsconfig for client/server
- updated webpack builds
- jest config to use seperate tsconfig for client/server

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 30, 2020
- refactor cypress to use e2e as a project
- update i18n config to init without needing side effects

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Oct 30, 2020
- react-i18next for translation
- example component
- example test
- react-i18n mock and helpers
- fix typing in i18n utils
- remove react proptype eslint on .tsx files
- tsconfig paths instead of custom module mapper in ts-jest config
- handle newly added bundles in bundle calculation action
- add cucumber features to RTL tests
- seperate tsconfig for client/server
- jest config to use seperate tsconfig for client/server
- refactor cypress to use e2e as a project
- update i18n config to init without needing side effects

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Nov 2, 2020
- react-i18next for translation
- example component
- example test
- react-i18n mock and helpers
- fix typing in i18n utils
- remove react proptype eslint on .tsx files
- tsconfig paths instead of custom module mapper in ts-jest config
- handle newly added bundles in bundle calculation action
- add cucumber features to RTL tests
- seperate tsconfig for client/server
- jest config to use seperate tsconfig for client/server
- refactor cypress to use e2e as a project
- update i18n config to init without needing side effects

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Nov 2, 2020
- react-i18next for translation
- example component
- example test
- react-i18n mock and helpers
- fix typing in i18n utils
- remove react proptype eslint on .tsx files
- tsconfig paths instead of custom module mapper in ts-jest config
- handle newly added bundles in bundle calculation action
- add cucumber features to RTL tests
- seperate tsconfig for client/server
- jest config to use seperate tsconfig for client/server
- refactor cypress to use e2e as a project
- update i18n config to init without needing side effects

Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
nictownsend added a commit to nictownsend/strimzi-ui that referenced this issue Nov 3, 2020
Contributes to: strimzi#21

Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
@matthew-chirgwin matthew-chirgwin linked a pull request Nov 6, 2020 that will close this issue
Merged
pmuir added a commit to pmuir/strimzi-ui that referenced this issue Dec 10, 2020
feat: allow the graphql client to have custom middlewares applied
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants