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

Implemented localization support throughout the app #587

Merged
merged 16 commits into from
Aug 30, 2023
Merged

Conversation

Al12rs
Copy link
Contributor

@Al12rs Al12rs commented Aug 30, 2023

closes #453

  • Implemented translations for relevant strings in the app using backed implemented with Implement the translation backend #452
  • Localized strings should update themselves live on language change for the most part, or close enough in some cases.
  • I did not test live updating as we discussed it wasn't a hard requirement.
  • Added a way to create avalonia bindings in code for localized strings and added documentation for that use case.
  • Added rough but serviceable Italian translation, which I used to test the if translations were working.
  • Reduced some of the flakyness of Localization tests by making them sequential and resetting the locale to English after each test.
  • The ui related localization test are still flaky due to accessing ui from wrong thread or something.
  • Fixed a DownloadTaskViewModel test that didn't work after the localization changes due to there being an additional Poll() call in the viewModel constructor now.

I tried finding all of the string, but I might have missed some.

@Al12rs Al12rs self-assigned this Aug 30, 2023
@Al12rs Al12rs requested a review from a team August 30, 2023 16:06
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #587 (c05db36) into main (8fce8a0) will decrease coverage by 0.27%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #587      +/-   ##
==========================================
- Coverage   68.12%   67.85%   -0.27%     
==========================================
  Files         599      599              
  Lines       16222    16465     +243     
  Branches     1086     1098      +12     
==========================================
+ Hits        11051    11173     +122     
- Misses       4895     5010     +115     
- Partials      276      282       +6     
Flag Coverage Δ
Linux 67.09% <50.00%> (-0.30%) ⬇️
Windows 66.94% <50.00%> (-0.32%) ⬇️
clean_environment_tests 67.85% <50.00%> (-0.26%) ⬇️
network_tests ?
networking_tests ?

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

Files Changed Coverage
...Controls/Buttons/RoundedButton/RoundedButton.axaml 0.00%
...usMods.App.UI/Controls/GameWidget/GameWidget.axaml 0.00%
src/NexusMods.App.UI/Controls/Pills/Premium.axaml 0.00%
...p.UI/LeftMenu/Items/LaunchButtonDesignViewModel.cs ø
...ys/Download/Cancel/CancelDownloadOverlayView.axaml 0.00%
...Download/Cancel/CancelDownloadOverlayView.axaml.cs 0.00%
....App.UI/Overlays/Login/NexusLoginOverlayView.axaml 0.00%
....App.UI/RightContent/Downloads/CompletedView.axaml 0.00%
...ds.App.UI/RightContent/Downloads/HistoryView.axaml 0.00%
.../NexusMods.App.UI/RightContent/Home/HomeView.axaml 0.00%
... and 19 more
@halgari
Copy link
Collaborator

halgari commented Aug 30, 2023

This is a lot of mind-numbing work. Thanks for cranking through all this code.

@halgari halgari merged commit 39755d0 into main Aug 30, 2023
3 of 5 checks passed
@halgari halgari deleted the translations branch August 30, 2023 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants