Skip to content

Commit

Permalink
PT-15025: Currency fail to show up on frontend. (#221)
Browse files Browse the repository at this point in the history
fix: Currency fail to show up on frontend. User can see N/A instead of currency symbol. Custom formatting  can be any valid standard numeric format specifier, as well as any combination of custom numeric format specifiers,
  • Loading branch information
OlegoO authored Jan 17, 2024
1 parent a108676 commit 850a63e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
5 changes: 3 additions & 2 deletions src/VirtoCommerce.CoreModule.Core/Currency/Currency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ private void Initialize()
EnglishName = region.CurrencyEnglishName;
}

if (_code != null)
string symbol;
if (_code != null && _isoCurrencySymbolDict.TryGetValue(_code, out symbol) && symbol != null)
{
Symbol = _isoCurrencySymbolDict[_code] ?? "N/A";
Symbol = symbol;
NumberFormat.CurrencySymbol = Symbol;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@
"symbol": "Symbol",
"custom-formatting": "Benutzerdefinierte Formatierung"
},
"descriptions": {
"code": "Der Währungscode. Verwenden Sie den 3-Buchstaben-ISO 4217-Code, falls vorhanden.",
"name": "Der Name der Währung.",
"is-primary": "Ist das die Hauptwährung? Nur eine Währung kann primär sein.",
"exchange-rate": "Der Wechselkurs zur Primärwährung des Wechselkurses",
"symbol": "Kurzes Währungssymbol",
"custom-formatting": "Benutzerdefinierte Formatierung, die auf den Währungswert angewendet wird"
},
"descriptions": {
"code": "Der Währungscode. Verwenden Sie den 3-Buchstaben-ISO 4217-Code, falls vorhanden.",
"name": "Der Name der Währung.",
"is-primary": "Ist das die Hauptwährung? Nur eine Währung kann primär sein.",
"exchange-rate": "Der Wechselkurs zur Primärwährung des Wechselkurses",
"symbol": "Kurzes Währungssymbol",
"custom-formatting": "Kann jeder gültige Standardbezeichner für numerische Formate sein, z sowie jede Kombination von benutzerdefinierten numerischen Formatspezifizierern."
},
"placeholders": {
"symbol": "Ein eigenes Symbol eingeben oder leer lassen um entsprechenden Standard zu verwenden.",
"code": "Währungscode eingeben",
"name": "Geben Sie den Währungsnamen ein",
"exchange-rate": "Geben Sie den Wechselkurs gegenüber der Hauptwährung ein",
"custom-formatting": "0,0.000"
"custom-formatting": "Bitte geben Sie ein Format an oder lassen Sie es als Standard leer"
},
"validation": {
"maxlength": "Der Währungscode darf nur 3 Symbole enthalten"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"is-primary": "Enable this option to make this currency your default one. Note: Only one currency may be set as default.",
"exchange-rate": "Please provide the exchange rate against your default currency.",
"symbol": "Please provide a sign for this currency.",
"custom-formatting": "You can apply custom formatting to the currency value.",
"custom-formatting": "Can be any valid standard numeric format specifier, as well as any combination of custom numeric format specifiers.",
"midpoint-rounding": "Please select an appropriate midpoint rounding method.",
"rounding-type": "Please select an appropriate rounding type."
},
Expand All @@ -92,7 +92,9 @@
"code": "Please provide currency code...",
"name": "Please provide currency name...",
"exchange-rate": "Please provide the exchange rate against your default currency...",
"custom-formatting": "0.0.000"
"custom-formatting": "Please provide a format or leave blank for default",
"midpoint-rounding": "Select midpoint rounding policy",
"rounding-type": "Select rounding policy"
},
"validation": {
"maxlength": "The currency code must consist of 3 alphabetic characters"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"is-primary": "Является основной",
"exchange-rate": "Обменный курс",
"symbol": "Символ",
"custom-formatting": "Автоматическое форматирование валюты",
"custom-formatting": "Может быть любым допустимым описателем стандартного числового формата, например а также любую комбинацию описателей пользовательского числового формата.",
"midpoint-rounding": "Округление чисел",
"rounding-type": "Тип округления"
},
Expand All @@ -92,7 +92,7 @@
"code": "Укажите код валюты...",
"name": "Укажите название валюты...",
"exchange-rate": "Укажите курс валют по умолчанию...",
"custom-formatting": "0.0.000"
"custom-formatting": "Укажите формат или оставьте пустым для значения по умолчанию"
},
"validation": {
"maxlength": "Код валюты должен состоять из З алфавитных символов"
Expand Down

0 comments on commit 850a63e

Please sign in to comment.