This commit is contained in:
Rick Falkvinge
2022-08-09 21:34:16 +02:00
parent 2ee09b13c8
commit 055324978e
2 changed files with 9 additions and 7 deletions
@@ -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 (',') + "]}]");
@@ -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 ("{" +