diff options
author | Joas Schilling <coding@schilljs.com> | 2022-04-26 11:05:02 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2022-04-26 11:41:15 +0000 |
commit | 0b7ab9c092d0d4f98d5bae823c5d41aba9f32ea1 (patch) | |
tree | 767caaf8848f4de15ab109ea5258c9e657734ed6 /tests | |
parent | dd93df22f40ca2436f8b80e67691e7fa487434e7 (diff) | |
download | nextcloud-server-0b7ab9c092d0d4f98d5bae823c5d41aba9f32ea1.tar.gz nextcloud-server-0b7ab9c092d0d4f98d5bae823c5d41aba9f32ea1.zip |
Add a unit test for translation with trailing colon
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/L10N/L10nTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
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]); |