Skip to content

feat(i18n): add ui localization#2279

Merged
ReenigneArcher merged 1 commit intonightlyfrom
feat(i18n)-add-ui-localization
Mar 22, 2024
Merged

feat(i18n): add ui localization#2279
ReenigneArcher merged 1 commit intonightlyfrom
feat(i18n)-add-ui-localization

Conversation

@ReenigneArcher
Copy link
Copy Markdown
Member

@ReenigneArcher ReenigneArcher commented Mar 19, 2024

Description

Add localization to UI.

I followed this guide: https://vue-community.org/vue/translating-vue-js-applications-with-vue-i18n.html

Some formatting was removed from strings, especially in config descriptions. This was done to make it both easier to translate, and easier to contribute to the source code.

Todo:

  • Add remaining strings to en.json
  • Determine if translations should be in /src_assets/common/assets/web/locale/ or /locale/ (2nd option is my preference... but build works as is)
  • Determine if we should be using /src_assets/common/assets/web/locale/sunshine.json as the default file or /src_assets/common/assets/web/locale/en/sunshine.json (fix(i18n): allow localizing preferences page Themerr-plex#398 will be a good test of how crowdin handles this)
  • Determine if the locale should be a config option or language switcher only available in the UI (decided on config option, unless there is an objection)
  • Ensure localization process is documented
  • Ensure build works
  • How to change the language with the config value?
  • html tags inside of strings dont' work. e.g. <b>SOMETHING</b>
    image
  • Lazy load languages https://kazupon.github.io/vue-i18n/guide/lazy-loading.html

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@ReenigneArcher ReenigneArcher force-pushed the feat(i18n)-add-ui-localization branch 11 times, most recently from e38c0a9 to 9f18842 Compare March 21, 2024 01:10
@ReenigneArcher ReenigneArcher force-pushed the feat(i18n)-add-ui-localization branch 6 times, most recently from a242eab to f74b996 Compare March 21, 2024 03:44
@ReenigneArcher ReenigneArcher force-pushed the feat(i18n)-add-ui-localization branch 7 times, most recently from 62e9b78 to 6dccb0c Compare March 22, 2024 02:15
@ReenigneArcher ReenigneArcher marked this pull request as ready for review March 22, 2024 02:18
@ReenigneArcher

This comment was marked as resolved.

@ReenigneArcher ReenigneArcher force-pushed the feat(i18n)-add-ui-localization branch 2 times, most recently from 1406e9e to 34266e7 Compare March 22, 2024 02:51
@ReenigneArcher ReenigneArcher force-pushed the feat(i18n)-add-ui-localization branch from 34266e7 to 458e5df Compare March 22, 2024 03:01
@ReenigneArcher ReenigneArcher force-pushed the feat(i18n)-add-ui-localization branch from 458e5df to 6e55864 Compare March 22, 2024 23:26
Co-Authored-By: TheElixZammuto <6505622+TheElixZammuto@users.noreply.github.com>
@ReenigneArcher ReenigneArcher force-pushed the feat(i18n)-add-ui-localization branch from 6e55864 to 24a2fbb Compare March 22, 2024 23:27
@ReenigneArcher
Copy link
Copy Markdown
Member Author

@cgutman FYI

@ReenigneArcher ReenigneArcher merged commit 8777433 into nightly Mar 22, 2024
@ReenigneArcher ReenigneArcher deleted the feat(i18n)-add-ui-localization branch March 22, 2024 23:54
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Jun 6, 2024
Co-authored-by: TheElixZammuto <6505622+TheElixZammuto@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants