Crowdin Scripts: Difference between revisions

From FreeCAD Documentation
(started page, saving for progress)
 
m (update)
Line 1: Line 1:
== Managing Translations for FreeCAD ==
== Managing Translations for FreeCAD ==
FreeCAD uses a 3rd party translation service called [https://crowdin.com/project/freecad Crowdin] to manage translations.

There are 3 scripts in <code>FreeCAD/src/Tools</code> that are used to manage translation files:
There are 3 scripts in <code>FreeCAD/src/Tools</code> that are used to manage translation files:
# <code>updatets.py</code> [https://github.com/FreeCAD/FreeCAD/blob/master/src/Tools/updatets.py (github source)]
# <code>updatets.py</code> [https://github.com/FreeCAD/FreeCAD/blob/master/src/Tools/updatets.py (github source)]
# <code>updatecrowdin.py</code> [https://github.com/FreeCAD/FreeCAD/blob/master/src/Tools/updatecrowdin.py (github source)]
# <code>updatecrowdin.py</code> [https://github.com/FreeCAD/FreeCAD/blob/master/src/Tools/updatecrowdin.py (github source)]
# <code>updatefromcrowdin.py</code> [https://github.com/FreeCAD/FreeCAD/blob/master/src/Tools/updatefromcrowdin.py (github source)]
# <code>updatefromcrowdin.py</code> [https://github.com/FreeCAD/FreeCAD/blob/master/src/Tools/updatefromcrowdin.py (github source)]

The first is <code>updatets.py</code> and it's job is to
These scripts are run from the root of the <code>FreeCAD/</code> directory.
Note: In order for these scripts to work one needs to have the valid FreeCAD Crowdin API key placed in their <code>~/.crowdin-freecad</code> file
=== updatets.py ===
This script will create the .ts files in your local <code>FreeCAD/</code> directory.

=== updatecrowdin.py ===
This script pushes changes to the Crowdin from your local <code>FreeCAD/</code> directory. The script currently supports 4 arguments:
* <code>updatecrowdin.py status</code> prints a status of the translations
* <code>updatecrowdin.py update</code> updates crowdin the current version of .ts files found in the source code
* <code>updatecrowdin.py build</code> builds a new downloadable package on crowdin with all trasnlated strings
* <code>updatecrowdin.py download</code> downloads the latest build

=== updatefromcrowdin.py ===
This script pulls changes from crowdin to your local <code>FreeCAD/</code> directory.

Revision as of 18:18, 13 June 2018

Managing Translations for FreeCAD

FreeCAD uses a 3rd party translation service called Crowdin to manage translations.

There are 3 scripts in FreeCAD/src/Tools that are used to manage translation files:

  1. updatets.py (github source)
  2. updatecrowdin.py (github source)
  3. updatefromcrowdin.py (github source)

These scripts are run from the root of the FreeCAD/ directory. Note: In order for these scripts to work one needs to have the valid FreeCAD Crowdin API key placed in their ~/.crowdin-freecad file

updatets.py

This script will create the .ts files in your local FreeCAD/ directory.

updatecrowdin.py

This script pushes changes to the Crowdin from your local FreeCAD/ directory. The script currently supports 4 arguments:

  • updatecrowdin.py status prints a status of the translations
  • updatecrowdin.py update updates crowdin the current version of .ts files found in the source code
  • updatecrowdin.py build builds a new downloadable package on crowdin with all trasnlated strings
  • updatecrowdin.py download downloads the latest build

updatefromcrowdin.py

This script pulls changes from crowdin to your local FreeCAD/ directory.