diff --git a/translations/translationtool/.gitignore b/translations/translationtool/.gitignore
index 3511f07e..d963dbe9 100644
--- a/translations/translationtool/.gitignore
+++ b/translations/translationtool/.gitignore
@@ -3,3 +3,6 @@ composer.phar
.vscode
.php-cs-fixer.cache
/tests/translationfiles/templates/tests.pot
+/tests-base/translationfiles/
+/tests/src/themes/tests/l10n/de.js
+/tests/src/themes/tests/l10n/de.json
diff --git a/translations/translationtool/src/translationtool.php b/translations/translationtool/src/translationtool.php
index 0d6ceeee..ccbd402a 100644
--- a/translations/translationtool/src/translationtool.php
+++ b/translations/translationtool/src/translationtool.php
@@ -10,6 +10,13 @@
require __DIR__ . '/vendor/autoload.php';
class TranslatableApp {
+ /** xgettext keywords and language for each language of languageOf() */
+ private const XGETTEXT_ARGUMENTS = [
+ 'php' => '--keyword=t --keyword=n:1,2 --language=PHP',
+ 'python' => '--keyword=_ --keyword=_n:1,2 --language=Python',
+ 'script' => '--keyword=t:2 --keyword=n:2,3 --language=Javascript',
+ ];
+
private string $appPath;
private string $name = '';
private string $fakeAppInfoFile;
@@ -18,6 +25,34 @@ class TranslatableApp {
private array $ignoreFiles = [];
private string $translationsPath;
private TranslationTool $tool;
+ /** @var array> lines of each generated file: source file relative to the working directory, its line and the language of its strings */
+ private array $fakeFileSources = [];
+ /** @var array>> line of each Vue template string by file, with the lines getTranslatorHintWithVueSource() reads its comment from: the line above the call and the rest of the line from the call */
+ private array $vueTemplateLines = [];
+ /** @var array> lines by file whose TRANSLATORS comment getTranslatorHintWithVueSource() gives to a template string on the next line */
+ private array $vueCommentLines = [];
+ /** @var array hints that getTranslatorHintWithVueSource() writes for Vue strings without a TRANSLATORS comment, which only name the source */
+ private array $generatedVueHints = [];
+ /** Start of a comment xgettext reads: // not after a : or a quote as in URLs, and # between whitespace, unlike #000 or #[Attribute] */
+ private const LINE_COMMENT_MARKER = '(?).)*?' . self::TRANSLATORS_INSIDE . ')/ism';
+ private const WHOLE_LINE_COMMENT = '/^\s*' . self::COMMENT_START . '/';
+ /** Name of a translation function, also as a method like $l->t() */
+ private const TRANSLATION_FUNCTION = '\b(?:t|n|_|_n)';
+ /** Code that ends a translation call: a call closed on the line, or a line that closes a call over several lines */
+ private const ENDED_CALL = '/' . self::TRANSLATION_FUNCTION . '\s*(?\((?:[^()]++|(?&arguments))*\))|^\s*[)\]}]/';
+ /** A colon or another translation joined to a translation call, or a colon right after a Vue mustache or PHP template tag */
+ private const TEXT_OUTSIDE = '/\)\s*[.+]\s*(?:([\'"])\s*:|(?:([\'"])[^\'"]*\2\s*[.+]\s*)?[\w$>.-]*' . self::TRANSLATION_FUNCTION . '\s*\()|\}\}\s*:|\?>\s*:/';
+ /** @var array> lines of the source files read for the lint, by file relative to the working directory */
+ private array $sourceFileLines = [];
public function __construct(string $appPath, string $translationsPath, TranslationTool $tool) {
$this->appPath = $appPath;
@@ -48,7 +83,7 @@ public function __construct(string $appPath, string $translationsPath, Translati
}
public function createOrCheckPotFile(bool $checkFiles = false): void {
- $pathToPotFile = $this->translationsPath . '/templates/' . $this->name . '.pot';
+ $pathToPotFile = $this->potFile();
// Gather required data
$this->createFakeFileForAppInfo();
@@ -64,24 +99,6 @@ public function createOrCheckPotFile(bool $checkFiles = false): void {
foreach ($translatableFiles as $entry) {
$output = '--output=' . escapeshellarg($pathToPotFile);
- $keywords = '';
- if (substr($entry, -4) === '.php') {
- $keywords = '--keyword=t --keyword=n:1,2';
- } elseif (substr($entry, -3) === '.py') {
- $keywords = '--keyword=_ --keyword=_n:1,2';
- } else {
- $keywords = '--keyword=t:2 --keyword=n:2,3';
- }
-
- $language = '--language=';
- if (substr($entry, -4) === '.php') {
- $language .= 'PHP';
- } elseif (substr($entry, -3) === '.py') {
- $language .= 'Python';
- } else {
- $language .= 'Javascript';
- }
-
$joinexisting = '';
if (file_exists($pathToPotFile)) {
$joinexisting = '--join-existing';
@@ -98,7 +115,7 @@ public function createOrCheckPotFile(bool $checkFiles = false): void {
$skipErrors = '2>/dev/null';
}
- $xgetCmd = 'xgettext ' . $output . ' ' . $joinexisting . ' ' . $keywords . ' ' . $language . ' ' . escapeshellarg($entry) . ' ' . $additionalArguments . ' ' . $extractAll . ' ' . $skipErrors;
+ $xgetCmd = 'xgettext ' . $output . ' ' . $joinexisting . ' ' . self::XGETTEXT_ARGUMENTS[$this->languageOf($entry)] . ' ' . escapeshellarg($entry) . ' ' . $additionalArguments . ' ' . $extractAll . ' ' . $skipErrors;
$this->tool->log($xgetCmd);
exec($xgetCmd);
@@ -116,7 +133,7 @@ public function createOrCheckPotFile(bool $checkFiles = false): void {
}
private function checkMissingTranslations(string $entry, string $tmpfname): void {
- $translations = (new Gettext\Loader\PoLoader())->loadFile($tmpfname);
+ $translations = $this->loadPoFile($tmpfname);
$first = true;
foreach($translations as $translation) {
if (preg_match_all('/(^|[^a-zA-Z_]+)(t\([^\)]*\))/', $translation->getOriginal(), $matches)) {
@@ -198,6 +215,17 @@ private function loadPoFile(string $poFile): Gettext\Translations {
if ($content === null) {
throw new RuntimeException('Could not remove the obsolete entries of ' . $poFile . ': ' . preg_last_error_msg());
}
+ // xgettext wraps a file name with spaces in Unicode isolation characters, which PoLoader would split at the spaces
+ if (str_contains($content, "\u{2068}")) {
+ $content = preg_replace_callback('/^#:.*$/m', static fn (array $reference): string => preg_replace_callback(
+ "/\u{2068}(.*?)\u{2069}/",
+ static fn (array $file): string => "\u{2068}" . rawurlencode($file[1]) . "\u{2069}",
+ $reference[0],
+ ) ?? $reference[0], $content);
+ if ($content === null) {
+ throw new RuntimeException('Could not read the references of ' . $poFile . ': ' . preg_last_error_msg());
+ }
+ }
return (new Gettext\Loader\PoLoader())->loadString($content);
}
@@ -294,18 +322,25 @@ private function createFakeFileForAppInfo() {
}
$strings = [];
+ $sourceLines = [];
+ $navigationNames = [];
+ $add = function (string $string, SimpleXMLElement $node) use (&$strings, &$sourceLines): void {
+ $strings[] = $string;
+ $sourceLines[] = $node->getName() === '' || !function_exists('dom_import_simplexml') ? null : dom_import_simplexml($node)->getLineNo();
+ };
$xml = simplexml_load_string(file_get_contents($entryName));
if ($xml->name) {
- $strings[] = $xml->name->__toString();
+ $add($xml->name->__toString(), $xml->name);
}
if ($xml->navigations) {
foreach ($xml->navigations as $navigation) {
$name = $navigation->navigation->name->__toString();
if (!in_array($name, $strings)) {
- $strings[] = $name;
+ $add($name, $navigation->navigation->name);
}
+ $navigationNames[] = $name;
}
}
@@ -313,16 +348,16 @@ private function createFakeFileForAppInfo() {
if ($xml->name->count() > 1) {
foreach ($xml->name as $name) {
if ((string)$name->attributes()->lang === 'en') {
- $name = $name->__toString();
- if (!in_array($name, $strings)) {
- $strings[] = $name;
+ $text = $name->__toString();
+ if (!in_array($text, $strings)) {
+ $add($text, $name);
}
}
}
} else {
$name = $xml->name->__toString();
if (!in_array($name, $strings)) {
- $strings[] = $name;
+ $add($name, $xml->name);
}
}
}
@@ -333,14 +368,14 @@ private function createFakeFileForAppInfo() {
if ((string)$summary->attributes()->lang === 'en') {
$name = $summary->__toString();
if (!in_array($name, $strings)) {
- $strings[] = $name;
+ $add($name, $summary);
}
}
}
} else {
$name = $xml->summary->__toString();
if (!in_array($name, $strings)) {
- $strings[] = $name;
+ $add($name, $xml->summary);
}
}
}
@@ -351,21 +386,26 @@ private function createFakeFileForAppInfo() {
if ((string)$description->attributes()->lang === 'en') {
$name = $description->__toString();
if (!in_array($name, $strings)) {
- $strings[] = trim($name);
+ $add(trim($name), $description);
}
}
}
} else {
$name = $xml->description->__toString();
if (!in_array($name, $strings)) {
- $strings[] = trim($name);
+ $add(trim($name), $xml->description);
}
}
}
- $content = 't(' . $this->escape($string) . ');' . PHP_EOL;
+ $content = '';
+ $line = 1;
+ $this->appendToFakeFile($this->fakeAppInfoFile, $content, $line, 'relativePath($entryName);
+ foreach ($strings as $index => $string) {
+ // Nextcloud formats only the navigation names with vsprintf(), it shows the other texts as they are
+ $language = in_array($string, $navigationNames, true) ? 'php' : 'other';
+ $this->appendToFakeFile($this->fakeAppInfoFile, $content, $line, '$l->t(' . $this->escape($string) . ');' . PHP_EOL, $relativeEntryName, $sourceLines[$index], $language);
}
file_put_contents($this->fakeAppInfoFile, $content);
@@ -373,6 +413,10 @@ private function createFakeFileForAppInfo() {
private function createFakeFileForVueFiles(): void {
$fakeFileContent = '';
+ $fakeFileLine = 1;
+ $append = function (string $text, ?string $sourceFile = null, ?int $sourceLine = null) use (&$fakeFileContent, &$fakeFileLine): void {
+ $this->appendToFakeFile($this->fakeVueFile, $fakeFileContent, $fakeFileLine, $text, $sourceFile, $sourceLine, 'script');
+ };
foreach ($this->findTranslatableFiles(['.vue']) as $vueFile) {
$vueSource = file_get_contents($vueFile);
@@ -380,41 +424,52 @@ private function createFakeFileForVueFiles(): void {
echo 'Warning: could not read ' . $vueFile . PHP_EOL;
continue;
}
+ $relativeVuePath = $this->relativePath($vueFile);
$matches = [];
- if (preg_match_all('/
diff --git a/translations/translationtool/tests/appinfo/info.xml b/translations/translationtool/tests/appinfo/info.xml
new file mode 100644
index 00000000..fbfd39fb
--- /dev/null
+++ b/translations/translationtool/tests/appinfo/info.xml
@@ -0,0 +1,21 @@
+
+
+
+ tests
+ Tests
+
+ Lint summary...
+
+
+
+
+ tests
+ Lint navigation for all files at 100%
+ tests.page.index
+
+
+
diff --git a/translations/translationtool/tests/expected-lint.txt b/translations/translationtool/tests/expected-lint.txt
new file mode 100644
index 00000000..da9e9ffa
--- /dev/null
+++ b/translations/translationtool/tests/expected-lint.txt
@@ -0,0 +1,291 @@
+lib/lint.php:13: error: Use the ellipsis character (…) instead of three dots: "Lint loading..."
+lib/lint.php:14: error: Use a non-breaking space (U+00A0) before the ellipsis: "Lint saving …"
+lib/lint.php:15: error: Use a straight single quote (') instead of ´, ‘ or ’: "Lint don’t panic"
+lib/lint.php:16: error: Remove the leading or trailing whitespace, translate the whole sentence in one string instead of concatenating it: "Lint error: "
+lib/lint.php:17: error: Remove the pipe character, it breaks the translation library: "Lint option A | option B"
+lib/lint.php:18: error: Spell out contractions, for example "Do not" and "Cannot": "Lint we don't know"
+lib/lint.php:19: error: Spell out contractions, for example "Do not" and "Cannot": "Lint can not connect"
+lib/lint.php:20: error: Write "ID" in capitals: "Lint unknown id {id}"
+lib/lint.php:21: error: Remove the HTML markup and insert it through placeholders: "Lint click here"
+lib/lint.php:22: error: Add the count (%n) to the plural, or use t() with a text that fits any number: "Lint import calendar"
+lib/lint.php:23: error: Use n() or another placeholder, %n only works in plurals: "Lint delete %n items"
+lib/lint.php:24: error: Use positioned placeholders (%1$s, %2$s) so translators can reorder them: "Lint moved %s to %s"
+lib/lint.php:25: warning: Write "administration" instead of "admin" or "administrator": "Lint ask your administrator"
+lib/lint.php:26: warning: Write "account" for a profile or "people" for humans instead of "user": "Lint invite users"
+lib/lint.php:27: error: Use the ellipsis character (…) instead of three dots: "Lint %n folder..."
+lib/lint.php:28: error: Use positioned placeholders (%1$s, %2$s) so translators can reorder them: "Lint moved %n file to %s"
+lib/lint.php:29: error: Rename the placeholder, Nextcloud replaces the %n in placeholders like %name% with the count: "Lint use %name% for the name"
+lib/lint.php:30: warning: Use %n to show the count in the plural, another placeholder can show a different number than the one that picks the plural form: "Lint delete file from %s"
+lib/lint.php:31: error: Use positioned placeholders (%1$s, %2$s) so translators can reorder them: "Lint moved %1$s and %s"
+lib/lint.php:32: warning: Use n() when a number in the text varies, some languages have more than one plural form: "Lint locked for %d seconds"
+lib/lint.php:34: warning: Put the string on its own line with its own TRANSLATORS comment, a comment only applies to the first string of a line: "Lint discard the changes"
+lib/lint.php:36: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint misspelled hint"
+lib/lint.php:39: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint call on several lines"
+lib/lint.php:43: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string after a blank line"
+lib/lint.php:44: error: Write %% for a percent sign, PHP reads every single % as the start of a placeholder: "Lint progress at 50%"
+lib/lint.php:46: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string after a docblock"
+lib/lint.php:48: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the trailing hint"
+src/lint.vue:70: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "Lint moved %1$s to %2$s"
+lib/lint.php:59: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the comment of two occurrences"
+lib/lint.php:61: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the trailing hint after an inline one"
+lib/lint.php:63: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint after a note"
+lib/lint.php:65: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a note for translators"
+lib/lint.php:67: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint before another comment"
+lib/lint.php:70: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a misspelled hint over two lines"
+lib/lint.php:73: warning: Put the string on its own line with its own TRANSLATORS comment, a comment only applies to the first string of a line: "Lint second string below a hint over two lines"
+lib/lint.php:78: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a note inside a block"
+lib/lint.php:80: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint before code"
+lib/lint.php:84: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a misspelled docblock"
+lib/lint.php:93: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string below a run"
+lib/lint.php:96: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string below a block hint over two lines"
+lib/lint.php:101: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string after a call over several lines"
+lib/lint.php:103: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string after two strings with a trailing hint"
+lib/lint.php:113: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint before a plain string"
+lib/lint.php:114: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint headline"
+lib/lint.php:115: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint enable"
+lib/lint.php:115: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint dark mode"
+lib/lint.php:116: warning: Use %n in both forms, some languages use the first form for numbers like 21 too: "Lint one file"
+lib/lint.php:117: error: Spell out contractions, for example "Do not" and "Cannot": "Lint you're done"
+lib/lint.php:118: error: Write "ID" in capitals: "Lint copy the ids"
+lib/lint.php:119: error: Use a straight single quote (') instead of ´, ‘ or ’: "Lint the ‘ sign"
+lib/lint.php:120: error: Use a non-breaking space (U+00A0) before the ellipsis: "Lint loading …"
+lib/lint.php:121: error: Remove the HTML markup and insert it through placeholders: "Lint click here"
+lib/lint.php:146: warning: Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint new string above a known one"
+lib/lint.php:149: warning: Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint new string in a call above a known one"
+lib/lint.py:5: error: Use %(count)d for the count, Python has no %n placeholder: "Lint python %n items"
+lib/lint.py:6: error: Use named placeholders like %(name)s so translators can reorder them: "Lint python moved %s to %s"
+lib/lint.py:7: warning: Use n() when a number in the text varies, some languages have more than one plural form: "Lint python locked for %d seconds"
+lib/lint.py:8: error: Add the count to the plural, or use _() with a text that fits any number: "Lint python import calendar"
+lib/lint.py:10: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint python string that gets the trailing hint"
+lib/lint.py:12: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint python string that gets the hint without a space"
+appinfo/info.xml:17: error: Write %% for a percent sign, PHP reads every single % as the start of a placeholder: "Lint navigation for all files at 100%"
+appinfo/info.xml:9: error: Use the ellipsis character (…) instead of three dots: "\n Lint summary...\n "
+src/lint-scripts.vue:5: error: Use the ellipsis character (…) instead of three dots: "Lint inline script string..."
+src/lint-scripts.vue:7: error: Use the ellipsis character (…) instead of three dots: "Lint setup script string..."
+src/lint.vue:46: error: Use the ellipsis character (…) instead of three dots: "Lint script string..."
+src/lint.vue:53: warning: Write "account" for a profile or "people" for humans instead of "user": "Lint 50% users"
+src/lint.vue:61: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "Lint copied %s files"
+src/lint.vue:62: warning: Name the placeholder after what it holds, for example {fileName} instead of {0}: "Lint hello {0}"
+src/lint.vue:63: warning: Use %n to show the count in the plural, another placeholder can show a different number than the one that picks the plural form: "Lint delete file from {folder}"
+src/lint.vue:65: warning: Use n() for a count, in t() %n is only replaced when a count is passed: "Lint deleted %n items"
+src/lint.vue:66: error: Write the placeholder as {name}, without spaces or double braces, or it is not replaced: "Lint hello {{name}}"
+src/lint.vue:67: warning: Use n() when a number in the text varies, some languages have more than one plural form: "Lint locked for {seconds} seconds"
+src/lint.vue:68: warning: Use %n in both forms, some languages use the first form for numbers like 21 too: "Lint one item"
+src/lint.vue:73: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint script string that gets the hint before a comma"
+src/lint.vue:7: error: Use the ellipsis character (…) instead of three dots: "Lint template string..."
+src/lint.vue:10: error: Use the ellipsis character (…) instead of three dots: "Lint string at the start of a line..."
+src/lint.vue:14: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint template string with a misspelled hint"
+src/lint.vue:16: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint headline in a template"
+src/lint.vue:19: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint repeated template string"
+src/lint.vue:24: error: Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint template string with a hint for itself"
+src/lint.vue:33: error: Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint template call at the start of a line with a hint"
+src/lint.vue:37: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint template attribute at the start of a line"
+src/vue.vue:43: warning: Use %n in both forms, some languages use the first form for numbers like 21 too: "one string"
+src/vue.vue:26: warning: Put the string on its own line with its own TRANSLATORS comment, a comment only applies to the first string of a line: "VUE String not"
+src/vue.vue:29: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "VUE String with followup double quotes"
+src/vue.vue:21: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "VUE %n Plural with wrapped %s"
+src/vue.vue:32: warning: Use %n in both forms, some languages use the first form for numbers like 21 too: "one test"
+src/vue.vue:19: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "VUE %n Plural with %s"
+src/js.js:26: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "JS %n Plural with %s"
+src/js.js:28: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "JS %n Plural with wrapped %s"
+src/ts.ts:18: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "TS %n Plural with %s"
+src/ts.ts:20: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "TS %n Plural with wrapped %s"
+src/with space/space.js:6: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "Lint script string in a folder with a space %s"
+templates/lint.php:21: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint template string that gets the PHP hint"
+44 error(s), 50 warning(s) in new source strings
+exit 1
+::error file=lib/lint.php,line=13,title=Translation source string::Use the ellipsis character (…) instead of three dots: "Lint loading..."
+::error file=lib/lint.php,line=14,title=Translation source string::Use a non-breaking space (U+00A0) before the ellipsis: "Lint saving …"
+::error file=lib/lint.php,line=15,title=Translation source string::Use a straight single quote (') instead of ´, ‘ or ’: "Lint don’t panic"
+::error file=lib/lint.php,line=16,title=Translation source string::Remove the leading or trailing whitespace, translate the whole sentence in one string instead of concatenating it: "Lint error: "
+::error file=lib/lint.php,line=17,title=Translation source string::Remove the pipe character, it breaks the translation library: "Lint option A | option B"
+::error file=lib/lint.php,line=18,title=Translation source string::Spell out contractions, for example "Do not" and "Cannot": "Lint we don't know"
+::error file=lib/lint.php,line=19,title=Translation source string::Spell out contractions, for example "Do not" and "Cannot": "Lint can not connect"
+::error file=lib/lint.php,line=20,title=Translation source string::Write "ID" in capitals: "Lint unknown id {id}"
+::error file=lib/lint.php,line=21,title=Translation source string::Remove the HTML markup and insert it through placeholders: "Lint click here"
+::error file=lib/lint.php,line=22,title=Translation source string::Add the count (%25n) to the plural, or use t() with a text that fits any number: "Lint import calendar"
+::error file=lib/lint.php,line=23,title=Translation source string::Use n() or another placeholder, %25n only works in plurals: "Lint delete %25n items"
+::error file=lib/lint.php,line=24,title=Translation source string::Use positioned placeholders (%251$s, %252$s) so translators can reorder them: "Lint moved %25s to %25s"
+::warning file=lib/lint.php,line=25,title=Translation source string::Write "administration" instead of "admin" or "administrator": "Lint ask your administrator"
+::warning file=lib/lint.php,line=26,title=Translation source string::Write "account" for a profile or "people" for humans instead of "user": "Lint invite users"
+::error file=lib/lint.php,line=27,title=Translation source string::Use the ellipsis character (…) instead of three dots: "Lint %25n folder..."
+::error file=lib/lint.php,line=28,title=Translation source string::Use positioned placeholders (%251$s, %252$s) so translators can reorder them: "Lint moved %25n file to %25s"
+::error file=lib/lint.php,line=29,title=Translation source string::Rename the placeholder, Nextcloud replaces the %25n in placeholders like %25name%25 with the count: "Lint use %25name%25 for the name"
+::warning file=lib/lint.php,line=30,title=Translation source string::Use %25n to show the count in the plural, another placeholder can show a different number than the one that picks the plural form: "Lint delete file from %25s"
+::error file=lib/lint.php,line=31,title=Translation source string::Use positioned placeholders (%251$s, %252$s) so translators can reorder them: "Lint moved %251$s and %25s"
+::warning file=lib/lint.php,line=32,title=Translation source string::Use n() when a number in the text varies, some languages have more than one plural form: "Lint locked for %25d seconds"
+::warning file=lib/lint.php,line=34,title=Translation source string::Put the string on its own line with its own TRANSLATORS comment, a comment only applies to the first string of a line: "Lint discard the changes"
+::warning file=lib/lint.php,line=36,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint misspelled hint"
+::warning file=lib/lint.php,line=39,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint call on several lines"
+::warning file=lib/lint.php,line=43,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string after a blank line"
+::error file=lib/lint.php,line=44,title=Translation source string::Write %25%25 for a percent sign, PHP reads every single %25 as the start of a placeholder: "Lint progress at 50%25"
+::warning file=lib/lint.php,line=46,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string after a docblock"
+::warning file=lib/lint.php,line=48,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the trailing hint"
+::error file=src/lint.vue,line=70,title=Translation source string::Use {name} placeholders, JavaScript does not replace %25s and %251$s: "Lint moved %251$s to %252$s"
+::warning file=lib/lint.php,line=59,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the comment of two occurrences"
+::warning file=lib/lint.php,line=61,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the trailing hint after an inline one"
+::warning file=lib/lint.php,line=63,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint after a note"
+::warning file=lib/lint.php,line=65,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a note for translators"
+::warning file=lib/lint.php,line=67,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint before another comment"
+::warning file=lib/lint.php,line=70,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a misspelled hint over two lines"
+::warning file=lib/lint.php,line=73,title=Translation source string::Put the string on its own line with its own TRANSLATORS comment, a comment only applies to the first string of a line: "Lint second string below a hint over two lines"
+::warning file=lib/lint.php,line=78,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a note inside a block"
+::warning file=lib/lint.php,line=80,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint before code"
+::warning file=lib/lint.php,line=84,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a misspelled docblock"
+::warning file=lib/lint.php,line=93,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string below a run"
+::warning file=lib/lint.php,line=96,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string below a block hint over two lines"
+::warning file=lib/lint.php,line=101,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string after a call over several lines"
+::warning file=lib/lint.php,line=103,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string after two strings with a trailing hint"
+::warning file=lib/lint.php,line=113,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint before a plain string"
+::warning file=lib/lint.php,line=114,title=Translation source string::Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint headline"
+::warning file=lib/lint.php,line=115,title=Translation source string::Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint enable"
+::warning file=lib/lint.php,line=115,title=Translation source string::Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint dark mode"
+::warning file=lib/lint.php,line=116,title=Translation source string::Use %25n in both forms, some languages use the first form for numbers like 21 too: "Lint one file"
+::error file=lib/lint.php,line=117,title=Translation source string::Spell out contractions, for example "Do not" and "Cannot": "Lint you're done"
+::error file=lib/lint.php,line=118,title=Translation source string::Write "ID" in capitals: "Lint copy the ids"
+::error file=lib/lint.php,line=119,title=Translation source string::Use a straight single quote (') instead of ´, ‘ or ’: "Lint the ‘ sign"
+::error file=lib/lint.php,line=120,title=Translation source string::Use a non-breaking space (U+00A0) before the ellipsis: "Lint loading …"
+::error file=lib/lint.php,line=121,title=Translation source string::Remove the HTML markup and insert it through placeholders: "Lint click here"
+::warning file=lib/lint.php,line=146,title=Translation source string::Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint new string above a known one"
+::warning file=lib/lint.php,line=149,title=Translation source string::Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint new string in a call above a known one"
+::error file=lib/lint.py,line=5,title=Translation source string::Use %25(count)d for the count, Python has no %25n placeholder: "Lint python %25n items"
+::error file=lib/lint.py,line=6,title=Translation source string::Use named placeholders like %25(name)s so translators can reorder them: "Lint python moved %25s to %25s"
+::warning file=lib/lint.py,line=7,title=Translation source string::Use n() when a number in the text varies, some languages have more than one plural form: "Lint python locked for %25d seconds"
+::error file=lib/lint.py,line=8,title=Translation source string::Add the count to the plural, or use _() with a text that fits any number: "Lint python import calendar"
+::warning file=lib/lint.py,line=10,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint python string that gets the trailing hint"
+::warning file=lib/lint.py,line=12,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint python string that gets the hint without a space"
+::error file=appinfo/info.xml,line=17,title=Translation source string::Write %25%25 for a percent sign, PHP reads every single %25 as the start of a placeholder: "Lint navigation for all files at 100%25"
+::error file=appinfo/info.xml,line=9,title=Translation source string::Use the ellipsis character (…) instead of three dots: "\n Lint summary...\n "
+::error file=src/lint-scripts.vue,line=5,title=Translation source string::Use the ellipsis character (…) instead of three dots: "Lint inline script string..."
+::error file=src/lint-scripts.vue,line=7,title=Translation source string::Use the ellipsis character (…) instead of three dots: "Lint setup script string..."
+::error file=src/lint.vue,line=46,title=Translation source string::Use the ellipsis character (…) instead of three dots: "Lint script string..."
+::warning file=src/lint.vue,line=53,title=Translation source string::Write "account" for a profile or "people" for humans instead of "user": "Lint 50%25 users"
+::error file=src/lint.vue,line=61,title=Translation source string::Use {name} placeholders, JavaScript does not replace %25s and %251$s: "Lint copied %25s files"
+::warning file=src/lint.vue,line=62,title=Translation source string::Name the placeholder after what it holds, for example {fileName} instead of {0}: "Lint hello {0}"
+::warning file=src/lint.vue,line=63,title=Translation source string::Use %25n to show the count in the plural, another placeholder can show a different number than the one that picks the plural form: "Lint delete file from {folder}"
+::warning file=src/lint.vue,line=65,title=Translation source string::Use n() for a count, in t() %25n is only replaced when a count is passed: "Lint deleted %25n items"
+::error file=src/lint.vue,line=66,title=Translation source string::Write the placeholder as {name}, without spaces or double braces, or it is not replaced: "Lint hello {{name}}"
+::warning file=src/lint.vue,line=67,title=Translation source string::Use n() when a number in the text varies, some languages have more than one plural form: "Lint locked for {seconds} seconds"
+::warning file=src/lint.vue,line=68,title=Translation source string::Use %25n in both forms, some languages use the first form for numbers like 21 too: "Lint one item"
+::warning file=src/lint.vue,line=73,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint script string that gets the hint before a comma"
+::error file=src/lint.vue,line=7,title=Translation source string::Use the ellipsis character (…) instead of three dots: "Lint template string..."
+::error file=src/lint.vue,line=10,title=Translation source string::Use the ellipsis character (…) instead of three dots: "Lint string at the start of a line..."
+::warning file=src/lint.vue,line=14,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint template string with a misspelled hint"
+::warning file=src/lint.vue,line=16,title=Translation source string::Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint headline in a template"
+::warning file=src/lint.vue,line=19,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint repeated template string"
+::error file=src/lint.vue,line=24,title=Translation source string::Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint template string with a hint for itself"
+::error file=src/lint.vue,line=33,title=Translation source string::Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint template call at the start of a line with a hint"
+::warning file=src/lint.vue,line=37,title=Translation source string::Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint template attribute at the start of a line"
+::warning file=src/vue.vue,line=43,title=Translation source string::Use %25n in both forms, some languages use the first form for numbers like 21 too: "one string"
+::warning file=src/vue.vue,line=26,title=Translation source string::Put the string on its own line with its own TRANSLATORS comment, a comment only applies to the first string of a line: "VUE String not"
+::warning file=src/vue.vue,line=29,title=Translation source string::Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "VUE String with followup double quotes"
+::error file=src/vue.vue,line=21,title=Translation source string::Use {name} placeholders, JavaScript does not replace %25s and %251$s: "VUE %25n Plural with wrapped %25s"
+::warning file=src/vue.vue,line=32,title=Translation source string::Use %25n in both forms, some languages use the first form for numbers like 21 too: "one test"
+::error file=src/vue.vue,line=19,title=Translation source string::Use {name} placeholders, JavaScript does not replace %25s and %251$s: "VUE %25n Plural with %25s"
+::error file=src/js.js,line=26,title=Translation source string::Use {name} placeholders, JavaScript does not replace %25s and %251$s: "JS %25n Plural with %25s"
+::error file=src/js.js,line=28,title=Translation source string::Use {name} placeholders, JavaScript does not replace %25s and %251$s: "JS %25n Plural with wrapped %25s"
+::error file=src/ts.ts,line=18,title=Translation source string::Use {name} placeholders, JavaScript does not replace %25s and %251$s: "TS %25n Plural with %25s"
+::error file=src/ts.ts,line=20,title=Translation source string::Use {name} placeholders, JavaScript does not replace %25s and %251$s: "TS %25n Plural with wrapped %25s"
+::error file=src/with space/space.js,line=6,title=Translation source string::Use {name} placeholders, JavaScript does not replace %25s and %251$s: "Lint script string in a folder with a space %25s"
+::warning file=templates/lint.php,line=21,title=Translation source string::Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint template string that gets the PHP hint"
+44 error(s), 50 warning(s) in new source strings
+exit 1
+lib/lint.php:13: error: Use the ellipsis character (…) instead of three dots: "Lint loading..."
+lib/lint.php:14: error: Use a non-breaking space (U+00A0) before the ellipsis: "Lint saving …"
+lib/lint.php:15: error: Use a straight single quote (') instead of ´, ‘ or ’: "Lint don’t panic"
+lib/lint.php:16: error: Remove the leading or trailing whitespace, translate the whole sentence in one string instead of concatenating it: "Lint error: "
+lib/lint.php:17: error: Remove the pipe character, it breaks the translation library: "Lint option A | option B"
+lib/lint.php:18: error: Spell out contractions, for example "Do not" and "Cannot": "Lint we don't know"
+lib/lint.php:19: error: Spell out contractions, for example "Do not" and "Cannot": "Lint can not connect"
+lib/lint.php:20: error: Write "ID" in capitals: "Lint unknown id {id}"
+lib/lint.php:21: error: Remove the HTML markup and insert it through placeholders: "Lint click here"
+lib/lint.php:22: error: Add the count (%n) to the plural, or use t() with a text that fits any number: "Lint import calendar"
+lib/lint.php:23: error: Use n() or another placeholder, %n only works in plurals: "Lint delete %n items"
+lib/lint.php:24: error: Use positioned placeholders (%1$s, %2$s) so translators can reorder them: "Lint moved %s to %s"
+lib/lint.php:25: warning: Write "administration" instead of "admin" or "administrator": "Lint ask your administrator"
+lib/lint.php:26: warning: Write "account" for a profile or "people" for humans instead of "user": "Lint invite users"
+lib/lint.php:27: error: Use the ellipsis character (…) instead of three dots: "Lint %n folder..."
+lib/lint.php:28: error: Use positioned placeholders (%1$s, %2$s) so translators can reorder them: "Lint moved %n file to %s"
+lib/lint.php:29: error: Rename the placeholder, Nextcloud replaces the %n in placeholders like %name% with the count: "Lint use %name% for the name"
+lib/lint.php:30: warning: Use %n to show the count in the plural, another placeholder can show a different number than the one that picks the plural form: "Lint delete file from %s"
+lib/lint.php:31: error: Use positioned placeholders (%1$s, %2$s) so translators can reorder them: "Lint moved %1$s and %s"
+lib/lint.php:32: warning: Use n() when a number in the text varies, some languages have more than one plural form: "Lint locked for %d seconds"
+lib/lint.php:34: warning: Put the string on its own line with its own TRANSLATORS comment, a comment only applies to the first string of a line: "Lint discard the changes"
+lib/lint.php:36: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint misspelled hint"
+lib/lint.php:39: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint call on several lines"
+lib/lint.php:43: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string after a blank line"
+lib/lint.php:44: error: Write %% for a percent sign, PHP reads every single % as the start of a placeholder: "Lint progress at 50%"
+lib/lint.php:46: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string after a docblock"
+lib/lint.php:48: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the trailing hint"
+src/lint.vue:70: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "Lint moved %1$s to %2$s"
+lib/lint.php:59: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the comment of two occurrences"
+lib/lint.php:61: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the trailing hint after an inline one"
+lib/lint.php:63: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint after a note"
+lib/lint.php:65: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a note for translators"
+lib/lint.php:67: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint before another comment"
+lib/lint.php:70: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a misspelled hint over two lines"
+lib/lint.php:73: warning: Put the string on its own line with its own TRANSLATORS comment, a comment only applies to the first string of a line: "Lint second string below a hint over two lines"
+lib/lint.php:78: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a note inside a block"
+lib/lint.php:80: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint before code"
+lib/lint.php:84: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint string below a misspelled docblock"
+lib/lint.php:93: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string below a run"
+lib/lint.php:96: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string below a block hint over two lines"
+lib/lint.php:101: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string after a call over several lines"
+lib/lint.php:103: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string after two strings with a trailing hint"
+lib/lint.php:113: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint string that gets the hint before a plain string"
+lib/lint.php:114: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint headline"
+lib/lint.php:115: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint enable"
+lib/lint.php:115: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint dark mode"
+lib/lint.php:116: warning: Use %n in both forms, some languages use the first form for numbers like 21 too: "Lint one file"
+lib/lint.php:117: error: Spell out contractions, for example "Do not" and "Cannot": "Lint you're done"
+lib/lint.php:118: error: Write "ID" in capitals: "Lint copy the ids"
+lib/lint.php:119: error: Use a straight single quote (') instead of ´, ‘ or ’: "Lint the ‘ sign"
+lib/lint.php:120: error: Use a non-breaking space (U+00A0) before the ellipsis: "Lint loading …"
+lib/lint.php:121: error: Remove the HTML markup and insert it through placeholders: "Lint click here"
+lib/lint.php:147: error: Use the ellipsis character (…) instead of three dots: "Lint already known..."
+lib/lint.php:147: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint already known..."
+lib/lint.php:151: error: Use the ellipsis character (…) instead of three dots: "Lint %n known file..."
+lib/lint.php:151: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint %n known file..."
+lib/lint.py:5: error: Use %(count)d for the count, Python has no %n placeholder: "Lint python %n items"
+lib/lint.py:6: error: Use named placeholders like %(name)s so translators can reorder them: "Lint python moved %s to %s"
+lib/lint.py:7: warning: Use n() when a number in the text varies, some languages have more than one plural form: "Lint python locked for %d seconds"
+lib/lint.py:8: error: Add the count to the plural, or use _() with a text that fits any number: "Lint python import calendar"
+lib/lint.py:10: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint python string that gets the trailing hint"
+lib/lint.py:12: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint python string that gets the hint without a space"
+appinfo/info.xml:17: error: Write %% for a percent sign, PHP reads every single % as the start of a placeholder: "Lint navigation for all files at 100%"
+appinfo/info.xml:9: error: Use the ellipsis character (…) instead of three dots: "\n Lint summary...\n "
+src/lint-scripts.vue:5: error: Use the ellipsis character (…) instead of three dots: "Lint inline script string..."
+src/lint-scripts.vue:7: error: Use the ellipsis character (…) instead of three dots: "Lint setup script string..."
+src/lint.vue:46: error: Use the ellipsis character (…) instead of three dots: "Lint script string..."
+src/lint.vue:49: error: Use the ellipsis character (…) instead of three dots: "Lint known script string..."
+src/lint.vue:53: warning: Write "account" for a profile or "people" for humans instead of "user": "Lint 50% users"
+src/lint.vue:61: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "Lint copied %s files"
+src/lint.vue:62: warning: Name the placeholder after what it holds, for example {fileName} instead of {0}: "Lint hello {0}"
+src/lint.vue:63: warning: Use %n to show the count in the plural, another placeholder can show a different number than the one that picks the plural form: "Lint delete file from {folder}"
+src/lint.vue:65: warning: Use n() for a count, in t() %n is only replaced when a count is passed: "Lint deleted %n items"
+src/lint.vue:66: error: Write the placeholder as {name}, without spaces or double braces, or it is not replaced: "Lint hello {{name}}"
+src/lint.vue:67: warning: Use n() when a number in the text varies, some languages have more than one plural form: "Lint locked for {seconds} seconds"
+src/lint.vue:68: warning: Use %n in both forms, some languages use the first form for numbers like 21 too: "Lint one item"
+src/lint.vue:73: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint script string that gets the hint before a comma"
+src/lint.vue:7: error: Use the ellipsis character (…) instead of three dots: "Lint template string..."
+src/lint.vue:10: error: Use the ellipsis character (…) instead of three dots: "Lint string at the start of a line..."
+src/lint.vue:14: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint template string with a misspelled hint"
+src/lint.vue:16: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "Lint headline in a template"
+src/lint.vue:19: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint repeated template string"
+src/lint.vue:24: error: Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint template string with a hint for itself"
+src/lint.vue:33: error: Move the TRANSLATORS comment onto its own line above the string, otherwise the string on the next line gets it: "Lint template call at the start of a line with a hint"
+src/lint.vue:37: warning: Start the comment with TRANSLATORS in capitals, otherwise it does not reach the translators: "Lint template attribute at the start of a line"
+src/vue.vue:43: warning: Use %n in both forms, some languages use the first form for numbers like 21 too: "one string"
+src/vue.vue:26: warning: Put the string on its own line with its own TRANSLATORS comment, a comment only applies to the first string of a line: "VUE String not"
+src/vue.vue:29: warning: Translate the whole text in one string, translators cannot move a colon or a joined text outside it: "VUE String with followup double quotes"
+src/vue.vue:21: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "VUE %n Plural with wrapped %s"
+src/vue.vue:32: warning: Use %n in both forms, some languages use the first form for numbers like 21 too: "one test"
+src/vue.vue:19: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "VUE %n Plural with %s"
+src/js.js:26: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "JS %n Plural with %s"
+src/js.js:28: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "JS %n Plural with wrapped %s"
+src/ts.ts:18: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "TS %n Plural with %s"
+src/ts.ts:20: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "TS %n Plural with wrapped %s"
+src/with space/space.js:6: error: Use {name} placeholders, JavaScript does not replace %s and %1$s: "Lint script string in a folder with a space %s"
+templates/lint.php:21: warning: Check the TRANSLATORS comment after the code above, xgettext gives it to this string, not to the one it follows: "Lint template string that gets the PHP hint"
+47 error(s), 50 warning(s) in all source strings
+exit 1
diff --git a/translations/translationtool/tests/expected.pot b/translations/translationtool/tests/expected.pot
index fa6c67bd..d2567078 100644
--- a/translations/translationtool/tests/expected.pot
+++ b/translations/translationtool/tests/expected.pot
@@ -1,3 +1,500 @@
+#: lib/lint.php:13
+msgid "Lint loading..."
+msgstr ""
+
+#: lib/lint.php:14
+msgid "Lint saving …"
+msgstr ""
+
+#: lib/lint.php:15
+msgid "Lint don’t panic"
+msgstr ""
+
+#: lib/lint.php:16
+msgid "Lint error: "
+msgstr ""
+
+#: lib/lint.php:17
+msgid "Lint option A | option B"
+msgstr ""
+
+#: lib/lint.php:18
+msgid "Lint we don't know"
+msgstr ""
+
+#: lib/lint.php:19
+msgid "Lint can not connect"
+msgstr ""
+
+#: lib/lint.php:20
+msgid "Lint unknown id {id}"
+msgstr ""
+
+#: lib/lint.php:21
+msgid "Lint click here"
+msgstr ""
+
+#: lib/lint.php:22
+msgid "Lint import calendar"
+msgid_plural "Lint import calendars"
+msgstr[0] ""
+msgstr[1] ""
+
+#: lib/lint.php:23
+msgid "Lint delete %n items"
+msgstr ""
+
+#: lib/lint.php:24
+#, php-format
+msgid "Lint moved %s to %s"
+msgstr ""
+
+#: lib/lint.php:25
+msgid "Lint ask your administrator"
+msgstr ""
+
+#: lib/lint.php:26
+msgid "Lint invite users"
+msgstr ""
+
+#: lib/lint.php:27
+msgid "Lint %n folder..."
+msgid_plural "Lint %n folders..."
+msgstr[0] ""
+msgstr[1] ""
+
+#: lib/lint.php:28
+msgid "Lint moved %n file to %s"
+msgid_plural "Lint moved %n files from %s to %s"
+msgstr[0] ""
+msgstr[1] ""
+
+#: lib/lint.php:29
+msgid "Lint use %name% for the name"
+msgstr ""
+
+#: lib/lint.php:30
+#, php-format
+msgid "Lint delete file from %s"
+msgid_plural "Lint delete files from %s"
+msgstr[0] ""
+msgstr[1] ""
+
+#: lib/lint.php:31
+#, php-format
+msgid "Lint moved %1$s and %s"
+msgstr ""
+
+#: lib/lint.php:32
+#, php-format
+msgid "Lint locked for %d seconds"
+msgstr ""
+
+#. TRANSLATORS Lint hint that only reaches the first string of the line
+#: lib/lint.php:34
+msgid "Lint save the changes"
+msgstr ""
+
+#: lib/lint.php:34
+msgid "Lint discard the changes"
+msgstr ""
+
+#: lib/lint.php:36
+msgid "Lint misspelled hint"
+msgstr ""
+
+#: lib/lint.php:39
+msgid "Lint call on several lines"
+msgstr ""
+
+#: lib/lint.php:43
+msgid "Lint string after a blank line"
+msgstr ""
+
+#: lib/lint.php:44
+msgid "Lint progress at 50%"
+msgstr ""
+
+#: lib/lint.php:46
+msgid "Lint string after a docblock"
+msgstr ""
+
+#: lib/lint.php:47
+msgid "Lint string with a trailing hint"
+msgstr ""
+
+#. TRANSLATORS Lint hint that xgettext gives to the next line
+#: lib/lint.php:48
+msgid "Lint string that gets the trailing hint"
+msgstr ""
+
+#. TRANSLATORS Lint inline hint
+#: lib/lint.php:49
+msgid "Lint string with an inline hint"
+msgstr ""
+
+#. TRANSLATORS Lint hint before the code
+#: lib/lint.php:50
+msgid "Lint string after a hint on its line"
+msgstr ""
+
+#: lib/lint.php:51
+#: lib/lint.php:125
+#: specialVueFakeDummyForL10nScript.js:34
+#, javascript-format, php-format
+msgid "Lint moved %1$s to %2$s"
+msgstr ""
+
+#: lib/lint.php:52
+msgid "Lint first of two strings"
+msgstr ""
+
+#. TRANSLATORS Lint hint for the second string
+#: lib/lint.php:52
+msgid "Lint second of two strings"
+msgstr ""
+
+#: lib/lint.php:53
+msgid "Lint enter the address as @"
+msgstr ""
+
+#: lib/lint.php:54
+msgid "Lint see https://example.com/details?id=app for the app"
+msgstr ""
+
+#: lib/lint.php:55
+#, php-format
+msgid "Lint padded %1$'*10s name"
+msgstr ""
+
+#. TRANSLATORS Lint comment of two occurrences
+#: lib/lint.php:57
+#: lib/lint.php:58
+msgid "Lint string with the same comment twice"
+msgstr ""
+
+#. TRANSLATORS Lint comment of two occurrences
+#: lib/lint.php:59
+msgid "Lint string that gets the comment of two occurrences"
+msgstr ""
+
+#. TRANSLATORS Lint inline hint before a trailing one
+#: lib/lint.php:60
+msgid "Lint string with two hints"
+msgstr ""
+
+#. TRANSLATORS Lint trailing hint after an inline one
+#: lib/lint.php:61
+msgid "Lint string that gets the trailing hint after an inline one"
+msgstr ""
+
+#: lib/lint.php:62
+msgid "Lint string with a note before the tag"
+msgstr ""
+
+#. TRANSLATORS Lint hint after a note
+#: lib/lint.php:63
+msgid "Lint string that gets the hint after a note"
+msgstr ""
+
+#: lib/lint.php:65
+msgid "Lint string below a note for translators"
+msgstr ""
+
+#: lib/lint.php:66
+msgid "Lint string with a hint before another comment"
+msgstr ""
+
+#. TRANSLATORS Lint hint before another comment
+#. note
+#: lib/lint.php:67
+msgid "Lint string that gets the hint before another comment"
+msgstr ""
+
+#: lib/lint.php:70
+msgid "Lint string below a misspelled hint over two lines"
+msgstr ""
+
+#. TRANSLATORS Lint hint over
+#. two lines for the first string
+#: lib/lint.php:73
+msgid "Lint first string below a hint over two lines"
+msgstr ""
+
+#: lib/lint.php:73
+msgid "Lint second string below a hint over two lines"
+msgstr ""
+
+#: lib/lint.php:75
+msgid "Lint string below a comment about the translator"
+msgstr ""
+
+#: lib/lint.php:78
+msgid "Lint string below a note inside a block"
+msgstr ""
+
+#: lib/lint.php:79
+msgid "Lint string with a hint before code"
+msgstr ""
+
+#. TRANSLATORS Lint hint before code
+#: lib/lint.php:80
+msgid "Lint string that gets the hint before code"
+msgstr ""
+
+#: lib/lint.php:84
+msgid "Lint string below a misspelled docblock"
+msgstr ""
+
+#. TRANSLATORS Lint unit
+#: lib/lint.php:86
+msgid "Lint KB"
+msgstr ""
+
+#. TRANSLATORS Lint unit
+#: lib/lint.php:87
+msgid "Lint MB"
+msgstr ""
+
+#. TRANSLATORS Lint size
+#: lib/lint.php:88
+msgid "Lint GB"
+msgstr ""
+
+#. TRANSLATORS Lint size
+#: lib/lint.php:89
+msgid "Lint TB"
+msgstr ""
+
+#: lib/lint.php:91
+msgid "Lint string with a trailing hint in a run"
+msgstr ""
+
+#. TRANSLATORS Lint hint at the start of a run
+#. TRANSLATORS Lint hint of the string below the run
+#: lib/lint.php:93
+msgid "Lint string below a run"
+msgstr ""
+
+#: lib/lint.php:94
+msgid "Lint string with a block hint over two lines"
+msgstr ""
+
+#. TRANSLATORS Lint block hint
+#. over two lines
+#: lib/lint.php:96
+msgid "Lint string below a block hint over two lines"
+msgstr ""
+
+#: lib/lint.php:98
+#, php-format
+msgid "Lint moved %1$s to %2$s in a call over several lines"
+msgstr ""
+
+#. TRANSLATORS Lint hint after a call over several lines
+#: lib/lint.php:101
+msgid "Lint string after a call over several lines"
+msgstr ""
+
+#: lib/lint.php:102
+msgid "Lint first string before a trailing hint"
+msgstr ""
+
+#: lib/lint.php:102
+msgid "Lint second string before a trailing hint"
+msgstr ""
+
+#. TRANSLATORS Lint hint after two strings
+#: lib/lint.php:103
+msgid "Lint string after two strings with a trailing hint"
+msgstr ""
+
+#. TRANSLATORS Lint hint after a note on its own line
+#: lib/lint.php:105
+msgid "Lint string below a note with a tag"
+msgstr ""
+
+#. TRANSLATORS Lint hint after an opening bracket
+#: lib/lint.php:107
+msgid "Lint string after an opening bracket"
+msgstr ""
+
+#. TRANSLATORS Lint hint after an opening call
+#: lib/lint.php:110
+msgid "Lint string after an opening call"
+msgstr ""
+
+#: lib/lint.php:112
+msgid "Lint string before a plain string"
+msgstr ""
+
+#. TRANSLATORS Lint hint before a plain string
+#: lib/lint.php:113
+msgid "Lint string that gets the hint before a plain string"
+msgstr ""
+
+#: lib/lint.php:114
+msgid "Lint headline"
+msgstr ""
+
+#: lib/lint.php:115
+msgid "Lint enable"
+msgstr ""
+
+#: lib/lint.php:115
+msgid "Lint dark mode"
+msgstr ""
+
+#: lib/lint.php:116
+msgid "Lint one file"
+msgid_plural "Lint %n files"
+msgstr[0] ""
+msgstr[1] ""
+
+#: lib/lint.php:117
+msgid "Lint you're done"
+msgstr ""
+
+#: lib/lint.php:118
+msgid "Lint copy the ids"
+msgstr ""
+
+#: lib/lint.php:119
+msgid "Lint the ‘ sign"
+msgstr ""
+
+#: lib/lint.php:120
+msgid "Lint loading\t…"
+msgstr ""
+
+#: lib/lint.php:121
+msgid "Lint click here"
+msgstr ""
+
+#: lib/lint.php:124
+msgid "Lint loading …"
+msgstr ""
+
+#: lib/lint.php:126
+msgid "Lint contact {id}"
+msgstr ""
+
+#: lib/lint.php:127
+msgid "Lint {user} joined"
+msgstr ""
+
+#: lib/lint.php:128
+#, php-format
+msgid "Lint shown as %%d for %s"
+msgstr ""
+
+#: lib/lint.php:129
+msgid "Lint %n file in %1$s"
+msgid_plural "Lint %n files in %1$s"
+msgstr[0] ""
+msgstr[1] ""
+
+#. TRANSLATORS Lint hint on its own line
+#: lib/lint.php:131
+msgid "Lint string with its own hint"
+msgstr ""
+
+#: lib/lint.php:132
+msgid "Lint the user interface"
+msgstr ""
+
+#: lib/lint.php:133
+msgid "Lint this can not only be fast"
+msgstr ""
+
+#. TRANSLATORS Lint hint for one occurrence of a string
+#: lib/lint.php:135
+#: lib/lint.php:136
+msgid "Lint string used twice"
+msgstr ""
+
+#: lib/lint.php:136
+msgid "Lint first string of its line"
+msgstr ""
+
+#: lib/lint.php:139
+msgid "Lint string below the call"
+msgstr ""
+
+#: lib/lint.php:143
+msgid "Lint string after a trailing comment"
+msgstr ""
+
+#: lib/lint.php:146
+msgid "Lint new string above a known one"
+msgstr ""
+
+#. TRANSLATORS Lint hint that reaches the known string
+#: lib/lint.php:147
+msgid "Lint already known..."
+msgstr ""
+
+#: lib/lint.php:149
+msgid "Lint new string in a call above a known one"
+msgstr ""
+
+#. TRANSLATORS Lint hint that reaches the known plural
+#: lib/lint.php:151
+msgid "Lint %n known file..."
+msgid_plural "Lint %n known files..."
+msgstr[0] ""
+msgstr[1] ""
+
+#: lib/lint.py:5
+msgid "Lint python %n items"
+msgstr ""
+
+#: lib/lint.py:6
+#, python-format
+msgid "Lint python moved %s to %s"
+msgstr ""
+
+#: lib/lint.py:7
+#, python-format
+msgid "Lint python locked for %d seconds"
+msgstr ""
+
+#: lib/lint.py:8
+msgid "Lint python import calendar"
+msgid_plural "Lint python import calendars"
+msgstr[0] ""
+msgstr[1] ""
+
+#: lib/lint.py:9
+msgid "Lint python string with a trailing hint"
+msgstr ""
+
+#. TRANSLATORS Lint python trailing hint
+#: lib/lint.py:10
+msgid "Lint python string that gets the trailing hint"
+msgstr ""
+
+#: lib/lint.py:11
+msgid "Lint python string with a hint without a space"
+msgstr ""
+
+#. TRANSLATORS Lint python hint without a space
+#: lib/lint.py:12
+msgid "Lint python string that gets the hint without a space"
+msgstr ""
+
+#: lib/lint.py:15
+#, python-format
+msgid "Lint python %(count)d file"
+msgid_plural "Lint python %(count)d files"
+msgstr[0] ""
+msgstr[1] ""
+
+#: lib/lint.py:16
+#, python-format
+msgid "Lint python moved %(source)s to %(target)s"
+msgstr ""
+
#. TRANSLATORS PHP string with plain text
#: lib/php.php:13
msgid "PHP String"
@@ -47,82 +544,283 @@ msgid_plural "PHP %n Plurals with positional %1$s"
msgstr[0] ""
msgstr[1] ""
-#: specialVueFakeDummyForL10nScript.js:8
+#: specialAppInfoFakeDummyForL10nScript.php:2
+msgid "Tests"
+msgstr ""
+
+#: specialAppInfoFakeDummyForL10nScript.php:3
+msgid "Lint navigation for all files at 100%"
+msgstr ""
+
+#: specialAppInfoFakeDummyForL10nScript.php:4
+msgid ""
+"\n"
+"\t\tLint summary...\n"
+"\t"
+msgstr ""
+
+#: specialAppInfoFakeDummyForL10nScript.php:5
+msgid ""
+"Lint description of the test app\n"
+"with a second line, using 50% of the space for %name"
+msgstr ""
+
+#. TRANSLATORS src/first-line.vue:1
+#: specialVueFakeDummyForL10nScript.js:2
+msgid "Lint string on the first line"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:3
+msgid "Lint inline script string..."
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:4
+msgid "Lint setup script string..."
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:10
+msgid "Lint script string..."
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:13
+msgid "Lint known script string..."
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:17
+msgid "Lint 50% users"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:17
+msgid "Lint the %uid placeholder"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:21
+msgid "Lint script string below a hash in a string"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:25
+#, javascript-format
+msgid "Lint copied %s files"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:26
+msgid "Lint hello {0}"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:27
+msgid "Lint delete file from {folder}"
+msgid_plural "Lint delete files from {folder}"
+msgstr[0] ""
+msgstr[1] ""
+
+#: specialVueFakeDummyForL10nScript.js:28
+msgid "Lint hello {name}"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:29
+msgid "Lint deleted %n items"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:30
+msgid "Lint hello {{name}}"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:31
+msgid "Lint locked for {seconds} seconds"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:32
+msgid "Lint one item"
+msgid_plural "Lint %n items"
+msgstr[0] ""
+msgstr[1] ""
+
+#. TRANSLATORS Lint inline script hint
+#: specialVueFakeDummyForL10nScript.js:33
+msgid "Lint script string with an inline hint"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:35
+msgid "Lint call {phoneNumber}"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:36
+msgid "Lint script string with a hint before a comma"
+msgstr ""
+
+#. TRANSLATORS Lint script hint before a comma
+#: specialVueFakeDummyForL10nScript.js:37
+msgid "Lint script string that gets the hint before a comma"
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:7
+#: specialVueFakeDummyForL10nScript.js:44
+msgid "Lint template string..."
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:9
+#: specialVueFakeDummyForL10nScript.js:46
+msgid "Lint string at the start of a line..."
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:14
+#: specialVueFakeDummyForL10nScript.js:48
+msgid "Lint template string with a misspelled hint"
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:15
+#: specialVueFakeDummyForL10nScript.js:50
+msgid "Lint link to the translators section"
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:16
+#: specialVueFakeDummyForL10nScript.js:52
+msgid "Lint headline in a template"
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:17
+#: specialVueFakeDummyForL10nScript.js:54
+#: specialVueFakeDummyForL10nScript.js:56
+msgid "Lint repeated template string"
+msgstr ""
+
+#. TRANSLATORS Lint template hint on the line of the string
(src/lint.vue:20)
+#: specialVueFakeDummyForL10nScript.js:58
+msgid "Lint template string with a hint on its line"
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:23
+#: specialVueFakeDummyForL10nScript.js:60
+msgid "Lint template string after a blank line"
+msgstr ""
+
+#. TRANSLATORS Lint hint that also reaches the next line (src/lint.vue:24)
+#: specialVueFakeDummyForL10nScript.js:62
+msgid "Lint template string with a hint for itself"
+msgstr ""
+
+#. TRANSLATORS Lint hint that also reaches the next line (src/lint.vue:25)
+#: specialVueFakeDummyForL10nScript.js:64
+msgid "Lint template string that gets the hint of the line above"
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:26
+#: specialVueFakeDummyForL10nScript.js:66
+#: specialVueFakeDummyForL10nScript.js:70
+msgid "Lint template string used twice"
+msgstr ""
+
+#. TRANSLATORS Lint hint that stays on its line (src/lint.vue:27)
+#: specialVueFakeDummyForL10nScript.js:68
+msgid "Lint template string between"
+msgstr ""
+
+#. TRANSLATORS Lint hint for the first of two lines (src/lint.vue:29)
+#: specialVueFakeDummyForL10nScript.js:72
+msgid "Lint template string before one with its own hint"
+msgstr ""
+
+#. TRANSLATORS Lint hint for the second of two lines (src/lint.vue:30)
+#: specialVueFakeDummyForL10nScript.js:74
+msgid "Lint template string with its own hint"
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:32
+#: specialVueFakeDummyForL10nScript.js:76
+msgid "Lint template call at the start of a line with a hint"
+msgstr ""
+
+#. TRANSLATORS Lint hint after a call at the start of a line (src/lint.vue:34)
+#: specialVueFakeDummyForL10nScript.js:78
+msgid "Lint template string after a call at the start of a line"
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:36
+#: specialVueFakeDummyForL10nScript.js:80
+msgid "Lint template attribute at the start of a line"
+msgstr ""
+
+#. TRANSLATORS src/lint.vue:39
+#: specialVueFakeDummyForL10nScript.js:82
+msgid "Lint template string after a hint on its line"
+msgstr ""
+
+#: specialVueFakeDummyForL10nScript.js:90
msgid "one string"
msgid_plural "%n strings"
msgstr[0] ""
msgstr[1] ""
#. TRANSLATORS VUE string with plain text (src/vue.vue:8)
-#: specialVueFakeDummyForL10nScript.js:17
+#: specialVueFakeDummyForL10nScript.js:99
msgid "VUE String"
msgstr ""
#. TRANSLATORS VUE string with parameters (src/vue.vue:10)
-#: specialVueFakeDummyForL10nScript.js:19
+#: specialVueFakeDummyForL10nScript.js:101
msgid "VUE String with inline {parameter}"
msgstr ""
#. TRANSLATORS VUE string with wrapped parameters (src/vue.vue:12)
-#: specialVueFakeDummyForL10nScript.js:21
+#: specialVueFakeDummyForL10nScript.js:103
msgid "VUE String with wrapped {parameter}"
msgstr ""
#. TRANSLATORS VUE Fix for https://github.com/nextcloud/docker-ci/pull/663 - Part 1 (src/vue.vue:26)
-#: specialVueFakeDummyForL10nScript.js:23
+#: specialVueFakeDummyForL10nScript.js:105
msgid "VUE String testing"
msgstr ""
-#: specialVueFakeDummyForL10nScript.js:23
+#: specialVueFakeDummyForL10nScript.js:105
msgid "VUE String not"
msgstr ""
#. TRANSLATORS src/vue.vue:31
-#: specialVueFakeDummyForL10nScript.js:25
+#: specialVueFakeDummyForL10nScript.js:107
msgid "test"
msgstr ""
#. TRANSLATORS VUE Fix for https://github.com/nextcloud/docker-ci/pull/663 - Part 2 (src/vue.vue:29)
-#: specialVueFakeDummyForL10nScript.js:27
+#: specialVueFakeDummyForL10nScript.js:109
msgid "VUE String with followup double quotes"
msgstr ""
#. TRANSLATORS VUE plural with plain text (src/vue.vue:17)
-#: specialVueFakeDummyForL10nScript.js:29
+#: specialVueFakeDummyForL10nScript.js:111
msgid "VUE %n Plural"
msgid_plural "VUE %n Plurals"
msgstr[0] ""
msgstr[1] ""
#. TRANSLATORS VUE plural with wrapped parameters (src/vue.vue:21)
-#: specialVueFakeDummyForL10nScript.js:33
+#: specialVueFakeDummyForL10nScript.js:115
msgid "VUE %n Plural with wrapped %s"
msgid_plural "VUE %n Plurals with wrapped %s"
msgstr[0] ""
msgstr[1] ""
#. TRANSLATORS src/vue.vue:32
-#: specialVueFakeDummyForL10nScript.js:35
+#: specialVueFakeDummyForL10nScript.js:117
msgid "one test"
msgid_plural "%n tests"
msgstr[0] ""
msgstr[1] ""
-#: specialVueFakeDummyForL10nScript.js:37
+#: specialVueFakeDummyForL10nScript.js:119
msgid "String in \"setup\" script section"
msgstr ""
-#: specialVueFakeDummyForL10nScript.js:44
+#: specialVueFakeDummyForL10nScript.js:126
msgid "String in non-setup script section"
msgstr ""
#. TRANSLATORS src/zz-vue-setup.vue:7
-#: specialVueFakeDummyForL10nScript.js:50
+#: specialVueFakeDummyForL10nScript.js:132
msgid "String in template part"
msgstr ""
#. TRANSLATORS VUE plural with parameters (src/vue.vue:19)
-#: specialVueFakeDummyForL10nScript.js:31
+#: specialVueFakeDummyForL10nScript.js:113
msgid "VUE %n Plural with %s"
msgid_plural "VUE %n Plurals with %s"
msgstr[0] ""
@@ -210,3 +908,54 @@ msgid "TS %n Plural with wrapped %s"
msgid_plural "TS %n Plurals with wrapped %s"
msgstr[0] ""
msgstr[1] ""
+
+#: src/with space/space.js:6
+#, javascript-format
+msgid "Lint script string in a folder with a space %s"
+msgstr ""
+
+#: templates/lint.php:10
+msgid "Lint template string before an HTML comment"
+msgstr ""
+
+#: templates/lint.php:11
+msgid "Lint template string after an HTML comment"
+msgstr ""
+
+#: templates/lint.php:13
+msgid "Lint template string below an HTML comment"
+msgstr ""
+
+#: templates/lint.php:15
+msgid "Lint template string below an HTML note"
+msgstr ""
+
+#: templates/lint.php:17
+msgid "Lint template string below a link"
+msgstr ""
+
+#: templates/lint.php:19
+msgid "Lint template string below a PHP comment"
+msgstr ""
+
+#: templates/lint.php:20
+msgid "Lint template string before a PHP hint"
+msgstr ""
+
+#. TRANSLATORS Lint PHP hint before the end tag
+#: templates/lint.php:21
+msgid "Lint template string that gets the PHP hint"
+msgstr ""
+
+#: templates/lint.php:22
+msgid "Lint template string before a PHP note"
+msgstr ""
+
+#: templates/lint.php:23
+msgid "Lint template string after a PHP note"
+msgstr ""
+
+#. TRANSLATORS Lint hint in a template tag
+#: templates/lint.php:25
+msgid "Lint template string below a hint in a tag"
+msgstr ""
diff --git a/translations/translationtool/tests/lib/lint.php b/translations/translationtool/tests/lib/lint.php
new file mode 100644
index 00000000..8533b342
--- /dev/null
+++ b/translations/translationtool/tests/lib/lint.php
@@ -0,0 +1,151 @@
+t('Lint loading...');
+$l->t('Lint saving …');
+$l->t('Lint don’t panic');
+$l->t('Lint error: ');
+$l->t('Lint option A | option B');
+$l->t('Lint we don\'t know');
+$l->t('Lint can not connect');
+$l->t('Lint unknown id {id}', ['id' => 1]);
+$l->t('Lint click here');
+$l->n('Lint import calendar', 'Lint import calendars', 2);
+$l->t('Lint delete %n items');
+$l->t('Lint moved %s to %s', ['a', 'b']);
+$l->t('Lint ask your administrator');
+$l->t('Lint invite users');
+$l->n('Lint %n folder...', 'Lint %n folders...', 2);
+$l->n('Lint moved %n file to %s', 'Lint moved %n files from %s to %s', 2, ['a', 'b']);
+$l->t('Lint use %name% for the name', ['%name%' => 'Alice']);
+$l->n('Lint delete file from %s', 'Lint delete files from %s', 2, ['a']);
+$l->t('Lint moved %1$s and %s', ['a', 'b']);
+$l->t('Lint locked for %d seconds', [5]);
+// TRANSLATORS Lint hint that only reaches the first string of the line
+$lint = [$l->t('Lint save the changes'), $l->t('Lint discard the changes')];
+// Translators: Lint hint that xgettext does not extract
+$l->t('Lint misspelled hint');
+$l->t(
+ // translators: Lint hint directly above the string of a call on several lines
+ 'Lint call on several lines'
+);
+// translators: Lint hint with a blank line before the call
+
+$l->t('Lint string after a blank line');
+$l->t('Lint progress at 50%');
+/** translators: Lint docblock hint */
+$l->t('Lint string after a docblock');
+$l->t('Lint string with a trailing hint'); // TRANSLATORS Lint hint that xgettext gives to the next line
+$l->t('Lint string that gets the trailing hint');
+$l->t(/* TRANSLATORS Lint inline hint */ 'Lint string with an inline hint');
+/* TRANSLATORS Lint hint before the code */ $l->t('Lint string after a hint on its line');
+$l->t('Lint moved %1$s to %2$s');
+$lint = [$l->t('Lint first of two strings'), $l->t(/* TRANSLATORS Lint hint for the second string */ 'Lint second of two strings')];
+$l->t('Lint enter the address as @');
+$l->t('Lint see https://example.com/details?id=app for the app');
+$l->t('Lint padded %1$\'*10s name', ['a']);
+// TRANSLATORS Lint comment of two occurrences
+$l->t('Lint string with the same comment twice');
+$l->t('Lint string with the same comment twice'); // TRANSLATORS Lint comment of two occurrences
+$l->t('Lint string that gets the comment of two occurrences');
+$l->t(/* TRANSLATORS Lint inline hint before a trailing one */ 'Lint string with two hints'); // TRANSLATORS Lint trailing hint after an inline one
+$l->t('Lint string that gets the trailing hint after an inline one');
+$l->t('Lint string with a note before the tag'); // Note, TRANSLATORS Lint hint after a note
+$l->t('Lint string that gets the hint after a note');
+// Note for translators: Lint hint that xgettext does not find
+$l->t('Lint string below a note for translators');
+$l->t('Lint string with a hint before another comment'); /* TRANSLATORS Lint hint before another comment */ // note
+$l->t('Lint string that gets the hint before another comment');
+/* translators: Lint misspelled hint over
+ two lines */
+$l->t('Lint string below a misspelled hint over two lines');
+/* TRANSLATORS Lint hint over
+ two lines for the first string */
+$lint = [$l->t('Lint first string below a hint over two lines'), $l->t('Lint second string below a hint over two lines')];
+// Use the translator of the recipient
+$l->t('Lint string below a comment about the translator');
+/* Note
+ for translators: Lint misspelled hint inside a block */
+$l->t('Lint string below a note inside a block');
+$l->t('Lint string with a hint before code') /* TRANSLATORS Lint hint before code */;
+$l->t('Lint string that gets the hint before code');
+/**
+ * translator keep it short: Lint misspelled hint on a docblock line
+ */
+$l->t('Lint string below a misspelled docblock');
+$lint = [
+ /* TRANSLATORS Lint unit */ 'kb' => $l->t('Lint KB'),
+ /* TRANSLATORS Lint unit */ 'mb' => $l->t('Lint MB'),
+ 'gb' => $l->t(/* TRANSLATORS Lint size */ 'Lint GB'),
+ 'tb' => $l->t(/* TRANSLATORS Lint size */ 'Lint TB'),
+];
+$l->t('Lint string with a trailing hint in a run'); // TRANSLATORS Lint hint at the start of a run
+// TRANSLATORS Lint hint of the string below the run
+$l->t('Lint string below a run');
+$l->t('Lint string with a block hint over two lines'); /* TRANSLATORS Lint block hint
+ over two lines */
+$l->t('Lint string below a block hint over two lines');
+$lint = $l->t(
+ 'Lint moved %1$s to %2$s in a call over several lines',
+ ['a', 'b'],
+); // TRANSLATORS Lint hint after a call over several lines
+$l->t('Lint string after a call over several lines');
+$lint = [$l->t('Lint first string before a trailing hint'), $l->t('Lint second string before a trailing hint')]; // TRANSLATORS Lint hint after two strings
+$l->t('Lint string after two strings with a trailing hint');
+// Note, TRANSLATORS Lint hint after a note on its own line
+$l->t('Lint string below a note with a tag');
+$lint = [ // TRANSLATORS Lint hint after an opening bracket
+ $l->t('Lint string after an opening bracket'),
+];
+$lint = $l->t( // TRANSLATORS Lint hint after an opening call
+ 'Lint string after an opening call',
+);
+$lint = $l->t('Lint string before a plain string') /* TRANSLATORS Lint hint before a plain string */ . ': ';
+$l->t('Lint string that gets the hint before a plain string');
+$lint = $l->t('Lint headline') . ':';
+$lint = $l->t('Lint enable') . ' ' . $l->t('Lint dark mode');
+$l->n('Lint one file', 'Lint %n files', 2);
+$l->t('Lint you\'re done');
+$l->t('Lint copy the ids');
+$l->t('Lint the ‘ sign');
+$l->t("Lint loading\t…");
+$l->t('Lint click here');
+
+// Strings following the translation guidelines
+$l->t('Lint loading …');
+$l->t('Lint moved %1$s to %2$s', ['a', 'b']);
+$l->t('Lint contact {id}', ['id' => 1]);
+$l->t('Lint {user} joined', ['user' => 'Alice']);
+$l->t('Lint shown as %%d for %s', ['a']);
+$l->n('Lint %n file in %1$s', 'Lint %n files in %1$s', 2, ['a']);
+// TRANSLATORS Lint hint on its own line
+$l->t('Lint string with its own hint');
+$l->t('Lint the user interface');
+$l->t('Lint this can not only be fast');
+// TRANSLATORS Lint hint for one occurrence of a string
+$l->t('Lint string used twice');
+$lint = [$l->t('Lint first string of its line'), $l->t('Lint string used twice')];
+// translators: Lint comment that xgettext drops, because the call starts on the line below
+$l->t(
+ 'Lint string below the call'
+);
+// translators: Lint comment above code, which xgettext drops
+$lintValue = 2; // Lint trailing comment
+$l->t('Lint string after a trailing comment');
+
+// Already in the base checkout, not reported with --base
+$l->t('Lint new string above a known one'); // TRANSLATORS Lint hint that reaches the known string
+$l->t('Lint already known...');
+$lint = $l->t(
+ 'Lint new string in a call above a known one',
+); // TRANSLATORS Lint hint that reaches the known plural
+$l->n('Lint %n known file...', 'Lint %n known files...', 2);
diff --git a/translations/translationtool/tests/lib/lint.py b/translations/translationtool/tests/lib/lint.py
new file mode 100644
index 00000000..a9d62a16
--- /dev/null
+++ b/translations/translationtool/tests/lib/lint.py
@@ -0,0 +1,16 @@
+# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
+# SPDX-License-Identifier: AGPL-3.0-or-later
+
+# Strings against the translation guidelines, reported in expected-lint.txt
+_('Lint python %n items')
+_('Lint python moved %s to %s') % ('a', 'b')
+_('Lint python locked for %d seconds') % 5
+_n('Lint python import calendar', 'Lint python import calendars', 2)
+_('Lint python string with a trailing hint') # TRANSLATORS Lint python trailing hint
+_('Lint python string that gets the trailing hint')
+_('Lint python string with a hint without a space') #TRANSLATORS Lint python hint without a space
+_('Lint python string that gets the hint without a space')
+
+# Strings following the translation guidelines
+_n('Lint python %(count)d file', 'Lint python %(count)d files', 2) % {'count': 2}
+_('Lint python moved %(source)s to %(target)s') % {'source': 'a', 'target': 'b'}
diff --git a/translations/translationtool/tests/src/first-line.vue b/translations/translationtool/tests/src/first-line.vue
new file mode 100644
index 00000000..56fe3d4e
--- /dev/null
+++ b/translations/translationtool/tests/src/first-line.vue
@@ -0,0 +1 @@
+{{ t('test', 'Lint string on the first line') }}
diff --git a/translations/translationtool/tests/src/first-line.vue.license b/translations/translationtool/tests/src/first-line.vue.license
new file mode 100644
index 00000000..8c5ffd52
--- /dev/null
+++ b/translations/translationtool/tests/src/first-line.vue.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
+SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/translations/translationtool/tests/src/lint-scripts.vue b/translations/translationtool/tests/src/lint-scripts.vue
new file mode 100644
index 00000000..23bce66f
--- /dev/null
+++ b/translations/translationtool/tests/src/lint-scripts.vue
@@ -0,0 +1,8 @@
+
+
+
diff --git a/translations/translationtool/tests/src/lint.vue b/translations/translationtool/tests/src/lint.vue
new file mode 100644
index 00000000..ab39f13a
--- /dev/null
+++ b/translations/translationtool/tests/src/lint.vue
@@ -0,0 +1,78 @@
+
+
+
+ {{ t('test', 'Lint template string...') }}
+
+ {{
+t('test', 'Lint string at the start of a line...')
+ }}
+
+
+ {{ t('test', 'Lint template string with a misspelled hint') }}
+ {{ t('test', 'Lint link to the translators section') }}
+ {{ t('test', 'Lint headline in a template') }}:
+ {{ t('test', 'Lint repeated template string') }}
+
+ {{ t('test', 'Lint repeated template string') }}
+ {{ t('test', 'Lint template string with a hint on its line') }}
+
+
+ {{ t('test', 'Lint template string after a blank line') }}
+ {{ t('test', 'Lint template string with a hint for itself') }}
+ {{ t('test', 'Lint template string that gets the hint of the line above') }}
+ {{ t('test', 'Lint template string used twice') }}
+ {{ t('test', 'Lint template string between') }}
+ {{ t('test', 'Lint template string used twice') }}
+ {{ t('test', 'Lint template string before one with its own hint') }}
+ {{ t('test', 'Lint template string with its own hint') }}
+
+ {{
+t('test', 'Lint template call at the start of a line with a hint') }}
+ {{ t('test', 'Lint template string after a call at the start of a line') }}
+
+
+
+ {{ t('test', 'Lint template string after a hint on its line') }}
+
+
+
diff --git a/translations/translationtool/tests/src/themes/tests/l10n/.gitkeep b/translations/translationtool/tests/src/themes/tests/l10n/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/translations/translationtool/tests/src/with space/space.js b/translations/translationtool/tests/src/with space/space.js
new file mode 100644
index 00000000..0c4b49b4
--- /dev/null
+++ b/translations/translationtool/tests/src/with space/space.js
@@ -0,0 +1,6 @@
+/**
+ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+t('test', 'Lint script string in a folder with a space %s')
diff --git a/translations/translationtool/tests/templates/lint.php b/translations/translationtool/tests/templates/lint.php
new file mode 100644
index 00000000..a6006ec6
--- /dev/null
+++ b/translations/translationtool/tests/templates/lint.php
@@ -0,0 +1,25 @@
+
+t('Lint template string before an HTML comment')); ?>
+t('Lint template string after an HTML comment')); ?>
+
+t('Lint template string below an HTML comment')); ?>
+
+t('Lint template string below an HTML note')); ?>
+
+t('Lint template string below a link')); ?>
+
+t('Lint template string below a PHP comment')); ?>
+t('Lint template string before a PHP hint')); /* TRANSLATORS Lint PHP hint before the end tag */ ?>
+t('Lint template string that gets the PHP hint')); ?>
+t('Lint template string before a PHP note')); // note ?>
+t('Lint template string after a PHP note')); ?>
+
+t('Lint template string below a hint in a tag')); ?>
diff --git a/translations/translationtool/tests/test.sh b/translations/translationtool/tests/test.sh
index 4675bce9..5321ee53 100644
--- a/translations/translationtool/tests/test.sh
+++ b/translations/translationtool/tests/test.sh
@@ -40,3 +40,22 @@ if ! [[ "$CHANGED_LINES" = "0" ]]; then
git diff expected-check-files.txt
exit 1
fi
+
+# Lint the source strings missing in the base checkout, as plain text and as GitHub annotations, then all of them
+lint() {
+ php ../src/translationtool.php lint-source-strings "$@"
+ echo "exit $?"
+}
+{
+ lint --base=../tests-base
+ lint --base=../tests-base --format=github
+ lint
+} | grep -E ': (error|warning): |^::|source strings$|^exit ' > expected-lint.txt
+
+CHANGED_LINES=$(git diff expected-lint.txt | wc -l)
+
+if ! [[ "$CHANGED_LINES" = "0" ]]; then
+ echo 'Lint result changed'
+ git diff expected-lint.txt
+ exit 1
+fi
diff --git a/translations/translationtool/translationtool.phar b/translations/translationtool/translationtool.phar
index 5f7b2043..788e3663 100755
Binary files a/translations/translationtool/translationtool.phar and b/translations/translationtool/translationtool.phar differ