Jump to content

Sandbox:C4e

From FreeCAD Documentation
This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Personal Sandbox[edit | edit source]

This is the personal sandbox of C4e.


Current work[edit | edit source]

Current work an adding information to Translating_an_external_workbench

Needed tools[edit | edit source]

To gather all the Strings from your module you can start with a command line tool called lupdate.

The lupdate command line tool finds translatable strings in C++ source, C++ header, Java, Python, QML, and UI files and generates or updates TS files.

—Qt Group, [Qt linguist manual], Using lupdate

The Qt for open source use can be downloaded from here.

Linux[edit | edit source]

The most common Linux distributions have PySide Binaries packaged in their repositories. An overview is listed in the Qt wiki.

If there is no packaged version available it can be installed via Python with the pip command, e.g. pip install pyside6. Therefore you have to install pip first.


macOS[edit | edit source]

There are two mac plattform versions. The newer Apple Silicon (arm64) and the older Intel (x86) one.

You can either install the Qt for open source version like described above, or use the Homebrew version of pyside.

The current Qt is built against intel based libraries, therefore you have to install Rosetta on arm64-based Macs.


Windows[edit | edit source]

On Windows the easiest way is the installation von the Qt for open source like described above.

The lupdate tool is located in the bin folder of the installation directory of the Qt kit, for example, C:\Qt\6.7.2\msvc2019_64\bin, on the 64-bit version of Windows.


Clean up the following paragraph!

  • You will need the lupdate, lconvert, lrelease and pylupdate tools installed on your system. In Linux distributions they usually come in packages named pyside-tools or pyside2-tools. On some systems lupdate is named lupdate4 or lupdate5 or lupdate-qt4 or similar. Same for the other tools. You may use the Qt4 or Qt5 version at your choice. In Qt6 there is no separate translation system for Python files, lupdate is used to extract strings from all types of source files.