Update localization

* the pot
 * add a readme on how to use the utility
 * typos
 * french translation
This commit is contained in:
supermerill 2020-07-05 17:23:03 +02:00
parent eb9802022e
commit 89c475a439
7 changed files with 11525 additions and 20 deletions

View File

@ -415,7 +415,7 @@ set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
add_custom_target(gettext_make_pot
COMMAND xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --debug
-f "${L10N_DIR}/list.txt"
-o "${L10N_DIR}/SupserSlicer.pot"
-o "${L10N_DIR}/SuperSlicer.pot"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate pot file from strings in the source tree"
)

View File

@ -0,0 +1,57 @@
# How to create / update your own language
## 1) initialisation
open the settings.ini
for each file that can contains useful translation, create / edit a "data" line to point to the said file.
The 'input' property must be the SuperSlicer.pot path
The 'output' must be the SuperSlicer.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 exemple, we are going to update the spanish translation.
We are going to use the old slic3++ translation and the prusa one.
So the settings.ini contains these lines :
```
data = es/Slic3r++.po
data = es/PrusaSlicer_es.po
input = SuperSlicer.pot
todo = es/todo.po
output = es/SuperSlicer.po
```
## 2) launch the utility.
* Open a console
* cd into the localization directory,
* execute 'java -jar pomergeur.jar'
It will tell you if you made some mistakes about the paths, the number of translations reused and the number to do.
## 3) complete the translation file
Then, you have to open the es/toto.po file and complete all the translation.
* msgid lines are the english string
* msgstr is the translated one, should be empty string ("").
Important:
* you must write it in one line, use \n to input a line change.
* the %1, %2, ... MUST be put also in the translation, as it's a placeholder for input numbers, if one is missed the software will crash, so be careful. '%%' means '%'.
## 4) relaunch the utility
You can copy/save the todo.po in an other file in case of.
After filling the todo file, change the settings.ini:
```
data = es/todo.po
data = es/SuperSlicer.po
data = es/Slic3r++.po
data = es/PrusaSlicer_es.po
input = SuperSlicer.pot
todo = es/todo.po
output = es/SuperSlicer.po
```
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)

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,9 @@
data = C:/local/Slic3rcpp/resources/localization/fr/SuperSlicer.po
data = C:/local/Slic3rcpp/resources/localization/PrusaSlicer.pot
data = C:/local/Slic3rcpp/resources/localization/TODO.po
#data = C:/local/Slic3r/resources/localization/lang/TODO.po
#data = C:/local/Slic3r/resources/localization/lang/SuperSlicer.po
data = C:/local/Slic3r/resources/localization/lang/Slic3r++.po
data = C:/local/Slic3r/resources/localization/lang/PrusaSlicer_fr.po
input = C:/local/Slic3rcpp/resources/localization/SuperSlicer_en_US.po
todo = C:/local/Slic3rcpp/resources/localization/TODO.po
output = C:/local/Slic3rcpp/resources/localization/SuperSlicer.po
input = C:/local/Slic3r/resources/localization/SuperSlicer.pot
todo = C:/local/Slic3r/resources/localization/lang/TODO.po
output = C:/local/Slic3r/resources/localization/lang/SuperSlicer.po

View File

