Skip to content

Commit 6029f86

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 11f9fc5 commit 6029f86

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
@@ -89,6 +89,7 @@ public function __construct(
8989
$this->language = new Language($configuration);
9090
$this->langcode = $this->language->getPosixLanguage($this->language->getLanguage());
9191
$this->setupL10N();
92+
$this->addAttributeDomains();
9293
}
9394

9495

src/SimpleSAML/Locale/Translate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static function translateSingularGettext(?string $original): string
121121
// try attributes.po
122122
if ($text === $original) {
123123
// @TODO: Fix this to be compatible with PHP 8.4 - domain cannot be an empty string
124-
$text = TranslatorFunctions::getTranslator()->dgettext("", $original);
124+
$text = TranslatorFunctions::getTranslator()->dgettext("attributes", $original);
125125
}
126126
}
127127
}

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

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

9191
$log = Logger::getCapturedLog();
92-
self::assertCount(7, $log);
92+
self::assertCount(9, $log);
9393

9494
self::assertStringContainsString(
9595
"A Service Provider reported the following error during authentication: "

0 commit comments

Comments
 (0)