mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 07:55:59 +08:00
Typos in localization readme
This commit is contained in:
parent
00ac854325
commit
747991ad35
@ -16,25 +16,25 @@ If you found an odd translation and want to change it, go to section B)
|
||||
Useful tools:
|
||||
|
||||
* windows:
|
||||
* [python](https://www.python.org/)
|
||||
* [gettext](http://gnuwin32.sourceforge.net/downlinks/gettext.php)
|
||||
* [python](https://www.python.org/)
|
||||
* [gettext](http://gnuwin32.sourceforge.net/downlinks/gettext.php)
|
||||
* linux:
|
||||
* python: make sure you can execute python3, install it if it isn't here.
|
||||
* gettext: if you can't execute msgfmt, install the package 'gettext'
|
||||
* macos: maybe like linux?
|
||||
|
||||
### 1) initialisation
|
||||
open the settings.ini
|
||||
for each file that can contain useful translation, create/edit a "data" line to point to the said file.
|
||||
The 'input' property must be the Slic3r.pot path
|
||||
The 'output' must be the Slic3r.po
|
||||
The 'todo' contains the path of the po file to complete.
|
||||
Open the settings.ini
|
||||
* For each file that can contain useful translation, create/edit a "data" line to point to the said file.
|
||||
* The 'input' property must be the Slic3r.pot path
|
||||
* The 'output' must be the Slic3r.po
|
||||
* The 'todo' contains the path of the po file to complete.
|
||||
|
||||
note that the first data line has the priority over the other ones (the first translation encountered is the one used)
|
||||
|
||||
In this example, we are going to update the Spanish translation.
|
||||
We are going to use your old translation file and the current PrusaSlicer one.
|
||||
To decompile the .mo of Prusaslicer, use the command `msgunfmt PrusaSlicer.mo -o PrusaSlicer.po`.
|
||||
In this example, we are going to update the Spanish translation.
|
||||
We are going to use your old translation file and the current PrusaSlicer one.
|
||||
To decompile the .mo of Prusaslicer, use the command `msgunfmt PrusaSlicer.mo -o PrusaSlicer.po`.
|
||||
So the settings.ini contains these lines :
|
||||
|
||||
```
|
||||
@ -59,13 +59,13 @@ output = es/Slic3r.po
|
||||
```
|
||||
|
||||
Notes:
|
||||
* thee 'todo' and 'output' files will be erased, so be sure nothing important has this name (or write another name)
|
||||
* the file at 'database_out' will receive all the database created from the data files. That way, it will keep your new & old unused translations just in case the wording revert back to it, or to be used as reference for the helper.
|
||||
* the 'todo' and 'output' files will be erased, so be sure you didn't use this file name (or copy it elsewhere). Note that often, Slic3r.po is used as input & output, as it's the "updated" file.
|
||||
* the file at 'database_out' will receive all the translations created from the data files. That way, it will keep your new & old unused translations just in case the wording revert back to it, or to be used as reference for the helper.
|
||||
* ui_dir should be the path to the slic3r/resources/ui_layout directory. If you're in slic3r/resources/localization, this value is good.
|
||||
* allow_msgctxt is a bool to allow to keep the msgctxt tags. You need a recent version of gettext to use that.
|
||||
* ignore_case is a bool that will let the tool to ignore the case when comparing msgid if no translation is found.
|
||||
* remove_comment is a bool taht will remove all comment in the output file. It's to avoid unecessary changes in the git commit.
|
||||
* percent_error_similar is a number between 0 and 1. This will activate the helper that will write help comment in the TODO file. These will present similar string that are already translated, to let you pick chunk that are already translated to avoid redoing all the work. It's the percentage of difference allowed (0 = identical, 1 = everything, 0.5 = not more than half of the string is different), using (levenshtein distance / msgid length).
|
||||
* remove_comment is a bool that will remove all comments in the output file. It's to avoid unecessary changes in the git commit. Don't submit pull request for '.po' file with comments. (Note that the translations are ordered by alphabetic order)
|
||||
* percent_error_similar is a number between 0 and 1. This will activate the helper that will write help comment in the TODO file. These will present similar string that are already translated, to let you pick chunk that are already translated to avoid redoing all the work. It's the percentage of difference allowed (0 = identical, 1 = everything, 0.5 = not more than half of the string is different), using (levenshtein distance / msgid length). You have to install the levenshtein lib in python to use it.
|
||||
* max_similar: max number of help translation per item
|
||||
* language and language_code: text to include in the header.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user