@ -534,7 +534,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionBool(true));
def = this->add("duplicate_distance", coFloat);
def->label = L("Distance between copies");
def->label = L("Distance between objects");
def->category = OptionCategory::output;
def->tooltip = L("Distance used for the auto-arrange feature of the plater.");
def->sidetext = L("mm");
@ -1996,7 +1996,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("max_speed_reduction", coPercents);
def->label = L("Max speed reduction");
def->category = OptionCategory::speed;
def->tooltip = L("Amount of speed you can reduce per extrusion speed.");
def->tooltip = L("Set to 90% if you don't want the speed to be reduced by more than 90%.");
def->sidetext = L("%");
def->min = 0;
def->max = 100;
@ -2156,7 +2156,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Enable Limits");
def->category = OptionCategory::limits;
def->tooltip = L("Slic3r can add M201 M203 M202 M204 and M205 gcodes to pass the machine limits defined here to the firmware."
"Gcodes printed will depends of the firmware selected (please Report an issue if you found something wrong)."
" Gcodes printed will depends of the firmware selected (please Report an issue if you found something wrong)."
"\nIf you want only a selection, you can write your gcode with these value, example: "
"\nM204 P[machine_max_acceleration_extruding] T[machine_max_acceleration_retracting]");
def->mode = comAdvanced;
@ -2200,7 +2200,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionBool(true));
def = this->add("overhangs_width", coFloatOrPercent);
def->label = L("As bridge threshold");
def->label = L("'As bridge' threshold");
def->full_label = L("Overhang bridge threshold");
def->category = OptionCategory::perimeter;
def->tooltip = L("Minimum unsupported width for an extrusion to be considered an overhang. Can be in mm or in a % of the nozzle diameter.");
@ -2760,8 +2760,8 @@ void PrintConfigDef::init_fff_params()
def->full_label = ("Solid infill speed");
def->category = OptionCategory::speed;
def->tooltip = L("Speed for printing solid regions (top/bottom/internal horizontal shells). "
"This can be expressed as a percentage (for example: 80%) over the default infill speed "
"infill speed above. Set to zero for auto.");
"This can be expressed as a percentage (for example: 80%) over the default infill speed."
" Set to zero for auto.");
def->sidetext = L("mm/s or %");
def->ratio_over = "infill_speed";
def->aliases = { "solid_infill_feed_rate" };
@ -3183,7 +3183,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("merging with perimeters");
def->full_label = L("Thin wall merge");
def->category = OptionCategory::perimeter;
def->tooltip = L("Allow the external periemter to merge the thin wals int he path. !!! IF you disable this setting, please explain me why (via help->report issue)"
def->tooltip = L("Allow the external perimeter to merge the thin walls in the path. !!! IF you disable this setting, please explain me why (via help->report issue)"
" because I'm going to DELETE this setting next release, as i don't see why someone may want to disable it.");
def->mode = comExpert;
def->set_default_value(new ConfigOptionBool(true));
@ -3540,7 +3540,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("z_step", coFloat);
def->label = L("Z full step");
def->tooltip = L("Set this to the height moved when your Z motor (or equivalent) turns one step."
"If your motor needs 200 steps to move your head/plater by 1mm, this field have to be 1/200 = 0.005."
" If your motor needs 200 steps to move your head/plater by 1mm, this field have to be 1/200 = 0.005."
"\nThe gcode can't write a value below 0.001 so any value below or equal that is equivalent to disabling the feature."
"\n0 to disable.");
def->cli = "z-step=f";
@ -3694,7 +3694,7 @@ void PrintConfigDef::init_milling_params()
def->tooltip = L("Put here the gcode to change the toolhead (called after the g-code T[next_extruder]). You have access to [next_extruder] and [previous_extruder]."
" next_extruder is the 'extruder number' of the new milling tool, it's equal to the index (begining at 0) of the milling tool plus the number of extruders."
" previous_extruder is the 'extruder number' of the previous tool, it may be a normal extruder, if it's below the number of extruders."
" The numbe rof extruder is available at [extruder]and the number of milling tool is available at [milling_cutter].");
" The number of extruder is available at [extruder] and the number of milling tool is available at [milling_cutter].");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionStrings(""));
@ -3704,14 +3704,14 @@ void PrintConfigDef::init_milling_params()
def->tooltip = L("Put here the gcode to end the toolhead action, like stopping the spindle. You have access to [next_extruder] and [previous_extruder]."
" previous_extruder is the 'extruder number' of the current milling tool, it's equal to the index (begining at 0) of the milling tool plus the number of extruders."
" next_extruder is the 'extruder number' of the next tool, it may be a normal extruder, if it's below the number of extruders."
" The numbe rof extruder is available at [extruder]and the number of milling tool is available at [milling_cutter].");
" The number of extruder is available at [extruder]and the number of milling tool is available at [milling_cutter].");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionStrings(""));
def = this->add("milling_post_process", coBool);
def->label = L("Milling post-processing");
def->category = OptionCategory::milling;
def->tooltip = L("If activated, at the end of each layer, the printer will switch to a milling ead and mill the external perimeters."
def->tooltip = L("If activated, at the end of each layer, the printer will switch to a milling head and mill the external perimeters."
"\nYou should set the 'Milling extra XY size' to a value high enough to have enough plastic to mill. Also, be sure that your piece is firmly glued to the bed.");
def->mode = comSimple;
def->set_default_value(new ConfigOptionBool(false));
@ -3729,7 +3729,7 @@ void PrintConfigDef::init_milling_params()
def = this->add("milling_after_z", coFloatOrPercent);
def->label = L("Milling only after");
def->category = OptionCategory::milling;
def->tooltip = L("THis setting restrict the post-process milling to a certain height, to avoid milling the bed. It can be a mm of a % of the first layer height (so it can depends of the object).");
def->tooltip = L("This setting restrict the post-process milling to a certain height, to avoid milling the bed. It can be a mm of a % of the first layer height (so it can depends of the object).");
def->sidetext = L("mm or %");
def->ratio_over = "first_layer_height";
def->mode = comAdvanced;

View File

@ -1437,7 +1437,7 @@ void GLCanvas3D::Tooltip::render(const Vec2d& mouse_position) const
imgui.set_next_window_pos(mouse_position(0), mouse_position(1) + 16, ImGuiCond_Always, 0.0f, 0.0f);
#endif // ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI
imgui.begin(_(L("canvas_tooltip")), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoFocusOnAppearing);
imgui.begin(_("canvas_tooltip"), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoFocusOnAppearing);
ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
ImGui::TextUnformatted(m_text.c_str());