From 1887c0dd08572c787a768f897f52fbfbd2302156 Mon Sep 17 00:00:00 2001 From: Munkh-erdene Damdinbazar Date: Mon, 8 Jan 2024 18:09:17 +0800 Subject: [PATCH 01/19] add translation and some of component --- addon/components/modals/add-store-hours.hbs | 4 +- addon/components/modals/assign-driver.hbs | 6 +- .../components/modals/create-first-store.hbs | 12 +- addon/components/modals/create-gateway.hbs | 14 +- .../modals/create-network-category.hbs | 10 +- addon/components/modals/create-network.hbs | 14 +- .../components/modals/create-new-variant.hbs | 8 +- .../modals/create-notification-channel.hbs | 14 +- .../modals/create-product-category.hbs | 12 +- addon/components/modals/create-store.hbs | 6 +- addon/components/modals/import-products.hbs | 23 ++- addon/components/modals/incoming-order.hbs | 36 ++--- addon/components/modals/manage-addons.hbs | 14 +- addon/components/network-category-picker.hbs | 10 +- addon/components/schedule-manager.hbs | 2 +- addon/components/store-selector.hbs | 4 +- translations/en-us.yaml | 138 +++++++++++++++++- 17 files changed, 231 insertions(+), 96 deletions(-) diff --git a/addon/components/modals/add-store-hours.hbs b/addon/components/modals/add-store-hours.hbs index e0035b3..90fd666 100644 --- a/addon/components/modals/add-store-hours.hbs +++ b/addon/components/modals/add-store-hours.hbs @@ -1,8 +1,8 @@ \ No newline at end of file diff --git a/addon/components/modals/assign-driver.hbs b/addon/components/modals/assign-driver.hbs index caaf274..32116d4 100644 --- a/addon/components/modals/assign-driver.hbs +++ b/addon/components/modals/assign-driver.hbs @@ -10,11 +10,11 @@

- Select a driver to assign to this order. + {{t "storefront.component.modals.assign-driver.message-driver"}}

- - + {{model.name}} diff --git a/addon/components/modals/create-first-store.hbs b/addon/components/modals/create-first-store.hbs index 03f4da5..8b391b5 100644 --- a/addon/components/modals/create-first-store.hbs +++ b/addon/components/modals/create-first-store.hbs @@ -3,17 +3,17 @@
-

Welcome to Storefront!

+

{{t "storefront.component.modals.create-first-store.title"}}

- Storefront allows you to quickly setup a headless and dynamic on-demand shop powered by Fleetbase. - Submit the form below to create your first store. + {{t "storefront.component.modals.create-first-store.message"}} + {{t "storefront.component.modals.create-first-store.submit-message"}}

- - - + + +
diff --git a/addon/components/modals/create-gateway.hbs b/addon/components/modals/create-gateway.hbs index 845f7ad..3228d44 100644 --- a/addon/components/modals/create-gateway.hbs +++ b/addon/components/modals/create-gateway.hbs @@ -1,20 +1,20 @@
@@ -29,16 +29,16 @@ {{/each}} diff --git a/addon/components/network-category-picker.hbs b/addon/components/network-category-picker.hbs index 699a326..2605bca 100644 --- a/addon/components/network-category-picker.hbs +++ b/addon/components/network-category-picker.hbs @@ -4,13 +4,13 @@ {{#if this.isLoading}}
- Loading... + {{t "storefront.common.loading"}}
{{else}} {{#if this.selectedCategory}} - Back + {{t "storefront.common.back"}} {{/if}} {{#each this.categories as |category|}} @@ -20,9 +20,9 @@ {{else}}
{{#if this.selectedCategory}} - No subcategories for {{this.selectedCategory.name}} + {{t "storefront.network-category-picker.no-subcategory"}} {{this.selectedCategory.name}} {{else}} - No categories for this network + {{t "storefront.network-category-picker.no-categories"}} {{/if}}
{{/each}} @@ -32,7 +32,7 @@
diff --git a/addon/components/schedule-manager.hbs b/addon/components/schedule-manager.hbs index 8a41d10..339162a 100644 --- a/addon/components/schedule-manager.hbs +++ b/addon/components/schedule-manager.hbs @@ -4,7 +4,7 @@

{{day}}

-
diff --git a/addon/components/store-selector.hbs b/addon/components/store-selector.hbs index 6fe48c4..f792bb7 100644 --- a/addon/components/store-selector.hbs +++ b/addon/components/store-selector.hbs @@ -7,14 +7,14 @@ {{or store.name "-"}} {{else}} - + {{/each}}
diff --git a/translations/en-us.yaml b/translations/en-us.yaml index b30bacc..41eaf4a 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -1,2 +1,138 @@ storefront: - extension-name: Storefront \ No newline at end of file + extension-name: Storefront + common: + back: Back + cash: Cash + config: Config + customer: Customer + delivery: Delivery + invalid: Invalid + loading: Loading... + photos: photos + pickup: Pickup + remove: Remove + store: Store + total: Total + upload-new: Upload new + uploading: Uploading... + + component: + modals: + add-store-hours: + start-time: Start time + operation-start: When availability/operation start + end-time: End time + operation-end: When availability/operation hours end + assign-driver: + message-driver: Select a driver to assign to this order. + name-driver: Select Driver + placeholder-driver: Select Driver to Assign + create-first-store: + title: Welcome to Storefront! + message: Storefront allows you to quickly setup a headless and dynamic on-demand shop powered by Fleetbase. + submit-message: Submit the form below to create your first store. + storefront-name: Storefront name + enter-name: Enter the name of your store + description: Storefront description + brief-description: Give your store a simple brief description on the types of things sold + currency: Storefront currency + select-currency: Select the default currency for your storefront + create-getaway: + getaway: Gateway type + getaway-text: Select gateway type + getaway-name: Getaway name + name-text: Give your payment gateway a name, this will only be relevent internally + getaway-code: Getaway code + code-text: Identifier code used to identify gateway to the SDK + callback-url: Callback URL + callback-text: Callback URL if applicable + return-url: Return URL + return-text: Return URL if applicable + sandbox-getaway: This is a sandbox gateway + create-network-category: + parent-category: Parent category + select-parent: Select a parent category if any + category-name: Category name + name-text: Enter a name for category + description: Category description + description-text: Give your network category a brief description + category-icon: Category icon type + create-network: + title: Start a Network + messagle-line1: Storefront allows you to quickly create marketplaces, enabling multiple storefronts to sell under an umbrella. + messagle-line2: When you create the network you defined your rules and you're able to expand your network through invitiations. + messagle-line3: Get started by creating a network below. + name: Network name + name-text: Enter the name of your store + description: Network description + description-text: Give your store a simple brief description on the types of things sold + currency: Network currency + currency-text: Select the default currency for your storefront + create-new-variant: + name: Variant name + name-text: Give your product variant a name + description: Variant description + description-text: Short description of the variant + cheackbox-1: Allow user to select multiple variant options at once + cheackbox-2: This product variant selection is required + create-notification-channel: + title: Channel + title-text: Select notification channel + name: Channel name + name-text: Give your notification channel a name, this will only be relevent internally + key: Channel Key + key-text: This is your notification channel key, use this to specify which apps should utilize this notification channel via sdk configs. + create-product-category: + name: Category name + name-text: Enter a name for category + description: Category description + description-text: Give your product category a brief description + icon: Category icon + uploading-new: Upload new category icon + create-store: + name: Storefront name + name-text: Enter the name of your store + description: Storefront description + description-text: Give your store a simple brief description on the types of things sold + currency: Storefront currency + currency-text: Select the default currency for your storefront + import-products: + uploading-message: Processing import... + drop-upload: Drop to upload + ready-upload: ready for upload. + upload-spreadsheets: Upload Spreadsheets + drag-drop: Drag and drop spreadsheet files onto this dropzone + select-spreadsheets: or select spreadsheets to upload. + upload-queue: Upload Queue + optionally-select-category: Optionally select a category to import products into + select-category: Select Category + incoming-order: + assigned: Driver Assigned + not-assigned: No driver assigned + no-phone: No phone + change-driver: Change Driver + assign-driver: Assign Driver + pickup-order: Customer must pickup order from + address: Customer address + tracking: Tracking + summary: Order Summary + subtotal: Subtotal + fee: Delivery fee + tip: Tip + delivery-tip: Delivery Tip + manage-addons: + title: New Category + delete: Delete Category + new: New Addon + name: Addon Name + description: Addon Description + + network-category-picker: + no-subcategory: No subcategories for + no-categories: No categories for this network + create-category: Create a new category + schedule-manager: + add-hours: Add Hours + store-selector: + no-stores: No stores to select + create-storefront: Create a new storefront \ No newline at end of file From 6de5f5549ac635dd8c37cbd3d2527d95371fcdf2 Mon Sep 17 00:00:00 2001 From: Bayarbold8 Date: Tue, 9 Jan 2024 17:54:22 +0800 Subject: [PATCH 02/19] storefront translation --- .../components/modals/order-ready-assign-driver.hbs | 8 +++----- addon/components/modals/share-network.hbs | 12 ++++++------ translations/en-us.yaml | 11 +++++++++++ 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/addon/components/modals/order-ready-assign-driver.hbs b/addon/components/modals/order-ready-assign-driver.hbs index f1d863a..89c1f9f 100644 --- a/addon/components/modals/order-ready-assign-driver.hbs +++ b/addon/components/modals/order-ready-assign-driver.hbs @@ -12,18 +12,16 @@

- You are about to set this order as ready and dispatch, use the dropdown below to select a driver - to dispatch to.

Or optionally you can opt to dispatch order as adhoc which will ping the - order to all nearby drivers to be accepted. + {{t "storefront.component.modals.order-ready-assign-driver.driver-dispatch" htmlSafe=true}}

{{#unless @options.adhoc}} - + {{model.name}} diff --git a/addon/components/modals/share-network.hbs b/addon/components/modals/share-network.hbs index 6470187..4d2f0f3 100644 --- a/addon/components/modals/share-network.hbs +++ b/addon/components/modals/share-network.hbs @@ -3,9 +3,9 @@
-

Invite members to your network

+

{{t "storefront.components.modals.share-network.invite-member"}}

- Grab a shareable invitiation link or send individual invites via email below. + {{t "storefront.components.modals.share-network.email-below"}}

@@ -13,19 +13,19 @@

Share with people and organizations

- Enter the emails of people or organizations you want to send an invite to your network. + {{t "storefront.components.modals.share-network.invite-network"}}

- + {{tag}}
-

Get link

+

{{t "storefront.components.modals.share-network.get-link"}}

- +
{{#if @options.network.options.shareable_link_enabled}} diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 41eaf4a..896c331 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -126,6 +126,17 @@ storefront: new: New Addon name: Addon Name description: Addon Description + order-ready-assign-driver: + driver-dispatch: You are about to set this order as ready and dispatch, use the dropdown below to select a driver to dispatch to.

Or optionally you can opt to dispatch order as adhoc which will ping the order to all nearby drivers to be accepted. + name: Select Driver + placeholder: Select Driver to Assign + share-network: + invite-member: Invite members to your network + email-below: Grab a shareable invitiation link or send individual invites via email below. + invite-network: Enter the emails of people or organizations you want to send an invite to your network. + placeholder: Add emails + get-link: Get link + helpText: Anyone with this link is able to join your network network-category-picker: no-subcategory: No subcategories for From ac6e448f552cddfcefd3bbd6c12d9d80db2cd6d4 Mon Sep 17 00:00:00 2001 From: Bayarbold8 Date: Wed, 10 Jan 2024 17:56:11 +0800 Subject: [PATCH 03/19] storefront translation file and components --- addon/components/modals/incoming-order.hbs | 4 +- addon/components/modals/share-network.hbs | 2 +- addon/components/modals/store-details.hbs | 8 +- addon/components/modals/store-form.hbs | 10 +- .../components/modals/store-location-form.hbs | 28 ++-- addon/components/widget/customers.hbs | 12 +- addon/components/widget/orders.hbs | 42 +++--- .../components/widget/storefront-metrics.hbs | 10 +- addon/templates/customers/index.hbs | 4 +- .../networks/index/network/index.hbs | 98 +++++++------- translations/en-us.yaml | 121 +++++++++++++++++- 11 files changed, 227 insertions(+), 112 deletions(-) diff --git a/addon/components/modals/incoming-order.hbs b/addon/components/modals/incoming-order.hbs index 1e3ec94..882b687 100644 --- a/addon/components/modals/incoming-order.hbs +++ b/addon/components/modals/incoming-order.hbs @@ -32,7 +32,7 @@ {{@options.order.driver_assigned.name}}
{{n-a @options.order.driver_assigned.displayName}}
-
{{n-a @options.order.driver_assigned.phone {{t "storefront.component.modals.incoming-order.no-phone"}} }}
+
{{n-a @options.order.driver_assigned.phone (t "storefront.component.modals.incoming-order.no-phone")}}
{{else}} @@ -40,7 +40,7 @@ {{/if}} {{#if @options.assignDriver}}
-
{{/if}}
diff --git a/addon/components/modals/share-network.hbs b/addon/components/modals/share-network.hbs index 4d2f0f3..a4f5766 100644 --- a/addon/components/modals/share-network.hbs +++ b/addon/components/modals/share-network.hbs @@ -22,7 +22,7 @@
-
+

{{t "storefront.components.modals.share-network.get-link"}}

diff --git a/addon/components/modals/store-details.hbs b/addon/components/modals/store-details.hbs index 5785f79..c2ccbda 100644 --- a/addon/components/modals/store-details.hbs +++ b/addon/components/modals/store-details.hbs @@ -2,19 +2,19 @@