Skip to content

Commit

Permalink
fix: incorrect locale code for Austria (#24)
Browse files Browse the repository at this point in the history
- change typo on locale code.
  • Loading branch information
eiriarte-mendez authored Jan 26, 2022
1 parent d28c49a commit a7d07f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Service/LanguageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class LanguageService
*/
public function __construct($language = 'EN')
{
$language = in_array(strtoupper($language), ['AU', 'CH']) ? 'DE' : $language;
$language = in_array(strtoupper($language), ['AT', 'CH']) ? 'DE' : $language;

if (!$this->localeFileExists($language)) {
$language = 'EN';
Expand Down
6 changes: 5 additions & 1 deletion tests/Unit/Service/LanguageServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ public function provideTranslatedMessages()
{
return [
['DE', 'rp_mouseover_effective_rate', 'Gesamtkosten des Kredits als jährlicher Prozentsatz.'],
['AU', 'rp_sepa_link', 'Einwilligungserklärung zum SEPA-Mandat lesen'],
['AT', 'rp_sepa_link', 'Einwilligungserklärung zum SEPA-Mandat lesen'],
['CH', 'wcd_sepa_terms_block_3', 'Es gelten dabei die mit dem Kreditinstitut vereinbarten Bedingungen.'],
['EN', 'rp_sepa_link', 'Declaration of SEPA mandate'],
// Unknown locale code will use english language by default:
['AU', 'wcd_sepa_terms_block_3', 'My rights are explained in a statement that I can obtain from my bank.'],
['FR', 'wcd_sepa_terms_block_3', 'My rights are explained in a statement that I can obtain from my bank.'],
];
}

Expand Down

0 comments on commit a7d07f3

Please sign in to comment.