Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Globalization enhancements #1791

Merged
merged 1 commit into from
May 12, 2023
Merged

Conversation

francoislehoux-okta
Copy link
Contributor

@francoislehoux-okta francoislehoux-okta commented May 11, 2023

Description

  • OdysseyTranslationProvider and OdysseyProvider can take translationOverrides prop in to optionally override key/value pairs for any language that is supported as follow:
const translationOverrides = {
  en: {
    "fieldlabel.optional.text": "Not Required"
  }
}

// ...

<OdysseyTranslationProvider translationOverrides={translationOverrides}>
  // ...
</OdysseyTranslationProvider>
  • Removed fs-extra, everything could be reimplemented with fs directly.
  • Enhanced documentation for OdysseyTranslationProvider

@francoislehoux-okta francoislehoux-okta force-pushed the globalization-enhancements branch from d9cd242 to e158c22 Compare May 11, 2023 20:12
@francoislehoux-okta francoislehoux-okta changed the base branch from develop to globalization May 11, 2023 20:13
@francoislehoux-okta francoislehoux-okta marked this pull request as ready for review May 11, 2023 21:05
@francoislehoux-okta francoislehoux-okta changed the base branch from globalization to develop May 11, 2023 21:08
@francoislehoux-okta francoislehoux-okta force-pushed the globalization-enhancements branch from c273fa0 to 7bd9818 Compare May 12, 2023 15:59
Comment on lines +81 to +89
The following keys can have their values overriden:

- `fielderror.screenreader.text`
- `fieldlabel.optional.text`
- `severity.success`
- `severity.warning`
- `severity.info`
- `severity.error`
- `toast.close.text`
Copy link
Contributor

@KevinGhadyani-Okta KevinGhadyani-Okta May 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice we document these, but can we generate this from the TS instead?

I think we can do a loop from the .ts files; that way if we add one, no one has to remember to update the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would mean moving from simple markdown stories to a tsx one. Will see if I have time by eod.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.mdx files allow you to write JavaScript.

I'll set this to NON-BLOCKING. Just make a ticket for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you can only render "JSX" components

@francoislehoux-okta francoislehoux-okta force-pushed the globalization-enhancements branch from 7bd9818 to f6f9d5e Compare May 12, 2023 18:32
@francoislehoux-okta francoislehoux-okta force-pushed the globalization-enhancements branch from f6f9d5e to a1047b6 Compare May 12, 2023 19:22
@francoislehoux-okta francoislehoux-okta force-pushed the globalization-enhancements branch from a1047b6 to cb6fbe4 Compare May 12, 2023 19:38
@francoislehoux-okta francoislehoux-okta merged commit eba5274 into develop May 12, 2023
@KevinGhadyani-Okta KevinGhadyani-Okta deleted the globalization-enhancements branch June 2, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants