diff --git a/packages/smooth_app/lib/l10n/app_en.arb b/packages/smooth_app/lib/l10n/app_en.arb index b0a0854c449a..a1a4ebf14956 100644 --- a/packages/smooth_app/lib/l10n/app_en.arb +++ b/packages/smooth_app/lib/l10n/app_en.arb @@ -1448,14 +1448,33 @@ "@edit_product_form_item_error_existing": { "description": "Error message when the user tries to re-submit an existing value" }, - "edit_product_form_item_add_action": "Add a new {itemType}", - "description": "Tooltip to show when the user long presses the (+) button", - "@edit_product_form_item_add_action": { - "placeholders": { - "itemType": { - "type": "String" - } - } + "edit_product_form_item_add_action_brand": "Add a new brand", + "@edit_product_form_item_add_action_brand": { + "description": "Tooltip to show when the user long presses the (+) button on a brand" + }, + "edit_product_form_item_add_action_label": "Add a new label", + "@edit_product_form_item_add_action_label": { + "description": "Tooltip to show when the user long presses the (+) button on a label" + }, + "edit_product_form_item_add_action_store": "Add a new store", + "@edit_product_form_item_add_action_store": { + "description": "Tooltip to show when the user long presses the (+) button on a store" + }, + "edit_product_form_item_add_action_origin": "Add a new origin", + "@edit_product_form_item_add_action_origin": { + "description": "Tooltip to show when the user long presses the (+) button on an origin" + }, + "edit_product_form_item_add_action_emb_code": "Add a new traceability code", + "@edit_product_form_item_add_action_emb_code": { + "description": "Tooltip to show when the user long presses the (+) button on a traceability code" + }, + "edit_product_form_item_add_action_country": "Add a new country", + "@edit_product_form_item_add_action_country": { + "description": "Tooltip to show when the user long presses the (+) button on a country" + }, + "edit_product_form_item_add_action_category": "Add a new category", + "@edit_product_form_item_add_action_category": { + "description": "Tooltip to show when the user long presses the (+) button on a category" }, "edit_product_form_item_details_title": "Basic details", "@edit_product_form_item_details_title": { @@ -1513,7 +1532,7 @@ "@edit_product_form_item_origins_title": { "description": "Product edition - Origins - Title" }, - "edit_product_form_item_origins_hint": "Input an origin (eg: Germany)", + "edit_product_form_item_origins_hint": "Input an origin (eg: Beef from Argentina)", "@edit_product_form_item_origins_hint": { "description": "Product edition - Origins - input textfield hint" }, @@ -2702,9 +2721,9 @@ "@scan_header_compare_button_invalid_state_tooltip": { "description": "Tooltip (message visible with a long-press) on the Compare button on top of the scanner, when there is just one product scanned" }, - "scan_header_compare_button_valid_state_tooltip": "Click to compare the products you have scanned", + "scan_header_compare_button_valid_state_tooltip": "Compare the products you have scanned", "@scan_header_compare_button_valid_state_tooltip": { - "description": "Tooltip (message visible with a long-press) on the Compare button on top of the scanner, when there is at least two prodiucts" + "description": "Tooltip (message visible with a long-press) on the Compare button on top of the scanner, when there is at least two products" }, "scan_product_loading": "You have scanned\nthe barcode:", "@scan_product_loading": { diff --git a/packages/smooth_app/lib/l10n/app_fr.arb b/packages/smooth_app/lib/l10n/app_fr.arb index 20924a84eaf5..6228290f69cf 100644 --- a/packages/smooth_app/lib/l10n/app_fr.arb +++ b/packages/smooth_app/lib/l10n/app_fr.arb @@ -1448,14 +1448,33 @@ "@edit_product_form_item_error_existing": { "description": "Error message when the user tries to re-submit an existing value" }, - "edit_product_form_item_add_action": "Ajouter un nouveau {itemType}", - "description": "Infobulle à afficher lorsque l'utilisateur appuie longuement sur le bouton (+)", - "@edit_product_form_item_add_action": { - "placeholders": { - "itemType": { - "type": "String" - } - } + "edit_product_form_item_add_action_brand": "Ajouter une nouvelle marque", + "@edit_product_form_item_add_action_brand": { + "description": "Tooltip to show when the user long presses the (+) button on a brand" + }, + "edit_product_form_item_add_action_label": "Ajouter un nouveau label", + "@edit_product_form_item_add_action_label": { + "description": "Tooltip to show when the user long presses the (+) button on a label" + }, + "edit_product_form_item_add_action_store": "Ajouter un nouveau magasin", + "@edit_product_form_item_add_action_store": { + "description": "Tooltip to show when the user long presses the (+) button on a store" + }, + "edit_product_form_item_add_action_origin": "Ajouter une nouvelle origine", + "@edit_product_form_item_add_action_origin": { + "description": "Tooltip to show when the user long presses the (+) button on an origin" + }, + "edit_product_form_item_add_action_emb_code": "Ajouter un nouveau code de traçabilité", + "@edit_product_form_item_add_action_emb_code": { + "description": "Tooltip to show when the user long presses the (+) button on a traceability code" + }, + "edit_product_form_item_add_action_country": "Ajouter un nouveau pays", + "@edit_product_form_item_add_action_country": { + "description": "Tooltip to show when the user long presses the (+) button on a country" + }, + "edit_product_form_item_add_action_category": "Ajouter une nouvelle catégorie", + "@edit_product_form_item_add_action_category": { + "description": "Tooltip to show when the user long presses the (+) button on a category" }, "edit_product_form_item_details_title": "Informations de base", "@edit_product_form_item_details_title": { @@ -1513,7 +1532,7 @@ "@edit_product_form_item_origins_title": { "description": "Product edition - Origins - Title" }, - "edit_product_form_item_origins_hint": "Saisir une origine (ex : Espagne)", + "edit_product_form_item_origins_hint": "Saisir une origine (ex : Bœuf d'Argentine)", "@edit_product_form_item_origins_hint": { "description": "Product edition - Origins - input textfield hint" }, @@ -2702,7 +2721,7 @@ "@scan_header_compare_button_invalid_state_tooltip": { "description": "Tooltip (message visible with a long-press) on the Compare button on top of the scanner, when there is just one product scanned" }, - "scan_header_compare_button_valid_state_tooltip": "Cliquez pour comparer les produits que vous avez scannés", + "scan_header_compare_button_valid_state_tooltip": "Comparer les produits que vous avez scannés", "@scan_header_compare_button_valid_state_tooltip": { "description": "Tooltip (message visible with a long-press) on the Compare button on top of the scanner, when there is at least two prodiucts" }, diff --git a/packages/smooth_app/lib/l10n/app_he.arb b/packages/smooth_app/lib/l10n/app_he.arb index e3f6cdaa445a..e2ed55f32b58 100644 --- a/packages/smooth_app/lib/l10n/app_he.arb +++ b/packages/smooth_app/lib/l10n/app_he.arb @@ -2113,7 +2113,7 @@ } } }, - "prices_button_count_proof": "{count,plural, one {} two {{count} הוכחות} many {{count} הוכחות}=0{אין הוכחות} =1{הוכחה} other{{count} הוכחות}}", + "prices_button_count_proof": "{count,plural, two {{count} הוכחות} many {{count} הוכחות}=0{אין הוכחות} =1{הוכחה} other{{count} הוכחות}}", "@prices_button_count_proof": { "description": "Number of proofs, for a button", "placeholders": { @@ -2131,7 +2131,7 @@ } } }, - "prices_button_count_user": "{count,plural, one {} two {{count} משתמשים} many {{count} משתמשים}=0{אין משתמשים} =1{משתמש} other{{count} משתמשים}}", + "prices_button_count_user": "{count,plural, two {{count} משתמשים} many {{count} משתמשים}=0{אין משתמשים} =1{משתמש} other{{count} משתמשים}}", "@prices_button_count_user": { "description": "Number of users, for a button", "placeholders": { @@ -2140,7 +2140,7 @@ } } }, - "prices_button_count_price": "{count,plural, one {} two {{count} מחירים} many {{count} מחירים}=0{אין מחירים} =1{מחיר} other{{count} מחירים}}", + "prices_button_count_price": "{count,plural, two {{count} מחירים} many {{count} מחירים}=0{אין מחירים} =1{מחיר} other{{count} מחירים}}", "@prices_button_count_price": { "description": "Number of prices, for a button", "placeholders": { diff --git a/packages/smooth_app/lib/l10n/app_it.arb b/packages/smooth_app/lib/l10n/app_it.arb index c791bb3fc154..8de59278f661 100644 --- a/packages/smooth_app/lib/l10n/app_it.arb +++ b/packages/smooth_app/lib/l10n/app_it.arb @@ -1085,7 +1085,7 @@ "count": {} } }, - "multiselect_title": "{count,plural, one {}=0{Nessun prodotto selezionato} =1{Un prodotto selezionato} other{{count} prodotti selezionati}}", + "multiselect_title": "{count,plural, =0{Nessun prodotto selezionato} =1{Un prodotto selezionato} other{{count} prodotti selezionati}}", "@multiselect_title": { "description": "Page title with the number of selected items", "placeholders": { diff --git a/packages/smooth_app/lib/l10n/app_lt.arb b/packages/smooth_app/lib/l10n/app_lt.arb index 1cc4529bcd24..815efc258ebe 100644 --- a/packages/smooth_app/lib/l10n/app_lt.arb +++ b/packages/smooth_app/lib/l10n/app_lt.arb @@ -2113,7 +2113,7 @@ } } }, - "prices_button_count_proof": "{count,plural, one {} few {{count} įrodymai} many {{count} įrodymų}=0{No proof} =1{One proof} other{{count} įrodumai}}", + "prices_button_count_proof": "{count,plural, few {{count} įrodymai} many {{count} įrodymų}=0{No proof} =1{One proof} other{{count} įrodumai}}", "@prices_button_count_proof": { "description": "Number of proofs, for a button", "placeholders": { diff --git a/packages/smooth_app/lib/l10n/app_nl.arb b/packages/smooth_app/lib/l10n/app_nl.arb index a15c6927a6ad..8a84407aca62 100644 --- a/packages/smooth_app/lib/l10n/app_nl.arb +++ b/packages/smooth_app/lib/l10n/app_nl.arb @@ -1085,7 +1085,7 @@ "count": {} } }, - "multiselect_title": "{count,plural, one {}=0{Geen geselecteerd product} =1{Eén geselecteerd product} other{{count} geselecteerde producten}}", + "multiselect_title": "{count,plural, =0{Geen geselecteerd product} =1{Eén geselecteerd product} other{{count} geselecteerde producten}}", "@multiselect_title": { "description": "Page title with the number of selected items", "placeholders": { @@ -1975,8 +1975,8 @@ "prices_app_dev_mode_flag": "Snelkoppeling naar de Prijzen-app op de productpagina", "prices_app_button": "Ga naar de Prijzen-app", "prices_generic_title": "Prijzen", - "prices_add_n_prices": "{count,plural, one {}=1{Voeg een prijs toe} other{Voeg {count} prijzen toe}}", - "prices_send_n_prices": "{count,plural, one {}=1{Verstuur 1 prijs} other{Verstuur {count} prijzen}}", + "prices_add_n_prices": "{count,plural, =1{Voeg een prijs toe} other{Voeg {count} prijzen toe}}", + "prices_send_n_prices": "{count,plural, =1{Verstuur 1 prijs} other{Verstuur {count} prijzen}}", "prices_add_an_item": "Item toevoegen", "prices_add_a_price": "Voeg een prijs toe", "prices_add_a_receipt": "Een ontvangstbewijs toevoegen", @@ -2004,7 +2004,7 @@ "prices_barcode_enter": "Voer de streepjescode in", "prices_barcode_reader_action": "Streepjescodelezer", "prices_view_prices": "Bekijk de prijzen", - "prices_product_accessibility_summary": "{count,plural, one {}=1{1 prijs} other{{count} prijzen}} voor {product}", + "prices_product_accessibility_summary": "{count,plural, =1{1 prijs} other{{count} prijzen}} voor {product}", "@prices_product_accessibility_summary": { "description": "A card summarizing the number of prices for a product", "placeholders": { @@ -2016,7 +2016,7 @@ } } }, - "prices_list_length_one_page": "{count,plural, one {}=0{Nog geen prijs} =1{Slechts één prijs} other{Alle {count} prijzen}}", + "prices_list_length_one_page": "{count,plural, =0{Nog geen prijs} =1{Slechts één prijs} other{Alle {count} prijzen}}", "@prices_list_length_one_page": { "description": "Number of prices for one-page result", "placeholders": { @@ -2068,7 +2068,7 @@ "@prices_open_proof": { "description": "Button to open a proof" }, - "prices_proofs_list_length_one_page": "{count,plural, one {}=0{Nog geen bewijs} =1{Slechts één bewijs} other{Alle {count} bewijzen}}", + "prices_proofs_list_length_one_page": "{count,plural, =0{Nog geen bewijs} =1{Slechts één bewijs} other{Alle {count} bewijzen}}", "@prices_proofs_list_length_one_page": { "description": "Number of proofs for one-page result", "placeholders": { @@ -2113,7 +2113,7 @@ } } }, - "prices_button_count_proof": "{count,plural, one {}=0{Geen bewijs} =1{Eén bewijs} other{{count} bewijzen}}", + "prices_button_count_proof": "{count,plural, =0{Geen bewijs} =1{Eén bewijs} other{{count} bewijzen}}", "@prices_button_count_proof": { "description": "Number of proofs, for a button", "placeholders": { @@ -2122,7 +2122,7 @@ } } }, - "prices_button_count_product": "{count,plural, one {}=0{Geen product} =1{Eén product} other{{count} producten}}", + "prices_button_count_product": "{count,plural, =0{Geen product} =1{Eén product} other{{count} producten}}", "@prices_button_count_product": { "description": "Number of products, for a button", "placeholders": { @@ -2131,7 +2131,7 @@ } } }, - "prices_button_count_user": "{count,plural, one {}=0{Geen gebruiker} =1{Eén gebruiker} other{{count} gebruikers}}", + "prices_button_count_user": "{count,plural, =0{Geen gebruiker} =1{Eén gebruiker} other{{count} gebruikers}}", "@prices_button_count_user": { "description": "Number of users, for a button", "placeholders": { @@ -2140,7 +2140,7 @@ } } }, - "prices_button_count_price": "{count,plural, one {}=0{Geen prijs} =1{Eén prijs} other{{count} prijzen}}", + "prices_button_count_price": "{count,plural, =0{Geen prijs} =1{Eén prijs} other{{count} prijzen}}", "@prices_button_count_price": { "description": "Number of prices, for a button", "placeholders": { diff --git a/packages/smooth_app/lib/l10n/app_pt.arb b/packages/smooth_app/lib/l10n/app_pt.arb index 061e992474b7..9896ddbd4314 100644 --- a/packages/smooth_app/lib/l10n/app_pt.arb +++ b/packages/smooth_app/lib/l10n/app_pt.arb @@ -2016,7 +2016,7 @@ } } }, - "prices_list_length_one_page": "{count,plural, one {}=0{Ainda sem preço} =1{Apenas um preço} other{Todos os {count} preços}}", + "prices_list_length_one_page": "{count,plural, =0{Ainda sem preço} =1{Apenas um preço} other{Todos os {count} preços}}", "@prices_list_length_one_page": { "description": "Number of prices for one-page result", "placeholders": { diff --git a/packages/smooth_app/lib/l10n/app_uk.arb b/packages/smooth_app/lib/l10n/app_uk.arb index 296cdc9b7a40..e56a94dccdad 100644 --- a/packages/smooth_app/lib/l10n/app_uk.arb +++ b/packages/smooth_app/lib/l10n/app_uk.arb @@ -1976,7 +1976,7 @@ "prices_app_button": "Перейдіть у додаток Ціни", "prices_generic_title": "Ціни", "prices_add_n_prices": "{count,plural, =1{Додайте ціну} other{Додайте {count} цін}}", - "prices_send_n_prices": "{count,plural, one {Надіслати{count} ціну} few {Надіслати {count} ціни} many {Надіслати {count} цін}=1{Надіслати ціну} other{Надіслати {count} ціни}}", + "prices_send_n_prices": "{count,plural, =1{Надіслати{count} ціну} few {Надіслати {count} ціни} many {Надіслати {count} цін}=1{Надіслати ціну} other{Надіслати {count} ціни}}", "prices_add_an_item": "Додати елемент", "prices_add_a_price": "Додати ціну", "prices_add_a_receipt": "Додати чек", diff --git a/packages/smooth_app/lib/pages/product/simple_input_page_helpers.dart b/packages/smooth_app/lib/pages/product/simple_input_page_helpers.dart index 22e4ee504224..78b6240e585e 100644 --- a/packages/smooth_app/lib/pages/product/simple_input_page_helpers.dart +++ b/packages/smooth_app/lib/pages/product/simple_input_page_helpers.dart @@ -97,6 +97,9 @@ abstract class AbstractSimpleInputPageHelper extends ChangeNotifier { /// Returns the type of the text field (eg: label, category…). String getTypeLabel(final AppLocalizations appLocalizations); + /// Returns the Tooltip for the "add" text field. + String getAddTooltip(final AppLocalizations appLocalizations); + /// Returns additional examples about the "add" text field. String? getAddExplanations(final AppLocalizations appLocalizations) => null; @@ -260,6 +263,10 @@ class SimpleInputPageBrandsHelper extends AbstractSimpleInputPageHelper { String getAddHint(final AppLocalizations appLocalizations) => appLocalizations.add_basic_details_brand_names_hint; + @override + String getAddTooltip(AppLocalizations appLocalizations) => + appLocalizations.edit_product_form_item_add_action_brand; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.brand_name; @@ -325,6 +332,10 @@ class SimpleInputPageStoreHelper extends AbstractSimpleInputPageHelper { String getAddHint(final AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_stores_hint; + @override + String getAddTooltip(AppLocalizations appLocalizations) => + appLocalizations.edit_product_form_item_add_action_store; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_stores_type; @@ -363,6 +374,10 @@ class SimpleInputPageOriginHelper extends AbstractSimpleInputPageHelper { String getAddHint(final AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_origins_hint; + @override + String getAddTooltip(AppLocalizations appLocalizations) => + appLocalizations.edit_product_form_item_add_action_origin; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_origins_type; @@ -419,6 +434,10 @@ class SimpleInputPageEmbCodeHelper extends AbstractSimpleInputPageHelper { String getAddHint(final AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_emb_codes_hint; + @override + String getAddTooltip(AppLocalizations appLocalizations) => + appLocalizations.edit_product_form_item_add_action_emb_code; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_emb_codes_type; @@ -486,6 +505,10 @@ class SimpleInputPageLabelHelper extends AbstractSimpleInputPageHelper { String getAddHint(final AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_labels_hint; + @override + String getAddTooltip(AppLocalizations appLocalizations) => + appLocalizations.edit_product_form_item_add_action_label; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_labels_type; @@ -560,6 +583,10 @@ class SimpleInputPageCategoryHelper extends AbstractSimpleInputPageHelper { String getAddHint(final AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_categories_hint; + @override + String getAddTooltip(AppLocalizations appLocalizations) => + appLocalizations.edit_product_form_item_add_action_category; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_categories_type; @@ -611,6 +638,10 @@ class SimpleInputPageCountryHelper extends AbstractSimpleInputPageHelper { String getAddHint(final AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_countries_hint; + @override + String getAddTooltip(AppLocalizations appLocalizations) => + appLocalizations.edit_product_form_item_add_action_country; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_countries_type; diff --git a/packages/smooth_app/lib/pages/product/simple_input_widget.dart b/packages/smooth_app/lib/pages/product/simple_input_widget.dart index 8281790adc4b..a7f709ae6fb8 100644 --- a/packages/smooth_app/lib/pages/product/simple_input_widget.dart +++ b/packages/smooth_app/lib/pages/product/simple_input_widget.dart @@ -117,8 +117,7 @@ class _SimpleInputWidgetState extends State { ), ), Tooltip( - message: appLocalizations.edit_product_form_item_add_action( - widget.helper.getTypeLabel(appLocalizations)), + message: widget.helper.getAddTooltip(appLocalizations), child: IconButton( onPressed: _onAddItem, splashRadius: 20.0,