Refactor translations in translations section (#131)

This commit is contained in:
Dominik Żegleń 2019-08-26 23:50:08 +02:00 committed by dominik-zeglen
parent 8edd6ee756
commit 1585a5ad28
26 changed files with 1407 additions and 778 deletions

View file

@ -1,6 +1,6 @@
msgid "" msgid ""
msgstr "" 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-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -1139,6 +1139,14 @@ msgctxt "description"
msgid "Attribute Code" msgid "Attribute Code"
msgstr "" 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 #: build/locale/src/attributes/components/AttributeValues/AttributeValues.json
#. [src.attributes.components.AttributeValues.224159874] - section header #. [src.attributes.components.AttributeValues.224159874] - section header
#. defaultMessage is: #. defaultMessage is:
@ -1407,6 +1415,14 @@ msgctxt "categories section name"
msgid "Categories" msgid "Categories"
msgstr "" 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 #: build/locale/src/discounts/components/SaleDetailsPage/SaleDetailsPage.json
#. [saleDetailsPageCategoriesQuantity] - number of categories #. [saleDetailsPageCategoriesQuantity] - number of categories
#. defaultMessage is: #. defaultMessage is:
@ -1455,6 +1471,10 @@ msgstr ""
#. [src.collections.components.CollectionList.1214235329] #. [src.collections.components.CollectionList.1214235329]
#. defaultMessage is: #. defaultMessage is:
#. Category Name #. Category Name
#: build/locale/src/translations/components/TranslationsCategoriesPage/TranslationsCategoriesPage.json
#. [src.translations.components.TranslationsCategoriesPage.1214235329]
#. defaultMessage is:
#. Category Name
msgctxt "description" msgctxt "description"
msgid "Category Name" msgid "Category Name"
msgstr "" msgstr ""
@ -1559,6 +1579,14 @@ msgctxt "voucher code"
msgid "Code" msgid "Code"
msgstr "" 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 #: build/locale/src/discounts/components/DiscountCollections/DiscountCollections.json
#. [src.discounts.components.DiscountCollections.3011396316] #. [src.discounts.components.DiscountCollections.3011396316]
#. defaultMessage is: #. defaultMessage is:
@ -1583,6 +1611,10 @@ msgstr ""
#. [src.products.components.ProductOrganization.222873645] #. [src.products.components.ProductOrganization.222873645]
#. defaultMessage is: #. defaultMessage is:
#. Collections #. Collections
#: build/locale/src/translations/components/TranslationsEntitiesListPage/TranslationsEntitiesListPage.json
#. [src.translations.components.TranslationsEntitiesListPage.222873645]
#. defaultMessage is:
#. Collections
msgctxt "description" msgctxt "description"
msgid "Collections" msgid "Collections"
msgstr "" msgstr ""
@ -1615,6 +1647,14 @@ msgctxt "description"
msgid "Company information" msgid "Company information"
msgstr "" 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 #: build/locale/src/products/components/ProductOrganization/ProductOrganization.json
#. [src.products.components.ProductOrganization.2754779425] - product is configurable #. [src.products.components.ProductOrganization.2754779425] - product is configurable
#. defaultMessage is: #. defaultMessage is:
@ -1659,6 +1699,10 @@ msgstr ""
#. [src.pages.components.PageInfo.1116746286] - page content #. [src.pages.components.PageInfo.1116746286] - page content
#. defaultMessage is: #. defaultMessage is:
#. Content #. Content
#: build/locale/src/translations/components/TranslationsPagesPage/TranslationsPagesPage.json
#. [src.translations.components.TranslationsPagesPage.1116746286] - page content
#. defaultMessage is:
#. Content
msgctxt "page content" msgctxt "page content"
msgid "Content" msgid "Content"
msgstr "" msgstr ""
@ -2511,6 +2555,10 @@ msgstr ""
#. [src.description] #. [src.description]
#. defaultMessage is: #. defaultMessage is:
#. Description #. Description
#: build/locale/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.json
#. [src.translations.components.TranslationsProductsPage.3374163063]
#. defaultMessage is:
#. Description
msgctxt "description" msgctxt "description"
msgid "Description" msgid "Description"
msgstr "" msgstr ""
@ -2531,6 +2579,14 @@ msgctxt "product type"
msgid "Digital" msgid "Digital"
msgstr "" 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 #: build/locale/src/home/components/HomeScreen.json
#. [homeScreenDisclaimer] - header #. [homeScreenDisclaimer] - header
#. defaultMessage is: #. defaultMessage is:
@ -3135,6 +3191,26 @@ msgctxt "authentication provider API key"
msgid "Key" msgid "Key"
msgstr "" 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 #: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json
#. [src.orders.components.OrderListFilter.714411029] #. [src.orders.components.OrderListFilter.714411029]
#. defaultMessage is: #. defaultMessage is:
@ -3487,6 +3563,14 @@ msgctxt "staff member full name"
msgid "Name" msgid "Name"
msgstr "" 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 #: build/locale/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.json
#. [src.siteSettings.components.SiteSettingsDetails.2286355060] #. [src.siteSettings.components.SiteSettingsDetails.2286355060]
#. defaultMessage is: #. defaultMessage is:
@ -3627,6 +3711,14 @@ msgctxt "no authentication provider API keys"
msgid "No keys" msgid "No keys"
msgstr "" 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 #: build/locale/src/navigation/components/MenuList/MenuList.json
#. [menuListNoMenus] #. [menuListNoMenus]
#. defaultMessage is: #. defaultMessage is:
@ -3787,6 +3879,30 @@ msgctxt "description"
msgid "No subcategories found" msgid "No subcategories found"
msgstr "" 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 #: build/locale/src/orders/components/OrderDraftFinalizeDialog/OrderDraftFinalizeDialog.json
#. [src.orders.components.OrderDraftFinalizeDialog.1297434244] #. [src.orders.components.OrderDraftFinalizeDialog.1297434244]
#. defaultMessage is: #. defaultMessage is:
@ -4155,6 +4271,14 @@ msgctxt "section header"
msgid "Organize Product" msgid "Organize Product"
msgstr "" 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 #: build/locale/src/products/components/ProductListFilter/ProductListFilter.json
#. [src.products.components.ProductListFilter.1640493122] - product status #. [src.products.components.ProductListFilter.1640493122] - product status
#. defaultMessage is: #. defaultMessage is:
@ -4179,6 +4303,14 @@ msgctxt "order history message"
msgid "Oversold {quantity} items" msgid "Oversold {quantity} items"
msgstr "" 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 #: build/locale/src/intl.json
#. [src.pages] - pages section name #. [src.pages] - pages section name
#. defaultMessage is: #. defaultMessage is:
@ -4187,6 +4319,14 @@ msgctxt "pages section name"
msgid "Pages" msgid "Pages"
msgstr "" 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 #: build/locale/src/orders/components/OrderListFilter/OrderListFilter.json
#. [src.orders.components.OrderListFilter.210276526] - order fulfillment status #. [src.orders.components.OrderListFilter.210276526] - order fulfillment status
#. defaultMessage is: #. defaultMessage is:
@ -4471,6 +4611,14 @@ msgctxt "product name"
msgid "Product" msgid "Product"
msgstr "" 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 #: build/locale/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.json
#. [src.productTypes.components.ProductTypeAttributes.3559259966] - section header #. [src.productTypes.components.ProductTypeAttributes.3559259966] - section header
#. defaultMessage is: #. defaultMessage is:
@ -4483,6 +4631,10 @@ msgstr ""
#. [src.discounts.components.DiscountProducts.2697405188] #. [src.discounts.components.DiscountProducts.2697405188]
#. defaultMessage is: #. defaultMessage is:
#. Product Name #. Product Name
#: build/locale/src/translations/components/TranslationsProductsPage/TranslationsProductsPage.json
#. [src.translations.components.TranslationsProductsPage.2697405188]
#. defaultMessage is:
#. Product Name
msgctxt "description" msgctxt "description"
msgid "Product Name" msgid "Product Name"
msgstr "" msgstr ""
@ -4515,6 +4667,14 @@ msgctxt "product types section name"
msgid "Product Types" msgid "Product Types"
msgstr "" 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 #: build/locale/src/products/views/ProductCreate.json
#. [src.products.views.2899821092] #. [src.products.views.2899821092]
#. defaultMessage is: #. defaultMessage is:
@ -4587,6 +4747,14 @@ msgctxt "products section name"
msgid "Products" msgid "Products"
msgstr "" 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 #: build/locale/src/discounts/components/SaleDetailsPage/SaleDetailsPage.json
#. [saleDetailsPageProductsQuantity] - number of products #. [saleDetailsPageProductsQuantity] - number of products
#. defaultMessage is: #. defaultMessage is:
@ -4999,6 +5167,14 @@ msgctxt "variant sku"
msgid "SKU {sku}" msgid "SKU {sku}"
msgstr "" 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 #: build/locale/src/intl.json
#. [src.sales] - sales section name #. [src.sales] - sales section name
#. defaultMessage is: #. defaultMessage is:
@ -5007,6 +5183,14 @@ msgctxt "sales section name"
msgid "Sales" msgid "Sales"
msgstr "" 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 #: build/locale/src/orders/components/OrderCustomer/OrderCustomer.json
#. [src.orders.components.OrderCustomer.3912924864] - billing address #. [src.orders.components.OrderCustomer.3912924864] - billing address
#. defaultMessage is: #. defaultMessage is:
@ -5063,6 +5247,66 @@ msgctxt "description"
msgid "Search Customers" msgid "Search Customers"
msgstr "" 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 #: build/locale/src/orders/components/OrderListPage/OrderListPage.json
#. [src.orders.components.OrderListPage.355376157] #. [src.orders.components.OrderListPage.355376157]
#. defaultMessage is: #. defaultMessage is:
@ -5943,6 +6187,102 @@ msgctxt "description"
msgid "Tracking number" msgid "Tracking number"
msgstr "" 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 #: build/locale/src/categories/components/CategoryProducts/CategoryProducts.json
#. [src.categories.components.CategoryProducts.1952810469] - product type #. [src.categories.components.CategoryProducts.1952810469] - product type
#. defaultMessage is: #. defaultMessage is:
@ -6407,6 +6747,14 @@ msgctxt "order price range"
msgid "Value range" msgid "Value range"
msgstr "" 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 #: build/locale/src/products/components/ProductAttributes/ProductAttributes.json
#. [src.products.components.ProductAttributes.1207761269] - attribute values #. [src.products.components.ProductAttributes.1207761269] - attribute values
#. defaultMessage is: #. defaultMessage is:
@ -6415,6 +6763,14 @@ msgctxt "attribute values"
msgid "Values" msgid "Values"
msgstr "" 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 #: build/locale/src/productTypes/components/ProductTypeAttributes/ProductTypeAttributes.json
#. [src.productTypes.components.ProductTypeAttributes.888493112] - section header #. [src.productTypes.components.ProductTypeAttributes.888493112] - section header
#. defaultMessage is: #. defaultMessage is:
@ -6523,6 +6879,14 @@ msgctxt "dialog header"
msgid "Void Payment" msgid "Void Payment"
msgstr "" 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 #: build/locale/src/discounts/components/VoucherDetailsPage/VoucherDetailsPage.json
#. [src.discounts.components.VoucherDetailsPage.2071139683] #. [src.discounts.components.VoucherDetailsPage.2071139683]
#. defaultMessage is: #. defaultMessage is:
@ -6547,6 +6911,14 @@ msgctxt "vouchers section name"
msgid "Vouchers" msgid "Vouchers"
msgstr "" 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 #: build/locale/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.json
#. [src.productTypes.components.ProductTypeShipping.746695941] #. [src.productTypes.components.ProductTypeShipping.746695941]
#. defaultMessage is: #. defaultMessage is:
@ -6675,6 +7047,14 @@ msgctxt "description"
msgid "{amount,plural,one{One product} other{{amount} Products}} out of stock" msgid "{amount,plural,one{One product} other{{amount} Products}} out of stock"
msgstr "" 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 #: build/locale/src/customers/components/CustomerAddressListPage/CustomerAddressListPage.json
#. [src.customers.components.CustomerAddressListPage.489918044] - customer details, header #. [src.customers.components.CustomerAddressListPage.489918044] - customer details, header
#. defaultMessage is: #. defaultMessage is:
@ -6691,6 +7071,14 @@ msgctxt "customer's address book, header"
msgid "{fullName}'s Address Book" msgid "{fullName}'s Address Book"
msgstr "" 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 #: build/locale/src/products/components/ProductAttributes/ProductAttributes.json
#. [src.products.components.ProductAttributes.1071548120] - number of product attributes #. [src.products.components.ProductAttributes.1071548120] - number of product attributes
#. defaultMessage is: #. defaultMessage is:

View file

@ -157,6 +157,10 @@ export const sectionNames = defineMessages({
defaultMessage: "Taxes", defaultMessage: "Taxes",
description: "taxes section name" description: "taxes section name"
}, },
translations: {
defaultMessage: "Translations",
description: "translations section name"
},
vouchers: { vouchers: {
defaultMessage: "Vouchers", defaultMessage: "Vouchers",
description: "vouchers section name" description: "vouchers section name"

View file

@ -17,7 +17,9 @@ import Hr from "@saleor/components/Hr";
import Skeleton from "@saleor/components/Skeleton"; import Skeleton from "@saleor/components/Skeleton";
import classNames from "classnames"; import classNames from "classnames";
import React from "react"; import React from "react";
import i18n from "../../../i18n"; import { FormattedMessage } from "react-intl";
import { buttonMessages } from "@saleor/intl";
import TranslationFieldsLong from "./TranslationFieldsLong"; import TranslationFieldsLong from "./TranslationFieldsLong";
import TranslationFieldsRich from "./TranslationFieldsRich"; import TranslationFieldsRich from "./TranslationFieldsRich";
import TranslationFieldsShort from "./TranslationFieldsShort"; import TranslationFieldsShort from "./TranslationFieldsShort";
@ -138,12 +140,13 @@ const TranslationFields = withStyles(styles, { name: "TranslationFields" })(
<CardContent className={classes.cardContent}> <CardContent className={classes.cardContent}>
<Grid className={classes.grid} variant="uniform"> <Grid className={classes.grid} variant="uniform">
<Typography className={classes.columnHeader} variant="body2"> <Typography className={classes.columnHeader} variant="body2">
{i18n.t("Original String")} <FormattedMessage defaultMessage="Original String" />
</Typography> </Typography>
<Typography className={classes.columnHeader} variant="body2"> <Typography className={classes.columnHeader} variant="body2">
{i18n.t("Translation", { <FormattedMessage
context: "translation to language" defaultMessage="Translation"
})} description="Translated Name"
/>
</Typography> </Typography>
{fields.map(field => ( {fields.map(field => (
<React.Fragment key={field.name}> <React.Fragment key={field.name}>
@ -153,7 +156,7 @@ const TranslationFields = withStyles(styles, { name: "TranslationFields" })(
</Typography> </Typography>
<div className={classes.editButtonContainer}> <div className={classes.editButtonContainer}>
<Button color="primary" onClick={() => onEdit(field.name)}> <Button color="primary" onClick={() => onEdit(field.name)}>
{i18n.t("Edit")} <FormattedMessage {...buttonMessages.edit} />
</Button> </Button>
</div> </div>
<div className={classes.content}> <div className={classes.content}>
@ -231,16 +234,16 @@ const TranslationFields = withStyles(styles, { name: "TranslationFields" })(
) : ( ) : (
<CardContent> <CardContent>
<Typography className={classes.cardCaption} variant="caption"> <Typography className={classes.cardCaption} variant="caption">
{i18n.t( <FormattedMessage
"{{ fieldQuantity }} Translations, {{ translatedFieldQuantity }} Completed", defaultMessage="{numberOFields} Translations, {numberOfTranslatedFields} Completed"
{ values={{
fieldQuantity: fields.length, numberOfFields: fields.length,
translatedFieldQuantity: fields.reduce( numberOfTranslatedFields: fields.reduce(
(acc, field) => acc + +(field.translation !== null), (acc, field) => acc + +(field.translation !== null),
0 0
) )
} }}
)} />
</Typography> </Typography>
</CardContent> </CardContent>
)} )}

View file

@ -1,10 +1,10 @@
import TextField from "@material-ui/core/TextField"; import TextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography"; import Typography from "@material-ui/core/Typography";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
import Form from "@saleor/components/Form"; import Form from "@saleor/components/Form";
import i18n from "../../../i18n";
import TranslationFieldsSave from "./TranslationFieldsSave"; import TranslationFieldsSave from "./TranslationFieldsSave";
interface TranslationFieldsLongProps { interface TranslationFieldsLongProps {
@ -23,8 +23,10 @@ const TranslationFieldsLong: React.FC<TranslationFieldsLongProps> = ({
saveButtonState, saveButtonState,
onDiscard, onDiscard,
onSubmit onSubmit
}) => }) => {
edit ? ( const intl = useIntl();
return edit ? (
<Form <Form
initial={{ translation: initial }} initial={{ translation: initial }}
onSubmit={data => onSubmit(data.translation)} onSubmit={data => onSubmit(data.translation)}
@ -35,7 +37,9 @@ const TranslationFieldsLong: React.FC<TranslationFieldsLongProps> = ({
disabled={disabled} disabled={disabled}
fullWidth fullWidth
multiline multiline
label={i18n.t("Translation")} label={intl.formatMessage({
defaultMessage: "Translation"
})}
name="translation" name="translation"
value={data.translation} value={data.translation}
onChange={change} onChange={change}
@ -50,10 +54,11 @@ const TranslationFieldsLong: React.FC<TranslationFieldsLongProps> = ({
</Form> </Form>
) : initial === null ? ( ) : initial === null ? (
<Typography color="textSecondary"> <Typography color="textSecondary">
{i18n.t("No translation yet")} <FormattedMessage defaultMessage="No translation yet" />
</Typography> </Typography>
) : ( ) : (
<Typography>{initial}</Typography> <Typography>{initial}</Typography>
); );
};
TranslationFieldsLong.displayName = "TranslationFieldsLong"; TranslationFieldsLong.displayName = "TranslationFieldsLong";
export default TranslationFieldsLong; export default TranslationFieldsLong;

View file

@ -1,11 +1,11 @@
import Typography from "@material-ui/core/Typography"; import Typography from "@material-ui/core/Typography";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
import DraftRenderer from "@saleor/components/DraftRenderer"; import DraftRenderer from "@saleor/components/DraftRenderer";
import Form from "@saleor/components/Form"; import Form from "@saleor/components/Form";
import RichTextEditor from "@saleor/components/RichTextEditor"; import RichTextEditor from "@saleor/components/RichTextEditor";
import i18n from "../../../i18n";
import TranslationFieldsSave from "./TranslationFieldsSave"; import TranslationFieldsSave from "./TranslationFieldsSave";
interface TranslationFieldsRichProps { interface TranslationFieldsRichProps {
@ -24,8 +24,10 @@ const TranslationFieldsRich: React.FC<TranslationFieldsRichProps> = ({
saveButtonState, saveButtonState,
onDiscard, onDiscard,
onSubmit onSubmit
}) => }) => {
edit ? ( const intl = useIntl();
return edit ? (
<Form <Form
initial={{ translation: initial }} initial={{ translation: initial }}
onSubmit={data => onSubmit(data.translation)} onSubmit={data => onSubmit(data.translation)}
@ -37,7 +39,9 @@ const TranslationFieldsRich: React.FC<TranslationFieldsRichProps> = ({
error={undefined} error={undefined}
helperText={undefined} helperText={undefined}
initial={JSON.parse(initial)} initial={JSON.parse(initial)}
label={i18n.t("Translation")} label={intl.formatMessage({
defaultMessage: "Translation"
})}
name="translation" name="translation"
onChange={change} onChange={change}
/> />
@ -51,12 +55,13 @@ const TranslationFieldsRich: React.FC<TranslationFieldsRichProps> = ({
</Form> </Form>
) : initial === null ? ( ) : initial === null ? (
<Typography color="textSecondary"> <Typography color="textSecondary">
{i18n.t("No translation yet")} <FormattedMessage defaultMessage="No translation yet" />
</Typography> </Typography>
) : ( ) : (
<Typography> <Typography>
<DraftRenderer content={JSON.parse(initial)} /> <DraftRenderer content={JSON.parse(initial)} />
</Typography> </Typography>
); );
};
TranslationFieldsRich.displayName = "TranslationFieldsRich"; TranslationFieldsRich.displayName = "TranslationFieldsRich";
export default TranslationFieldsRich; export default TranslationFieldsRich;

View file

@ -6,11 +6,12 @@ import {
WithStyles WithStyles
} from "@material-ui/core/styles"; } from "@material-ui/core/styles";
import React from "react"; import React from "react";
import { FormattedMessage } from "react-intl";
import ConfirmButton, { import ConfirmButton, {
ConfirmButtonTransitionState ConfirmButtonTransitionState
} from "@saleor/components/ConfirmButton"; } from "@saleor/components/ConfirmButton";
import i18n from "../../../i18n"; import { buttonMessages } from "@saleor/intl";
interface TranslationFieldsSaveProps { interface TranslationFieldsSaveProps {
saveButtonState: ConfirmButtonTransitionState; saveButtonState: ConfirmButtonTransitionState;
@ -45,9 +46,11 @@ const TranslationFieldsSave = withStyles(styles, {
transitionState={saveButtonState} transitionState={saveButtonState}
onClick={onSave} onClick={onSave}
> >
{i18n.t("Save")} <FormattedMessage {...buttonMessages.save} />
</ConfirmButton> </ConfirmButton>
<Button onClick={onDiscard}>{i18n.t("Discard")}</Button> <Button onClick={onDiscard}>
<FormattedMessage defaultMessage="Discard" description="button" />
</Button>
</div> </div>
) )
); );

View file

@ -1,10 +1,10 @@
import TextField from "@material-ui/core/TextField"; import TextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography"; import Typography from "@material-ui/core/Typography";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
import Form from "@saleor/components/Form"; import Form from "@saleor/components/Form";
import i18n from "../../../i18n";
import TranslationFieldsSave from "./TranslationFieldsSave"; import TranslationFieldsSave from "./TranslationFieldsSave";
interface TranslationFieldsShortProps { interface TranslationFieldsShortProps {
@ -23,8 +23,10 @@ const TranslationFieldsShort: React.FC<TranslationFieldsShortProps> = ({
saveButtonState, saveButtonState,
onDiscard, onDiscard,
onSubmit onSubmit
}) => }) => {
edit ? ( const intl = useIntl();
return edit ? (
<Form <Form
initial={{ translation: initial }} initial={{ translation: initial }}
onSubmit={data => onSubmit(data.translation)} onSubmit={data => onSubmit(data.translation)}
@ -34,7 +36,9 @@ const TranslationFieldsShort: React.FC<TranslationFieldsShortProps> = ({
<TextField <TextField
disabled={disabled} disabled={disabled}
fullWidth fullWidth
label={i18n.t("Translation")} label={intl.formatMessage({
defaultMessage: "Translation"
})}
name="translation" name="translation"
value={data.translation} value={data.translation}
onChange={change} onChange={change}
@ -49,10 +53,11 @@ const TranslationFieldsShort: React.FC<TranslationFieldsShortProps> = ({
</Form> </Form>
) : initial === null ? ( ) : initial === null ? (
<Typography color="textSecondary"> <Typography color="textSecondary">
{i18n.t("No translation yet")} <FormattedMessage defaultMessage="No translation yet" />
</Typography> </Typography>
) : ( ) : (
<Typography>{initial}</Typography> <Typography>{initial}</Typography>
); );
};
TranslationFieldsShort.displayName = "TranslationFieldsShort"; TranslationFieldsShort.displayName = "TranslationFieldsShort";
export default TranslationFieldsShort; export default TranslationFieldsShort;

View file

@ -1,11 +1,12 @@
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader"; import AppHeader from "@saleor/components/AppHeader";
import CardSpacer from "@saleor/components/CardSpacer"; import CardSpacer from "@saleor/components/CardSpacer";
import Container from "@saleor/components/Container"; import Container from "@saleor/components/Container";
import LanguageSwitch from "@saleor/components/LanguageSwitch"; import LanguageSwitch from "@saleor/components/LanguageSwitch";
import PageHeader from "@saleor/components/PageHeader"; import PageHeader from "@saleor/components/PageHeader";
import i18n from "../../../i18n"; import { commonMessages, sectionNames } from "@saleor/intl";
import { maybe } from "../../../misc"; import { maybe } from "../../../misc";
import { LanguageCodeEnum } from "../../../types/globalTypes"; import { LanguageCodeEnum } from "../../../types/globalTypes";
import { CategoryTranslationFragment } from "../../types/CategoryTranslationFragment"; import { CategoryTranslationFragment } from "../../types/CategoryTranslationFragment";
@ -38,15 +39,22 @@ const TranslationsCategoriesPage: React.StatelessComponent<
onEdit, onEdit,
onLanguageChange, onLanguageChange,
onSubmit onSubmit
}) => ( }) => {
const intl = useIntl();
return (
<Container> <Container>
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader> <AppHeader onBack={onBack}>
{intl.formatMessage(sectionNames.translations)}
</AppHeader>
<PageHeader <PageHeader
title={i18n.t( title={intl.formatMessage(
'Translation Category "{{ categoryName }}" - {{ languageCode }}', {
defaultMessage:
'Translation Category "{categoryNane}" - {languageCode}'
},
{ {
categoryName: maybe(() => category.name, "..."), categoryName: maybe(() => category.name, "..."),
context: "category translation page title",
languageCode languageCode
} }
)} )}
@ -61,10 +69,12 @@ const TranslationsCategoriesPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("General Information")} title={intl.formatMessage(commonMessages.generalInformations)}
fields={[ fields={[
{ {
displayName: i18n.t("Category Name"), displayName: intl.formatMessage({
defaultMessage: "Category Name"
}),
name: fieldNames.name, name: fieldNames.name,
translation: maybe(() => translation: maybe(() =>
category.translation ? category.translation.name : null category.translation ? category.translation.name : null
@ -73,7 +83,7 @@ const TranslationsCategoriesPage: React.StatelessComponent<
value: maybe(() => category.name) value: maybe(() => category.name)
}, },
{ {
displayName: i18n.t("Description"), displayName: intl.formatMessage(commonMessages.description),
name: fieldNames.descriptionJson, name: fieldNames.descriptionJson,
translation: maybe(() => translation: maybe(() =>
category.translation ? category.translation.descriptionJson : null category.translation ? category.translation.descriptionJson : null
@ -92,10 +102,14 @@ const TranslationsCategoriesPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("Search Engine Preview")} title={intl.formatMessage({
defaultMessage: "Search Engine Preview"
})}
fields={[ fields={[
{ {
displayName: i18n.t("Search Engine Title"), displayName: intl.formatMessage({
defaultMessage: "Search Engine Title"
}),
name: fieldNames.seoTitle, name: fieldNames.seoTitle,
translation: maybe(() => translation: maybe(() =>
category.translation ? category.translation.seoTitle : null category.translation ? category.translation.seoTitle : null
@ -104,7 +118,9 @@ const TranslationsCategoriesPage: React.StatelessComponent<
value: maybe(() => category.seoTitle) value: maybe(() => category.seoTitle)
}, },
{ {
displayName: i18n.t("Search Engine Description"), displayName: intl.formatMessage({
defaultMessage: "Search Engine Description"
}),
name: fieldNames.seoDescription, name: fieldNames.seoDescription,
translation: maybe(() => translation: maybe(() =>
category.translation ? category.translation.seoDescription : null category.translation ? category.translation.seoDescription : null
@ -119,6 +135,7 @@ const TranslationsCategoriesPage: React.StatelessComponent<
onSubmit={onSubmit} onSubmit={onSubmit}
/> />
</Container> </Container>
); );
};
TranslationsCategoriesPage.displayName = "TranslationsCategoriesPage"; TranslationsCategoriesPage.displayName = "TranslationsCategoriesPage";
export default TranslationsCategoriesPage; export default TranslationsCategoriesPage;

View file

@ -1,11 +1,12 @@
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader"; import AppHeader from "@saleor/components/AppHeader";
import CardSpacer from "@saleor/components/CardSpacer"; import CardSpacer from "@saleor/components/CardSpacer";
import Container from "@saleor/components/Container"; import Container from "@saleor/components/Container";
import LanguageSwitch from "@saleor/components/LanguageSwitch"; import LanguageSwitch from "@saleor/components/LanguageSwitch";
import PageHeader from "@saleor/components/PageHeader"; import PageHeader from "@saleor/components/PageHeader";
import i18n from "../../../i18n"; import { commonMessages, sectionNames } from "@saleor/intl";
import { maybe } from "../../../misc"; import { maybe } from "../../../misc";
import { LanguageCodeEnum } from "../../../types/globalTypes"; import { LanguageCodeEnum } from "../../../types/globalTypes";
import { CollectionTranslationFragment } from "../../types/CollectionTranslationFragment"; import { CollectionTranslationFragment } from "../../types/CollectionTranslationFragment";
@ -38,15 +39,23 @@ const TranslationsCollectionsPage: React.StatelessComponent<
onEdit, onEdit,
onLanguageChange, onLanguageChange,
onSubmit onSubmit
}) => ( }) => {
const intl = useIntl();
return (
<Container> <Container>
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader> <AppHeader onBack={onBack}>
{intl.formatMessage(sectionNames.translations)}
</AppHeader>
<PageHeader <PageHeader
title={i18n.t( title={intl.formatMessage(
'Translation Collection "{{ collectionName }}" - {{ languageCode }}', {
defaultMessage:
'Translation Collection "{collectionName}" - {languageCode}',
description: "header"
},
{ {
collectionName: maybe(() => collection.name, "..."), collectionName: maybe(() => collection.name, "..."),
context: "collection translation page title",
languageCode languageCode
} }
)} )}
@ -61,10 +70,12 @@ const TranslationsCollectionsPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("General Information")} title={intl.formatMessage(commonMessages.generalInformations)}
fields={[ fields={[
{ {
displayName: i18n.t("Collection Name"), displayName: intl.formatMessage({
defaultMessage: "Collection Name"
}),
name: fieldNames.name, name: fieldNames.name,
translation: maybe(() => translation: maybe(() =>
collection.translation ? collection.translation.name : null collection.translation ? collection.translation.name : null
@ -73,7 +84,7 @@ const TranslationsCollectionsPage: React.StatelessComponent<
value: maybe(() => collection.name) value: maybe(() => collection.name)
}, },
{ {
displayName: i18n.t("Description"), displayName: intl.formatMessage(commonMessages.description),
name: fieldNames.descriptionJson, name: fieldNames.descriptionJson,
translation: maybe(() => translation: maybe(() =>
collection.translation collection.translation
@ -94,10 +105,14 @@ const TranslationsCollectionsPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("Search Engine Preview")} title={intl.formatMessage({
defaultMessage: "Search Engine Preview"
})}
fields={[ fields={[
{ {
displayName: i18n.t("Search Engine Title"), displayName: intl.formatMessage({
defaultMessage: "Search Engine Title"
}),
name: fieldNames.seoTitle, name: fieldNames.seoTitle,
translation: maybe(() => translation: maybe(() =>
collection.translation ? collection.translation.seoTitle : null collection.translation ? collection.translation.seoTitle : null
@ -106,7 +121,9 @@ const TranslationsCollectionsPage: React.StatelessComponent<
value: maybe(() => collection.seoTitle) value: maybe(() => collection.seoTitle)
}, },
{ {
displayName: i18n.t("Search Engine Description"), displayName: intl.formatMessage({
defaultMessage: "Search Engine Description"
}),
name: fieldNames.seoDescription, name: fieldNames.seoDescription,
translation: maybe(() => translation: maybe(() =>
collection.translation collection.translation
@ -123,6 +140,7 @@ const TranslationsCollectionsPage: React.StatelessComponent<
onSubmit={onSubmit} onSubmit={onSubmit}
/> />
</Container> </Container>
); );
};
TranslationsCollectionsPage.displayName = "TranslationsCollectionsPage"; TranslationsCollectionsPage.displayName = "TranslationsCollectionsPage";
export default TranslationsCollectionsPage; export default TranslationsCollectionsPage;

View file

@ -8,11 +8,12 @@ import TableHead from "@material-ui/core/TableHead";
import TableRow from "@material-ui/core/TableRow"; import TableRow from "@material-ui/core/TableRow";
import classNames from "classnames"; import classNames from "classnames";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl";
import { ListProps } from "../../../types"; import { ListProps } from "../../../types";
import Skeleton from "@saleor/components/Skeleton"; import Skeleton from "@saleor/components/Skeleton";
import TablePagination from "@saleor/components/TablePagination"; import TablePagination from "@saleor/components/TablePagination";
import i18n from "../../../i18n";
import { maybe, renderCollection } from "../../../misc"; import { maybe, renderCollection } from "../../../misc";
export interface TranslatableEntity { export interface TranslatableEntity {
@ -52,17 +53,21 @@ const TranslationsEntitiesList = withStyles(styles, {
onPreviousPage, onPreviousPage,
onRowClick, onRowClick,
pageInfo pageInfo
}: TranslationsEntitiesListProps & WithStyles<typeof styles>) => ( }: TranslationsEntitiesListProps & WithStyles<typeof styles>) => {
const intl = useIntl();
return (
<Table> <Table>
<TableHead> <TableHead>
<TableRow> <TableRow>
<TableCell className={classes.wideColumn}> <TableCell className={classes.wideColumn}>
{i18n.t("Name", { context: "table header" })} <FormattedMessage
defaultMessage="Name"
description="entity (product, collection, shipping method) name"
/>
</TableCell> </TableCell>
<TableCell className={classes.textRight}> <TableCell className={classes.textRight}>
{i18n.t("Completed Translations", { <FormattedMessage defaultMessage="Completed Translations" />
context: "table header"
})}
</TableCell> </TableCell>
</TableRow> </TableRow>
</TableHead> </TableHead>
@ -99,10 +104,13 @@ const TranslationsEntitiesList = withStyles(styles, {
<TableCell className={classes.textRight}> <TableCell className={classes.textRight}>
{maybe<React.ReactNode>( {maybe<React.ReactNode>(
() => () =>
i18n.t("{{ current }} of {{ max }}", { intl.formatMessage(
context: "translation progress", {
...entity.completion defaultMessage: "{current} of {max}",
}), description: "translation progress"
},
entity.completion
),
<Skeleton /> <Skeleton />
)} )}
</TableCell> </TableCell>
@ -111,14 +119,15 @@ const TranslationsEntitiesList = withStyles(styles, {
() => ( () => (
<TableRow> <TableRow>
<TableCell colSpan={2}> <TableCell colSpan={2}>
{i18n.t("No translatable entities found")} <FormattedMessage defaultMessage="No translatable entities found" />
</TableCell> </TableCell>
</TableRow> </TableRow>
) )
)} )}
</TableBody> </TableBody>
</Table> </Table>
) );
}
); );
TranslationsEntitiesList.displayName = "TranslationsEntitiesList"; TranslationsEntitiesList.displayName = "TranslationsEntitiesList";
export default TranslationsEntitiesList; export default TranslationsEntitiesList;

View file

@ -1,5 +1,6 @@
import Card from "@material-ui/core/Card"; import Card from "@material-ui/core/Card";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader"; import AppHeader from "@saleor/components/AppHeader";
import Container from "@saleor/components/Container"; import Container from "@saleor/components/Container";
@ -7,8 +8,7 @@ import PageHeader from "@saleor/components/PageHeader";
// tslint:disable no-submodule-imports // tslint:disable no-submodule-imports
import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo";
import FilterTabs, { FilterTab } from "@saleor/components/TableFilter"; import FilterTabs, { FilterTab } from "@saleor/components/TableFilter";
import i18n from "../../../i18n"; import { maybe } from "@saleor/misc";
import { maybe } from "../../../misc";
import { TranslatableEntities } from "../../urls"; import { TranslatableEntities } from "../../urls";
export interface TranslationsEntitiesListPageProps { export interface TranslationsEntitiesListPageProps {
@ -33,14 +33,26 @@ export type TranslationsEntitiesListFilterTab = keyof typeof TranslatableEntitie
const TranslationsEntitiesListPage: React.StatelessComponent< const TranslationsEntitiesListPage: React.StatelessComponent<
TranslationsEntitiesListPageProps TranslationsEntitiesListPageProps
> = ({ filters, language, onBack, children }) => ( > = ({ filters, language, onBack, children }) => {
const intl = useIntl();
return (
<Container> <Container>
<AppHeader onBack={onBack}>{i18n.t("Languages")}</AppHeader> <AppHeader onBack={onBack}>
<PageHeader {intl.formatMessage({
title={i18n.t("Translations to {{ language }}", { defaultMessage: "Languages"
context: "object translation page header",
language: maybe(() => language.language, "...")
})} })}
</AppHeader>
<PageHeader
title={intl.formatMessage(
{
defaultMessage: "Translations to {language}",
description: "header"
},
{
language: maybe(() => language.language, "...")
}
)}
/> />
<Card> <Card>
<FilterTabs <FilterTabs
@ -55,31 +67,52 @@ const TranslationsEntitiesListPage: React.StatelessComponent<
] as TranslationsEntitiesListFilterTab[]).indexOf(filters.current)} ] as TranslationsEntitiesListFilterTab[]).indexOf(filters.current)}
> >
<FilterTab <FilterTab
label={i18n.t("Categories")} label={intl.formatMessage({
defaultMessage: "Categories"
})}
onClick={filters.onCategoriesTabClick} onClick={filters.onCategoriesTabClick}
/> />
<FilterTab <FilterTab
label={i18n.t("Collections")} label={intl.formatMessage({
defaultMessage: "Collections"
})}
onClick={filters.onCollectionsTabClick} onClick={filters.onCollectionsTabClick}
/> />
<FilterTab <FilterTab
label={i18n.t("Products")} label={intl.formatMessage({
defaultMessage: "Products"
})}
onClick={filters.onProductsTabClick} onClick={filters.onProductsTabClick}
/> />
<FilterTab label={i18n.t("Sales")} onClick={filters.onSalesTabClick} />
<FilterTab <FilterTab
label={i18n.t("Vouchers")} label={intl.formatMessage({
defaultMessage: "Sales"
})}
onClick={filters.onSalesTabClick}
/>
<FilterTab
label={intl.formatMessage({
defaultMessage: "Vouchers"
})}
onClick={filters.onVouchersTabClick} onClick={filters.onVouchersTabClick}
/> />
<FilterTab label={i18n.t("Pages")} onClick={filters.onPagesTabClick} />
<FilterTab <FilterTab
label={i18n.t("Product Types")} label={intl.formatMessage({
defaultMessage: "Pages"
})}
onClick={filters.onPagesTabClick}
/>
<FilterTab
label={intl.formatMessage({
defaultMessage: "Product Types"
})}
onClick={filters.onProductTypesTabClick} onClick={filters.onProductTypesTabClick}
/> />
</FilterTabs> </FilterTabs>
{children} {children}
</Card> </Card>
</Container> </Container>
); );
};
TranslationsEntitiesListPage.displayName = "TranslationsEntitiesListPage"; TranslationsEntitiesListPage.displayName = "TranslationsEntitiesListPage";
export default TranslationsEntitiesListPage; export default TranslationsEntitiesListPage;

View file

@ -6,11 +6,11 @@ import TableCell from "@material-ui/core/TableCell";
import TableHead from "@material-ui/core/TableHead"; import TableHead from "@material-ui/core/TableHead";
import TableRow from "@material-ui/core/TableRow"; import TableRow from "@material-ui/core/TableRow";
import React from "react"; import React from "react";
import { FormattedMessage } from "react-intl";
// tslint:disable no-submodule-imports // tslint:disable no-submodule-imports
import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo";
import Skeleton from "@saleor/components/Skeleton"; import Skeleton from "@saleor/components/Skeleton";
import i18n from "../../../i18n";
import { maybe, renderCollection } from "../../../misc"; import { maybe, renderCollection } from "../../../misc";
export interface TranslationsLanguageListProps { export interface TranslationsLanguageListProps {
@ -40,7 +40,7 @@ const TranslationsLanguageList = withStyles(styles, {
<TableHead> <TableHead>
<TableRow> <TableRow>
<TableCell> <TableCell>
{i18n.t("Language", { context: "table header" })} <FormattedMessage defaultMessage="Language" />
</TableCell> </TableCell>
</TableRow> </TableRow>
</TableHead> </TableHead>
@ -65,7 +65,7 @@ const TranslationsLanguageList = withStyles(styles, {
() => ( () => (
<TableRow> <TableRow>
<TableCell colSpan={1}> <TableCell colSpan={1}>
{i18n.t("No languages found")} <FormattedMessage defaultMessage="No languages found" />
</TableCell> </TableCell>
</TableRow> </TableRow>
) )

View file

@ -1,12 +1,12 @@
// import Button from "@material-ui/core/Button"; // import Button from "@material-ui/core/Button";
// import AddIcon from "@material-ui/icons/Add"; // import AddIcon from "@material-ui/icons/Add";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import Container from "@saleor/components/Container"; import Container from "@saleor/components/Container";
import PageHeader from "@saleor/components/PageHeader"; import PageHeader from "@saleor/components/PageHeader";
// tslint:disable no-submodule-imports // tslint:disable no-submodule-imports
import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo"; import { ShopInfo_shop_languages } from "@saleor/components/Shop/types/ShopInfo";
import i18n from "../../../i18n";
import TranslationsLanguageList from "../TranslationsLanguageList"; import TranslationsLanguageList from "../TranslationsLanguageList";
export interface TranslationsLanguageListPageProps { export interface TranslationsLanguageListPageProps {
@ -17,16 +17,27 @@ export interface TranslationsLanguageListPageProps {
const TranslationsLanguageListPage: React.StatelessComponent< const TranslationsLanguageListPage: React.StatelessComponent<
TranslationsLanguageListPageProps TranslationsLanguageListPageProps
> = ({ languages, onRowClick }) => ( > = ({ languages, onRowClick }) => {
const intl = useIntl();
return (
<Container> <Container>
<PageHeader title={i18n.t("Languages")}> <PageHeader
title={intl.formatMessage({
defaultMessage: "Languages"
})}
>
{/* <Button color="primary" variant="contained" onClick={onAdd}> {/* <Button color="primary" variant="contained" onClick={onAdd}>
{i18n.t("Add Language")} <FormattedMessage
defaultMessage="Add Language"
description="button"
/>
<AddIcon /> <AddIcon />
</Button> */} </Button> */}
</PageHeader> </PageHeader>
<TranslationsLanguageList languages={languages} onRowClick={onRowClick} /> <TranslationsLanguageList languages={languages} onRowClick={onRowClick} />
</Container> </Container>
); );
};
TranslationsLanguageListPage.displayName = "TranslationsLanguageListPage"; TranslationsLanguageListPage.displayName = "TranslationsLanguageListPage";
export default TranslationsLanguageListPage; export default TranslationsLanguageListPage;

View file

@ -1,11 +1,12 @@
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader"; import AppHeader from "@saleor/components/AppHeader";
import CardSpacer from "@saleor/components/CardSpacer"; import CardSpacer from "@saleor/components/CardSpacer";
import Container from "@saleor/components/Container"; import Container from "@saleor/components/Container";
import LanguageSwitch from "@saleor/components/LanguageSwitch"; import LanguageSwitch from "@saleor/components/LanguageSwitch";
import PageHeader from "@saleor/components/PageHeader"; import PageHeader from "@saleor/components/PageHeader";
import i18n from "../../../i18n"; import { commonMessages, sectionNames } from "@saleor/intl";
import { maybe } from "../../../misc"; import { maybe } from "../../../misc";
import { LanguageCodeEnum } from "../../../types/globalTypes"; import { LanguageCodeEnum } from "../../../types/globalTypes";
import { PageTranslationFragment } from "../../types/PageTranslationFragment"; import { PageTranslationFragment } from "../../types/PageTranslationFragment";
@ -38,15 +39,25 @@ const TranslationsPagesPage: React.StatelessComponent<
onEdit, onEdit,
onLanguageChange, onLanguageChange,
onSubmit onSubmit
}) => ( }) => {
const intl = useIntl();
return (
<Container> <Container>
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader> <AppHeader onBack={onBack}>
{intl.formatMessage(sectionNames.translations)}
</AppHeader>
<PageHeader <PageHeader
title={i18n.t('Translation Page "{{ pageName }}" - {{ languageCode }}', { title={intl.formatMessage(
context: "page translation page title", {
defaultMessage: 'Translation Page "{pageName}" - {languageCode}',
description: "header"
},
{
languageCode, languageCode,
pageName: maybe(() => page.title, "...") pageName: maybe(() => page.title, "...")
})} }
)}
> >
<LanguageSwitch <LanguageSwitch
currentLanguage={LanguageCodeEnum[languageCode]} currentLanguage={LanguageCodeEnum[languageCode]}
@ -58,10 +69,12 @@ const TranslationsPagesPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("General Information")} title={intl.formatMessage(commonMessages.generalInformations)}
fields={[ fields={[
{ {
displayName: i18n.t("Page Title"), displayName: intl.formatMessage({
defaultMessage: "Page Title"
}),
name: fieldNames.title, name: fieldNames.title,
translation: maybe(() => translation: maybe(() =>
page.translation ? page.translation.title : null page.translation ? page.translation.title : null
@ -70,7 +83,10 @@ const TranslationsPagesPage: React.StatelessComponent<
value: maybe(() => page.title) value: maybe(() => page.title)
}, },
{ {
displayName: i18n.t("Content"), displayName: intl.formatMessage({
defaultMessage: "Content",
description: "page content"
}),
name: fieldNames.contentJson, name: fieldNames.contentJson,
translation: maybe(() => translation: maybe(() =>
page.translation ? page.translation.contentJson : null page.translation ? page.translation.contentJson : null
@ -89,10 +105,14 @@ const TranslationsPagesPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("Search Engine Preview")} title={intl.formatMessage({
defaultMessage: "Search Engine Preview"
})}
fields={[ fields={[
{ {
displayName: i18n.t("Search Engine Title"), displayName: intl.formatMessage({
defaultMessage: "Search Engine Title"
}),
name: fieldNames.seoTitle, name: fieldNames.seoTitle,
translation: maybe(() => translation: maybe(() =>
page.translation ? page.translation.seoTitle : null page.translation ? page.translation.seoTitle : null
@ -101,7 +121,9 @@ const TranslationsPagesPage: React.StatelessComponent<
value: maybe(() => page.seoTitle) value: maybe(() => page.seoTitle)
}, },
{ {
displayName: i18n.t("Search Engine Description"), displayName: intl.formatMessage({
defaultMessage: "Search Engine Description"
}),
name: fieldNames.seoDescription, name: fieldNames.seoDescription,
translation: maybe(() => translation: maybe(() =>
page.translation ? page.translation.seoDescription : null page.translation ? page.translation.seoDescription : null
@ -116,6 +138,7 @@ const TranslationsPagesPage: React.StatelessComponent<
onSubmit={onSubmit} onSubmit={onSubmit}
/> />
</Container> </Container>
); );
};
TranslationsPagesPage.displayName = "TranslationsPagesPage"; TranslationsPagesPage.displayName = "TranslationsPagesPage";
export default TranslationsPagesPage; export default TranslationsPagesPage;

View file

@ -1,11 +1,12 @@
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader"; import AppHeader from "@saleor/components/AppHeader";
import CardSpacer from "@saleor/components/CardSpacer"; import CardSpacer from "@saleor/components/CardSpacer";
import Container from "@saleor/components/Container"; import Container from "@saleor/components/Container";
import LanguageSwitch from "@saleor/components/LanguageSwitch"; import LanguageSwitch from "@saleor/components/LanguageSwitch";
import PageHeader from "@saleor/components/PageHeader"; import PageHeader from "@saleor/components/PageHeader";
import i18n from "../../../i18n"; import { sectionNames } from "@saleor/intl";
import { maybe } from "../../../misc"; import { maybe } from "../../../misc";
import { LanguageCodeEnum } from "../../../types/globalTypes"; import { LanguageCodeEnum } from "../../../types/globalTypes";
import { ProductTypeTranslationFragment } from "../../types/ProductTypeTranslationFragment"; import { ProductTypeTranslationFragment } from "../../types/ProductTypeTranslationFragment";
@ -36,14 +37,22 @@ const TranslationsProductTypesPage: React.StatelessComponent<
onEdit, onEdit,
onLanguageChange, onLanguageChange,
onSubmit onSubmit
}) => ( }) => {
const intl = useIntl();
return (
<Container> <Container>
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader> <AppHeader onBack={onBack}>
{intl.formatMessage(sectionNames.translations)}
</AppHeader>
<PageHeader <PageHeader
title={i18n.t( title={intl.formatMessage(
'Translation Product Type "{{ productTypeName }}" - {{ languageCode }}', {
defaultMessage:
'Translation Product Type "{productTypeName}" - {languageCode}',
description: "header"
},
{ {
context: "productType translation page title",
languageCode, languageCode,
productTypeName: maybe(() => productType.name, "...") productTypeName: maybe(() => productType.name, "...")
} }
@ -62,12 +71,20 @@ const TranslationsProductTypesPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={false} initialState={false}
title={i18n.t("Product Attribute ({{ attributeName }})", { title={intl.formatMessage(
{
defaultMessage: "Product Attribute ({attributeName})",
description: "header"
},
{
attributeName: attribute.name attributeName: attribute.name
})} }
)}
fields={[ fields={[
{ {
displayName: i18n.t("Attribute Name"), displayName: intl.formatMessage({
defaultMessage: "Attribute Name"
}),
name: fieldNames.attribute + ":" + attribute.id, name: fieldNames.attribute + ":" + attribute.id,
translation: maybe(() => translation: maybe(() =>
attribute.translation ? attribute.translation.name : null attribute.translation ? attribute.translation.name : null
@ -77,9 +94,15 @@ const TranslationsProductTypesPage: React.StatelessComponent<
}, },
...attribute.values.map( ...attribute.values.map(
(attributeValue, attributeValueIndex) => ({ (attributeValue, attributeValueIndex) => ({
displayName: i18n.t("Value {{ number }}", { displayName: intl.formatMessage(
{
defaultMessage: "Value {number}",
description: "attribute values"
},
{
number: attributeValueIndex + 1 number: attributeValueIndex + 1
}), }
),
name: fieldNames.value + ":" + attributeValue.id, name: fieldNames.value + ":" + attributeValue.id,
translation: maybe(() => translation: maybe(() =>
attributeValue.translation attributeValue.translation
@ -112,24 +135,40 @@ const TranslationsProductTypesPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={false} initialState={false}
title={i18n.t("Variant Attribute ({{ attributeName }})", { title={intl.formatMessage(
{
defaultMessage: "Variant Attribute ({attributeName})",
description: "header"
},
{
attributeName: attribute.name attributeName: attribute.name
})} }
)}
fields={[ fields={[
{ {
displayName: i18n.t("Attribute Name"), displayName: intl.formatMessage({
defaultMessage: "Attribute Name"
}),
name: fieldNames.attribute + ":" + attribute.id, name: fieldNames.attribute + ":" + attribute.id,
translation: maybe(() => translation: maybe(() =>
attribute.translation ? attribute.translation.name : null attribute.translation
? attribute.translation.name
: null
), ),
type: "short" as "short", type: "short" as "short",
value: maybe(() => attribute.name) value: maybe(() => attribute.name)
}, },
...attribute.values.map( ...attribute.values.map(
(attributeValue, attributeValueIndex) => ({ (attributeValue, attributeValueIndex) => ({
displayName: i18n.t("Value {{ number }}", { displayName: intl.formatMessage(
{
defaultMessage: "Value {number}",
description: "attribute values"
},
{
number: attributeValueIndex + 1 number: attributeValueIndex + 1
}), }
),
name: fieldNames.value + ":" + attributeValue.id, name: fieldNames.value + ":" + attributeValue.id,
translation: maybe(() => translation: maybe(() =>
attributeValue.translation attributeValue.translation
@ -155,6 +194,7 @@ const TranslationsProductTypesPage: React.StatelessComponent<
</> </>
} }
</Container> </Container>
); );
};
TranslationsProductTypesPage.displayName = "TranslationsProductTypesPage"; TranslationsProductTypesPage.displayName = "TranslationsProductTypesPage";
export default TranslationsProductTypesPage; export default TranslationsProductTypesPage;

View file

@ -1,11 +1,12 @@
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader"; import AppHeader from "@saleor/components/AppHeader";
import CardSpacer from "@saleor/components/CardSpacer"; import CardSpacer from "@saleor/components/CardSpacer";
import Container from "@saleor/components/Container"; import Container from "@saleor/components/Container";
import LanguageSwitch from "@saleor/components/LanguageSwitch"; import LanguageSwitch from "@saleor/components/LanguageSwitch";
import PageHeader from "@saleor/components/PageHeader"; import PageHeader from "@saleor/components/PageHeader";
import i18n from "../../../i18n"; import { commonMessages, sectionNames } from "@saleor/intl";
import { maybe } from "../../../misc"; import { maybe } from "../../../misc";
import { LanguageCodeEnum } from "../../../types/globalTypes"; import { LanguageCodeEnum } from "../../../types/globalTypes";
import { ProductTranslationFragment } from "../../types/ProductTranslationFragment"; import { ProductTranslationFragment } from "../../types/ProductTranslationFragment";
@ -38,14 +39,22 @@ const TranslationsProductsPage: React.StatelessComponent<
onEdit, onEdit,
onLanguageChange, onLanguageChange,
onSubmit onSubmit
}) => ( }) => {
const intl = useIntl();
return (
<Container> <Container>
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader> <AppHeader onBack={onBack}>
{intl.formatMessage(sectionNames.translations)}
</AppHeader>
<PageHeader <PageHeader
title={i18n.t( title={intl.formatMessage(
'Translation Product "{{ productName }}" - {{ languageCode }}', {
defaultMessage:
'Translation Product "{productName}" - {languageCode}',
description: "header"
},
{ {
context: "product translation page title",
languageCode, languageCode,
productName: maybe(() => product.name, "...") productName: maybe(() => product.name, "...")
} }
@ -61,10 +70,12 @@ const TranslationsProductsPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("General Information")} title={intl.formatMessage(commonMessages.generalInformations)}
fields={[ fields={[
{ {
displayName: i18n.t("Product Name"), displayName: intl.formatMessage({
defaultMessage: "Product Name"
}),
name: fieldNames.name, name: fieldNames.name,
translation: maybe(() => translation: maybe(() =>
product.translation ? product.translation.name : null product.translation ? product.translation.name : null
@ -73,7 +84,9 @@ const TranslationsProductsPage: React.StatelessComponent<
value: maybe(() => product.name) value: maybe(() => product.name)
}, },
{ {
displayName: i18n.t("Description"), displayName: intl.formatMessage({
defaultMessage: "Description"
}),
name: fieldNames.descriptionJson, name: fieldNames.descriptionJson,
translation: maybe(() => translation: maybe(() =>
product.translation ? product.translation.descriptionJson : null product.translation ? product.translation.descriptionJson : null
@ -92,10 +105,14 @@ const TranslationsProductsPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("Search Engine Preview")} title={intl.formatMessage({
defaultMessage: "Search Engine Preview"
})}
fields={[ fields={[
{ {
displayName: i18n.t("Search Engine Title"), displayName: intl.formatMessage({
defaultMessage: "Search Engine Title"
}),
name: fieldNames.seoTitle, name: fieldNames.seoTitle,
translation: maybe(() => translation: maybe(() =>
product.translation ? product.translation.seoTitle : null product.translation ? product.translation.seoTitle : null
@ -104,7 +121,9 @@ const TranslationsProductsPage: React.StatelessComponent<
value: maybe(() => product.seoTitle) value: maybe(() => product.seoTitle)
}, },
{ {
displayName: i18n.t("Search Engine Description"), displayName: intl.formatMessage({
defaultMessage: "Search Engine Description"
}),
name: fieldNames.seoDescription, name: fieldNames.seoDescription,
translation: maybe(() => translation: maybe(() =>
product.translation ? product.translation.seoDescription : null product.translation ? product.translation.seoDescription : null
@ -119,6 +138,7 @@ const TranslationsProductsPage: React.StatelessComponent<
onSubmit={onSubmit} onSubmit={onSubmit}
/> />
</Container> </Container>
); );
};
TranslationsProductsPage.displayName = "TranslationsProductsPage"; TranslationsProductsPage.displayName = "TranslationsProductsPage";
export default TranslationsProductsPage; export default TranslationsProductsPage;

View file

@ -1,10 +1,11 @@
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader"; import AppHeader from "@saleor/components/AppHeader";
import Container from "@saleor/components/Container"; import Container from "@saleor/components/Container";
import LanguageSwitch from "@saleor/components/LanguageSwitch"; import LanguageSwitch from "@saleor/components/LanguageSwitch";
import PageHeader from "@saleor/components/PageHeader"; import PageHeader from "@saleor/components/PageHeader";
import i18n from "../../../i18n"; import { commonMessages, sectionNames } from "@saleor/intl";
import { maybe } from "../../../misc"; import { maybe } from "../../../misc";
import { LanguageCodeEnum } from "../../../types/globalTypes"; import { LanguageCodeEnum } from "../../../types/globalTypes";
import { SaleTranslationFragment } from "../../types/SaleTranslationFragment"; import { SaleTranslationFragment } from "../../types/SaleTranslationFragment";
@ -34,15 +35,25 @@ const TranslationsSalesPage: React.StatelessComponent<
onEdit, onEdit,
onLanguageChange, onLanguageChange,
onSubmit onSubmit
}) => ( }) => {
const intl = useIntl();
return (
<Container> <Container>
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader> <AppHeader onBack={onBack}>
{intl.formatMessage(sectionNames.translations)}
</AppHeader>
<PageHeader <PageHeader
title={i18n.t('Translation Sale "{{ saleName }}" - {{ languageCode }}', { title={intl.formatMessage(
context: "sale translation page title", {
defaultMessage: 'Translation Sale "{saleName}" - {languageCode}',
description: "header"
},
{
languageCode, languageCode,
saleName: maybe(() => sale.name, "...") saleName: maybe(() => sale.name, "...")
})} }
)}
> >
<LanguageSwitch <LanguageSwitch
currentLanguage={LanguageCodeEnum[languageCode]} currentLanguage={LanguageCodeEnum[languageCode]}
@ -54,10 +65,12 @@ const TranslationsSalesPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("General Information")} title={intl.formatMessage(commonMessages.generalInformations)}
fields={[ fields={[
{ {
displayName: i18n.t("Sale Name"), displayName: intl.formatMessage({
defaultMessage: "Sale Name"
}),
name: fieldNames.name, name: fieldNames.name,
translation: maybe(() => translation: maybe(() =>
sale.translation ? sale.translation.name : null sale.translation ? sale.translation.name : null
@ -72,6 +85,7 @@ const TranslationsSalesPage: React.StatelessComponent<
onSubmit={onSubmit} onSubmit={onSubmit}
/> />
</Container> </Container>
); );
};
TranslationsSalesPage.displayName = "TranslationsSalesPage"; TranslationsSalesPage.displayName = "TranslationsSalesPage";
export default TranslationsSalesPage; export default TranslationsSalesPage;

View file

@ -1,10 +1,11 @@
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import AppHeader from "@saleor/components/AppHeader"; import AppHeader from "@saleor/components/AppHeader";
import Container from "@saleor/components/Container"; import Container from "@saleor/components/Container";
import LanguageSwitch from "@saleor/components/LanguageSwitch"; import LanguageSwitch from "@saleor/components/LanguageSwitch";
import PageHeader from "@saleor/components/PageHeader"; import PageHeader from "@saleor/components/PageHeader";
import i18n from "../../../i18n"; import { commonMessages, sectionNames } from "@saleor/intl";
import { maybe } from "../../../misc"; import { maybe } from "../../../misc";
import { LanguageCodeEnum } from "../../../types/globalTypes"; import { LanguageCodeEnum } from "../../../types/globalTypes";
import { TranslationsEntitiesPageProps } from "../../types/TranslationsEntitiesPage"; import { TranslationsEntitiesPageProps } from "../../types/TranslationsEntitiesPage";
@ -34,14 +35,22 @@ const TranslationsVouchersPage: React.StatelessComponent<
onEdit, onEdit,
onLanguageChange, onLanguageChange,
onSubmit onSubmit
}) => ( }) => {
const intl = useIntl();
return (
<Container> <Container>
<AppHeader onBack={onBack}>{i18n.t("Translations")}</AppHeader> <AppHeader onBack={onBack}>
{intl.formatMessage(sectionNames.translations)}
</AppHeader>
<PageHeader <PageHeader
title={i18n.t( title={intl.formatMessage(
'Translation Voucher "{{ voucherName }}" - {{ languageCode }}', {
defaultMessage:
'Translation Voucher "{voucherName}" - {languageCode}',
description: "header"
},
{ {
context: "voucher translation page title",
languageCode, languageCode,
voucherName: maybe(() => voucher.name, "...") voucherName: maybe(() => voucher.name, "...")
} }
@ -57,10 +66,12 @@ const TranslationsVouchersPage: React.StatelessComponent<
activeField={activeField} activeField={activeField}
disabled={disabled} disabled={disabled}
initialState={true} initialState={true}
title={i18n.t("General Information")} title={intl.formatMessage(commonMessages.generalInformations)}
fields={[ fields={[
{ {
displayName: i18n.t("Voucher Name"), displayName: intl.formatMessage({
defaultMessage: "Voucher Name"
}),
name: fieldNames.name, name: fieldNames.name,
translation: maybe(() => translation: maybe(() =>
voucher.translation ? voucher.translation.name : null voucher.translation ? voucher.translation.name : null
@ -75,6 +86,7 @@ const TranslationsVouchersPage: React.StatelessComponent<
onSubmit={onSubmit} onSubmit={onSubmit}
/> />
</Container> </Container>
); );
};
TranslationsVouchersPage.displayName = "TranslationsVouchersPage"; TranslationsVouchersPage.displayName = "TranslationsVouchersPage";
export default TranslationsVouchersPage; export default TranslationsVouchersPage;

View file

@ -1,9 +1,10 @@
import { parse as parseQs } from "qs"; import { parse as parseQs } from "qs";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import { Route, RouteComponentProps, Switch } from "react-router-dom"; import { Route, RouteComponentProps, Switch } from "react-router-dom";
import { sectionNames } from "@saleor/intl";
import { WindowTitle } from "../components/WindowTitle"; import { WindowTitle } from "../components/WindowTitle";
import i18n from "../i18n";
import { LanguageCodeEnum } from "../types/globalTypes"; import { LanguageCodeEnum } from "../types/globalTypes";
import { import {
languageEntitiesPath, languageEntitiesPath,
@ -174,9 +175,12 @@ const TranslationsProductTypes: React.FC<TranslationsEntityRouteProps> = ({
); );
}; };
const TranslationsRouter: React.FC = () => ( const TranslationsRouter: React.FC = () => {
const intl = useIntl();
return (
<> <>
<WindowTitle title={i18n.t("Translations")} /> <WindowTitle title={intl.formatMessage(sectionNames.translations)} />
<Switch> <Switch>
<Route <Route
exact exact
@ -253,6 +257,7 @@ const TranslationsRouter: React.FC = () => (
/> />
</Switch> </Switch>
</> </>
); );
};
TranslationsRouter.displayName = "TranslationsRouter"; TranslationsRouter.displayName = "TranslationsRouter";
export default TranslationsRouter; export default TranslationsRouter;

View file

@ -1,10 +1,11 @@
import { stringify as stringifyQs } from "qs"; import { stringify as stringifyQs } from "qs";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import useNavigator from "@saleor/hooks/useNavigator"; import useNavigator from "@saleor/hooks/useNavigator";
import useNotifier from "@saleor/hooks/useNotifier"; import useNotifier from "@saleor/hooks/useNotifier";
import useShop from "@saleor/hooks/useShop"; import useShop from "@saleor/hooks/useShop";
import i18n from "../../i18n"; import { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "../../misc"; import { getMutationState, maybe } from "../../misc";
import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes"; import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes";
import TranslationsCategoriesPage, { import TranslationsCategoriesPage, {
@ -36,6 +37,7 @@ const TranslationsCategories: React.FC<TranslationsCategoriesProps> = ({
const navigate = useNavigator(); const navigate = useNavigator();
const notify = useNotifier(); const notify = useNotifier();
const shop = useShop(); const shop = useShop();
const intl = useIntl();
const onEdit = (field: string) => const onEdit = (field: string) =>
navigate( navigate(
@ -48,7 +50,7 @@ const TranslationsCategories: React.FC<TranslationsCategoriesProps> = ({
const onUpdate = (data: UpdateCategoryTranslations) => { const onUpdate = (data: UpdateCategoryTranslations) => {
if (data.categoryTranslate.errors.length === 0) { if (data.categoryTranslate.errors.length === 0) {
notify({ notify({
text: i18n.t("Translation Saved") text: intl.formatMessage(commonMessages.savedChanges)
}); });
navigate("?", true); navigate("?", true);
} }

View file

@ -1,10 +1,11 @@
import { stringify as stringifyQs } from "qs"; import { stringify as stringifyQs } from "qs";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import useNavigator from "@saleor/hooks/useNavigator"; import useNavigator from "@saleor/hooks/useNavigator";
import useNotifier from "@saleor/hooks/useNotifier"; import useNotifier from "@saleor/hooks/useNotifier";
import useShop from "@saleor/hooks/useShop"; import useShop from "@saleor/hooks/useShop";
import i18n from "../../i18n"; import { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "../../misc"; import { getMutationState, maybe } from "../../misc";
import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes"; import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes";
import TranslationsCollectionsPage, { import TranslationsCollectionsPage, {
@ -36,6 +37,7 @@ const TranslationsCollections: React.FC<TranslationsCollectionsProps> = ({
const navigate = useNavigator(); const navigate = useNavigator();
const notify = useNotifier(); const notify = useNotifier();
const shop = useShop(); const shop = useShop();
const intl = useIntl();
const onEdit = (field: string) => const onEdit = (field: string) =>
navigate( navigate(
@ -48,7 +50,7 @@ const TranslationsCollections: React.FC<TranslationsCollectionsProps> = ({
const onUpdate = (data: UpdateCollectionTranslations) => { const onUpdate = (data: UpdateCollectionTranslations) => {
if (data.collectionTranslate.errors.length === 0) { if (data.collectionTranslate.errors.length === 0) {
notify({ notify({
text: i18n.t("Translation Saved") text: intl.formatMessage(commonMessages.savedChanges)
}); });
navigate("?", true); navigate("?", true);
} }

View file

@ -1,10 +1,11 @@
import { stringify as stringifyQs } from "qs"; import { stringify as stringifyQs } from "qs";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import useNavigator from "@saleor/hooks/useNavigator"; import useNavigator from "@saleor/hooks/useNavigator";
import useNotifier from "@saleor/hooks/useNotifier"; import useNotifier from "@saleor/hooks/useNotifier";
import useShop from "@saleor/hooks/useShop"; import useShop from "@saleor/hooks/useShop";
import i18n from "../../i18n"; import { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "../../misc"; import { getMutationState, maybe } from "../../misc";
import { import {
LanguageCodeEnum, LanguageCodeEnum,
@ -39,6 +40,7 @@ const TranslationsPages: React.FC<TranslationsPagesProps> = ({
const navigate = useNavigator(); const navigate = useNavigator();
const notify = useNotifier(); const notify = useNotifier();
const shop = useShop(); const shop = useShop();
const intl = useIntl();
const onEdit = (field: string) => const onEdit = (field: string) =>
navigate( navigate(
@ -51,7 +53,7 @@ const TranslationsPages: React.FC<TranslationsPagesProps> = ({
const onUpdate = (data: UpdatePageTranslations) => { const onUpdate = (data: UpdatePageTranslations) => {
if (data.pageTranslate.errors.length === 0) { if (data.pageTranslate.errors.length === 0) {
notify({ notify({
text: i18n.t("Translation Saved") text: intl.formatMessage(commonMessages.savedChanges)
}); });
navigate("?", true); navigate("?", true);
} }

View file

@ -1,10 +1,11 @@
import { stringify as stringifyQs } from "qs"; import { stringify as stringifyQs } from "qs";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import useNavigator from "@saleor/hooks/useNavigator"; import useNavigator from "@saleor/hooks/useNavigator";
import useNotifier from "@saleor/hooks/useNotifier"; import useNotifier from "@saleor/hooks/useNotifier";
import useShop from "@saleor/hooks/useShop"; import useShop from "@saleor/hooks/useShop";
import i18n from "../../i18n"; import { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "../../misc"; import { getMutationState, maybe } from "../../misc";
import { import {
LanguageCodeEnum, LanguageCodeEnum,
@ -43,6 +44,7 @@ const TranslationsProductTypes: React.FC<TranslationsProductTypesProps> = ({
const navigate = useNavigator(); const navigate = useNavigator();
const notify = useNotifier(); const notify = useNotifier();
const shop = useShop(); const shop = useShop();
const intl = useIntl();
const onEdit = (field: string) => const onEdit = (field: string) =>
navigate( navigate(
@ -55,7 +57,7 @@ const TranslationsProductTypes: React.FC<TranslationsProductTypesProps> = ({
const onAttributeUpdate = (data: UpdateAttributeTranslations) => { const onAttributeUpdate = (data: UpdateAttributeTranslations) => {
if (data.attributeTranslate.errors.length === 0) { if (data.attributeTranslate.errors.length === 0) {
notify({ notify({
text: i18n.t("Translation Saved") text: intl.formatMessage(commonMessages.savedChanges)
}); });
navigate("?", true); navigate("?", true);
} }
@ -63,7 +65,7 @@ const TranslationsProductTypes: React.FC<TranslationsProductTypesProps> = ({
const onAttributeValueUpdate = (data: UpdateAttributeValueTranslations) => { const onAttributeValueUpdate = (data: UpdateAttributeValueTranslations) => {
if (data.attributeValueTranslate.errors.length === 0) { if (data.attributeValueTranslate.errors.length === 0) {
notify({ notify({
text: i18n.t("Translation Saved") text: intl.formatMessage(commonMessages.savedChanges)
}); });
navigate("?", true); navigate("?", true);
} }

View file

@ -1,10 +1,11 @@
import { stringify as stringifyQs } from "qs"; import { stringify as stringifyQs } from "qs";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import useNavigator from "@saleor/hooks/useNavigator"; import useNavigator from "@saleor/hooks/useNavigator";
import useNotifier from "@saleor/hooks/useNotifier"; import useNotifier from "@saleor/hooks/useNotifier";
import useShop from "@saleor/hooks/useShop"; import useShop from "@saleor/hooks/useShop";
import i18n from "../../i18n"; import { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "../../misc"; import { getMutationState, maybe } from "../../misc";
import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes"; import { LanguageCodeEnum, TranslationInput } from "../../types/globalTypes";
import TranslationsProductsPage, { import TranslationsProductsPage, {
@ -36,6 +37,7 @@ const TranslationsProducts: React.FC<TranslationsProductsProps> = ({
const navigate = useNavigator(); const navigate = useNavigator();
const notify = useNotifier(); const notify = useNotifier();
const shop = useShop(); const shop = useShop();
const intl = useIntl();
const onEdit = (field: string) => const onEdit = (field: string) =>
navigate( navigate(
@ -48,7 +50,7 @@ const TranslationsProducts: React.FC<TranslationsProductsProps> = ({
const onUpdate = (data: UpdateProductTranslations) => { const onUpdate = (data: UpdateProductTranslations) => {
if (data.productTranslate.errors.length === 0) { if (data.productTranslate.errors.length === 0) {
notify({ notify({
text: i18n.t("Translation Saved") text: intl.formatMessage(commonMessages.savedChanges)
}); });
navigate("?", true); navigate("?", true);
} }

View file

@ -1,10 +1,11 @@
import { stringify as stringifyQs } from "qs"; import { stringify as stringifyQs } from "qs";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import useNavigator from "@saleor/hooks/useNavigator"; import useNavigator from "@saleor/hooks/useNavigator";
import useNotifier from "@saleor/hooks/useNotifier"; import useNotifier from "@saleor/hooks/useNotifier";
import useShop from "@saleor/hooks/useShop"; import useShop from "@saleor/hooks/useShop";
import i18n from "../../i18n"; import { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "../../misc"; import { getMutationState, maybe } from "../../misc";
import { import {
LanguageCodeEnum, LanguageCodeEnum,
@ -39,6 +40,7 @@ const TranslationsSales: React.FC<TranslationsSalesProps> = ({
const navigate = useNavigator(); const navigate = useNavigator();
const notify = useNotifier(); const notify = useNotifier();
const shop = useShop(); const shop = useShop();
const intl = useIntl();
const onEdit = (field: string) => const onEdit = (field: string) =>
navigate( navigate(
@ -51,7 +53,7 @@ const TranslationsSales: React.FC<TranslationsSalesProps> = ({
const onUpdate = (data: UpdateSaleTranslations) => { const onUpdate = (data: UpdateSaleTranslations) => {
if (data.saleTranslate.errors.length === 0) { if (data.saleTranslate.errors.length === 0) {
notify({ notify({
text: i18n.t("Translation Saved") text: intl.formatMessage(commonMessages.savedChanges)
}); });
navigate("?", true); navigate("?", true);
} }

View file

@ -1,10 +1,11 @@
import { stringify as stringifyQs } from "qs"; import { stringify as stringifyQs } from "qs";
import React from "react"; import React from "react";
import { useIntl } from "react-intl";
import useNavigator from "@saleor/hooks/useNavigator"; import useNavigator from "@saleor/hooks/useNavigator";
import useNotifier from "@saleor/hooks/useNotifier"; import useNotifier from "@saleor/hooks/useNotifier";
import useShop from "@saleor/hooks/useShop"; import useShop from "@saleor/hooks/useShop";
import i18n from "../../i18n"; import { commonMessages } from "@saleor/intl";
import { getMutationState, maybe } from "../../misc"; import { getMutationState, maybe } from "../../misc";
import { import {
LanguageCodeEnum, LanguageCodeEnum,
@ -39,6 +40,7 @@ const TranslationsVouchers: React.FC<TranslationsVouchersProps> = ({
const navigate = useNavigator(); const navigate = useNavigator();
const notify = useNotifier(); const notify = useNotifier();
const shop = useShop(); const shop = useShop();
const intl = useIntl();
const onEdit = (field: string) => const onEdit = (field: string) =>
navigate( navigate(
@ -51,7 +53,7 @@ const TranslationsVouchers: React.FC<TranslationsVouchersProps> = ({
const onUpdate = (data: UpdateVoucherTranslations) => { const onUpdate = (data: UpdateVoucherTranslations) => {
if (data.voucherTranslate.errors.length === 0) { if (data.voucherTranslate.errors.length === 0) {
notify({ notify({
text: i18n.t("Translation Saved") text: intl.formatMessage(commonMessages.savedChanges)
}); });
navigate("?", true); navigate("?", true);
} }