From 055324978eb751bd307e92d18a97e893adb34733 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Tue, 9 Aug 2022 21:34:16 +0200 Subject: [PATCH] More loc --- Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs | 11 ++++++----- Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs b/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs index 83ddf6e9..e0720c1a 100644 --- a/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs +++ b/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs @@ -6,6 +6,7 @@ using System.Text; using Swarmops.Common; using Swarmops.Common.Enums; using Swarmops.Common.Interfaces; +using Swarmops.Localization; using Swarmops.Logic.Financial; using Swarmops.Logic.Security; using Swarmops.Logic.Support; @@ -216,16 +217,16 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers switch (accountLookup[row.FinancialAccountId].AccountType) { case FinancialAccountType.Asset: - accountClass = Resources.Global.Financial_Asset; + accountClass = LocalizedStrings.Get(LocDomain.Global, "Financial_Asset"); break; case FinancialAccountType.Debt: - accountClass = Resources.Global.Financial_Debt; + accountClass = LocalizedStrings.Get(LocDomain.Global, "Financial_Debt"); break; case FinancialAccountType.Income: - accountClass = Resources.Global.Financial_Income; + accountClass = LocalizedStrings.Get(LocDomain.Global, "Financial_Income"); break; case FinancialAccountType.Cost: - accountClass = Resources.Global.Financial_Cost; + accountClass = LocalizedStrings.Get(LocDomain.Global, "Financial_Cost"); break; default: throw new NotImplementedException(); @@ -261,7 +262,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers // If there are no transactions in this time period, say so result.Append ("{\"description\":\"" + - JsonSanitize (Resources.Pages.Ledgers.InspectLedgers_NoTransactions) + "\"},"); + JsonSanitize (LocalizedStrings.Get(LocDomain.PagesLedgers, "InspectLedgers_NoTransactions")) + "\"},"); } Response.Output.WriteLine ("[" + result.ToString().TrimEnd (',') + "]}]"); diff --git a/Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs b/Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs index e5f3052b..755eb14c 100644 --- a/Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs +++ b/Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs @@ -2,6 +2,7 @@ using System.Globalization; using System.Text; using Swarmops.Common.Enums; +using Swarmops.Localization; using Swarmops.Logic.Financial; using Swarmops.Logic.Security; @@ -18,7 +19,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers string monthString = Request.QueryString["Month"]; string emptyResponse = "[{\"id\":\"-\",\"description\":\"" + - JsonSanitize (Resources.Pages.Ledgers.InspectLedgers_PleaseSelectAccount) + "\"}]"; + JsonSanitize (LocalizedStrings.Get(LocDomain.PagesLedgers, "InspectLedgers_PleaseSelectAccount")) + "\"}]"; if (string.IsNullOrEmpty (accountIdString) || string.IsNullOrEmpty (yearString) || string.IsNullOrEmpty (monthString) || accountIdString == "undefined") @@ -199,7 +200,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers // If there are no transactions in this time period, say so result.Append ("{\"description\":\"" + - JsonSanitize (Resources.Pages.Ledgers.InspectLedgers_NoTransactions) + "\"},"); + JsonSanitize (LocalizedStrings.Get(LocDomain.PagesLedgers, "InspectLedgers_NoTransactions")) + "\"},"); } result.Append ("{" +