Skip to content

Commit

Permalink
Added missing error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcameron committed Aug 3, 2021
1 parent 5d277d3 commit 101a6a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions client/src/i18n/en/exchange.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"ADDING_RATE" : "Adding an exchange Rate",
"ADD_MISSING_RATES_FOR": "Please add missing exchange rates for:",
"AT_THE_DATE": "at the date",
"CURRENCY_NOT_SUPPORTED": "Currency not supported ",
"CLICK_HERE_TO_FIX_RATES": "Click here to set missing currency exchange rates",
"CURRENT_RATE" : "Current Exchange Rate",
"DEFINE_EXCHANGE_RATE": "Please define the exchange rate for: {{name}} ({{symbol}})!",
Expand All @@ -11,6 +12,7 @@
"EXCHANGE_RATES" : "Exchange Rate(s)",
"FIX_MISSING_RATES_FIRST": "You must fix missing exchange rates before proceeding!",
"FOR" : "for",
"INVALID_CURRENCY_DEFINITION": "Invalid currency definition! ",
"INVOICE_DISCLAIMER" : "Exchange rate based on the latest enterprise exchange:",
"MISSING_EXCHANGE_RATES": "The exchange for some currencies have not be defined!",
"MUST_DEFINE_RATES_FIRST": "The exchange rates for all currencies be defined first!",
Expand Down
2 changes: 2 additions & 0 deletions client/src/i18n/fr/exchange.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"ADDING_RATE" : "Ajouter un taux de change",
"ADD_MISSING_RATES_FOR": "Veuillez ajouter les taux de change manquants pour :",
"AT_THE_DATE": "à la date",
"CURRENCY_NOT_SUPPORTED": "Monnaie non supportée ",
"CLICK_HERE_TO_FIX_RATES": "Cliquez ici pour définir les taux de change manquants",
"CURRENT_RATE" : "Taux de change actuel",
"DEFINE_EXCHANGE_RATE": "Veuillez définir le taux de change pour : {{name}} ({{symbol}})!",
Expand All @@ -11,6 +12,7 @@
"EXCHANGE_RATES" : "le taux de change",
"FIX_MISSING_RATES_FIRST": "Vous devez fixer les taux de change manquants avant de poursuivre !",
"FOR" : "pour",
"INVALID_CURRENCY_DEFINITION": "Définition de la monnaie non valide ! ",
"INVOICE_DISCLAIMER" : "Taux de Change basé sur le dernier taux de l'entreprise",
"MISSING_EXCHANGE_RATES": "Les taux de change de certaines monnaies n'ont pas été définis !",
"MUST_DEFINE_RATES_FIRST": "Les taux de change de toutes les monnaies doivent d'abord être définis !",
Expand Down
4 changes: 2 additions & 2 deletions client/src/js/filters/currency.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function CurrencyFilter(CurrencyFormat, Session) {
if (angular.isUndefined(currencyId)) {

if (requireCurrencyDefinition) {
return formatError('INVALID_CURRENCY_DEFINITION', amount);
return formatError('EXCHANGE.INVALID_CURRENCY_DEFINITION', amount);
} else {

// Display enterprise currency unless otherwise specified
Expand All @@ -55,7 +55,7 @@ function CurrencyFilter(CurrencyFormat, Session) {

// Currency ID did not match a currency ID or format configuration was not found
if (!formatConfiguration.supported) {
return formatError('CURRENCY_NOT_SUPPORTED', amount);
return formatError('EXCHANGE.CURRENCY_NOT_SUPPORTED', amount);
}

return formatNumber(amount, formatConfiguration.PATTERNS[1], formatConfiguration.GROUP_SEP, formatConfiguration.DECIMAL_SEP)
Expand Down

0 comments on commit 101a6a2

Please sign in to comment.