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

feat: allow other language titles #1023

Merged
merged 14 commits into from Jun 24, 2023
Merged

Conversation

Chesire
Copy link
Owner

@Chesire Chesire commented Jun 24, 2023

Add option to change how the titles are displayed, the preference options are:

  • Canonical: Default
  • English: English name
  • Romaji: Japanese name in Romaji
  • Japanese: Fully Japanese name

The titles are all pulled from the backend, if a title is not available it falls back to the canonical title.

Closes #735

When pulling down all the details for a series, pull down all the titles at once so we can choose
which to display.
Store the new otherTitles field in the database. We need to use Moshi to convert from a
Map<String,String> to a String and back due to Room not supporting maps.
@Chesire Chesire self-assigned this Jun 24, 2023
@commit-lint
Copy link

commit-lint bot commented Jun 24, 2023

Features

  • pull down all titles for a series (b8858f5)
  • store the new field in the database (8515545)
  • add preference storage for title language (93a4c77)
  • choose the correct title to use on series lists (8a98d3d)
  • allow user to change their title language setting (c892aab)

Bug Fixes

  • ensure a blank title is not returned (13fd97e)
  • wrong string being displayed on dialog (d1a372b)

Tests

  • update tests (0e37218)
  • add ui test to change the title language (ba4b8ca)
  • add missing params in unit tests (2460679)
  • fix wrong mapping characters used in tests (fde8eeb)
  • add missing params for tests (16a001d)

Doc

  • fix couple of kdoc issues (e0ce79e)

Styles

Contributors

Chesire

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@ChesireBot
Copy link

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@codecov
Copy link

codecov bot commented Jun 24, 2023

Codecov Report

Patch coverage: 84.70% and project coverage change: +0.27 🎉

Comparison is base (bc64aaf) 77.23% compared to head (16a001d) 77.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1023      +/-   ##
==========================================
+ Coverage   77.23%   77.51%   +0.27%     
==========================================
  Files         152      156       +4     
  Lines        2223     2299      +76     
  Branches      247      259      +12     
==========================================
+ Hits         1717     1782      +65     
- Misses        425      430       +5     
- Partials       81       87       +6     
Impacted Files Coverage Δ
...esire/nekome/core/preferences/SeriesPreferences.kt 0.00% <0.00%> (ø)
...sire/nekome/app/settings/config/ui/ConfigScreen.kt 0.00% <ø> (ø)
...rc/main/java/com/chesire/nekome/database/RoomDB.kt 16.66% <0.00%> (ø)
...re/nekome/app/series/collection/ui/DomainMapper.kt 74.19% <62.50%> (-4.98%) ⬇️
...e/nekome/app/settings/config/ui/ConfigViewModel.kt 74.11% <81.81%> (+2.11%) ⬆️
...ire/nekome/core/preferences/flags/TitleLanguage.kt 83.33% <83.33%> (ø)
...e/nekome/app/series/item/core/BuildTitleUseCase.kt 85.71% <85.71%> (ø)
...chesire/nekome/database/converters/MapConverter.kt 88.88% <88.88%> (ø)
...chesire/nekome/app/series/item/ui/ItemViewModel.kt 90.00% <100.00%> (+0.12%) ⬆️
...settings/config/core/RetrievePreferencesUseCase.kt 97.22% <100.00%> (+1.76%) ⬆️
... and 9 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Chesire Chesire merged commit 2485530 into master Jun 24, 2023
9 checks passed
@Chesire Chesire deleted the feature/allow-other-language-titles branch June 24, 2023 16:14
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.

Add title preference setting
2 participants