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

Feature: Support for language selection #1524

Merged
merged 6 commits into from
Sep 6, 2023

Conversation

shilob
Copy link
Member

@shilob shilob commented Sep 6, 2023

Portal language can now be changed through the language picker dropdown.

Supported languages are configured via the sails.config.i18n.next.init block, specifically: supportedLngs and preload arrays.

The corresponding language file must also exist in the assets/locale/<language code>/translation.json path.

Finally, to display the language option in the drop down list, the language code label text must also exist in the language file itself, in the format lang-<language code>.

A few included chores:

  • Bootstrap of TranslationService is now async
  • Dev-specific client app build scripts can output to Sails' temp dir
  • welcome-title language file entry now supports HTML content

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04% 🎉

Comparison is base (d0ecc83) 70.00% compared to head (1bcb201) 70.05%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1524      +/-   ##
===========================================
+ Coverage    70.00%   70.05%   +0.04%     
===========================================
  Files          110      111       +1     
  Lines         1867     1870       +3     
  Branches       218      218              
===========================================
+ Hits          1307     1310       +3     
  Misses         560      560              
Flag Coverage Δ
frontend-core-lib 52.41% <100.00%> (+0.10%) ⬆️
frontend-dashboard 88.07% <ø> (ø)
frontend-export 100.00% <ø> (ø)
frontend-local-auth 100.00% <ø> (ø)
frontend-manage-roles 63.33% <ø> (ø)
frontend-manage-users 59.81% <ø> (ø)
frontend-report 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
config/auth.js 100.00% <ø> (ø)
config/i18n.js 100.00% <ø> (ø)
config/policies.js 100.00% <ø> (ø)
...ox/portal-ng-common/src/lib/translation.service.ts 84.90% <100.00%> (+0.29%) ⬆️
api/policies/setLang.js 100.00% <100.00%> (ø)
config/bootstrap.js 85.88% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrewbrazzatti andrewbrazzatti merged commit 7bdeb50 into develop Sep 6, 2023
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