It's better when it's simple

User Tools

Site Tools


Translation Tool

Repository for Translate Tool Thingy

The commands used here are retrieved from .bash_history of the user translate. The documentation was done several years after the usage of them and might be incomplete. :!: Use your brain and read the logs :!:


:!: not complete see also and use your brain :!:

  • checkout code from github:
    git clone
  • install composer:
    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 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
  • rebuilt cache of Symfony framework
  • if there are changes to the translation object LocalText, LanguageFileParser, etc which are cached by the translation tool:
    php app/console dokuwiki:updateLanguages


:!: After every configuration change the cache has to be rebuild :!:

  • configuration for production:
        - { resource: config.yml }
                type:         fingers_crossed
                action_level: error
                handler:      nested
                type:  stream
                path:  %kernel.logs_dir%/%kernel.environment%.log
                level: debug
        trusted_hosts: ['.*\.?translate\.dokuwiki\.org$'
  • parameters for the application:
        # 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
        mailer_transport: smtp
        mailer_host: localhost
        mailer_user: null
        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
        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 -
        # Default locale. (there is just english)
        locale: en
        ## Feature flags
        featureImport: false
        featureAddTranslationFromDetail: false
        ## at path for symphony
        router.request_context.scheme: http


  • 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



  • login to server
  • change to translate user:
    sudo -i
    su translate
  • delete repository:
    cd htdocs
    php app/console dokuwiki:deleteRepo plugin <pluginname>



  • 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 to languageName.code:
    DELETE FROM languageStats WHERE language='langCode';
  • delete language based on language code:
    DELETE FROM languageName where code='langCode';


  • logfiles
    • /var/log/apache2/translate-access.log ⇒ apache access logs
    • /var/log/apache2/translate-error.log ⇒ apache error logs
    • DOC_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
  • to get a list of possible options and commands for the console-app run:
    php app/console list
teams/translate-tool.txt · Last modified: 2019-04-01 20:26 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki