-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
base: master
Are you sure you want to change the base?
Conversation
…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.
There was a problem hiding this 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.
soory for that . i have removed all the unwanted fields . But still when i try to rebuild its still casusing the same error :
|
i have created the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AffanShaikhsurab!
Looks good to me, but the generated code is not compatible. My bad. cf. #1024.
Should I need to change anything |
Now you need to "Update your project", which will include #1024, and generate again the files - especially |
thanks for solving the error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AffanShaikhsurab!
Looks good, but the code must be tested.
For instance in api_get_product_test.dart
.
can you please check if the tests are okay or they need any changes ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @AffanShaikhsurab for your latest changes!
Please have a look at my comments, so that I can approve your PR.
test/api_get_product_test.dart
Outdated
expect(result.status, ProductResultV3.statusSuccess); | ||
expect(result.product, isNotNull); | ||
|
||
// Check conservation conditions in languages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please get rid of useless comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AffanShaikhsurab Please systematically have your code formatted.
Besides, my suggestion regarding languages was to use JAPANESE and expect all languages. You use a language called ALL_LANGUAGES, I couldn't find it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AffanShaikhsurab As expected:
You're supposed to run at least your own tests.
Really sorry about that! I must have missed it somehow. I'll make sure to pay closer attention next time. Thanks for pointing it out! |
I've updated the test case to use the Japanese language and allow for other languages as well. Could you please check if it's correct? Apologies for the inconvenience, as I'm still getting familiar with the repository. I'll make sure this doesn't happen again in the future. Thanks for your patience! |
@AffanShaikhsurab What about running locally your test at least once, just to be sure: |
I just wanted to clarify that these tests were failing for me even before. When the repository is forked and the tests are run, they still fail. So, it doesn’t seem to be an issue caused by me, as the failures appear to have been there from the start. Could you kindly check how we might be able to fix this? Thank you so much! |
@AffanShaikhsurab Tests are often failing globally, that's a fact. Sometimes it's because server data changed, sometimes because the server is not reachable. We're not careful enough about them, and that can give the wrong impression that we don't care about tests, that they always fail, and that may be discouraging. I'll give you that. But I'm talking more specifically about your new test, that fails not because of the server, but apparently because of the code. So, please run just your test, and make sure it passes. |
Thank you for pointing that out! I’ve taken the time to test my changes specifically, and my test appears to be passing successfully. Please let me know if there’s anything else I should review or address. |
@AffanShaikhsurab I'm afraid there's a misunderstanding:
|
…l tests - Updated setLanguageString in product.dart to include new fields. - Added tests to verify availability of non-primary language labels.
I’m sorry for the misunderstanding earlier; you’re absolutely right. I had missed that point. I’ve now added the French language test to verify that non-Japanese labels (e.g., in French) are available. Additionally, I’ve updated the setLanguageString method in product.dart to include support for the new fields. Could you please take a look and let me know if there’s anything I’m still missing? Also, I’d appreciate any advice on how I can communicate better and avoid such misunderstandings in the future. Thank you for pointing this out and for your guidance! |
|
What
Screenshot
Fixes bug(s)
Part of