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 translationtool/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor
composer.phar
.vscode
16 changes: 16 additions & 0 deletions translationtool/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.PHONY: translationtool.phar

translationtool.phar: install-composer-deps
php -d phar.readonly=off vendor/bin/phar-composer build src
chmod +x translationtool.phar

install-composer-deps: composer.phar
php composer.phar install
php composer.phar install -d src

composer.phar:
curl -sS https://getcomposer.org/installer | php

clean:
rm -f translationtool.phar composer.lock src/composer.lock
rm -rf vendor src/vendor
16 changes: 16 additions & 0 deletions translationtool/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Nextcloud translation tool

This tool is used to extract translatable texts from the source code and to create translation files that can be used by Nextcloud.

## Generating PO files

To extract the texts from the source code and create a pot file simply go to the folder of your app and run
`php /path/to/translationhelper.phar create-pot-files`. Now the script will create a folder called *translationfiles*
and put the generated pot file in there. One pot file will be created for each app.

You'll find the pot files in *translationfiles/templates/$app.pot*

## Generating Nextcloud files

Once you have the translated po files under *translationfiles/$lang/$app.po* you can create the js and json files used by Nextcloud.
To do so run `php /path/to/translationhelper.phar convert-po-files`. The files are then put in the *l10n* folder of the apps.
13 changes: 13 additions & 0 deletions translationtool/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "nextcloud/translationtool",
"description": "Needed for the translation tool",
"license": "MIT",
"config": {
"vendor-dir": "vendor",
"optimize-autoloader": true,
"classmap-authoritative": true
},
"require": {
"clue/phar-composer": "^1.0"
}
}
Loading