Skip to content

Commit 17f4c09

Browse files
committed
fix for attributes.po translations (simplesamlphp#2576)
* A 2.4 PR of 2575 to see what the CI makes of it in that env. simplesamlphp#2575 * it seems that the number of attempted paths in included in the count
1 parent e9b1651 commit 17f4c09

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/SimpleSAML/Locale/Localization.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public function __construct(
8484
$this->language = new Language($configuration);
8585
$this->langcode = $this->language->getPosixLanguage($this->language->getLanguage());
8686
$this->setupL10N();
87+
$this->addAttributeDomains();
8788
}
8889

8990

src/SimpleSAML/Locale/Translate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public static function translateSingularGettext(?string $original): string
111111
// try attributes.po
112112
if ($text === $original) {
113113
// @TODO: Fix this to be compatible with PHP 8.4 - domain cannot be an empty string
114-
$text = TranslatorFunctions::getTranslator()->dgettext("", $original);
114+
$text = TranslatorFunctions::getTranslator()->dgettext("attributes", $original);
115115
}
116116
}
117117
}

tests/modules/core/src/Controller/ExceptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function testErrorURL(string $code, string $ts, string $rp, string $tid,
8686
Logger::setCaptureLog(false);
8787

8888
$log = Logger::getCapturedLog();
89-
self::assertCount(7, $log);
89+
self::assertCount(9, $log);
9090

9191
self::assertStringContainsString(
9292
"A Service Provider reported the following error during authentication: "

0 commit comments

Comments
 (0)