Skip to content

spyder-ide/gettext-helpers

Repository files navigation

Gettext-Helpers

Copyright © 2009–2012 Pierre Raybaut/CEA

Copyright © 2011- Gettext-Helpers Contributors

Licensed under the terms of the GNU General Public License Version 3.

Overview

Gettext-Helpers is originally based on a module and set of scripts from the GUIdata project by Pierre Raybaut, the original creator of Spyder, the Scientific Python Development Environment, and later adopted for use internally with building the translations for that project by current Spyder maintainer Carlos Cordoba and others, with additional improvements added during that time.

Finally, it was spun out into its own project for modularity and flexibility. However, its primary purpose remains to build the Spyder translation files.

Installation

Currently, you can just git clone the repository and call the scripts and functions locally on your project of choice, though you may want to put it on your PATH/PYTHONPATH first.

You will also need to install Firefox or Chrome to use as webdriver!

With pip

pip install selenium polib
python setup.py develop

With conda

conda install selenium polib -c spyder-ide
python setup.py develop

Usage

Go to the root of the repository you want to update:

To scan files and generate a *.pot file:

spyder-gettext scan <PATH_TO_ROOT_MODULE>

To create or update new language stubs:

spyder-gettext scan <PATH_TO_ROOT_MODULE> --target-lang es

To translate untranslated strings:

This uses selenium, the firefox webdriver and google translate

spyder-gettext translate <PATH_TO_ROOT_MODULE> --target-lang es

To compile translated files:

spyder-gettext compile <PATH_TO_ROOT_MODULE> --target-lang es

To create Crowdin configuration:

spyder-gettext scan <PATH_TO_ROOT_MODULE> --crowdin

Contributing

Everyone is welcome to help with Gettext-Helpers. Please read our contributing instructions to get started!

Credits

The original files were licensed under the terms of the CeCILL license 2.0; this derivative is released under the GNU General Public License 3.0 (or any later version) for greater license compatibility and clarity, to reduce pointless license proliferation, and to use an OSI-approved license. For older versions of the files originally covered by the CeCILL, the applicable license is the one listed in the header at the top of the files.

All current files are released under the GNU GPL version 3, although they may be based on or near-identical to MIT (Expat) licensed versions found elsewhere in the Spyder project, and thus can be used under those permissive terms as well if so desired.

About the Spyder IDE

Spyder is a powerful scientific environment written in Python, for Python, and designed by and for scientists, engineers and data analysts. It offers a unique combination of the advanced editing, analysis, debugging, and profiling functionality of a comprehensive development tool with the data exploration, interactive execution, deep inspection, and beautiful visualization capabilities of a scientific package.

Beyond its many built-in features, its abilities can be extended even further via its plugin system and API. Furthermore, Spyder can also be used as a PyQt5 extension library, allowing you to build upon its functionality and embed its components, such as the interactive console, in your own software.

For more general information about Spyder and to stay up to date on the latest Spyder news and information, please check out our website.

More information

Spyder Website

Download Spyder (with Anaconda)

Spyder Github

Support Spyder on OpenCollective

About

Helper functions and scripts for gettext translation in Python

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors

Languages