-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
Add the product main language to the details page (write) #4771
Comments
@monsieurtanuki i would like to work on this issue, please assign it to me. I have gone through #4672 as well, it would be more helpful if you could brief me a little bit more about this issue. |
Hi @Azad99-9! |
@monsieurtanuki |
@Azad99-9 Yes, something like that. |
|
@Azad99-9 Please consider that:
|
@monsieurtanuki just need a little more clarity, All user interface elements within the specific product range should be displayed in the main language of the product ? |
@Azad99-9 Not really sure what you mean but:
|
Yeah that was comprehensive, go it.👍 |
Shall i raise the pull request? |
English is NOT the default.
Please just edit the file that you change, in this case probably ONLY app_en.arb.
That's good. |
@monsieurtanuki When a new product is being created, the language selector is automatically setting the 'product main language' field to English by default. This setup indicates that the product main language field is always assigned a value and technically cannot be null, as the language selector widget lacks an option corresponding to null. Would it be advisable to modify the language selector widget to include an additional option, such as 'not-specified,' allowing the 'product main language' field to accommodate null values, as previously suggested?. |
Only if that's the way you coded it.
Yes it technically can:
That's exactly what I suggested in my previous comment: "Please imagine a solution in the language selector where the language can be null, perhaps with an additional label like "not specified"." |
@monsieurtanuki may i know what is the difference between "product query language" and product.lang. |
@Azad99-9 In this issue it's "product MAIN language" and |
Is there any update on this issue @Azad99-9? |
Kindly unassign me this issue. |
@monsieurtanuki There is a product main language dropdown on the details page to choose the language when trying to add a new product. Do you mean in some other place? |
@abdullah-khudher Again, there are localized fields. For each of them, there is a language selector. For instance, the name of the product is X in English and Y in French. Like in your screenshots. AND, there's a field that contains the product MAIN language. That's what the issue is about. |
As far as I understood it (Correct me if I'm wrong): Say there is a product sold in Germany
We can have its name in English:
But we can specify the main language of a product, which in this case would be German, since that's what's on the product. That's what the |
@M123-dev That's correct! |
@abdullah-khudher Still working on it? |
Can I take that issue? |
Hi @panicoli0! |
Hey @monsieurtanuki The idea is to have the capability to define the product's main language right? |
@panicoli0 Indeed it is.
|
The proper wording is "Main product language" |
@panicoli0 Not a big fan of the "Main product language" looking like a chapter title but that's the right page, that will do for the moment. Please note that this is the only language selector case where the language may be
|
I just spotted that product.lang is not editable and is always coming as default with a value of ENGLISH. /// Returns a [Product] with the values from the text fields.
Product? _getMinimalistProduct() {
// Product()
// ..barcode = _product.barcode
// ..website = _websiteController.text;
Product? result;
Product getBasicProduct() => Product()
..barcode = _product.barcode
..lang = _multilingualHelper.getCurrentLanguage()
..website = _websiteController.text;
if (_websiteController.isDifferentFromInitialValue) {
result ??= getBasicProduct();
result.website = _websiteController.text;
}
_multilangualHelperControllerWithHistory.text =
_multilingualHelper.getCurrentLanguage().toString();
if (_multilangualHelperControllerWithHistory.isDifferentFromInitialValue) {
result ??= getBasicProduct();
result.lang = _multilingualHelper.getCurrentLanguage();
}
return result;
} something from outside is resetting the value to ENGLISH. |
Hi @panicoli0! |
Hey @monsieurtanuki here is the code that I'm using to store the product.lang: Any chance to have a quick call between us? I can share the branch with you. |
I just checked it inside the SDK. It looks like the Do you have an other idea how to set it monsieurtanuki, otherwise we would have to ask Stéphane. Unrelated: @panicoli0 I'd recommend posting your email in a harder to read format like |
Hi @panicoli0! Unfortunately I cannot dedicate that much time to that issue. In addition to that, as @M123-dev noted, for some products we cannot change the main language. |
hey @monsieurtanuki and @M123-dev |
Yes @panicoli0 but that would have to be done in the server. @stephanegigandet is there a way to set the main product language, the |
@M123-dev the "lang" field is not read only on the server side |
I would have a look at it but I have issues with higher priorities. |
Problem
Today it's not possible in the app to see or set the product main language (
LANGUAGE
/lang
).Proposed solution
Add the product main language to the details page (write).
Additional context
May explain #4672
The text was updated successfully, but these errors were encountered: