mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-30 14:21:08 -07:00
Update the codes to 01.01.00.10 for the formal release
1. first formal version of macos 2. add the bambu networking plugin install logic 3. auto compute the wipe volume when filament change 4. add the logic of wiping into support 5. refine the GUI layout and icons, improve the gui apperance in lots of small places 6. serveral improve to support 7. support AMS auto-mapping 8. disable lots of unstable features: such as params table, media file download, HMS 9. fix serveral kinds of bugs 10. update the document of building 11. ...
This commit is contained in:
parent
e1528e4299
commit
e9e4d75877
267 changed files with 10326 additions and 32228 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Localization and translation guide
|
||||
|
||||
The purpose of this guide is to describe how to contribute to the PrusaSlicer translations. We use GNUgettext for extracting string resources from the project and PoEdit for editing translations.
|
||||
The purpose of this guide is to describe how to contribute to the Bambu Studio translations. We use GNUgettext for extracting string resources from the project and PoEdit for editing translations.
|
||||
|
||||
Those can be downloaded here:
|
||||
- https://sourceforge.net/directory/os:windows/?q=gnu+gettext GNUgettext package contains a set of tools to extract strings from the source code and to create the translation Catalog.
|
||||
|
|
@ -12,41 +12,42 @@ Full manual for GNUgettext can be seen here: http://www.gnu.org/software/gettext
|
|||
|
||||
|
||||
### Scenario 1. How do I add a translation or fix an existing translation
|
||||
1. Get PO-file from corresponding folder here:
|
||||
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization
|
||||
1. Get PO-file 'BambuStudio_xx.pot' from corresponding sub-folder here:
|
||||
https://github.com/bambulab/BambuStudio/tree/master/bbl/i18n
|
||||
2. Open this file in PoEdit as "Edit a translation"
|
||||
3. Apply your corrections to the translation
|
||||
4. Push changed PrusaSlicer.po and PrusaSlicer.mo (will create automatically after saving of PrusaSlicer.po in PoEdit) into the original folder.
|
||||
4. Push changed BambuStudio_xx.po into the original folder
|
||||
5. copy BambuStudio_xx.mo into resources/i18n/xx and rename it to BambuStudio.mo, then push the changed file.
|
||||
|
||||
### Scenario 2. How do I add a new language support
|
||||
1. Get file PrusaSlicer.pot here :
|
||||
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization
|
||||
1. Get file BambuStudio.pot here :
|
||||
https://github.com/bambulab/BambuStudio/tree/master/bbl/i18n
|
||||
2. Open it in PoEdit for "Create new translation"
|
||||
3. Select Translation Language (for example French).
|
||||
4. 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 PrusaSlicer.po
|
||||
- Click "Save file" button. PrusaSlicer.mo will be created immediately
|
||||
- Both PrusaSlicer.po and PrusaSlicer.mo have to be saved here:
|
||||
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization/fr
|
||||
- Rename the file to BambuStudio_fr.po
|
||||
- Click "Save file" button. BambuStudio_fr.mo will be created immediately
|
||||
- Bambu_Studio_fr.po needs to be copied into the sub-folder fr of https://github.com/bambulab/BambuStudio/tree/master/bbl/i18n, and be pushed
|
||||
- copy BambuStudio_xx.mo into resources/i18n/xx and rename it to BambuStudio.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 PrusaSlicer
|
||||
Each string resource in PrusaSlicer available for translation needs to be explicitly marked using L() macro like this:
|
||||
### Scenario 3. How do I add a new text resource when implementing a feature to Bambu Studio
|
||||
Each string resource in Bambu Studio available for translation needs to be explicitly marked using L() macro like this:
|
||||
```C++
|
||||
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 PrusaSlicer as an example
|
||||
### Scenario 4. How do I use GNUgettext to localize my own application taking Bambu Studio as an example
|
||||
|
||||
1. For convenience create a list of files with this macro `L(s)`. We have
|
||||
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization/list.txt.
|
||||
https://github.com/bambulab/BambuStudio/blob/master/bbl/i18n/list.txt.
|
||||
|
||||
2. Create template file(*.POT) with GNUgettext command:
|
||||
```
|
||||
xgettext --keyword=L --add-comments=TRN --from-code=UTF-8 --debug -o PrusaSlicer.pot -f list.txt
|
||||
xgettext --keyword=L --add-comments=TRN --from-code=UTF-8 --debug -o BambuStudio.pot -f list.txt
|
||||
```
|
||||
|
||||
Use flag `--from-code=UTF-8` to specify that the source strings are in UTF-8 encoding
|
||||
|
|
@ -74,14 +75,14 @@ https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization/list.t
|
|||
When you have Catalog to translation open POT or PO file in PoEdit and start translating.
|
||||
|
||||
|
||||
## General guidelines for PrusaSlicer translators
|
||||
## General guidelines for Bambu Studio 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 PrusaSlicer.mo, and you can run PrusaSlicer (see above).
|
||||
- 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 Bambu Studio.mo, and you can run Bambu Studio (see above).
|
||||
|
||||
- If you see an encoding error (garbage characters instead of Unicode) somewhere in PrusaSlicer, report it. It is likely not a problem of your translation, but a bug in the software.
|
||||
- If you see an encoding error (garbage characters instead of Unicode) somewhere in Bambu Studio, 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:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue