From a4cd9fd37cb5345f2bd45cac639c6e69fab37ad1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 26 Apr 2022 11:05:02 +0200 Subject: [PATCH] Add a unit test for translation with trailing colon Signed-off-by: Joas Schilling --- tests/lib/L10N/L10nTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/lib/L10N/L10nTest.php b/tests/lib/L10N/L10nTest.php index 9f6337ba804..f410c523c05 100644 --- a/tests/lib/L10N/L10nTest.php +++ b/tests/lib/L10N/L10nTest.php @@ -35,6 +35,13 @@ class L10nTest extends TestCase { return new Factory($config, $request, $userSession, \OC::$SERVERROOT); } + public function testSimpleTranslationWithTrailingColon(): void { + $transFile = \OC::$SERVERROOT.'/tests/data/l10n/de.json'; + $l = new L10N($this->getFactory(), 'test', 'de', 'de_AT', [$transFile]); + + $this->assertEquals('Files:', $l->t('Files:')); + } + public function testGermanPluralTranslations() { $transFile = \OC::$SERVERROOT.'/tests/data/l10n/de.json'; $l = new L10N($this->getFactory(), 'test', 'de', 'de_AT', [$transFile]);