Browse Source

Add a unit test for translation with trailing colon

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v25.0.0beta1
Joas Schilling 2 years ago
parent
commit
a4cd9fd37c
No account linked to committer's email address
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      tests/lib/L10N/L10nTest.php

+ 7
- 0
tests/lib/L10N/L10nTest.php View File

@@ -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]);

Loading…
Cancel
Save