
* Large images optimizations * Add image and update instructions for junction deviation Added a new image illustrating the printer jerk limitation setting and updated the calibration documentation to clarify steps for setting Maximum Junction Deviation. Improved formatting and corrected a typo in the instructions. * Update README links to Wiki * Fix Wiki image paths + Typos * Fixes, typos and Infill improvements * Update VFA calibration guide and add resonance avoidance Expanded the VFA calibration documentation with more detailed explanations of VFA causes, the VFA Speed Test, and how to use the Resonance Avoidance Speed Range. Added a new image illustrating the resonance avoidance configuration. * Add surface density setting to top/bottom shells docs * Ironing Wiki Wip * Wall and surfaces wiki wip * Fix top/bottom link * Better topbottom reddirect * bridging wiki wip * Fix TOP bottom * Wall wiki wip * strength advanced wiki wip * speed advance renaming * inital speed wiki wip * Other Layer Speed Wiki Wip... * Speed overhang Wiki WIP * Travel speed wiki wip * Speed acceleration wiki wip * Update speed_settings_initial_layer_speed.md * Jerk Wiki Wip * support wiki wip * Raft wiki wip * support filamnet wiki wip * Support ironing wiki wip * Support advanced Wiki Wip * Tree wiki wip * STL images optimizations * Prime tower wiki wip * Update PA line diagram images Were bigger than original used to crop this ones. * Ooze wiki wip * Flush wiki wip * Image optimizatios * Clarify TPMS-D infill description Updated the TPMS-D infill section to specify that it refers to the Schwarz Diamond surface, improving clarity for users. Also updated the infill calculator spreadsheet. Co-Authored-By: Rodrigo <162915171+RF47@users.noreply.github.com> * images+++ * Multimaterial advanced Wiki Wip * Skirt Wiki Wip * Brim wiki wip * Add Junction Deviation formula to documentation Included the mathematical formula for Junction Deviation in the cornering calibration documentation to clarify its calculation. Co-Authored-By: Rodrigo <162915171+RF47@users.noreply.github.com> * Others special mode Wiki Wip Co-Authored-By: Rodrigo <162915171+RF47@users.noreply.github.com> * Fix links * Fill Multiline infill Wiki Introduced a new section in the infill documentation describing the Fill Multiline setting, its differences from other slicers, and its use cases. Added a comparison table and illustrative GIF to clarify how OrcaSlicer maintains density and material usage when using multiple infill lines. * Multiline infill wiki update Co-Authored-By: Rodrigo <162915171+RF47@users.noreply.github.com> * Multiline Tab.cpp * Gcode output Wiki Wip * Others wiki wips * Home quality * Add process links in home * Quality Basic Missing descriptions * Update quality_settings_bridging.md * basic desc * basic advance strentgth * Basic speed * basic other speeds * Fix link * Update speed_settings_overhang_speed.md * Update speed_settings_travel.md * Update speed_settings_acceleration.md * Fix * Expand documentation for acceleration and jerk settings * Support wiki * Raft wiki * Support wiki desc * Prime tower wiki * Multimaterial wiki desc * Filament to features wiki * Ooze improve * Fix duplicate text * Fix typo in volumetric speed calibration guide Corrected 'promoted' to 'prompted' in the instructions for entering test settings in the volumetric speed calibration documentation. * centeres image * Overlapping gif * Others wiki basic desc * Clarify retraction calibration recommendation Expanded the explanation for calibrating retraction settings, specifying that it should be done after Flow and Pressure Advance calibration for optimal extrusion setup. Co-Authored-By: Rodrigo <162915171+RF47@users.noreply.github.com> * Links in Readme + minor change Refined links and formatting in README for better navigation. Expanded wall printing order section in quality settings documentation to clarify Inner/Outer, Inner/Outer/Inner, and Outer/Inner modes. Updated calibration guide images and formatting for improved clarity. * Add SVG icons to infill pattern comparison table * Delete doc/images/gui directory remplaced with GUI * Create process-preset-full.png --------- Co-authored-by: Rodrigo <162915171+RF47@users.noreply.github.com>
6 KiB
Localization and translation guide
The purpose of this guide is to describe how to contribute to the Orca Slicer translations. We use GNUgettext for extracting string resources from the project and PoEdit for editing translations.
Those can be downloaded here:
- GNUgettext package contains a set of tools to extract strings from the source code and to create the translation Catalog.
- PoEdit provides good interface for the translators.
After GNUgettext is installed, it is recommended to add the path to gettext/bin to PATH variable.
Full manual for GNUgettext can be seen here: http://www.gnu.org/software/gettext/manual/gettext.html
Scenario 1. How do I add a translation or fix an existing translation
- Get PO-file 'OrcaSlicer_xx.pot' from corresponding sub-folder here: https://github.com/softfever/OrcaSlicer/tree/master/localization/i18n
- Open this file in PoEdit as "Edit a translation"
- Apply your corrections to the translation
- Push changed OrcaSlicer_xx.po into the original folder
- copy OrcaSlicer_xx.mo into resources/i18n/xx and rename it to OrcaSlicer.mo, then push the changed file.
Scenario 2. How do I add a new language support
- Get file OrcaSlicer.pot here : https://github.com/softfever/OrcaSlicer/tree/master/localization/i18n
- Open it in PoEdit for "Create new translation"
- Select Translation Language (for example French).
- As a result you will have fr.po - the file containing translation to French.
Notice. When the translation is complete you need to:
- Rename the file to OrcaSlicer_fr.po
- Click "Save file" button. OrcaSlicer_fr.mo will be created immediately
- Bambu_Studio_fr.po needs to be copied into the sub-folder fr of https://github.com/softfever/OrcaSlicer/tree/master/localization/i18n, and be pushed
- copy OrcaSlicer_xx.mo into resources/i18n/xx and rename it to OrcaSlicer.mo, then push the changed file. ( name of folder "fr" means "French" - the translation language).
Scenario 3. How do I add a new text resource when implementing a feature to Orca Slicer
Each string resource in Orca Slicer available for translation needs to be explicitly marked using L() macro like this:
auto msg = L("This message to be localized")
To get translated text use one of needed macro/function (_(s)
or _CHB(s)
).
If you add new file resource, add it to the list of files containing macro L()
Scenario 4. How do I use GNUgettext to localize my own application taking Orca Slicer as an example
-
For convenience create a list of files with this macro
L(s)
. We have https://github.com/softfever/OrcaSlicer/blob/master/localization/i18n/list.txt. -
Create template file(*.POT) with GNUgettext command:
xgettext --keyword=L --add-comments=TRN --from-code=UTF-8 --debug -o OrcaSlicer.pot -f list.txt
Use flag
--from-code=UTF-8
to specify that the source strings are in UTF-8 encoding Use flag--debug
to correctly extract formatted strings(used %d, %s etc.) -
Create PO- and MO-files for your project as described above.
-
To merge old PO-file with strings from created new POT-file use command:
msgmerge -N -o new.po old.po new.pot
Use option
-N
to not using fuzzy matching when an exact match is not found. -
To concatenate old PO-file with strings from new PO-file use command:
msgcat -o new.po old.po
-
Create an English translation catalog with command:
msgen -o new.po old.po
Note
In this Catalog it will be totally same strings for initial text and translated.
When you have Catalog to translation open POT or PO file in PoEdit and start translating.
General guidelines for Orca Slicer translators
-
We recommend using PoEdit application for translation (as described above). It will help you eliminate most punctuation errors and will show you strings with "random" translations (if the fuzzy parameter was used).
-
To check how the translated text looks on the UI elements, test it :) If you use PoEdit, all you need to do is save the file. At this point, a MO file will be created. Rename it Orca Slicer.mo, and you can run Orca Slicer (see above).
-
If you see an encoding error (garbage characters instead of Unicode) somewhere in Orca Slicer, report it. It is likely not a problem of your translation, but a bug in the software.
-
See on which UI elements the translated phrase will be used. Especially if it's a button, it is very important to decide on the translation and not write alternative translations in parentheses, as this will significantly increase the width of the button, which is sometimes highly undesirable:
-
If you decide to use autocorrect or any batch processing tool, the output requires very careful proofreading. It is very easy to make it do changes that break things big time.
-
Any formatting parts of the phrases must remain unchanged. For example, you should not change
%1%
to%1 %
, you should not change%%
to%
(for percent sign) and similar. This will lead to application crashes. -
Please pay attention to spaces, line breaks (\n) and punctuation marks. Don't add extra line breaks. This is especially important for parameter names.
-
Description of the parameters should not contain units of measurement. For example, "Enable fan if layer print time is less than
n seconds" -
For units of measurement, use the international system of units. Use "s" instead of "sec".
-
If the phrase doesn't have a dot at the end, don't add it. And if it does, then don't forget to :)
-
It is useful to stick to the same terminology in the application (especially with basic terms such as "filament" and similar). Stay consistent. Otherwise it will confuse users.