From 72d3b5755efca5b5d5a9248eb9bb9ec5d584e4df Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 11 Jan 2022 10:58:10 +0300 Subject: [PATCH 1/4] added payment widget localization --- .../EShopOnAbp.PublicWeb/Components/Payment/Default.cshtml | 4 ++-- .../Localization/EShopOnAbp/en.json | 4 +++- .../Localization/EShopOnAbp/tr.json | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/Default.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/Default.cshtml index 08495130..105a87ad 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/Default.cshtml +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/Default.cshtml @@ -12,7 +12,7 @@
-
Select Address
+
@L["Payment:SelectAddress"]
@foreach (var address in Model.Address) { @@ -33,7 +33,7 @@
-
Select Payment Method
+
@L["Payment:SelectPaymentMethod"]
@foreach (var paymentType in Model.PaymentTypes) { diff --git a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json index 4fa9b538..f3dff531 100644 --- a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json +++ b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json @@ -23,6 +23,8 @@ "RemoveFromBasket": "Remove from basket", "CompletePurchase": "Complete purchase", "CompleteOrder": "Complete order", - "Index:AddToBasket": "Add to basket" + "Index:AddToBasket": "Add to basket", + "Payment:SelectAddress": "Select Address", + "Payment:SelectPaymentMethod": "Select Payment Method" } } diff --git a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json index c5eab1a1..8ab9e2bb 100644 --- a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json +++ b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json @@ -23,6 +23,8 @@ "RemoveFromBasket": "Sepetten kaldır", "CompletePurchase": "Alışverişi tamamla", "CompleteOrder": "Siparişi onayla", - "Index:AddToBasket": "Sepete ekle" + "Index:AddToBasket": "Sepete ekle", + "Payment:SelectAddress": "Adres Seçin", + "Payment:SelectPaymentMethod": "Ödeme Şeklini Seçin" } } From af387c08d7f16e01c0edbeac560b1d7356f1e972 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 11 Jan 2022 11:18:24 +0300 Subject: [PATCH 2/4] added order received localization --- .../Pages/OrderReceived.cshtml | 15 ++++++++++----- .../Localization/EShopOnAbp/en.json | 9 ++++++++- .../Localization/EShopOnAbp/tr.json | 9 ++++++++- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/OrderReceived.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/OrderReceived.cshtml index b9c9d777..f7adfe3a 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/OrderReceived.cshtml +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/OrderReceived.cshtml @@ -1,6 +1,9 @@ @page "{orderNo:int}" @using System.Globalization +@using EShopOnAbp.Localization +@using Microsoft.Extensions.Localization @model EShopOnAbp.PublicWeb.Pages.OrderReceivedModel +@inject IStringLocalizer L @{ decimal orderTotal = Model.ReceivedOrder.Items.Sum(q => q.UnitPrice * q.Units); string orderTotalString = orderTotal.ToString("C", new CultureInfo("en-US")); // We work with USD any ways @@ -23,21 +26,23 @@
-

Sipariş alındı!

-

Siparişiniz ile ilgili detaylar @Model.ReceivedOrder.Buyer.Email adresine gönderildi. Siparişlerime git

+

@L["OrderReceived:AcceptedOrder"]

+

+ @L["OrderReceived:MailSentTo"] @Model.ReceivedOrder.Buyer.Email @L["OrderReceived:MailSentToEnd"] @L["OrderReceived:LinkToMyOrders"] +

-
Sipariş Numarası
+
@L["OrderReceived:OrderNo"]
@orderNoString
-
Teslimat Adresi
+
@L["OrderReceived:DeliveryAddress"]
@Model.ReceivedOrder.Address.Description
@@ -45,7 +50,7 @@
@Model.ReceivedOrder.Address.City / @Model.ReceivedOrder.Address.Country
-
Ödenen Tutar
+
@L["OrderReceived:PaidTotal"]
@orderTotalString
diff --git a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json index f3dff531..fe4c73e6 100644 --- a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json +++ b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json @@ -25,6 +25,13 @@ "CompleteOrder": "Complete order", "Index:AddToBasket": "Add to basket", "Payment:SelectAddress": "Select Address", - "Payment:SelectPaymentMethod": "Select Payment Method" + "Payment:SelectPaymentMethod": "Select Payment Method", + "OrderReceived:AcceptedOrder": "Your order is received!", + "OrderReceived:MailSentTo": "Your order details have been sent to ", + "OrderReceived:MailSentToEnd": " email address.", + "OrderReceived:LinkToMyOrders": "Go to my orders.", + "OrderReceived:OrderNo": "Order No", + "OrderReceived:DeliveryAddress": "Delivery Address", + "OrderReceived:PaidTotal": "Paid Total" } } diff --git a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json index 8ab9e2bb..d3fe21c3 100644 --- a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json +++ b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json @@ -25,6 +25,13 @@ "CompleteOrder": "Siparişi onayla", "Index:AddToBasket": "Sepete ekle", "Payment:SelectAddress": "Adres Seçin", - "Payment:SelectPaymentMethod": "Ödeme Şeklini Seçin" + "Payment:SelectPaymentMethod": "Ödeme Şeklini Seçin", + "OrderReceived:AcceptedOrder": "Siparişiniz alındı!", + "OrderReceived:MailSentTo": "Siparişiniz ile ilgili detaylar ", + "OrderReceived:MailSentToEnd": " email adresine gönderildi.", + "OrderReceived:LinkToMyOrders": "Siparişlerime git.", + "OrderReceived:OrderNo": "Sipariş Numarası", + "OrderReceived:DeliveryAddress": "Teslimat Adresi", + "OrderReceived:PaidTotal": "Ödenen Tutar" } } From 3c8a506787ab49129eb1d1263b07bc00ba8066a4 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 11 Jan 2022 11:30:48 +0300 Subject: [PATCH 3/4] added my orders localization --- .../EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml | 17 +++++++++++------ .../Localization/EShopOnAbp/en.json | 6 +++++- .../Localization/EShopOnAbp/tr.json | 6 +++++- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml index eaf32853..0569ed16 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml @@ -19,15 +19,20 @@ @{ string lastYearString = $"y{DateTime.Today.Year - 1}"; string filter = ""; + int lastYearCounter = 2; var selectList = new List { - new(@L["Last30Days"], "last30", selected: true), - new(@L["LastMonth"], "m1"), - new(@L["Last3Months"], "m3"), - new(@L["LastYear"], lastYearString), - new("2020", "y2020"), - new("2019", "y2019") + new(@L["MyOrders:Last30Days"], "last30", selected: true), + new(@L["MyOrders:LastMonth"], "m1"), + new(@L["MyOrders:Last3Months"], "m3"), + new(@L["MyOrders:LastYear"], lastYearString) }; + for (int i = 0; i < lastYearCounter; i++) + { + selectList.Add( + new((DateTime.Today.Year - 2 - i).ToString(), $"y{DateTime.Today.Year - 2 - i}") + ); + } }
diff --git a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json index fe4c73e6..4d787a49 100644 --- a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json +++ b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json @@ -32,6 +32,10 @@ "OrderReceived:LinkToMyOrders": "Go to my orders.", "OrderReceived:OrderNo": "Order No", "OrderReceived:DeliveryAddress": "Delivery Address", - "OrderReceived:PaidTotal": "Paid Total" + "OrderReceived:PaidTotal": "Paid Total", + "MyOrders:Last30Days": "Last 30 days", + "MyOrders:LastMonth": "Last month", + "MyOrders:Last3Months": "Last 3 months", + "MyOrders:LastYear": "Last year" } } diff --git a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json index d3fe21c3..cc0f3edf 100644 --- a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json +++ b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json @@ -32,6 +32,10 @@ "OrderReceived:LinkToMyOrders": "Siparişlerime git.", "OrderReceived:OrderNo": "Sipariş Numarası", "OrderReceived:DeliveryAddress": "Teslimat Adresi", - "OrderReceived:PaidTotal": "Ödenen Tutar" + "OrderReceived:PaidTotal": "Ödenen Tutar", + "MyOrders:Last30Days": "Son 30 gün", + "MyOrders:LastMonth": "Geçen ay", + "MyOrders:Last3Months": "Son 3 ay", + "MyOrders:LastYear": "Geçen yıl" } } From 964b92cf4d6e87ddb04105e912ef6fe23c8715de Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 11 Jan 2022 11:46:49 +0300 Subject: [PATCH 4/4] Updated user orders localization --- .../Components/UserOrders/Default.cshtml | 20 +++++++++---------- .../Localization/EShopOnAbp/en.json | 8 +++++++- .../Localization/EShopOnAbp/tr.json | 8 +++++++- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Components/UserOrders/Default.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Components/UserOrders/Default.cshtml index cad59f57..4b0bcd39 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Components/UserOrders/Default.cshtml +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Components/UserOrders/Default.cshtml @@ -9,7 +9,7 @@
SERVICE ERROR
} - @Model.UserOrders.Count sipariş verildi. + @L["UserOrders:TotalOrderCount"] @Model.UserOrders.Count @foreach (var order in Model.UserOrders) { @@ -19,22 +19,22 @@
-
Sipariş Tarihi
+
@L["UserOrders:OrderDate"]
@order.OrderDate.ToString("dd MMMM yyyy")
-
Toplam
+
@L["Purchase:OrderTotal"]
@orderTotalString
-
Teslimat Adresi
+
@L["OrderReceived:DeliveryAddress"]
@order.Address.Description
- Sipariş No @order.OrderNo.ToString("N0", new NumberFormatInfo() {NumberGroupSeparator = " "}) + @L["OrderReceived:OrderNo"] @order.OrderNo.ToString("N0", new NumberFormatInfo() {NumberGroupSeparator = " "})
@@ -52,18 +52,18 @@ -
@item.ProductName
-
Ürünü iade edebileceğiniz son tarih: @order.OrderDate.AddMonths(1).ToString("dd MMMM yyyy")
+
@item.ProductName
+
@L["UserOrders:ProductReturnDate"] @order.OrderDate.AddMonths(1).ToString("dd MMMM yyyy")
- +
- Ürünleri iade et + @L["UserOrders:ReturnProducts"] - Ürün yorumu yazın + @L["UserOrders:AddReview"] diff --git a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json index 4d787a49..2d7574a5 100644 --- a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json +++ b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json @@ -36,6 +36,12 @@ "MyOrders:Last30Days": "Last 30 days", "MyOrders:LastMonth": "Last month", "MyOrders:Last3Months": "Last 3 months", - "MyOrders:LastYear": "Last year" + "MyOrders:LastYear": "Last year", + "UserOrders:TotalOrderCount": "Total order count:", + "UserOrders:OrderDate": "Order Date", + "UserOrders:BuyAgain": "Buy Again", + "UserOrders:ProductReturnDate": "Last date for product return:", + "UserOrders:ReturnProducts": "Return products", + "UserOrders:AddReview": "Add product review" } } diff --git a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json index cc0f3edf..52687b06 100644 --- a/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json +++ b/shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json @@ -36,6 +36,12 @@ "MyOrders:Last30Days": "Son 30 gün", "MyOrders:LastMonth": "Geçen ay", "MyOrders:Last3Months": "Son 3 ay", - "MyOrders:LastYear": "Geçen yıl" + "MyOrders:LastYear": "Geçen yıl", + "UserOrders:TotalOrderCount": "Toplam verilen sipariş:", + "UserOrders:OrderDate": "Sipariş Tarihi", + "UserOrders:BuyAgain": "Tekrar Satın Alın", + "UserOrders:ProductReturnDate": "Ürünü iade edebileceğiniz son tarih:", + "UserOrders:ReturnProducts": "Ürünleri iade et", + "UserOrders:AddReview": "Ürün yorumu yazın" } }