forked from ing-bank/lion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add translations to the type of validation message (ing-bank#2226)
- Loading branch information
1 parent
68f748a
commit b83863c
Showing
41 changed files
with
335 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@lion/ui': patch | ||
--- | ||
|
||
[FeedbackValidation] add a translation of the validation feedback type to the beginning of the validation message |
75 changes: 75 additions & 0 deletions
75
packages/ui/components/form-core/src/localizeNamespaceLoader.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
export const localizeNamespaceLoader = /** @param {string} locale */ locale => { | ||
switch (locale) { | ||
case 'bg-BG': | ||
return import('@lion/ui/form-core-translations/bg-BG.js'); | ||
case 'bg': | ||
return import('@lion/ui/form-core-translations/bg.js'); | ||
case 'cs-CZ': | ||
return import('@lion/ui/form-core-translations/cs-CZ.js'); | ||
case 'cs': | ||
return import('@lion/ui/form-core-translations/cs.js'); | ||
case 'de-DE': | ||
return import('@lion/ui/form-core-translations/de-DE.js'); | ||
case 'de': | ||
return import('@lion/ui/form-core-translations/de.js'); | ||
case 'en-AU': | ||
return import('@lion/ui/form-core-translations/en-AU.js'); | ||
case 'en-GB': | ||
return import('@lion/ui/form-core-translations/en-GB.js'); | ||
case 'en-US': | ||
return import('@lion/ui/form-core-translations/en-US.js'); | ||
case 'en-PH': | ||
case 'en': | ||
return import('@lion/ui/form-core-translations/en.js'); | ||
case 'es-ES': | ||
return import('@lion/ui/form-core-translations/es-ES.js'); | ||
case 'es': | ||
return import('@lion/ui/form-core-translations/es.js'); | ||
case 'fr-FR': | ||
return import('@lion/ui/form-core-translations/fr-FR.js'); | ||
case 'fr-BE': | ||
return import('@lion/ui/form-core-translations/fr-BE.js'); | ||
case 'fr': | ||
return import('@lion/ui/form-core-translations/fr.js'); | ||
case 'hu-HU': | ||
return import('@lion/ui/form-core-translations/hu-HU.js'); | ||
case 'hu': | ||
return import('@lion/ui/form-core-translations/hu.js'); | ||
case 'it-IT': | ||
return import('@lion/ui/form-core-translations/it-IT.js'); | ||
case 'it': | ||
return import('@lion/ui/form-core-translations/it.js'); | ||
case 'nl-BE': | ||
return import('@lion/ui/form-core-translations/nl-BE.js'); | ||
case 'nl-NL': | ||
return import('@lion/ui/form-core-translations/nl-NL.js'); | ||
case 'nl': | ||
return import('@lion/ui/form-core-translations/nl.js'); | ||
case 'pl-PL': | ||
return import('@lion/ui/form-core-translations/pl-PL.js'); | ||
case 'pl': | ||
return import('@lion/ui/form-core-translations/pl.js'); | ||
case 'ro-RO': | ||
return import('@lion/ui/form-core-translations/ro-RO.js'); | ||
case 'ro': | ||
return import('@lion/ui/form-core-translations/ro.js'); | ||
case 'ru-RU': | ||
return import('@lion/ui/form-core-translations/ru-RU.js'); | ||
case 'ru': | ||
return import('@lion/ui/form-core-translations/ru.js'); | ||
case 'sk-SK': | ||
return import('@lion/ui/form-core-translations/sk-SK.js'); | ||
case 'sk': | ||
return import('@lion/ui/form-core-translations/sk.js'); | ||
case 'uk-UA': | ||
return import('@lion/ui/form-core-translations/uk-UA.js'); | ||
case 'uk': | ||
return import('@lion/ui/form-core-translations/uk.js'); | ||
case 'zh-CN': | ||
case 'zh': | ||
return import('@lion/ui/form-core-translations/zh.js'); | ||
default: | ||
return import('@lion/ui/form-core-translations/en.js'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import bg from './bg.js'; | ||
|
||
export default { | ||
...bg, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Грешка', | ||
validationWarning: 'Предупреждение', | ||
validationSuccess: 'Успех', | ||
validationInfo: 'Информация', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import cs from './cs.js'; | ||
|
||
export default { | ||
...cs, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Chyba', | ||
validationWarning: 'Varování', | ||
validationSuccess: 'Úspěch', | ||
validationInfo: 'Informace', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import de from './de.js'; | ||
|
||
export default { | ||
...de, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Fehler', | ||
validationWarning: 'Warnhinweis', | ||
validationSuccess: 'Erfolgreich', | ||
validationInfo: 'Info', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import en from './en.js'; | ||
|
||
export default { | ||
...en, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import en from './en.js'; | ||
|
||
export default { | ||
...en, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import en from './en.js'; | ||
|
||
export default { | ||
...en, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Error', | ||
validationWarning: 'Warning', | ||
validationSuccess: 'Success', | ||
validationInfo: 'Info', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import es from './es.js'; | ||
|
||
export default { | ||
...es, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Error', | ||
validationWarning: 'Advertencia', | ||
validationSuccess: 'Satisfactorio', | ||
validationInfo: 'Información', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import fr from './fr.js'; | ||
|
||
export default { | ||
...fr, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import fr from './fr.js'; | ||
|
||
export default { | ||
...fr, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Erreur', | ||
validationWarning: 'Avertissement', | ||
validationSuccess: 'Succès', | ||
validationInfo: 'Info', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import hu from './hu.js'; | ||
|
||
export default { | ||
...hu, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Hiba', | ||
validationWarning: 'Figyelmeztetés', | ||
validationSuccess: 'Sikeres', | ||
validationInfo: 'Információ', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import it from './it.js'; | ||
|
||
export default { | ||
...it, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Errore', | ||
validationWarning: 'Avvertenza', | ||
validationSuccess: 'Operazione riuscita', | ||
validationInfo: 'Info', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import nl from './nl.js'; | ||
|
||
export default { | ||
...nl, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import nl from './nl.js'; | ||
|
||
export default { | ||
...nl, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Fout', | ||
validationWarning: 'Waarschuwing', | ||
validationSuccess: 'Succes', | ||
validationInfo: 'Informatie', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import pl from './pl.js'; | ||
|
||
export default { | ||
...pl, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Błąd', | ||
validationWarning: 'Ostrzeżenie', | ||
validationSuccess: 'Zrealizowano pomyślnie', | ||
validationInfo: 'Informacja', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import ro from './ro.js'; | ||
|
||
export default { | ||
...ro, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Eroare', | ||
validationWarning: 'Atenție', | ||
validationSuccess: 'Succes', | ||
validationInfo: 'Informații', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import ru from './ru.js'; | ||
|
||
export default { | ||
...ru, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Ошибка', | ||
validationWarning: 'Предупреждение', | ||
validationSuccess: 'Успешно', | ||
validationInfo: 'Информация', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import sk from './sk.js'; | ||
|
||
export default { | ||
...sk, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
validationError: 'Chyba', | ||
validationWarning: 'Varovanie', | ||
validationSuccess: 'Úspešné', | ||
validationInfo: 'Info', | ||
}; |
Oops, something went wrong.