Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions translations/translationtool/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
828 changes: 766 additions & 62 deletions translations/translationtool/src/translationtool.php

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions translations/translationtool/tests-base/appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<!--
- SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id>tests</id>
<name>Tests</name>
<summary>Base summary</summary>
</info>
Empty file.
15 changes: 15 additions & 0 deletions translations/translationtool/tests-base/lib/lint.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

$l = \OCP\Server::get(\OCP\IL10N::class);

// Base checkout for the lint test: strings that already exist are not reported
$l->t('Lint already known...');
$l->n('Lint %n known file...', 'Lint %n known files...', 2);
$l->n('Lint %n folder...', 'Lint %n folder...', 2);
14 changes: 14 additions & 0 deletions translations/translationtool/tests-base/src/lint.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
- SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

<script>
export default {
computed: {
known() {
return t('test', 'Lint known script string...')
},
},
}
</script>
21 changes: 21 additions & 0 deletions translations/translationtool/tests/appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<!--
- SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id>tests</id>
<name>Tests</name>
<summary>
Lint summary...
</summary> <!-- TRANSLATORS Lint comment that info.xml does not pass on -->
<description><![CDATA[Lint description of the test app
with a second line, using 50% of the space for %name]]></description>
<navigations>
<navigation>
<id>tests</id>
<name>Lint navigation for all files at 100%</name>
<route>tests.page.index</route>
</navigation>
</navigations>
</info>
291 changes: 291 additions & 0 deletions translations/translationtool/tests/expected-lint.txt

Large diffs are not rendered by default.

Loading