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

[SPIKE] Figure out how to prepopulate the database with all languages #407

Closed
PaulKlauser opened this issue Aug 29, 2023 · 1 comment
Closed
Assignees

Comments

@PaulKlauser
Copy link
Collaborator

Currently the database is initially populated with whatever the current language is when the app is first launched. Subsequent launches will not repopulate, regardless of the language.

This is due to the implementation relying on an initial set of string resources that are shoved into the database on first launch in PresetsRepository#populateDatabase().

Should we instead prepopulate the database like: https://developer.android.com/training/data-storage/room/prepopulate

Or is that too much of a compromise with how Crowdin supplies our translations?

We could likely check for language changes and repopulate the database, but the complexity that opens up seems like it may not be worth the effort.

Outcome of this spike should be story(s) for implementing whatever strategy is decided to get our database populated in a way that:

  • properly supports multiple languages
  • minimizes pain during migrations
  • allows flexibility in adding new preset phrases with new versions of the app.
@PaulKlauser PaulKlauser created this issue from a note in Vocable-Android (Ready to select) Aug 29, 2023
@PaulKlauser
Copy link
Collaborator Author

It does look like you can reference the language resources in other locale configurations, but we'd still need to iterate through all of the locales we support, and keep that in sync with the resource directories. Doesn't seem ideal, but it is one approach we could take.

@PaulKlauser PaulKlauser moved this from Ready to select to In progress in Vocable-Android Sep 19, 2023
@PaulKlauser PaulKlauser self-assigned this Sep 19, 2023
@PaulKlauser PaulKlauser moved this from In progress to Done in Vocable-Android Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant