-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Touch #12
- Loading branch information
Showing
5 changed files
with
261 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Pootle FS Documentation | ||
======================= | ||
|
||
Pootle FS app provides a plugin framework for synchronizing external | ||
filesystems containing localisation files. | ||
|
||
An FS can be either a local filesystem or a VCS system such as git, svn, hg or | ||
cvs. | ||
|
||
The app uses a configuration syntax to create associations between Pootle | ||
``Stores`` and file stores. The stores can then be synced and changes in either | ||
can be tracked. | ||
|
||
Syncing is a 2-step process in which changes to Stores/files are initially | ||
staged with any or all of: | ||
|
||
- ``add_translations`` | ||
- ``fetch_translations`` | ||
- ``rm_translations`` | ||
- ``merge_translations`` | ||
|
||
Changes to previously synced Stores/files are automatically staged for | ||
synchronisation, where no conflict exists. | ||
|
||
Once the desired changes have been staged ``sync_translations`` is called to | ||
perform the synchronisation. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
configuration | ||
workflow | ||
commands | ||
status | ||
responses | ||
plugins/git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.. _pootle_fs_git: | ||
|
||
Pootle FS Git plugin | ||
-------------------- | ||
|
||
Installation | ||
============ | ||
|
||
Currently only available for developer install: | ||
|
||
`<https://github.com/translate/pootle_fs_git>`_ | ||
|
||
|
||
The core pootle_fs app is also required (also dev only): | ||
|
||
`<https://github.com/translate/pootle_fs>`_ | ||
|
||
|
||
Currently also requires the ``no_mtime`` branch of pootle: | ||
|
||
`<https://github.com/phlax/pootle/tree/no_mtime>`_ | ||
|
||
|
||
Pootle configuration | ||
==================== | ||
|
||
.. code-block:: bash | ||
(env) $ pootle fs MYPROJECT set_fs git GIT_URL | ||
``MYPROJECT`` should be the name of a project in your Pootle site. | ||
|
||
``GIT_URL`` should be git ssh url. | ||
|
||
|
||
Git authentication | ||
================== | ||
|
||
Currently only ssh authentication is supported. | ||
|
||
The user running the pootle commands therefore must have a working ssh | ||
environment and read/write access to the git repository in order to synchronize. | ||
|
||
|
||
Custom .pootle.ini options | ||
========================== | ||
|
||
When using the git pootle_fs plugin there are some git-specific options | ||
|
||
.. code-block:: bash | ||
[default] | ||
commit_message = "A custom commit message..." | ||
author_name = "My Self" | ||
author_email = "[email protected]" | ||
committer_name = "Pootle Server" | ||
committer_email = "[email protected]" | ||
Further reading | ||
=============== | ||
|
||
- `Workflow <../workflow.rst>`_ | ||
- `Status <../status.rst>`_ | ||
- `Commands <../commands.rst>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,128 @@ | ||
.. _workflow: | ||
|
||
Pootle FS Workflow | ||
------------------ | ||
Pootle filesystem Workflow | ||
-------------------------- | ||
|
||
|
||
Syncing previously synced Stores/files | ||
====================================== | ||
|
||
Pulling translation files from FS to Pootle | ||
=========================================== | ||
When a ``Store`` and corresponding file have been synced previously, they are | ||
automatically staged for syncing if either changes. | ||
|
||
This is not the case however if both have changed - see resolving conflicts | ||
section for further information. | ||
|
||
To re-sync ``Stores`` and files: | ||
|
||
Pushing translation files from Pootle to FS | ||
=========================================== | ||
.. code-block:: bash | ||
(env) $ pootle fs myproject sync_translations | ||
Pulling new translation files from the filesystem to Pootle | ||
=========================================================== | ||
|
||
The workflow for bringing new translations from the filesystem into Pootle is: | ||
|
||
.. code-block:: bash | ||
(env) $ pootle fs myproject fetch_translations | ||
(env) $ pootle fs myproject sync_translations | ||
Where ``fetch_translations`` will stage the new translations, and | ||
``sync_translations`` will actually sync to the database. | ||
|
||
.. note:: You can fetch/sync specific ``Stores`` or files, or groups of them | ||
using the ``-P`` and ``-p`` options to fetch_translations and | ||
sync_translations. | ||
|
||
|
||
Pushing new translation files from Pootle to the filesystem | ||
=========================================================== | ||
|
||
The workflow for sending translations from Pootle to the filesystem: | ||
|
||
.. code-block:: bash | ||
(env) $ pootle fs myproject add_translations | ||
(env) $ pootle fs myproject sync_translations | ||
Where ``add_translations`` will stage the new translations, and | ||
``sync_translations`` will actually sync to the filesystem. | ||
|
||
.. note:: You can add/sync specific ``Stores`` or files, or groups of them | ||
using the ``-P`` and ``-p`` options to add_translations and | ||
sync_translations. | ||
|
||
|
||
Resolving conflicts | ||
=================== | ||
|
||
Conflicts can occur if both a Pootle ``Store`` and the corresponding file have | ||
changed. | ||
|
||
Conflict can also arise if a new Pootle ``Store`` is added and a matched file | ||
has been added in the filesystem. | ||
|
||
|
||
Resolving conflicts - overwriting Pootle with filesystem version | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
If you wish to keep the version that is currently on the filesystem, | ||
discarding all changes in Pootle, you can do the following: | ||
|
||
.. code-block:: bash | ||
(env) $ pootle fs myproject fetch_translations --force | ||
(env) $ pootle fs myproject sync_translations | ||
Resolving conflicts - overwriting filesystem with Pootle version | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
If you wish to keep the version that is currently in Pootle, | ||
discarding all changes in the filesystem, you can do the following: | ||
|
||
.. code-block:: bash | ||
(env) $ pootle fs myproject add_translations --force | ||
(env) $ pootle fs myproject sync_translations | ||
Resolving conflicts - merging | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
In order to merge the changes made in both Pootle and the filesystem, you can: | ||
|
||
.. code-block:: bash | ||
(env) $ pootle fs myproject merge_translations | ||
(env) $ pootle fs myproject sync_translations | ||
When merging if there are conflicts in translation units the default behaviour | ||
is to keep the filesystem version, and make the Pootle version into a suggestion. | ||
|
||
You can reverse this behaviour as follows: | ||
|
||
.. code-block:: bash | ||
(env) $ pootle fs myproject merge_translations --pootle-wins | ||
(env) $ pootle fs myproject sync_translations | ||
Removing files/Stores | ||
===================== | ||
^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Sometimes a ``Store`` or file is unmatched on the other side, either because it | ||
is newly added or because a ``Store`` or file has been removed. | ||
|
||
You can remove ``Stores`` or files that do not have a corresponding match: | ||
|
||
.. code-block:: bash | ||
(env) $ pootle fs myproject rm_translations | ||
(env) $ pootle fs myproject sync_translations | ||
This will not affect any other ``Stores`` or files. |