Completed translation to Ukrainian.

* Signs of degree are returned to UTF-8 in PrintConfig.
* Changed _LU8 macro. It's translated now like string explicitly specified as a string is already in UTF-8 encoding.
This commit is contained in:
YuSanka 2018-02-19 15:32:22 +01:00
parent c6ff5ccbf4
commit f5ae470e5e
10 changed files with 2926 additions and 440 deletions

View file

@ -38,7 +38,7 @@ namespace Slic3r { namespace GUI {
wxString Field::get_tooltip_text(const wxString& default_string)
{
wxString tooltip_text("");
wxString tooltip = wxString::FromUTF8(m_opt.tooltip.c_str());
wxString tooltip = _LU8(m_opt.tooltip);
if (tooltip.length() > 0)
tooltip_text = tooltip + "(" + _L("default") + ": " +
(boost::iends_with(m_opt_id, "_gcode") ? "\n" : "") +

View file

@ -25,6 +25,11 @@ class TabIface;
//! macro used to localization, return wxString
#define _L(s) wxGetTranslation(s)
//! macro used to localization of ConfigOptionDef's std::strings
//! Explicitly specify that the source string is already in UTF-8 encoding
#define _LU8(s) wxGetTranslation(wxString(s.c_str(), wxConvUTF8))
//! macro used to mark string used at localization,
//! return same string
#define _LS(s) s

View file

@ -152,7 +152,7 @@ void OptionsGroup::append_line(const Line& line) {
ConfigOptionDef option = opt.opt;
// add label if any
if (option.label != "") {
auto field_label = new wxStaticText(parent(), wxID_ANY, _L(option.label) + ":", wxDefaultPosition, wxDefaultSize);
auto field_label = new wxStaticText(parent(), wxID_ANY, _LU8(option.label) + ":", wxDefaultPosition, wxDefaultSize);
field_label->SetFont(label_font);
sizer->Add(field_label, 0, wxALIGN_CENTER_VERTICAL, 0);
}
@ -166,9 +166,7 @@ void OptionsGroup::append_line(const Line& line) {
// add sidetext if any
if (option.sidetext != "") {
// Explicitly specify that the source string is already in UTF-8 encoding
wxString sidetext_str(option.sidetext.c_str(), wxConvUTF8);
auto sidetext = new wxStaticText(parent(), wxID_ANY, _L(sidetext_str), wxDefaultPosition, wxDefaultSize);
auto sidetext = new wxStaticText(parent(), wxID_ANY, _LU8(option.sidetext), wxDefaultPosition, wxDefaultSize);
sidetext->SetFont(sidetext_font);
sizer->Add(sidetext, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 4);
}
@ -190,7 +188,7 @@ void OptionsGroup::append_line(const Line& line) {
}
Line OptionsGroup::create_single_option_line(const Option& option) const {
Line retval{ _L(option.opt.label), _L(option.opt.tooltip) };
Line retval{ _LU8(option.opt.label), _LU8(option.opt.tooltip) };
Option tmp(option);
tmp.opt.label = std::string("");
retval.append_option(tmp);