Skip to content

Commit

Permalink
Improve translations
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k committed Jan 16, 2025
1 parent 6f7a900 commit 3dfbf48
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 40 deletions.
41 changes: 30 additions & 11 deletions packages/smooth_app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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": {
Expand Down
39 changes: 29 additions & 10 deletions packages/smooth_app/lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/smooth_app/lib/l10n/app_he.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/lib/l10n/app_it.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/lib/l10n/app_lt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
20 changes: 10 additions & 10 deletions packages/smooth_app/lib/l10n/app_nl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/lib/l10n/app_pt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/lib/l10n/app_uk.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": "Додати чек",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ class _SimpleInputWidgetState extends State<SimpleInputWidget> {
),
),
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,
Expand Down

0 comments on commit 3dfbf48

Please sign in to comment.