supermerill 075ded38ef updates to italian translation | 1 year ago | |
---|---|---|
.. | ||
ca | 2 years ago | |
cs | 2 years ago | |
de | 2 years ago | |
en | 2 years ago | |
es | 2 years ago | |
fr | 1 year ago | |
hu | 2 years ago | |
it | 1 year ago | |
ja | 2 years ago | |
ko | 2 years ago | |
ko_KR | 2 years ago | |
nl | 2 years ago | |
pl | 2 years ago | |
pt_BR | 2 years ago | |
ru | 2 years ago | |
tr | 2 years ago | |
uk | 2 years ago | |
wx_locale | 3 years ago | |
zh_CN | 2 years ago | |
zh_TW_copy | 2 years ago | |
README.md | 2 years ago | |
list.txt | 3 years ago | |
pom_merger.py | 2 years ago | |
settings.ini | 3 years ago | |
update_all.py | 2 years ago |
Note that Slic3r only supports left-to-right languages (if you want to change that, you're welcome to contribute).
Your language should have a code (use the ISO 639-1, second column). Creating a directory and putting a .mo file inside it will add automatically the translation in Slic3r.
You will have to complete a '.po' text file, with a text editor or a specific ide like poedit. When your translation work is finished, you'll have to compile it into a '.mo' file, this one is not readable with a text editor but is readable by the software.
If your language is already here, you remove all current files to start from scratch or rename them to use them as the start point.
If you found an odd translation and want to change it, go to section B)
Useful tools:
Open the settings.ini
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
.
So the settings.ini contains these lines :
data = es/Slic3r.po
data = MyKnowledgeBase.po
data = es/PrusaSlicer_es.po
database_out = MyKnowledgeBase.po
ui_dir = ../ui_layout
allow_msgctxt = false
ignore_case = false
remove_comment = true
percent_error_similar = 0.4
max_similar = 3
language = french
language_code = fr
input = Slic3r.pot
todo = es/todo.po
output = es/Slic3r.po
Notes:
Then, you have to open the es/todo.po file and complete all the translations.
Important:
You can copy/save the todo.po in another file in case of. After filling the todo file, change the settings.ini:
data = es/todo.po
data = MyKnowledgeBase.po
database_out = MyKnowledgeBase.po
ui_dir = ../ui_layout
allow_msgctxt = false
ignore_case = false
remove_comment = true
percent_error_similar = 0.4
max_similar = 3
language = french
language_code = fr
input = Slic3r.pot
todo = es/todo.po
output = es/Slic3r.po
This will tell you to use your todo and your newly created/edited Slic3r.po before using the other older file to complete unfound strings. A translation from the third file won't erase the one from the second unless it's empty (less than 3 characters) and the new one isn't. If a translation is replaced, the tool will inform you.
And re-launch the utility.
Repeat (if needed) until you have almost nothing left in your todo.po file (one-letter translation like "." are not copied by the utility)
When you're finished, compile your .po with the command msgfmt Slic3r.po -o Slic3r.mo
.
Then you can launch Slic3r to test it.
Note that you have to rename it to SuperSlicer.mo if you're using Superslicer and same for PrusaSlicer.