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: 4996 - reordering product languages #5025

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

Now we sort the product languages so that the more interesting languages are displayed first in the language selector:

  1. the languages that are currently used for this product field
  2. the latest languages used locally in the app
  3. the current app language
  4. the product main language
  5. the languages used for the product
    1. names
    2. images
    3. packages
    4. ingredients
    5. labels
    6. categories
    7. countries

Screenshot

Spanish is close to the top as it's the app language:
Screenshot_1706556912

Fixes bug(s)

Impacted files

New file:

  • language_priority.dart: Helper around the language priority.

Impacted files:

  • add_basic_details_page.dart: minor refactoring
  • dao_string_list.dart: now storing the latest languages used locally in the app
  • edit_ocr_page.dart: minor refactoring
  • language_selector.dart: now showing app and product languages as first languages
  • multilingual_helper.dart: minor refactoring

New file:
* `language_priority.dart`: Helper around the language priority.

Impacted files:
* `add_basic_details_page.dart`: minor refactoring
* `dao_string_list.dart`: now storing the latest languages used locally in the app
* `edit_ocr_page.dart`: minor refactoring
* `language_selector.dart`: now showing app and product languages as first languages
* `multilingual_helper.dart`: minor refactoring
Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @monsieurtanuki

@monsieurtanuki monsieurtanuki merged commit 4d9c7fc into openfoodfacts:develop Feb 4, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev for your review!

@alexgarel I hope that will solve most of your "Italian" problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make language selection sticky
2 participants