Skip to content

Commit

Permalink
Improved: added missing translation for static text, default preferen…
Browse files Browse the repository at this point in the history
…ce value while creation (hotwax#325)
  • Loading branch information
amansinghbais committed Jul 16, 2024
1 parent def93b2 commit 3fb518d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"Authenticating": "Authenticating",
"Are you sure you have received the purchase order for the selected items? Once closed, the shipments for the selected items wont be available for receiving later.": "Are you sure you have received the purchase order for the selected items? { space } Once closed, the shipments for the selected items won't be available for receiving later.",
"Arrival date": "Arrival date",
"Barcode Identifier": "Barcode Identifier",
"Barcode identification preference updated successfully.": "Barcode identification preference updated successfully.",
"Browser TimeZone": "Browser TimeZone",
"Browser time zone": "Browser time zone",
"Built: ": "Built: {builtDateTime}",
Expand All @@ -33,6 +35,7 @@
"Failed to update product identifier preference": "Failed to update product identifier preference",
"facility location": "facility location",
"Facility locations were not found corresponding to destination facility of return shipment. Please add facility locations to avoid receive return shipment failure.": "Facility locations were not found corresponding to destination facility of return shipment. Please add facility locations to avoid receive return shipment failure.",
"Failed to update barcode identification preference.": "Failed to update barcode identification preference.",
"Fetching time zones": "Fetching time zones",
"Force scan": "Force scan",
"Force scan preference updated successfully.": "Force scan preference updated successfully.",
Expand Down Expand Up @@ -107,6 +110,7 @@
"Search time zones": "Search time zones",
"Search SKU or product name": "Search SKU or product name",
"Secondary Product Identifier": "Secondary Product Identifier",
"Select": "Select",
"Select all": "Select all",
"Select facility": "Select facility",
"Selected TimeZone": "Selected TimeZone",
Expand Down Expand Up @@ -134,6 +138,7 @@
"Timezone": "Timezone",
"Time zone updated successfully": "Time zone updated successfully",
"To close the purchase order, select all.": "To close the purchase order, select all.",
"Unable to update barcode identification preference.": "Unable to update barcode identification preference.",
"Unable to update force scan preference.": "Unable to update force scan preference.",
"Unable to update product identifier preference": "Unable to update product identifier preference",
"Username": "Username",
Expand Down
6 changes: 3 additions & 3 deletions src/store/modules/util/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const actions: ActionTree<UtilState, RootState> = {

// when selecting none as ecom store, not updating the pref as it's not possible to save pref with empty productStoreId
if(!eComStoreId) {
showToast(translate("Unable to update force scan preference."))
showToast(translate("Unable to update barcode identification preference."))
commit(types.UTIL_BARCODE_IDENTIFICATION_PREF_UPDATED, prefValue)
return;
}
Expand All @@ -268,13 +268,13 @@ const actions: ActionTree<UtilState, RootState> = {
const resp = await UtilService.updateBarcodeIdentificationPref(params) as any

if((!hasError(resp))) {
showToast(translate("Force scan preference updated successfully."))
showToast(translate("Barcode identification preference updated successfully."))
prefValue = value
} else {
throw resp.data;
}
} catch(err) {
showToast(translate("Failed to update force scan preference."))
showToast(translate("Failed to update barcode identification preference."))
console.error(err)
}
commit(types.UTIL_BARCODE_IDENTIFICATION_PREF_UPDATED, prefValue)
Expand Down
2 changes: 1 addition & 1 deletion src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<ion-toggle label-placement="start" :checked="isForceScanEnabled" @click.prevent="updateForceScanStatus($event)">{{ translate("Require scanning") }}</ion-toggle>
</ion-item>
<ion-item lines="none">
<ion-select :label="translate('Barcode Identifier')" interface="popover" :placeholder="translate('Primary identifier')" :value="barcodeIdentificationPref" @ionChange="setBarcodeIdentificationPref($event.detail.value)">
<ion-select :label="translate('Barcode Identifier')" interface="popover" :placeholder="translate('Select')" :value="barcodeIdentificationPref" @ionChange="setBarcodeIdentificationPref($event.detail.value)">
<ion-select-option v-for="identification in productIdentifications" :key="identification">{{ identification }}</ion-select-option>
</ion-select>
</ion-item>
Expand Down

0 comments on commit 3fb518d

Please sign in to comment.