teams:translate-tool
This is an old revision of the document!
Table of Contents
Translate Tool Thingy
We are currently running the version of MichiTux with disabled language adding due to much spam.
Installation
not complete see also README.md and use your brain
- checkout code from github:
git clone https://github.com/...
- install composer:
export COMPOSER_PROCESS_TIMEOUT=3000 composer.phar install
- adapt configuration files
- don't know what these do but were run on installation:
php app/console assets:install --env=prod php app/console assetic:dump --env=prod
Update
Update are always needed when there is new code on github.
- login to server
- change to translate user:
sudo -i su translate cd ~/htdocs
- pull new code:
git pull
- if needed update dependencies:
composer update
- if there are changes to doctrine, update the schema:
php app/console doctrine:schema:update
Configuration
After every configuration change the cache has to be rebuild
- configuration for production:
- app/config/config_prod.yml
imports: - { resource: config.yml } monolog: handlers: main: type: fingers_crossed action_level: error handler: nested nested: type: stream path: %kernel.logs_dir%/%kernel.environment%.log level: debug framework: trusted_hosts: ['.*\.?translate\.dokuwiki\.org$'
- parameters for the application:
- app/config/parameters.yml
parameters: # Database configuration - see database_driver: pdo_mysql database_host: localhost database_port: null database_name: translate database_user: xxxxxx database_password: xxxxxx database_path: null # E-Mail configuration - see http://symfony.com/doc/current/cookbook/email/email.html#configuration mailer_transport: smtp mailer_host: localhost mailer_user: null mailer_from: translate@dokuwiki.org mailer_password: null # Hash salt secret: xxxxx # path to the git executable git_bin: /usr/bin/git # path to the data folder (must be writeable) data: /var/www/translate/data # time since last update per repository (sec) 86400 -> 1day # reprositoryUpdateAge: 86400 reprositoryUpdateAge: 7200 # max repositories to update per command run maxRepositoriesToUpdatePerRun: 10 # max number of import errors before ignoring a repository maxErrorCount: 3 # max time a git command can run in sec command_timeout: 120 # GitHub api token, see https://github.com/settings/applications git_hub_token: xxxxx # GitHub url # you can change this on a development environment to setup a second ssh key for a second git account without # messing up your environment - http://sampreshan.svashishtha.com/2012/05/20/quicktip-github-multiple-accounts-access-with-ssh/ git_hub_url: github.com # Default locale. (there is just english) locale: en ## Feature flags featureImport: false featureAddTranslationFromDetail: false ## at path for symphony router.request_context.host: translate.dokuwiki.org router.request_context.scheme: http
Cache
- login to server
- rebuilt cache:
sudo -i su translate cd ~/htdocs php app/console cache:clear --env=prod php app/console cache:warmup --env=prod
Plugin
delete
- login to server
- change to translate user:
sudo -i su translate
- delete repository:
cd cd htdocs php app/console dokuwiki:deleteRepo plugin <pluginname>
Languages
delete
- connect to database:
mysql -p translate
- list languages:
SELECT code from languageName;
- check whether which plugins use the language code:
SELECT * FROM languageStats WHERE language='langCode';
- delete all references between plugin and language code as
languageStats.language
is a foreign key tolanguageName.code
:DELETE FROM languageStats WHERE language='langCode';
- delete language based on language code:
DELETE FROM languageName where code='langCode';
Troubleshooting
- logfiles
/var/log/apache2/translate-access.log
⇒ apache access logs/var/log/apache2/translate-error.log
⇒ apache error logsDOC_ROOT/htdocs/app/logs/prod.log
⇒ application log for production environment
- sometimes the plugin importer stuck
- impacts
- no updates of translations are push to github
- no plugin updates are pulled from github
- solution
- login to server
- change to translate user:
sudo -i su translate cd ~/htdocs
- remove lock file of update process:
rm ../data/dokuwiki-importer.lock
- run update job manually:
php app/console dokuwiki:updateGit
- check the log files
teams/translate-tool.1431811947.txt.gz · Last modified: 2015-05-16 23:32 by andrwe