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: Add localized fields for conservation conditions and customer service in Product object #1020

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AffanShaikhsurab
Copy link

What

  • Added 'conservation_conditions_languages' and 'customer_service_languages' fields to the Product object for better multilingual support.
  • Updated the logic to handle localization using language-based keys, similar to product name fields.

Screenshot

Fixes bug(s)

Part of

…vice in Product object

- Added 'conservation_conditions_languages' and 'customer_service_languages' fields to the Product object for better multilingual support.
- Fixed issue with handling French-specific fields by using language-based keys.
@AffanShaikhsurab AffanShaikhsurab requested a review from a team as a code owner January 22, 2025 07:44
@AffanShaikhsurab AffanShaikhsurab changed the title Add localized fields for conservation conditions and customer service in Product object feat: Add localized fields for conservation conditions and customer service in Product object Jan 22, 2025
Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Hi @AffanShaikhsurab!
I didn't get that: even product.g.dart wasn't generated? Without it we cannot do anything.
Besides, reviewing your code, I saw that we don't need 3 product fields for each of those minor labels: the "all languages" is more than enough.

lib/src/utils/product_fields.dart Outdated Show resolved Hide resolved
lib/src/utils/product_fields.dart Outdated Show resolved Hide resolved
lib/src/utils/product_fields.dart Outdated Show resolved Hide resolved
lib/src/utils/product_fields.dart Outdated Show resolved Hide resolved
lib/src/utils/product_fields.dart Outdated Show resolved Hide resolved
lib/src/model/product.dart Outdated Show resolved Hide resolved
lib/src/model/product.dart Outdated Show resolved Hide resolved
lib/src/model/product.dart Outdated Show resolved Hide resolved
lib/src/model/product.dart Outdated Show resolved Hide resolved
@AffanShaikhsurab
Copy link
Author

AffanShaikhsurab commented Jan 22, 2025

soory for that . i have removed all the unwanted fields . But still when i try to rebuild its still casusing the same error :
am i doing something wrong ?

PS C:\Users\affan\Affan Projects\open source\open\openfoodfacts-dart> dart run build_runner build
[INFO] Generating build script completed, took 207ms
[WARNING] Invalidated precompiled build script due to missing asset graph.
[INFO] Precompiling build script... completed, took 803ms
[INFO] Building new asset graph completed, took 578ms
[INFO] Found 59 declared outputs which already exist on disk. This is likely because the.dart_tool/build folder was deleted, or you are submitting generated files to your source repository.
Delete these files?
1 - Delete
2 - Cancel build
3 - List conflicts

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

Successfully merging this pull request may close these issues.

2 participants