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

[i18n] Internationalization #943

Closed
kavilla opened this issue Nov 16, 2021 · 4 comments
Closed

[i18n] Internationalization #943

kavilla opened this issue Nov 16, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request i18n Internationalization related Issues and PRs

Comments

@kavilla
Copy link
Member

kavilla commented Nov 16, 2021

Is your feature request related to a problem? Please describe.

The problem arises from: #772

Originally an internationalization plugin existed in a proprietary section of the legacy application. The plugin would host internationalized messages and formats for different locales in a JSON file and a call to /translations/{locale} would return that file. The application is already built out to handle i18n messages but doesn't have anything return for the locale provided.

Describe the solution you'd like

Create an i18n SERVER plugin (non-UI), that is not part of the OpenSearch Dashboards repo that returns the correct values from a provided locale under the route /translations.

Example response:

 {
    "locale": "zh-CN",
    "formats": {
      "number": {
        "currency": {
          "style": "currency"
        }
      },
    "messages": {
      "advancedSettings.advancedSettingsLabel": "石弟",  
    }
  }

Describe alternatives you've considered

The plugin could go into the Dashboards repo but that is just another thing the main repo will have to manage. If it is external it will be much easier to contribute translations.

Additional context

We name the plugin some form of i18n/l10n/internationalization/localization and not translation. Translation doesn't really seem correct since I wouldn't say "translating the currency".

We could also change the api call from the main repo to call an updated endpoint.

@kavilla kavilla added enhancement New feature or request i18n Internationalization related Issues and PRs labels Nov 16, 2021
@kavilla
Copy link
Member Author

kavilla commented Nov 18, 2021

Need list of translations

@ahopp
Copy link
Contributor

ahopp commented Nov 18, 2021

Thanks for opening! If I understand, if a user wants to add a new language they would;

  1. Open an issues the language they want in the internationalization/localization plugin
  2. Someone would generate the translation (in the form of string to translated string JSON responses)
  3. Someone would open a PR for the locale specific JSON
  4. The plugin owner approves and merges
  5. YAML is updated to reflect the language of choice (same as today)

I think that makes sense to me - we'll need to figure out how one goes approving a PR for a language they don't speak but I think that's more operational.

Long-term, we should consider creating a path for the end user to select the language preference of their choice so an Dashboard instance can be vended in multiple languages at the same time.

@kavilla kavilla changed the title Internationalization (i18n) [i18n] Internationalization Nov 27, 2021
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
# [24.4.0](elastic/elastic-charts@v24.3.0...v24.4.0) (2020-12-09)

### Bug Fixes

* empty labels on debug state ([opensearch-project#940](elastic/elastic-charts#940)) ([3d1281b](elastic/elastic-charts@3d1281b))

### Features

* allow use of functions for y, y0, split and stack accessors ([opensearch-project#943](elastic/elastic-charts#943)) ([e881723](elastic/elastic-charts@e881723))
@ananzh ananzh self-assigned this Mar 28, 2022
@joshuarrrr
Copy link
Member

We've now created the i18n OpenSearch Dashboards plugin. @ahopp @kavilla, is there more work to be done for this issue?

@ananzh
Copy link
Member

ananzh commented Oct 18, 2022

I think we could close the issue, since the plugin is released.

@ananzh ananzh closed this as completed Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request i18n Internationalization related Issues and PRs
Projects
None yet
Development

No branches or pull requests

4 participants