-
Notifications
You must be signed in to change notification settings - Fork 4
Translation process
The translation process is divided with the following steps:
-
An author add plugin to the tool (
/plugin) (repository state: waiting) - See Add New Plugin Form -
two ways:
a. The author confirms the activation mail (
/plugin/{name}/activate/{key}) (repository state: initialProcessing)b. alternative: server admin adds plugin directly using
dokuwiki:addcommand (repository state: initialProcessing) -
Regular cronJob creates a remote fork and a local git clone of the extension from its Git repository
-
This regular cronJob process subsequently the translation files to a local format of serialized LocalText arrays
-
From now, a user can create a new translation (
/translate/plugin/<name>) - See Translation FormResults in TranslationUpdateEntity added with an id and state 'undone' and the translation stored in
[datafolder]/<type>/<name>/updates/<id>.update -
A 5 min cronjob will pick up the pending updates. In that process the translation is transformed to language file and send to the extension author.
Regulary Cronjobs:
-
Every 5 min:
For all repositories which: >agetoupdate,max updateperrun and <max errors perform:
Repository->update()
- basepath:
[datafolder]/<type>/<name>e.g.[datafolder]/plugin/indexmenu - create dir if not existing, set lock
- update from remote:
- if repository exists, pull changes and push to fork, else:
- create remote fork (if github) in the account https://github.com/dokuwiki-translate
- create local clone in
[datafolder]/<type>/<name>/repository - if fork or clone fails, delete whole
[datafolder]/<type>/<name>/folder
- if success:
- reset error count and last update time
- if 'initialProcessing' it set repository state to 'active' and sent extension ready mail
- if failed:
- set error and sent error mail
If Repository had changes, do update to language files stored locally from this repository:
- Retrieve extension or core specific array of folders with language files
- Search 'en/' and the other language folders in these folders
- Collect per language the files:
-
.php-files are parsed with LanguageFileParser as LocalText of type 'array', including an AuthorList -
.txt-files are parsed as LocalText of type 'markup'
-
- Use the RepositoryStats service to clear stats for this Repository
- Use the RepositoryStats service to create per language of the Repository a LanguageStatsEntity with a score
For all TranslationUpdateEntities with state 'undone'(i.e. stored translations from users) perform:
- get its Repository
- create patch and sent it
- make folder
[datafolder]/<type>/<name>/tmp - create local clone in
[datafolder]/<type>/<name>/tmp - get array with LocalText objects from
[datafolder]/<type>/<name>/updates/<id>.update - add for each LocalText a language file to local git
- commit the additions to local git
- remoteadd 'github', branch 'lang_update_', checkout, push to 'github'
- create pull request
- make folder
- if failed:
- set error and set error mail
- remove temporary folder
Finalize by sending all the mail in the spool.
- basepath:
-
At start of every day:
Update info from the (old) pluginrepo api and store serialized arrays of Repositories in
[datafolder]/dokuwikiRepositoryAPI.ser
Process
- Translation process
- CronJob overview triggers some commands.
- Commands for regular tasks and occasional maintenance
Files
Maintenance/development
- Deploying to Production is done from GitHub
- Development setup
- Maintenance
- Alternative Git interaction when setting up development setup
- Test steps for checking working of the tool
Documentation
- Components of Symphony used for the Tool
- More detail about using Doctrine
- Description working of the Forms