Refactor translations in translations section (#131)
This commit is contained in:
parent
8edd6ee756
commit
1585a5ad28
26 changed files with 1407 additions and 778 deletions
|
@ -1,6 +1,6 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2019-08-26T21:45:05.243Z\n"
|
||||
"POT-Creation-Date: 2019-08-26T21:49:04.020Z\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -1139,6 +1139,14 @@ msgctxt "description"
|
|||
msgid "Attribute Code"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.json
|
||||
#. [src.translations.components.TranslationsProductTypesPage.2642976392]
|
||||
#. defaultMessage is:
|
||||
#. Attribute Name
|
||||
msgctxt "description"
|
||||
msgid "Attribute Name"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/attributes/components/AttributeValues/AttributeValues.json
|
||||
#. [src.attributes.components.AttributeValues.224159874] - section header
|
||||
#. defaultMessage is:
|
||||
|
@ -1407,6 +1415,14 @@ msgctxt "categories section name"
|
|||
msgid "Categories"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
|
||||
#. [src.translations.components.TranslationsEntitiesListPage.3583204912]
|
||||
#. defaultMessage is:
|
||||
#. Categories
|
||||
msgctxt "description"
|
||||
msgid "Categories"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/discounts/components/SaleDetailsPage/SaleDetailsPage.json
|
||||
#. [saleDetailsPageCategoriesQuantity] - number of categories
|
||||
#. defaultMessage is:
|
||||
|
@ -1455,6 +1471,10 @@ msgstr ""
|
|||
#. [src.collections.components.CollectionList.1214235329]
|
||||
#. defaultMessage is:
|
||||
#. Category Name
|
||||
#: build/locale/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.json
|
||||
#. [src.translations.components.TranslationsCategoriesPage.1214235329]
|
||||
#. defaultMessage is:
|
||||
#. Category Name
|
||||
msgctxt "description"
|
||||
msgid "Category Name"
|
||||
msgstr ""
|
||||
|
@ -1559,6 +1579,14 @@ msgctxt "voucher code"
|
|||
msgid "Code"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.json
|
||||
#. [src.translations.components.TranslationsCollectionsPage.2759199473]
|
||||
#. defaultMessage is:
|
||||
#. Collection Name
|
||||
msgctxt "description"
|
||||
msgid "Collection Name"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/discounts/components/DiscountCollections/DiscountCollections.json
|
||||
#. [src.discounts.components.DiscountCollections.3011396316]
|
||||
#. defaultMessage is:
|
||||
|
@ -1583,6 +1611,10 @@ msgstr ""
|
|||
#. [src.products.components.ProductOrganization.222873645]
|
||||
#. defaultMessage is:
|
||||
#. Collections
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
|
||||
#. [src.translations.components.TranslationsEntitiesListPage.222873645]
|
||||
#. defaultMessage is:
|
||||
#. Collections
|
||||
msgctxt "description"
|
||||
msgid "Collections"
|
||||
msgstr ""
|
||||
|
@ -1615,6 +1647,14 @@ msgctxt "description"
|
|||
msgid "Company information"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.json
|
||||
#. [src.translations.components.TranslationsEntitiesList.49462429]
|
||||
#. defaultMessage is:
|
||||
#. Completed Translations
|
||||
msgctxt "description"
|
||||
msgid "Completed Translations"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/products/components/ProductOrganization/ProductOrganization.json
|
||||
#. [src.products.components.ProductOrganization.2754779425] - product is configurable
|
||||
#. defaultMessage is:
|
||||
|
@ -1659,6 +1699,10 @@ msgstr ""
|
|||
#. [src.pages.components.PageInfo.1116746286] - page content
|
||||
#. defaultMessage is:
|
||||
#. Content
|
||||
#: build/locale/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.json
|
||||
#. [src.translations.components.TranslationsPagesPage.1116746286] - page content
|
||||
#. defaultMessage is:
|
||||
#. Content
|
||||
msgctxt "page content"
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
@ -2511,6 +2555,10 @@ msgstr ""
|
|||
#. [src.description]
|
||||
#. defaultMessage is:
|
||||
#. Description
|
||||
#: build/locale/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.json
|
||||
#. [src.translations.components.TranslationsProductsPage.3374163063]
|
||||
#. defaultMessage is:
|
||||
#. Description
|
||||
msgctxt "description"
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
@ -2531,6 +2579,14 @@ msgctxt "product type"
|
|||
msgid "Digital"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFieldsSave.json
|
||||
#. [src.translations.components.TranslationFields.363646127] - button
|
||||
#. defaultMessage is:
|
||||
#. Discard
|
||||
msgctxt "button"
|
||||
msgid "Discard"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/home/components/HomeScreen.json
|
||||
#. [homeScreenDisclaimer] - header
|
||||
#. defaultMessage is:
|
||||
|
@ -3135,6 +3191,26 @@ msgctxt "authentication provider API key"
|
|||
msgid "Key"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.json
|
||||
#. [src.translations.components.TranslationsLanguageList.604081953]
|
||||
#. defaultMessage is:
|
||||
#. Language
|
||||
msgctxt "description"
|
||||
msgid "Language"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
|
||||
#. [src.translations.components.TranslationsEntitiesListPage.1163855804]
|
||||
#. defaultMessage is:
|
||||
#. Languages
|
||||
#: build/locale/src/translations/components/TranslationsLanguageListPage/TranslationsLanguageListPage.json
|
||||
#. [src.translations.components.TranslationsLanguageListPage.1163855804]
|
||||
#. defaultMessage is:
|
||||
#. Languages
|
||||
msgctxt "description"
|
||||
msgid "Languages"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json
|
||||
#. [src.orders.components.OrderListFilter.714411029]
|
||||
#. defaultMessage is:
|
||||
|
@ -3487,6 +3563,14 @@ msgctxt "staff member full name"
|
|||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.json
|
||||
#. [src.translations.components.TranslationsEntitiesList.636461959] - entity (product, collection, shipping method) name
|
||||
#. defaultMessage is:
|
||||
#. Name
|
||||
msgctxt "entity (product, collection, shipping method) name"
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.json
|
||||
#. [src.siteSettings.components.SiteSettingsDetails.2286355060]
|
||||
#. defaultMessage is:
|
||||
|
@ -3627,6 +3711,14 @@ msgctxt "no authentication provider API keys"
|
|||
msgid "No keys"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsLanguageList/TranslationsLanguageList.json
|
||||
#. [src.translations.components.TranslationsLanguageList.2966651157]
|
||||
#. defaultMessage is:
|
||||
#. No languages found
|
||||
msgctxt "description"
|
||||
msgid "No languages found"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/navigation/components/MenuList/MenuList.json
|
||||
#. [menuListNoMenus]
|
||||
#. defaultMessage is:
|
||||
|
@ -3787,6 +3879,30 @@ msgctxt "description"
|
|||
msgid "No subcategories found"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.json
|
||||
#. [src.translations.components.TranslationsEntitiesList.4176487406]
|
||||
#. defaultMessage is:
|
||||
#. No translatable entities found
|
||||
msgctxt "description"
|
||||
msgid "No translatable entities found"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFieldsLong.json
|
||||
#. [src.translations.components.TranslationFields.3793796047]
|
||||
#. defaultMessage is:
|
||||
#. No translation yet
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFieldsRich.json
|
||||
#. [src.translations.components.TranslationFields.3793796047]
|
||||
#. defaultMessage is:
|
||||
#. No translation yet
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFieldsShort.json
|
||||
#. [src.translations.components.TranslationFields.3793796047]
|
||||
#. defaultMessage is:
|
||||
#. No translation yet
|
||||
msgctxt "description"
|
||||
msgid "No translation yet"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json
|
||||
#. [src.orders.components.OrderDraftFinalizeDialog.1297434244]
|
||||
#. defaultMessage is:
|
||||
|
@ -4155,6 +4271,14 @@ msgctxt "section header"
|
|||
msgid "Organize Product"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFields.json
|
||||
#. [src.translations.components.TranslationFields.1348655672]
|
||||
#. defaultMessage is:
|
||||
#. Original String
|
||||
msgctxt "description"
|
||||
msgid "Original String"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/products/components/ProductListFilter/ProductListFilter.json
|
||||
#. [src.products.components.ProductListFilter.1640493122] - product status
|
||||
#. defaultMessage is:
|
||||
|
@ -4179,6 +4303,14 @@ msgctxt "order history message"
|
|||
msgid "Oversold {quantity} items"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.json
|
||||
#. [src.translations.components.TranslationsPagesPage.432157284]
|
||||
#. defaultMessage is:
|
||||
#. Page Title
|
||||
msgctxt "description"
|
||||
msgid "Page Title"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/intl.json
|
||||
#. [src.pages] - pages section name
|
||||
#. defaultMessage is:
|
||||
|
@ -4187,6 +4319,14 @@ msgctxt "pages section name"
|
|||
msgid "Pages"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
|
||||
#. [src.translations.components.TranslationsEntitiesListPage.3287512325]
|
||||
#. defaultMessage is:
|
||||
#. Pages
|
||||
msgctxt "description"
|
||||
msgid "Pages"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json
|
||||
#. [src.orders.components.OrderListFilter.210276526] - order fulfillment status
|
||||
#. defaultMessage is:
|
||||
|
@ -4471,6 +4611,14 @@ msgctxt "product name"
|
|||
msgid "Product"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.json
|
||||
#. [src.translations.components.TranslationsProductTypesPage.2510190956] - header
|
||||
#. defaultMessage is:
|
||||
#. Product Attribute ({attributeName})
|
||||
msgctxt "header"
|
||||
msgid "Product Attribute ({attributeName})"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.json
|
||||
#. [src.productTypes.components.ProductTypeAttributes.3559259966] - section header
|
||||
#. defaultMessage is:
|
||||
|
@ -4483,6 +4631,10 @@ msgstr ""
|
|||
#. [src.discounts.components.DiscountProducts.2697405188]
|
||||
#. defaultMessage is:
|
||||
#. Product Name
|
||||
#: build/locale/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.json
|
||||
#. [src.translations.components.TranslationsProductsPage.2697405188]
|
||||
#. defaultMessage is:
|
||||
#. Product Name
|
||||
msgctxt "description"
|
||||
msgid "Product Name"
|
||||
msgstr ""
|
||||
|
@ -4515,6 +4667,14 @@ msgctxt "product types section name"
|
|||
msgid "Product Types"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
|
||||
#. [src.translations.components.TranslationsEntitiesListPage.765385638]
|
||||
#. defaultMessage is:
|
||||
#. Product Types
|
||||
msgctxt "description"
|
||||
msgid "Product Types"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/products/views/ProductCreate.json
|
||||
#. [src.products.views.2899821092]
|
||||
#. defaultMessage is:
|
||||
|
@ -4587,6 +4747,14 @@ msgctxt "products section name"
|
|||
msgid "Products"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
|
||||
#. [src.translations.components.TranslationsEntitiesListPage.2968663655]
|
||||
#. defaultMessage is:
|
||||
#. Products
|
||||
msgctxt "description"
|
||||
msgid "Products"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/discounts/components/SaleDetailsPage/SaleDetailsPage.json
|
||||
#. [saleDetailsPageProductsQuantity] - number of products
|
||||
#. defaultMessage is:
|
||||
|
@ -4999,6 +5167,14 @@ msgctxt "variant sku"
|
|||
msgid "SKU {sku}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.json
|
||||
#. [src.translations.components.TranslationsSalesPage.898281424]
|
||||
#. defaultMessage is:
|
||||
#. Sale Name
|
||||
msgctxt "description"
|
||||
msgid "Sale Name"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/intl.json
|
||||
#. [src.sales] - sales section name
|
||||
#. defaultMessage is:
|
||||
|
@ -5007,6 +5183,14 @@ msgctxt "sales section name"
|
|||
msgid "Sales"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
|
||||
#. [src.translations.components.TranslationsEntitiesListPage.487083593]
|
||||
#. defaultMessage is:
|
||||
#. Sales
|
||||
msgctxt "description"
|
||||
msgid "Sales"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json
|
||||
#. [src.orders.components.OrderCustomer.3912924864] - billing address
|
||||
#. defaultMessage is:
|
||||
|
@ -5063,6 +5247,66 @@ msgctxt "description"
|
|||
msgid "Search Customers"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.json
|
||||
#. [src.translations.components.TranslationsCategoriesPage.1406947243]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Description
|
||||
#: build/locale/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.json
|
||||
#. [src.translations.components.TranslationsCollectionsPage.1406947243]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Description
|
||||
#: build/locale/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.json
|
||||
#. [src.translations.components.TranslationsPagesPage.1406947243]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Description
|
||||
#: build/locale/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.json
|
||||
#. [src.translations.components.TranslationsProductsPage.1406947243]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Description
|
||||
msgctxt "description"
|
||||
msgid "Search Engine Description"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.json
|
||||
#. [src.translations.components.TranslationsCategoriesPage.3468022343]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Preview
|
||||
#: build/locale/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.json
|
||||
#. [src.translations.components.TranslationsCollectionsPage.3468022343]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Preview
|
||||
#: build/locale/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.json
|
||||
#. [src.translations.components.TranslationsPagesPage.3468022343]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Preview
|
||||
#: build/locale/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.json
|
||||
#. [src.translations.components.TranslationsProductsPage.3468022343]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Preview
|
||||
msgctxt "description"
|
||||
msgid "Search Engine Preview"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.json
|
||||
#. [src.translations.components.TranslationsCategoriesPage.2496919463]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Title
|
||||
#: build/locale/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.json
|
||||
#. [src.translations.components.TranslationsCollectionsPage.2496919463]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Title
|
||||
#: build/locale/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.json
|
||||
#. [src.translations.components.TranslationsPagesPage.2496919463]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Title
|
||||
#: build/locale/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.json
|
||||
#. [src.translations.components.TranslationsProductsPage.2496919463]
|
||||
#. defaultMessage is:
|
||||
#. Search Engine Title
|
||||
msgctxt "description"
|
||||
msgid "Search Engine Title"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/orders/components/OrderListPage/OrderListPage.json
|
||||
#. [src.orders.components.OrderListPage.355376157]
|
||||
#. defaultMessage is:
|
||||
|
@ -5943,6 +6187,102 @@ msgctxt "description"
|
|||
msgid "Tracking number"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFields.json
|
||||
#. [src.translations.components.TranslationFields.2481190613] - Translated Name
|
||||
#. defaultMessage is:
|
||||
#. Translation
|
||||
msgctxt "Translated Name"
|
||||
msgid "Translation"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFieldsLong.json
|
||||
#. [src.translations.components.TranslationFields.2481190613]
|
||||
#. defaultMessage is:
|
||||
#. Translation
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFieldsRich.json
|
||||
#. [src.translations.components.TranslationFields.2481190613]
|
||||
#. defaultMessage is:
|
||||
#. Translation
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFieldsShort.json
|
||||
#. [src.translations.components.TranslationFields.2481190613]
|
||||
#. defaultMessage is:
|
||||
#. Translation
|
||||
msgctxt "description"
|
||||
msgid "Translation"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.json
|
||||
#. [src.translations.components.TranslationsCategoriesPage.2043581404]
|
||||
#. defaultMessage is:
|
||||
#. Translation Category "{categoryNane}" - {languageCode}
|
||||
msgctxt "description"
|
||||
msgid "Translation Category \"{categoryNane}\" - {languageCode}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsCollectionsPage/TranslationsCollectionsPage.json
|
||||
#. [src.translations.components.TranslationsCollectionsPage.3055443821] - header
|
||||
#. defaultMessage is:
|
||||
#. Translation Collection "{collectionName}" - {languageCode}
|
||||
msgctxt "header"
|
||||
msgid "Translation Collection \"{collectionName}\" - {languageCode}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.json
|
||||
#. [src.translations.components.TranslationsPagesPage.2806429775] - header
|
||||
#. defaultMessage is:
|
||||
#. Translation Page "{pageName}" - {languageCode}
|
||||
msgctxt "header"
|
||||
msgid "Translation Page \"{pageName}\" - {languageCode}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.json
|
||||
#. [src.translations.components.TranslationsProductsPage.2713974050] - header
|
||||
#. defaultMessage is:
|
||||
#. Translation Product "{productName}" - {languageCode}
|
||||
msgctxt "header"
|
||||
msgid "Translation Product \"{productName}\" - {languageCode}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.json
|
||||
#. [src.translations.components.TranslationsProductTypesPage.1281101905] - header
|
||||
#. defaultMessage is:
|
||||
#. Translation Product Type "{productTypeName}" - {languageCode}
|
||||
msgctxt "header"
|
||||
msgid "Translation Product Type \"{productTypeName}\" - {languageCode}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsSalesPage/TranslationsSalesPage.json
|
||||
#. [src.translations.components.TranslationsSalesPage.3731955064] - header
|
||||
#. defaultMessage is:
|
||||
#. Translation Sale "{saleName}" - {languageCode}
|
||||
msgctxt "header"
|
||||
msgid "Translation Sale \"{saleName}\" - {languageCode}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.json
|
||||
#. [src.translations.components.TranslationsVouchersPage.2447510181] - header
|
||||
#. defaultMessage is:
|
||||
#. Translation Voucher "{voucherName}" - {languageCode}
|
||||
msgctxt "header"
|
||||
msgid "Translation Voucher \"{voucherName}\" - {languageCode}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/intl.json
|
||||
#. [src.translations] - translations section name
|
||||
#. defaultMessage is:
|
||||
#. Translations
|
||||
msgctxt "translations section name"
|
||||
msgid "Translations"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
|
||||
#. [src.translations.components.TranslationsEntitiesListPage.2460580333] - header
|
||||
#. defaultMessage is:
|
||||
#. Translations to {language}
|
||||
msgctxt "header"
|
||||
msgid "Translations to {language}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/categories/components/CategoryProducts/CategoryProducts.json
|
||||
#. [src.categories.components.CategoryProducts.1952810469] - product type
|
||||
#. defaultMessage is:
|
||||
|
@ -6407,6 +6747,14 @@ msgctxt "order price range"
|
|||
msgid "Value range"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.json
|
||||
#. [src.translations.components.TranslationsProductTypesPage.1567737068] - attribute values
|
||||
#. defaultMessage is:
|
||||
#. Value {number}
|
||||
msgctxt "attribute values"
|
||||
msgid "Value {number}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/products/components/ProductAttributes/ProductAttributes.json
|
||||
#. [src.products.components.ProductAttributes.1207761269] - attribute values
|
||||
#. defaultMessage is:
|
||||
|
@ -6415,6 +6763,14 @@ msgctxt "attribute values"
|
|||
msgid "Values"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsProductTypesPage/TranslationsProductTypesPage.json
|
||||
#. [src.translations.components.TranslationsProductTypesPage.3538502409] - header
|
||||
#. defaultMessage is:
|
||||
#. Variant Attribute ({attributeName})
|
||||
msgctxt "header"
|
||||
msgid "Variant Attribute ({attributeName})"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.json
|
||||
#. [src.productTypes.components.ProductTypeAttributes.888493112] - section header
|
||||
#. defaultMessage is:
|
||||
|
@ -6523,6 +6879,14 @@ msgctxt "dialog header"
|
|||
msgid "Void Payment"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsVouchersPage/TranslationsVouchersPage.json
|
||||
#. [src.translations.components.TranslationsVouchersPage.2599922713]
|
||||
#. defaultMessage is:
|
||||
#. Voucher Name
|
||||
msgctxt "description"
|
||||
msgid "Voucher Name"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.json
|
||||
#. [src.discounts.components.VoucherDetailsPage.2071139683]
|
||||
#. defaultMessage is:
|
||||
|
@ -6547,6 +6911,14 @@ msgctxt "vouchers section name"
|
|||
msgid "Vouchers"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
|
||||
#. [src.translations.components.TranslationsEntitiesListPage.749185240]
|
||||
#. defaultMessage is:
|
||||
#. Vouchers
|
||||
msgctxt "description"
|
||||
msgid "Vouchers"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.json
|
||||
#. [src.productTypes.components.ProductTypeShipping.746695941]
|
||||
#. defaultMessage is:
|
||||
|
@ -6675,6 +7047,14 @@ msgctxt "description"
|
|||
msgid "{amount,plural,one{One product} other{{amount} Products}} out of stock"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.json
|
||||
#. [src.translations.components.TranslationsEntitiesList.1136143456] - translation progress
|
||||
#. defaultMessage is:
|
||||
#. {current} of {max}
|
||||
msgctxt "translation progress"
|
||||
msgid "{current} of {max}"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.json
|
||||
#. [src.customers.components.CustomerAddressListPage.489918044] - customer details, header
|
||||
#. defaultMessage is:
|
||||
|
@ -6691,6 +7071,14 @@ msgctxt "customer's address book, header"
|
|||
msgid "{fullName}'s Address Book"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/translations/components/TranslationFields/TranslationFields.json
|
||||
#. [src.translations.components.TranslationFields.282734765]
|
||||
#. defaultMessage is:
|
||||
#. {numberOFields} Translations, {numberOfTranslatedFields} Completed
|
||||
msgctxt "description"
|
||||
msgid "{numberOFields} Translations, {numberOfTranslatedFields} Completed"
|
||||
msgstr ""
|
||||
|
||||
#: build/locale/src/products/components/ProductAttributes/ProductAttributes.json
|
||||
#. [src.products.components.ProductAttributes.1071548120] - number of product attributes
|
||||
#. defaultMessage is:
|
||||
|
|
|
@ -157,6 +157,10 @@ export const sectionNames = defineMessages({
|
|||
defaultMessage: "Taxes",
|
||||
description: "taxes section name"
|
||||
},
|
||||
translations: {
|
||||
defaultMessage: "Translations",
|
||||
description: "translations section name"
|
||||
},
|
||||
vouchers: {
|
||||
defaultMessage: "Vouchers",
|
||||
description: "vouchers section name"
|
||||
|
|
|
@ -17,7 +17,9 @@ import Hr from "@saleor/components/Hr";
|
|||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import i18n from "../../../i18n";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import TranslationFieldsLong from "./TranslationFieldsLong";
|
||||
import TranslationFieldsRich from "./TranslationFieldsRich";
|
||||
import TranslationFieldsShort from "./TranslationFieldsShort";
|
||||
|
@ -138,12 +140,13 @@ const TranslationFields = withStyles(styles, { name: "TranslationFields" })(
|
|||
<CardContent className={classes.cardContent}>
|
||||
<Grid className={classes.grid} variant="uniform">
|
||||
<Typography className={classes.columnHeader} variant="body2">
|
||||
{i18n.t("Original String")}
|
||||
<FormattedMessage defaultMessage="Original String" />
|
||||
</Typography>
|
||||
<Typography className={classes.columnHeader} variant="body2">
|
||||
{i18n.t("Translation", {
|
||||
context: "translation to language"
|
||||
})}
|
||||
<FormattedMessage
|
||||
defaultMessage="Translation"
|
||||
description="Translated Name"
|
||||
/>
|
||||
</Typography>
|
||||
{fields.map(field => (
|
||||
<React.Fragment key={field.name}>
|
||||
|
@ -153,7 +156,7 @@ const TranslationFields = withStyles(styles, { name: "TranslationFields" })(
|
|||
</Typography>
|
||||
<div className={classes.editButtonContainer}>
|
||||
<Button color="primary" onClick={() => onEdit(field.name)}>
|
||||
{i18n.t("Edit")}
|
||||
<FormattedMessage {...buttonMessages.edit} />
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes.content}>
|
||||
|
@ -231,16 +234,16 @@ const TranslationFields = withStyles(styles, { name: "TranslationFields" })(
|
|||
) : (
|
||||
<CardContent>
|
||||
<Typography className={classes.cardCaption} variant="caption">
|
||||
{i18n.t(
|
||||
"{{ fieldQuantity }} Translations, {{ translatedFieldQuantity }} Completed",
|
||||
{
|
||||
fieldQuantity: fields.length,
|
||||
translatedFieldQuantity: fields.reduce(
|
||||
<FormattedMessage
|
||||
defaultMessage="{numberOFields} Translations, {numberOfTranslatedFields} Completed"
|
||||
values={{
|
||||
numberOfFields: fields.length,
|
||||
numberOfTranslatedFields: fields.reduce(
|
||||
(acc, field) => acc + +(field.translation !== null),
|
||||
0
|
||||
)
|
||||
}
|
||||
)}
|
||||
}}
|
||||
/>
|
||||
</Typography>
|
||||
</CardContent>
|
||||
)}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import TextField from "@material-ui/core/TextField";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||
import Form from "@saleor/components/Form";
|
||||
import i18n from "../../../i18n";
|
||||
import TranslationFieldsSave from "./TranslationFieldsSave";
|
||||
|
||||
interface TranslationFieldsLongProps {
|
||||
|
@ -23,8 +23,10 @@ const TranslationFieldsLong: React.FC<TranslationFieldsLongProps> = ({
|
|||
saveButtonState,
|
||||
onDiscard,
|
||||
onSubmit
|
||||
}) =>
|
||||
edit ? (
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return edit ? (
|
||||
<Form
|
||||
initial={{ translation: initial }}
|
||||
onSubmit={data => onSubmit(data.translation)}
|
||||
|
@ -35,7 +37,9 @@ const TranslationFieldsLong: React.FC<TranslationFieldsLongProps> = ({
|
|||
disabled={disabled}
|
||||
fullWidth
|
||||
multiline
|
||||
label={i18n.t("Translation")}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Translation"
|
||||
})}
|
||||
name="translation"
|
||||
value={data.translation}
|
||||
onChange={change}
|
||||
|
@ -50,10 +54,11 @@ const TranslationFieldsLong: React.FC<TranslationFieldsLongProps> = ({
|
|||
</Form>
|
||||
) : initial === null ? (
|
||||
<Typography color="textSecondary">
|
||||
{i18n.t("No translation yet")}
|
||||
<FormattedMessage defaultMessage="No translation yet" />
|
||||
</Typography>
|
||||
) : (
|
||||
<Typography>{initial}</Typography>
|
||||
);
|
||||
};
|
||||
TranslationFieldsLong.displayName = "TranslationFieldsLong";
|
||||
export default TranslationFieldsLong;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import Typography from "@material-ui/core/Typography";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||
import DraftRenderer from "@saleor/components/DraftRenderer";
|
||||
import Form from "@saleor/components/Form";
|
||||
import RichTextEditor from "@saleor/components/RichTextEditor";
|
||||
import i18n from "../../../i18n";
|
||||
import TranslationFieldsSave from "./TranslationFieldsSave";
|
||||
|
||||
interface TranslationFieldsRichProps {
|
||||
|
@ -24,8 +24,10 @@ const TranslationFieldsRich: React.FC<TranslationFieldsRichProps> = ({
|
|||
saveButtonState,
|
||||
onDiscard,
|
||||
onSubmit
|
||||
}) =>
|
||||
edit ? (
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return edit ? (
|
||||
<Form
|
||||
initial={{ translation: initial }}
|
||||
onSubmit={data => onSubmit(data.translation)}
|
||||
|
@ -37,7 +39,9 @@ const TranslationFieldsRich: React.FC<TranslationFieldsRichProps> = ({
|
|||
error={undefined}
|
||||
helperText={undefined}
|
||||
initial={JSON.parse(initial)}
|
||||
label={i18n.t("Translation")}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Translation"
|
||||
})}
|
||||
name="translation"
|
||||
onChange={change}
|
||||
/>
|
||||
|
@ -51,12 +55,13 @@ const TranslationFieldsRich: React.FC<TranslationFieldsRichProps> = ({
|
|||
</Form>
|
||||
) : initial === null ? (
|
||||
<Typography color="textSecondary">
|
||||
{i18n.t("No translation yet")}
|
||||
<FormattedMessage defaultMessage="No translation yet" />
|
||||
</Typography>
|
||||
) : (
|
||||
<Typography>
|
||||
<DraftRenderer content={JSON.parse(initial)} />
|
||||
</Typography>
|
||||
);
|
||||
};
|
||||
TranslationFieldsRich.displayName = "TranslationFieldsRich";
|
||||
export default TranslationFieldsRich;
|
||||
|
|
|
@ -6,11 +6,12 @@ import {
|
|||
WithStyles
|
||||
} from "@material-ui/core/styles";
|
||||
import React from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import ConfirmButton, {
|
||||
ConfirmButtonTransitionState
|
||||
} from "@saleor/components/ConfirmButton";
|
||||
import i18n from "../../../i18n";
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
|
||||
interface TranslationFieldsSaveProps {
|
||||
saveButtonState: ConfirmButtonTransitionState;
|
||||
|
@ -45,9 +46,11 @@ const TranslationFieldsSave = withStyles(styles, {
|
|||
transitionState={saveButtonState}
|
||||
onClick={onSave}
|
||||
>
|
||||
{i18n.t("Save")}
|
||||
<FormattedMessage {...buttonMessages.save} />
|
||||
</ConfirmButton>
|
||||
<Button onClick={onDiscard}>{i18n.t("Discard")}</Button>
|
||||
<Button onClick={onDiscard}>
|
||||
<FormattedMessage defaultMessage="Discard" description="button" />
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import TextField from "@material-ui/core/TextField";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||
import Form from "@saleor/components/Form";
|
||||
import i18n from "../../../i18n";
|
||||
import TranslationFieldsSave from "./TranslationFieldsSave";
|
||||
|
||||
interface TranslationFieldsShortProps {
|
||||
|
@ -23,8 +23,10 @@ const TranslationFieldsShort: React.FC<TranslationFieldsShortProps> = ({
|
|||
saveButtonState,
|
||||
onDiscard,
|
||||
onSubmit
|
||||
}) =>
|
||||
edit ? (
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return edit ? (
|
||||
<Form
|
||||
initial={{ translation: initial }}
|
||||
onSubmit={data => onSubmit(data.translation)}
|
||||
|
@ -34,7 +36,9 @@ const TranslationFieldsShort: React.FC<TranslationFieldsShortProps> = ({
|
|||
<TextField
|
||||
disabled={disabled}
|
||||
fullWidth
|
||||
label={i18n.t("Translation")}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Translation"
|
||||
})}
|
||||
name="translation"
|
||||
value={data.translation}
|
||||
onChange={change}
|
||||
|
@ -49,10 +53,11 @@ const TranslationFieldsShort: React.FC<TranslationFieldsShortProps> = ({
|
|||
</Form>
|
||||
) : initial === null ? (
|
||||
<Typography color="textSecondary">
|
||||
{i18n.t("No translation yet")}
|
||||
<FormattedMessage defaultMessage="No translation yet" />
|
||||
</Typography>
|
||||
) : (
|
||||
<Typography>{initial}</Typography>
|
||||
);
|
||||
};
|
||||
TranslationFieldsShort.displayName = "TranslationFieldsShort";
|
||||
export default TranslationFieldsShort;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import CardSpacer from "@saleor/components/CardSpacer";
|
||||
import Container from "@saleor/components/Container";
|
||||
import LanguageSwitch from "@saleor/components/LanguageSwitch";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import i18n from "../../../i18n";
|
||||
import { commonMessages, sectionNames } from "@saleor/intl";
|
||||
import { maybe } from "../../../misc";
|
||||
import { LanguageCodeEnum } from "../../../types/globalTypes";
|
||||
import { CategoryTranslationFragment } from "../../types/CategoryTranslationFragment";
|
||||
|
@ -38,87 +39,103 @@ const TranslationsCategoriesPage: React.StatelessComponent<
|
|||
onEdit,
|
||||
onLanguageChange,
|
||||
onSubmit
|
||||
}) => (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader>
|
||||
<PageHeader
|
||||
title={i18n.t(
|
||||
'Translation Category "{{ categoryName }}" - {{ languageCode }}',
|
||||
{
|
||||
categoryName: maybe(() => category.name, "..."),
|
||||
context: "category translation page title",
|
||||
languageCode
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>
|
||||
{intl.formatMessage(sectionNames.translations)}
|
||||
</AppHeader>
|
||||
<PageHeader
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage:
|
||||
'Translation Category "{categoryNane}" - {languageCode}'
|
||||
},
|
||||
{
|
||||
categoryName: maybe(() => category.name, "..."),
|
||||
languageCode
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage(commonMessages.generalInformations)}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Category Name"
|
||||
}),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
category.translation ? category.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => category.name)
|
||||
},
|
||||
{
|
||||
displayName: intl.formatMessage(commonMessages.description),
|
||||
name: fieldNames.descriptionJson,
|
||||
translation: maybe(() =>
|
||||
category.translation ? category.translation.descriptionJson : null
|
||||
),
|
||||
type: "rich" as "rich",
|
||||
value: maybe(() => category.descriptionJson)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("General Information")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Category Name"),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
category.translation ? category.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => category.name)
|
||||
},
|
||||
{
|
||||
displayName: i18n.t("Description"),
|
||||
name: fieldNames.descriptionJson,
|
||||
translation: maybe(() =>
|
||||
category.translation ? category.translation.descriptionJson : null
|
||||
),
|
||||
type: "rich" as "rich",
|
||||
value: maybe(() => category.descriptionJson)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
<CardSpacer />
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("Search Engine Preview")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Search Engine Title"),
|
||||
name: fieldNames.seoTitle,
|
||||
translation: maybe(() =>
|
||||
category.translation ? category.translation.seoTitle : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => category.seoTitle)
|
||||
},
|
||||
{
|
||||
displayName: i18n.t("Search Engine Description"),
|
||||
name: fieldNames.seoDescription,
|
||||
translation: maybe(() =>
|
||||
category.translation ? category.translation.seoDescription : null
|
||||
),
|
||||
type: "long" as "long",
|
||||
value: maybe(() => category.seoDescription)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
<CardSpacer />
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage({
|
||||
defaultMessage: "Search Engine Preview"
|
||||
})}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Search Engine Title"
|
||||
}),
|
||||
name: fieldNames.seoTitle,
|
||||
translation: maybe(() =>
|
||||
category.translation ? category.translation.seoTitle : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => category.seoTitle)
|
||||
},
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Search Engine Description"
|
||||
}),
|
||||
name: fieldNames.seoDescription,
|
||||
translation: maybe(() =>
|
||||
category.translation ? category.translation.seoDescription : null
|
||||
),
|
||||
type: "long" as "long",
|
||||
value: maybe(() => category.seoDescription)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
TranslationsCategoriesPage.displayName = "TranslationsCategoriesPage";
|
||||
export default TranslationsCategoriesPage;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import CardSpacer from "@saleor/components/CardSpacer";
|
||||
import Container from "@saleor/components/Container";
|
||||
import LanguageSwitch from "@saleor/components/LanguageSwitch";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import i18n from "../../../i18n";
|
||||
import { commonMessages, sectionNames } from "@saleor/intl";
|
||||
import { maybe } from "../../../misc";
|
||||
import { LanguageCodeEnum } from "../../../types/globalTypes";
|
||||
import { CollectionTranslationFragment } from "../../types/CollectionTranslationFragment";
|
||||
|
@ -38,91 +39,108 @@ const TranslationsCollectionsPage: React.StatelessComponent<
|
|||
onEdit,
|
||||
onLanguageChange,
|
||||
onSubmit
|
||||
}) => (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader>
|
||||
<PageHeader
|
||||
title={i18n.t(
|
||||
'Translation Collection "{{ collectionName }}" - {{ languageCode }}',
|
||||
{
|
||||
collectionName: maybe(() => collection.name, "..."),
|
||||
context: "collection translation page title",
|
||||
languageCode
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>
|
||||
{intl.formatMessage(sectionNames.translations)}
|
||||
</AppHeader>
|
||||
<PageHeader
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage:
|
||||
'Translation Collection "{collectionName}" - {languageCode}',
|
||||
description: "header"
|
||||
},
|
||||
{
|
||||
collectionName: maybe(() => collection.name, "..."),
|
||||
languageCode
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage(commonMessages.generalInformations)}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Collection Name"
|
||||
}),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
collection.translation ? collection.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => collection.name)
|
||||
},
|
||||
{
|
||||
displayName: intl.formatMessage(commonMessages.description),
|
||||
name: fieldNames.descriptionJson,
|
||||
translation: maybe(() =>
|
||||
collection.translation
|
||||
? collection.translation.descriptionJson
|
||||
: null
|
||||
),
|
||||
type: "rich" as "rich",
|
||||
value: maybe(() => collection.descriptionJson)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("General Information")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Collection Name"),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
collection.translation ? collection.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => collection.name)
|
||||
},
|
||||
{
|
||||
displayName: i18n.t("Description"),
|
||||
name: fieldNames.descriptionJson,
|
||||
translation: maybe(() =>
|
||||
collection.translation
|
||||
? collection.translation.descriptionJson
|
||||
: null
|
||||
),
|
||||
type: "rich" as "rich",
|
||||
value: maybe(() => collection.descriptionJson)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
<CardSpacer />
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("Search Engine Preview")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Search Engine Title"),
|
||||
name: fieldNames.seoTitle,
|
||||
translation: maybe(() =>
|
||||
collection.translation ? collection.translation.seoTitle : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => collection.seoTitle)
|
||||
},
|
||||
{
|
||||
displayName: i18n.t("Search Engine Description"),
|
||||
name: fieldNames.seoDescription,
|
||||
translation: maybe(() =>
|
||||
collection.translation
|
||||
? collection.translation.seoDescription
|
||||
: null
|
||||
),
|
||||
type: "long" as "long",
|
||||
value: maybe(() => collection.seoDescription)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
<CardSpacer />
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage({
|
||||
defaultMessage: "Search Engine Preview"
|
||||
})}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Search Engine Title"
|
||||
}),
|
||||
name: fieldNames.seoTitle,
|
||||
translation: maybe(() =>
|
||||
collection.translation ? collection.translation.seoTitle : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => collection.seoTitle)
|
||||
},
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Search Engine Description"
|
||||
}),
|
||||
name: fieldNames.seoDescription,
|
||||
translation: maybe(() =>
|
||||
collection.translation
|
||||
? collection.translation.seoDescription
|
||||
: null
|
||||
),
|
||||
type: "long" as "long",
|
||||
value: maybe(() => collection.seoDescription)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
TranslationsCollectionsPage.displayName = "TranslationsCollectionsPage";
|
||||
export default TranslationsCollectionsPage;
|
||||
|
|
|
@ -8,11 +8,12 @@ import TableHead from "@material-ui/core/TableHead";
|
|||
import TableRow from "@material-ui/core/TableRow";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { ListProps } from "../../../types";
|
||||
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import TablePagination from "@saleor/components/TablePagination";
|
||||
import i18n from "../../../i18n";
|
||||
import { maybe, renderCollection } from "../../../misc";
|
||||
|
||||
export interface TranslatableEntity {
|
||||
|
@ -52,73 +53,81 @@ const TranslationsEntitiesList = withStyles(styles, {
|
|||
onPreviousPage,
|
||||
onRowClick,
|
||||
pageInfo
|
||||
}: TranslationsEntitiesListProps & WithStyles<typeof styles>) => (
|
||||
<Table>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell className={classes.wideColumn}>
|
||||
{i18n.t("Name", { context: "table header" })}
|
||||
</TableCell>
|
||||
<TableCell className={classes.textRight}>
|
||||
{i18n.t("Completed Translations", {
|
||||
context: "table header"
|
||||
})}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableFooter>
|
||||
<TableRow>
|
||||
<TablePagination
|
||||
colSpan={2}
|
||||
hasNextPage={
|
||||
pageInfo && !disabled ? pageInfo.hasNextPage : undefined
|
||||
}
|
||||
onNextPage={onNextPage}
|
||||
hasPreviousPage={
|
||||
pageInfo && !disabled ? pageInfo.hasPreviousPage : undefined
|
||||
}
|
||||
onPreviousPage={onPreviousPage}
|
||||
/>
|
||||
</TableRow>
|
||||
</TableFooter>
|
||||
<TableBody>
|
||||
{renderCollection(
|
||||
entities,
|
||||
entity => (
|
||||
<TableRow
|
||||
className={classNames({
|
||||
[classes.tableRow]: !!entity
|
||||
})}
|
||||
hover={!!entity}
|
||||
onClick={entity ? () => onRowClick(entity.id) : undefined}
|
||||
key={entity ? entity.id : "skeleton"}
|
||||
>
|
||||
<TableCell>
|
||||
{maybe<React.ReactNode>(() => entity.name, <Skeleton />)}
|
||||
</TableCell>
|
||||
<TableCell className={classes.textRight}>
|
||||
{maybe<React.ReactNode>(
|
||||
() =>
|
||||
i18n.t("{{ current }} of {{ max }}", {
|
||||
context: "translation progress",
|
||||
...entity.completion
|
||||
}),
|
||||
<Skeleton />
|
||||
)}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
),
|
||||
() => (
|
||||
<TableRow>
|
||||
<TableCell colSpan={2}>
|
||||
{i18n.t("No translatable entities found")}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
)
|
||||
)}
|
||||
</TableBody>
|
||||
</Table>
|
||||
)
|
||||
}: TranslationsEntitiesListProps & WithStyles<typeof styles>) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Table>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell className={classes.wideColumn}>
|
||||
<FormattedMessage
|
||||
defaultMessage="Name"
|
||||
description="entity (product, collection, shipping method) name"
|
||||
/>
|
||||
</TableCell>
|
||||
<TableCell className={classes.textRight}>
|
||||
<FormattedMessage defaultMessage="Completed Translations" />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableFooter>
|
||||
<TableRow>
|
||||
<TablePagination
|
||||
colSpan={2}
|
||||
hasNextPage={
|
||||
pageInfo && !disabled ? pageInfo.hasNextPage : undefined
|
||||
}
|
||||
onNextPage={onNextPage}
|
||||
hasPreviousPage={
|
||||
pageInfo && !disabled ? pageInfo.hasPreviousPage : undefined
|
||||
}
|
||||
onPreviousPage={onPreviousPage}
|
||||
/>
|
||||
</TableRow>
|
||||
</TableFooter>
|
||||
<TableBody>
|
||||
{renderCollection(
|
||||
entities,
|
||||
entity => (
|
||||
<TableRow
|
||||
className={classNames({
|
||||
[classes.tableRow]: !!entity
|
||||
})}
|
||||
hover={!!entity}
|
||||
onClick={entity ? () => onRowClick(entity.id) : undefined}
|
||||
key={entity ? entity.id : "skeleton"}
|
||||
>
|
||||
<TableCell>
|
||||
{maybe<React.ReactNode>(() => entity.name, <Skeleton />)}
|
||||
</TableCell>
|
||||
<TableCell className={classes.textRight}>
|
||||
{maybe<React.ReactNode>(
|
||||
() =>
|
||||
intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "{current} of {max}",
|
||||
description: "translation progress"
|
||||
},
|
||||
entity.completion
|
||||
),
|
||||
<Skeleton />
|
||||
)}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
),
|
||||
() => (
|
||||
<TableRow>
|
||||
<TableCell colSpan={2}>
|
||||
<FormattedMessage defaultMessage="No translatable entities found" />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
)
|
||||
)}
|
||||
</TableBody>
|
||||
</Table>
|
||||
);
|
||||
}
|
||||
);
|
||||
TranslationsEntitiesList.displayName = "TranslationsEntitiesList";
|
||||
export default TranslationsEntitiesList;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import Card from "@material-ui/core/Card";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import Container from "@saleor/components/Container";
|
||||
|
@ -7,8 +8,7 @@ import PageHeader from "@saleor/components/PageHeader";
|
|||
// tslint:disable no-submodule-imports
|
||||
import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo";
|
||||
import FilterTabs, { FilterTab } from "@saleor/components/TableFilter";
|
||||
import i18n from "../../../i18n";
|
||||
import { maybe } from "../../../misc";
|
||||
import { maybe } from "@saleor/misc";
|
||||
import { TranslatableEntities } from "../../urls";
|
||||
|
||||
export interface TranslationsEntitiesListPageProps {
|
||||
|
@ -33,53 +33,86 @@ export type TranslationsEntitiesListFilterTab = keyof typeof TranslatableEntitie
|
|||
|
||||
const TranslationsEntitiesListPage: React.StatelessComponent<
|
||||
TranslationsEntitiesListPageProps
|
||||
> = ({ filters, language, onBack, children }) => (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>{i18n.t("Languages")}</AppHeader>
|
||||
<PageHeader
|
||||
title={i18n.t("Translations to {{ language }}", {
|
||||
context: "object translation page header",
|
||||
language: maybe(() => language.language, "...")
|
||||
})}
|
||||
/>
|
||||
<Card>
|
||||
<FilterTabs
|
||||
currentTab={([
|
||||
"categories",
|
||||
"collections",
|
||||
"products",
|
||||
"sales",
|
||||
"vouchers",
|
||||
"pages",
|
||||
"productTypes"
|
||||
] as TranslationsEntitiesListFilterTab[]).indexOf(filters.current)}
|
||||
>
|
||||
<FilterTab
|
||||
label={i18n.t("Categories")}
|
||||
onClick={filters.onCategoriesTabClick}
|
||||
/>
|
||||
<FilterTab
|
||||
label={i18n.t("Collections")}
|
||||
onClick={filters.onCollectionsTabClick}
|
||||
/>
|
||||
<FilterTab
|
||||
label={i18n.t("Products")}
|
||||
onClick={filters.onProductsTabClick}
|
||||
/>
|
||||
<FilterTab label={i18n.t("Sales")} onClick={filters.onSalesTabClick} />
|
||||
<FilterTab
|
||||
label={i18n.t("Vouchers")}
|
||||
onClick={filters.onVouchersTabClick}
|
||||
/>
|
||||
<FilterTab label={i18n.t("Pages")} onClick={filters.onPagesTabClick} />
|
||||
<FilterTab
|
||||
label={i18n.t("Product Types")}
|
||||
onClick={filters.onProductTypesTabClick}
|
||||
/>
|
||||
</FilterTabs>
|
||||
{children}
|
||||
</Card>
|
||||
</Container>
|
||||
);
|
||||
> = ({ filters, language, onBack, children }) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Languages"
|
||||
})}
|
||||
</AppHeader>
|
||||
<PageHeader
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "Translations to {language}",
|
||||
description: "header"
|
||||
},
|
||||
{
|
||||
language: maybe(() => language.language, "...")
|
||||
}
|
||||
)}
|
||||
/>
|
||||
<Card>
|
||||
<FilterTabs
|
||||
currentTab={([
|
||||
"categories",
|
||||
"collections",
|
||||
"products",
|
||||
"sales",
|
||||
"vouchers",
|
||||
"pages",
|
||||
"productTypes"
|
||||
] as TranslationsEntitiesListFilterTab[]).indexOf(filters.current)}
|
||||
>
|
||||
<FilterTab
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Categories"
|
||||
})}
|
||||
onClick={filters.onCategoriesTabClick}
|
||||
/>
|
||||
<FilterTab
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Collections"
|
||||
})}
|
||||
onClick={filters.onCollectionsTabClick}
|
||||
/>
|
||||
<FilterTab
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Products"
|
||||
})}
|
||||
onClick={filters.onProductsTabClick}
|
||||
/>
|
||||
<FilterTab
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Sales"
|
||||
})}
|
||||
onClick={filters.onSalesTabClick}
|
||||
/>
|
||||
<FilterTab
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Vouchers"
|
||||
})}
|
||||
onClick={filters.onVouchersTabClick}
|
||||
/>
|
||||
<FilterTab
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Pages"
|
||||
})}
|
||||
onClick={filters.onPagesTabClick}
|
||||
/>
|
||||
<FilterTab
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Product Types"
|
||||
})}
|
||||
onClick={filters.onProductTypesTabClick}
|
||||
/>
|
||||
</FilterTabs>
|
||||
{children}
|
||||
</Card>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
TranslationsEntitiesListPage.displayName = "TranslationsEntitiesListPage";
|
||||
export default TranslationsEntitiesListPage;
|
||||
|
|
|
@ -6,11 +6,11 @@ import TableCell from "@material-ui/core/TableCell";
|
|||
import TableHead from "@material-ui/core/TableHead";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import React from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
// tslint:disable no-submodule-imports
|
||||
import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import i18n from "../../../i18n";
|
||||
import { maybe, renderCollection } from "../../../misc";
|
||||
|
||||
export interface TranslationsLanguageListProps {
|
||||
|
@ -40,7 +40,7 @@ const TranslationsLanguageList = withStyles(styles, {
|
|||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell>
|
||||
{i18n.t("Language", { context: "table header" })}
|
||||
<FormattedMessage defaultMessage="Language" />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
|
@ -65,7 +65,7 @@ const TranslationsLanguageList = withStyles(styles, {
|
|||
() => (
|
||||
<TableRow>
|
||||
<TableCell colSpan={1}>
|
||||
{i18n.t("No languages found")}
|
||||
<FormattedMessage defaultMessage="No languages found" />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// import Button from "@material-ui/core/Button";
|
||||
// import AddIcon from "@material-ui/icons/Add";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import Container from "@saleor/components/Container";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
// tslint:disable no-submodule-imports
|
||||
import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo";
|
||||
import i18n from "../../../i18n";
|
||||
import TranslationsLanguageList from "../TranslationsLanguageList";
|
||||
|
||||
export interface TranslationsLanguageListPageProps {
|
||||
|
@ -17,16 +17,27 @@ export interface TranslationsLanguageListPageProps {
|
|||
|
||||
const TranslationsLanguageListPage: React.StatelessComponent<
|
||||
TranslationsLanguageListPageProps
|
||||
> = ({ languages, onRowClick }) => (
|
||||
<Container>
|
||||
<PageHeader title={i18n.t("Languages")}>
|
||||
{/* <Button color="primary" variant="contained" onClick={onAdd}>
|
||||
{i18n.t("Add Language")}
|
||||
> = ({ languages, onRowClick }) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<PageHeader
|
||||
title={intl.formatMessage({
|
||||
defaultMessage: "Languages"
|
||||
})}
|
||||
>
|
||||
{/* <Button color="primary" variant="contained" onClick={onAdd}>
|
||||
<FormattedMessage
|
||||
defaultMessage="Add Language"
|
||||
description="button"
|
||||
/>
|
||||
<AddIcon />
|
||||
</Button> */}
|
||||
</PageHeader>
|
||||
<TranslationsLanguageList languages={languages} onRowClick={onRowClick} />
|
||||
</Container>
|
||||
);
|
||||
</PageHeader>
|
||||
<TranslationsLanguageList languages={languages} onRowClick={onRowClick} />
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
TranslationsLanguageListPage.displayName = "TranslationsLanguageListPage";
|
||||
export default TranslationsLanguageListPage;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import CardSpacer from "@saleor/components/CardSpacer";
|
||||
import Container from "@saleor/components/Container";
|
||||
import LanguageSwitch from "@saleor/components/LanguageSwitch";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import i18n from "../../../i18n";
|
||||
import { commonMessages, sectionNames } from "@saleor/intl";
|
||||
import { maybe } from "../../../misc";
|
||||
import { LanguageCodeEnum } from "../../../types/globalTypes";
|
||||
import { PageTranslationFragment } from "../../types/PageTranslationFragment";
|
||||
|
@ -38,84 +39,106 @@ const TranslationsPagesPage: React.StatelessComponent<
|
|||
onEdit,
|
||||
onLanguageChange,
|
||||
onSubmit
|
||||
}) => (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader>
|
||||
<PageHeader
|
||||
title={i18n.t('Translation Page "{{ pageName }}" - {{ languageCode }}', {
|
||||
context: "page translation page title",
|
||||
languageCode,
|
||||
pageName: maybe(() => page.title, "...")
|
||||
})}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>
|
||||
{intl.formatMessage(sectionNames.translations)}
|
||||
</AppHeader>
|
||||
<PageHeader
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage: 'Translation Page "{pageName}" - {languageCode}',
|
||||
description: "header"
|
||||
},
|
||||
{
|
||||
languageCode,
|
||||
pageName: maybe(() => page.title, "...")
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage(commonMessages.generalInformations)}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Page Title"
|
||||
}),
|
||||
name: fieldNames.title,
|
||||
translation: maybe(() =>
|
||||
page.translation ? page.translation.title : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => page.title)
|
||||
},
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Content",
|
||||
description: "page content"
|
||||
}),
|
||||
name: fieldNames.contentJson,
|
||||
translation: maybe(() =>
|
||||
page.translation ? page.translation.contentJson : null
|
||||
),
|
||||
type: "rich" as "rich",
|
||||
value: maybe(() => page.contentJson)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("General Information")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Page Title"),
|
||||
name: fieldNames.title,
|
||||
translation: maybe(() =>
|
||||
page.translation ? page.translation.title : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => page.title)
|
||||
},
|
||||
{
|
||||
displayName: i18n.t("Content"),
|
||||
name: fieldNames.contentJson,
|
||||
translation: maybe(() =>
|
||||
page.translation ? page.translation.contentJson : null
|
||||
),
|
||||
type: "rich" as "rich",
|
||||
value: maybe(() => page.contentJson)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
<CardSpacer />
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("Search Engine Preview")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Search Engine Title"),
|
||||
name: fieldNames.seoTitle,
|
||||
translation: maybe(() =>
|
||||
page.translation ? page.translation.seoTitle : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => page.seoTitle)
|
||||
},
|
||||
{
|
||||
displayName: i18n.t("Search Engine Description"),
|
||||
name: fieldNames.seoDescription,
|
||||
translation: maybe(() =>
|
||||
page.translation ? page.translation.seoDescription : null
|
||||
),
|
||||
type: "long" as "long",
|
||||
value: maybe(() => page.seoDescription)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
<CardSpacer />
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage({
|
||||
defaultMessage: "Search Engine Preview"
|
||||
})}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Search Engine Title"
|
||||
}),
|
||||
name: fieldNames.seoTitle,
|
||||
translation: maybe(() =>
|
||||
page.translation ? page.translation.seoTitle : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => page.seoTitle)
|
||||
},
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Search Engine Description"
|
||||
}),
|
||||
name: fieldNames.seoDescription,
|
||||
translation: maybe(() =>
|
||||
page.translation ? page.translation.seoDescription : null
|
||||
),
|
||||
type: "long" as "long",
|
||||
value: maybe(() => page.seoDescription)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
TranslationsPagesPage.displayName = "TranslationsPagesPage";
|
||||
export default TranslationsPagesPage;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import CardSpacer from "@saleor/components/CardSpacer";
|
||||
import Container from "@saleor/components/Container";
|
||||
import LanguageSwitch from "@saleor/components/LanguageSwitch";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import i18n from "../../../i18n";
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { maybe } from "../../../misc";
|
||||
import { LanguageCodeEnum } from "../../../types/globalTypes";
|
||||
import { ProductTypeTranslationFragment } from "../../types/ProductTypeTranslationFragment";
|
||||
|
@ -36,125 +37,164 @@ const TranslationsProductTypesPage: React.StatelessComponent<
|
|||
onEdit,
|
||||
onLanguageChange,
|
||||
onSubmit
|
||||
}) => (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader>
|
||||
<PageHeader
|
||||
title={i18n.t(
|
||||
'Translation Product Type "{{ productTypeName }}" - {{ languageCode }}',
|
||||
{
|
||||
context: "productType translation page title",
|
||||
languageCode,
|
||||
productTypeName: maybe(() => productType.name, "...")
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
/>
|
||||
</PageHeader>
|
||||
{maybe(() => productType.productAttributes, []).map(
|
||||
(attribute, attributeIndex) => (
|
||||
<>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={false}
|
||||
title={i18n.t("Product Attribute ({{ attributeName }})", {
|
||||
attributeName: attribute.name
|
||||
})}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Attribute Name"),
|
||||
name: fieldNames.attribute + ":" + attribute.id,
|
||||
translation: maybe(() =>
|
||||
attribute.translation ? attribute.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => attribute.name)
|
||||
},
|
||||
...attribute.values.map(
|
||||
(attributeValue, attributeValueIndex) => ({
|
||||
displayName: i18n.t("Value {{ number }}", {
|
||||
number: attributeValueIndex + 1
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>
|
||||
{intl.formatMessage(sectionNames.translations)}
|
||||
</AppHeader>
|
||||
<PageHeader
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage:
|
||||
'Translation Product Type "{productTypeName}" - {languageCode}',
|
||||
description: "header"
|
||||
},
|
||||
{
|
||||
languageCode,
|
||||
productTypeName: maybe(() => productType.name, "...")
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
/>
|
||||
</PageHeader>
|
||||
{maybe(() => productType.productAttributes, []).map(
|
||||
(attribute, attributeIndex) => (
|
||||
<>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={false}
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "Product Attribute ({attributeName})",
|
||||
description: "header"
|
||||
},
|
||||
{
|
||||
attributeName: attribute.name
|
||||
}
|
||||
)}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Attribute Name"
|
||||
}),
|
||||
name: fieldNames.value + ":" + attributeValue.id,
|
||||
name: fieldNames.attribute + ":" + attribute.id,
|
||||
translation: maybe(() =>
|
||||
attributeValue.translation
|
||||
? attributeValue.translation.name
|
||||
: null
|
||||
attribute.translation ? attribute.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => attributeValue.name)
|
||||
})
|
||||
)
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
{attributeIndex < productType.productAttributes.length - 1 && (
|
||||
<CardSpacer />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
)}
|
||||
{
|
||||
<>
|
||||
<CardSpacer />
|
||||
{maybe(() => productType.variantAttributes, []).map(
|
||||
(attribute, attributeIndex) => (
|
||||
<>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={false}
|
||||
title={i18n.t("Variant Attribute ({{ attributeName }})", {
|
||||
attributeName: attribute.name
|
||||
})}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Attribute Name"),
|
||||
name: fieldNames.attribute + ":" + attribute.id,
|
||||
value: maybe(() => attribute.name)
|
||||
},
|
||||
...attribute.values.map(
|
||||
(attributeValue, attributeValueIndex) => ({
|
||||
displayName: intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "Value {number}",
|
||||
description: "attribute values"
|
||||
},
|
||||
{
|
||||
number: attributeValueIndex + 1
|
||||
}
|
||||
),
|
||||
name: fieldNames.value + ":" + attributeValue.id,
|
||||
translation: maybe(() =>
|
||||
attribute.translation ? attribute.translation.name : null
|
||||
attributeValue.translation
|
||||
? attributeValue.translation.name
|
||||
: null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => attribute.name)
|
||||
},
|
||||
...attribute.values.map(
|
||||
(attributeValue, attributeValueIndex) => ({
|
||||
displayName: i18n.t("Value {{ number }}", {
|
||||
number: attributeValueIndex + 1
|
||||
value: maybe(() => attributeValue.name)
|
||||
})
|
||||
)
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
{attributeIndex < productType.productAttributes.length - 1 && (
|
||||
<CardSpacer />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
)}
|
||||
{
|
||||
<>
|
||||
<CardSpacer />
|
||||
{maybe(() => productType.variantAttributes, []).map(
|
||||
(attribute, attributeIndex) => (
|
||||
<>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={false}
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "Variant Attribute ({attributeName})",
|
||||
description: "header"
|
||||
},
|
||||
{
|
||||
attributeName: attribute.name
|
||||
}
|
||||
)}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Attribute Name"
|
||||
}),
|
||||
name: fieldNames.value + ":" + attributeValue.id,
|
||||
name: fieldNames.attribute + ":" + attribute.id,
|
||||
translation: maybe(() =>
|
||||
attributeValue.translation
|
||||
? attributeValue.translation.name
|
||||
attribute.translation
|
||||
? attribute.translation.name
|
||||
: null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => attributeValue.name)
|
||||
})
|
||||
)
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
{attributeIndex < productType.variantAttributes.length - 1 && (
|
||||
<CardSpacer />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
)}
|
||||
</>
|
||||
}
|
||||
</Container>
|
||||
);
|
||||
value: maybe(() => attribute.name)
|
||||
},
|
||||
...attribute.values.map(
|
||||
(attributeValue, attributeValueIndex) => ({
|
||||
displayName: intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "Value {number}",
|
||||
description: "attribute values"
|
||||
},
|
||||
{
|
||||
number: attributeValueIndex + 1
|
||||
}
|
||||
),
|
||||
name: fieldNames.value + ":" + attributeValue.id,
|
||||
translation: maybe(() =>
|
||||
attributeValue.translation
|
||||
? attributeValue.translation.name
|
||||
: null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => attributeValue.name)
|
||||
})
|
||||
)
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
{attributeIndex < productType.variantAttributes.length - 1 && (
|
||||
<CardSpacer />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
)}
|
||||
</>
|
||||
}
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
TranslationsProductTypesPage.displayName = "TranslationsProductTypesPage";
|
||||
export default TranslationsProductTypesPage;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import CardSpacer from "@saleor/components/CardSpacer";
|
||||
import Container from "@saleor/components/Container";
|
||||
import LanguageSwitch from "@saleor/components/LanguageSwitch";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import i18n from "../../../i18n";
|
||||
import { commonMessages, sectionNames } from "@saleor/intl";
|
||||
import { maybe } from "../../../misc";
|
||||
import { LanguageCodeEnum } from "../../../types/globalTypes";
|
||||
import { ProductTranslationFragment } from "../../types/ProductTranslationFragment";
|
||||
|
@ -38,87 +39,106 @@ const TranslationsProductsPage: React.StatelessComponent<
|
|||
onEdit,
|
||||
onLanguageChange,
|
||||
onSubmit
|
||||
}) => (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader>
|
||||
<PageHeader
|
||||
title={i18n.t(
|
||||
'Translation Product "{{ productName }}" - {{ languageCode }}',
|
||||
{
|
||||
context: "product translation page title",
|
||||
languageCode,
|
||||
productName: maybe(() => product.name, "...")
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>
|
||||
{intl.formatMessage(sectionNames.translations)}
|
||||
</AppHeader>
|
||||
<PageHeader
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage:
|
||||
'Translation Product "{productName}" - {languageCode}',
|
||||
description: "header"
|
||||
},
|
||||
{
|
||||
languageCode,
|
||||
productName: maybe(() => product.name, "...")
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage(commonMessages.generalInformations)}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Product Name"
|
||||
}),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
product.translation ? product.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => product.name)
|
||||
},
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Description"
|
||||
}),
|
||||
name: fieldNames.descriptionJson,
|
||||
translation: maybe(() =>
|
||||
product.translation ? product.translation.descriptionJson : null
|
||||
),
|
||||
type: "rich" as "rich",
|
||||
value: maybe(() => product.descriptionJson)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("General Information")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Product Name"),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
product.translation ? product.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => product.name)
|
||||
},
|
||||
{
|
||||
displayName: i18n.t("Description"),
|
||||
name: fieldNames.descriptionJson,
|
||||
translation: maybe(() =>
|
||||
product.translation ? product.translation.descriptionJson : null
|
||||
),
|
||||
type: "rich" as "rich",
|
||||
value: maybe(() => product.descriptionJson)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
<CardSpacer />
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("Search Engine Preview")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Search Engine Title"),
|
||||
name: fieldNames.seoTitle,
|
||||
translation: maybe(() =>
|
||||
product.translation ? product.translation.seoTitle : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => product.seoTitle)
|
||||
},
|
||||
{
|
||||
displayName: i18n.t("Search Engine Description"),
|
||||
name: fieldNames.seoDescription,
|
||||
translation: maybe(() =>
|
||||
product.translation ? product.translation.seoDescription : null
|
||||
),
|
||||
type: "long" as "long",
|
||||
value: maybe(() => product.seoDescription)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
<CardSpacer />
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage({
|
||||
defaultMessage: "Search Engine Preview"
|
||||
})}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Search Engine Title"
|
||||
}),
|
||||
name: fieldNames.seoTitle,
|
||||
translation: maybe(() =>
|
||||
product.translation ? product.translation.seoTitle : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => product.seoTitle)
|
||||
},
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Search Engine Description"
|
||||
}),
|
||||
name: fieldNames.seoDescription,
|
||||
translation: maybe(() =>
|
||||
product.translation ? product.translation.seoDescription : null
|
||||
),
|
||||
type: "long" as "long",
|
||||
value: maybe(() => product.seoDescription)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
TranslationsProductsPage.displayName = "TranslationsProductsPage";
|
||||
export default TranslationsProductsPage;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import Container from "@saleor/components/Container";
|
||||
import LanguageSwitch from "@saleor/components/LanguageSwitch";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import i18n from "../../../i18n";
|
||||
import { commonMessages, sectionNames } from "@saleor/intl";
|
||||
import { maybe } from "../../../misc";
|
||||
import { LanguageCodeEnum } from "../../../types/globalTypes";
|
||||
import { SaleTranslationFragment } from "../../types/SaleTranslationFragment";
|
||||
|
@ -34,44 +35,57 @@ const TranslationsSalesPage: React.StatelessComponent<
|
|||
onEdit,
|
||||
onLanguageChange,
|
||||
onSubmit
|
||||
}) => (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader>
|
||||
<PageHeader
|
||||
title={i18n.t('Translation Sale "{{ saleName }}" - {{ languageCode }}', {
|
||||
context: "sale translation page title",
|
||||
languageCode,
|
||||
saleName: maybe(() => sale.name, "...")
|
||||
})}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>
|
||||
{intl.formatMessage(sectionNames.translations)}
|
||||
</AppHeader>
|
||||
<PageHeader
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage: 'Translation Sale "{saleName}" - {languageCode}',
|
||||
description: "header"
|
||||
},
|
||||
{
|
||||
languageCode,
|
||||
saleName: maybe(() => sale.name, "...")
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage(commonMessages.generalInformations)}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Sale Name"
|
||||
}),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
sale.translation ? sale.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => sale.name)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("General Information")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Sale Name"),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
sale.translation ? sale.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => sale.name)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
TranslationsSalesPage.displayName = "TranslationsSalesPage";
|
||||
export default TranslationsSalesPage;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import Container from "@saleor/components/Container";
|
||||
import LanguageSwitch from "@saleor/components/LanguageSwitch";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import i18n from "../../../i18n";
|
||||
import { commonMessages, sectionNames } from "@saleor/intl";
|
||||
import { maybe } from "../../../misc";
|
||||
import { LanguageCodeEnum } from "../../../types/globalTypes";
|
||||
import { TranslationsEntitiesPageProps } from "../../types/TranslationsEntitiesPage";
|
||||
|
@ -34,47 +35,58 @@ const TranslationsVouchersPage: React.StatelessComponent<
|
|||
onEdit,
|
||||
onLanguageChange,
|
||||
onSubmit
|
||||
}) => (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader>
|
||||
<PageHeader
|
||||
title={i18n.t(
|
||||
'Translation Voucher "{{ voucherName }}" - {{ languageCode }}',
|
||||
{
|
||||
context: "voucher translation page title",
|
||||
languageCode,
|
||||
voucherName: maybe(() => voucher.name, "...")
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<AppHeader onBack={onBack}>
|
||||
{intl.formatMessage(sectionNames.translations)}
|
||||
</AppHeader>
|
||||
<PageHeader
|
||||
title={intl.formatMessage(
|
||||
{
|
||||
defaultMessage:
|
||||
'Translation Voucher "{voucherName}" - {languageCode}',
|
||||
description: "header"
|
||||
},
|
||||
{
|
||||
languageCode,
|
||||
voucherName: maybe(() => voucher.name, "...")
|
||||
}
|
||||
)}
|
||||
>
|
||||
<LanguageSwitch
|
||||
currentLanguage={LanguageCodeEnum[languageCode]}
|
||||
languages={languages}
|
||||
onLanguageChange={onLanguageChange}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={intl.formatMessage(commonMessages.generalInformations)}
|
||||
fields={[
|
||||
{
|
||||
displayName: intl.formatMessage({
|
||||
defaultMessage: "Voucher Name"
|
||||
}),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
voucher.translation ? voucher.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => voucher.name)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</PageHeader>
|
||||
<TranslationFields
|
||||
activeField={activeField}
|
||||
disabled={disabled}
|
||||
initialState={true}
|
||||
title={i18n.t("General Information")}
|
||||
fields={[
|
||||
{
|
||||
displayName: i18n.t("Voucher Name"),
|
||||
name: fieldNames.name,
|
||||
translation: maybe(() =>
|
||||
voucher.translation ? voucher.translation.name : null
|
||||
),
|
||||
type: "short" as "short",
|
||||
value: maybe(() => voucher.name)
|
||||
}
|
||||
]}
|
||||
saveButtonState={saveButtonState}
|
||||
onEdit={onEdit}
|
||||
onDiscard={onDiscard}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
TranslationsVouchersPage.displayName = "TranslationsVouchersPage";
|
||||
export default TranslationsVouchersPage;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import { parse as parseQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import { Route, RouteComponentProps, Switch } from "react-router-dom";
|
||||
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { WindowTitle } from "../components/WindowTitle";
|
||||
import i18n from "../i18n";
|
||||
import { LanguageCodeEnum } from "../types/globalTypes";
|
||||
import {
|
||||
languageEntitiesPath,
|
||||
|
@ -174,85 +175,89 @@ const TranslationsProductTypes: React.FC<TranslationsEntityRouteProps> = ({
|
|||
);
|
||||
};
|
||||
|
||||
const TranslationsRouter: React.FC = () => (
|
||||
<>
|
||||
<WindowTitle title={i18n.t("Translations")} />
|
||||
<Switch>
|
||||
<Route
|
||||
exact
|
||||
path={languageListPath}
|
||||
component={TranslationsLanguageList}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntitiesPath(":languageCode")}
|
||||
component={TranslationsEntities}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.products,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsProducts}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.categories,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsCategories}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.collections,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsCollections}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.sales,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsSales}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.vouchers,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsVouchers}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.pages,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsPages}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.productTypes,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsProductTypes}
|
||||
/>
|
||||
</Switch>
|
||||
</>
|
||||
);
|
||||
const TranslationsRouter: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<>
|
||||
<WindowTitle title={intl.formatMessage(sectionNames.translations)} />
|
||||
<Switch>
|
||||
<Route
|
||||
exact
|
||||
path={languageListPath}
|
||||
component={TranslationsLanguageList}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntitiesPath(":languageCode")}
|
||||
component={TranslationsEntities}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.products,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsProducts}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.categories,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsCategories}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.collections,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsCollections}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.sales,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsSales}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.vouchers,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsVouchers}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.pages,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsPages}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={languageEntityPath(
|
||||
":languageCode",
|
||||
TranslatableEntities.productTypes,
|
||||
":id"
|
||||
)}
|
||||
component={TranslationsProductTypes}
|
||||
/>
|
||||
</Switch>
|
||||
</>
|
||||
);
|
||||
};
|
||||
TranslationsRouter.displayName = "TranslationsRouter";
|
||||
export default TranslationsRouter;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { stringify as stringifyQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import i18n from "../../i18n";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getMutationState, maybe } from "../../misc";
|
||||
import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes";
|
||||
import TranslationsCategoriesPage, {
|
||||
|
@ -36,6 +37,7 @@ const TranslationsCategories: React.FC<TranslationsCategoriesProps> = ({
|
|||
const navigate = useNavigator();
|
||||
const notify = useNotifier();
|
||||
const shop = useShop();
|
||||
const intl = useIntl();
|
||||
|
||||
const onEdit = (field: string) =>
|
||||
navigate(
|
||||
|
@ -48,7 +50,7 @@ const TranslationsCategories: React.FC<TranslationsCategoriesProps> = ({
|
|||
const onUpdate = (data: UpdateCategoryTranslations) => {
|
||||
if (data.categoryTranslate.errors.length === 0) {
|
||||
notify({
|
||||
text: i18n.t("Translation Saved")
|
||||
text: intl.formatMessage(commonMessages.savedChanges)
|
||||
});
|
||||
navigate("?", true);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { stringify as stringifyQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import i18n from "../../i18n";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getMutationState, maybe } from "../../misc";
|
||||
import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes";
|
||||
import TranslationsCollectionsPage, {
|
||||
|
@ -36,6 +37,7 @@ const TranslationsCollections: React.FC<TranslationsCollectionsProps> = ({
|
|||
const navigate = useNavigator();
|
||||
const notify = useNotifier();
|
||||
const shop = useShop();
|
||||
const intl = useIntl();
|
||||
|
||||
const onEdit = (field: string) =>
|
||||
navigate(
|
||||
|
@ -48,7 +50,7 @@ const TranslationsCollections: React.FC<TranslationsCollectionsProps> = ({
|
|||
const onUpdate = (data: UpdateCollectionTranslations) => {
|
||||
if (data.collectionTranslate.errors.length === 0) {
|
||||
notify({
|
||||
text: i18n.t("Translation Saved")
|
||||
text: intl.formatMessage(commonMessages.savedChanges)
|
||||
});
|
||||
navigate("?", true);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { stringify as stringifyQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import i18n from "../../i18n";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getMutationState, maybe } from "../../misc";
|
||||
import {
|
||||
LanguageCodeEnum,
|
||||
|
@ -39,6 +40,7 @@ const TranslationsPages: React.FC<TranslationsPagesProps> = ({
|
|||
const navigate = useNavigator();
|
||||
const notify = useNotifier();
|
||||
const shop = useShop();
|
||||
const intl = useIntl();
|
||||
|
||||
const onEdit = (field: string) =>
|
||||
navigate(
|
||||
|
@ -51,7 +53,7 @@ const TranslationsPages: React.FC<TranslationsPagesProps> = ({
|
|||
const onUpdate = (data: UpdatePageTranslations) => {
|
||||
if (data.pageTranslate.errors.length === 0) {
|
||||
notify({
|
||||
text: i18n.t("Translation Saved")
|
||||
text: intl.formatMessage(commonMessages.savedChanges)
|
||||
});
|
||||
navigate("?", true);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { stringify as stringifyQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import i18n from "../../i18n";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getMutationState, maybe } from "../../misc";
|
||||
import {
|
||||
LanguageCodeEnum,
|
||||
|
@ -43,6 +44,7 @@ const TranslationsProductTypes: React.FC<TranslationsProductTypesProps> = ({
|
|||
const navigate = useNavigator();
|
||||
const notify = useNotifier();
|
||||
const shop = useShop();
|
||||
const intl = useIntl();
|
||||
|
||||
const onEdit = (field: string) =>
|
||||
navigate(
|
||||
|
@ -55,7 +57,7 @@ const TranslationsProductTypes: React.FC<TranslationsProductTypesProps> = ({
|
|||
const onAttributeUpdate = (data: UpdateAttributeTranslations) => {
|
||||
if (data.attributeTranslate.errors.length === 0) {
|
||||
notify({
|
||||
text: i18n.t("Translation Saved")
|
||||
text: intl.formatMessage(commonMessages.savedChanges)
|
||||
});
|
||||
navigate("?", true);
|
||||
}
|
||||
|
@ -63,7 +65,7 @@ const TranslationsProductTypes: React.FC<TranslationsProductTypesProps> = ({
|
|||
const onAttributeValueUpdate = (data: UpdateAttributeValueTranslations) => {
|
||||
if (data.attributeValueTranslate.errors.length === 0) {
|
||||
notify({
|
||||
text: i18n.t("Translation Saved")
|
||||
text: intl.formatMessage(commonMessages.savedChanges)
|
||||
});
|
||||
navigate("?", true);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { stringify as stringifyQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import i18n from "../../i18n";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getMutationState, maybe } from "../../misc";
|
||||
import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes";
|
||||
import TranslationsProductsPage, {
|
||||
|
@ -36,6 +37,7 @@ const TranslationsProducts: React.FC<TranslationsProductsProps> = ({
|
|||
const navigate = useNavigator();
|
||||
const notify = useNotifier();
|
||||
const shop = useShop();
|
||||
const intl = useIntl();
|
||||
|
||||
const onEdit = (field: string) =>
|
||||
navigate(
|
||||
|
@ -48,7 +50,7 @@ const TranslationsProducts: React.FC<TranslationsProductsProps> = ({
|
|||
const onUpdate = (data: UpdateProductTranslations) => {
|
||||
if (data.productTranslate.errors.length === 0) {
|
||||
notify({
|
||||
text: i18n.t("Translation Saved")
|
||||
text: intl.formatMessage(commonMessages.savedChanges)
|
||||
});
|
||||
navigate("?", true);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { stringify as stringifyQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import i18n from "../../i18n";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getMutationState, maybe } from "../../misc";
|
||||
import {
|
||||
LanguageCodeEnum,
|
||||
|
@ -39,6 +40,7 @@ const TranslationsSales: React.FC<TranslationsSalesProps> = ({
|
|||
const navigate = useNavigator();
|
||||
const notify = useNotifier();
|
||||
const shop = useShop();
|
||||
const intl = useIntl();
|
||||
|
||||
const onEdit = (field: string) =>
|
||||
navigate(
|
||||
|
@ -51,7 +53,7 @@ const TranslationsSales: React.FC<TranslationsSalesProps> = ({
|
|||
const onUpdate = (data: UpdateSaleTranslations) => {
|
||||
if (data.saleTranslate.errors.length === 0) {
|
||||
notify({
|
||||
text: i18n.t("Translation Saved")
|
||||
text: intl.formatMessage(commonMessages.savedChanges)
|
||||
});
|
||||
navigate("?", true);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { stringify as stringifyQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import i18n from "../../i18n";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getMutationState, maybe } from "../../misc";
|
||||
import {
|
||||
LanguageCodeEnum,
|
||||
|
@ -39,6 +40,7 @@ const TranslationsVouchers: React.FC<TranslationsVouchersProps> = ({
|
|||
const navigate = useNavigator();
|
||||
const notify = useNotifier();
|
||||
const shop = useShop();
|
||||
const intl = useIntl();
|
||||
|
||||
const onEdit = (field: string) =>
|
||||
navigate(
|
||||
|
@ -51,7 +53,7 @@ const TranslationsVouchers: React.FC<TranslationsVouchersProps> = ({
|
|||
const onUpdate = (data: UpdateVoucherTranslations) => {
|
||||
if (data.voucherTranslate.errors.length === 0) {
|
||||
notify({
|
||||
text: i18n.t("Translation Saved")
|
||||
text: intl.formatMessage(commonMessages.savedChanges)
|
||||
});
|
||||
navigate("?", true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue