Extend and Update localizations (#12610)

This commit is contained in:
Ian Bassi
2026-03-05 11:33:07 -03:00
committed by GitHub
parent 2ed249a81b
commit 28649f498d
29 changed files with 5506 additions and 1660 deletions

View File

@@ -523,34 +523,34 @@ bool static check_old_linux_datadir(const wxString& app_name) {
#endif
struct FileWildcards {
std::string_view title;
const char* title_id;
std::vector<std::string_view> file_extensions;
};
static const FileWildcards file_wildcards_by_type[FT_SIZE] = {
/* FT_STEP */ { "STEP files"sv, { ".stp"sv, ".step"sv } },
/* FT_STL */ { "STL files"sv, { ".stl"sv } },
/* FT_OBJ */ { "OBJ files"sv, { ".obj"sv } },
/* FT_AMF */ { "AMF files"sv, { ".amf"sv, ".zip.amf"sv, ".xml"sv } },
/* FT_3MF */ { "3MF files"sv, { ".3mf"sv } },
/* FT_GCODE_3MF */ {"Gcode 3MF files"sv, {".gcode.3mf"sv}},
/* FT_GCODE */ { "G-code files"sv, { ".gcode"sv} },
/* FT_STEP */ { L("STEP files"), { ".stp"sv, ".step"sv } },
/* FT_STL */ { L("STL files"), { ".stl"sv } },
/* FT_OBJ */ { L("OBJ files"), { ".obj"sv } },
/* FT_AMF */ { L("AMF files"), { ".amf"sv, ".zip.amf"sv, ".xml"sv } },
/* FT_3MF */ { L("3MF files"), { ".3mf"sv } },
/* FT_GCODE_3MF */ {L("Gcode 3MF files"), {".gcode.3mf"sv}},
/* FT_GCODE */ { L("G-code files"), { ".gcode"sv} },
#ifdef __APPLE__
/* FT_MODEL */
{"Supported files"sv, {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".usd"sv, ".usda"sv, ".usdc"sv, ".usdz"sv, ".abc"sv, ".ply"sv, ".drc"sv}},
{L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".usd"sv, ".usda"sv, ".usdc"sv, ".usdz"sv, ".abc"sv, ".ply"sv, ".drc"sv}},
#else
/* FT_MODEL */
{"Supported files"sv, {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".drc"sv}},
{L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".drc"sv}},
#endif
/* FT_ZIP */ { "ZIP files"sv, { ".zip"sv } },
/* FT_PROJECT */ { "Project files"sv, { ".3mf"sv} },
/* FT_GALLERY */ { "Known files"sv, { ".stl"sv, ".obj"sv } },
/* FT_ZIP */ { L("ZIP files"), { ".zip"sv } },
/* FT_PROJECT */ { L("Project files"), { ".3mf"sv} },
/* FT_GALLERY */ { L("Known files"), { ".stl"sv, ".obj"sv } },
/* FT_INI */ { "INI files"sv, { ".ini"sv } },
/* FT_SVG */ { "SVG files"sv, { ".svg"sv } },
/* FT_TEX */ { "Texture"sv, { ".png"sv, ".svg"sv } },
/* FT_SL1 */ { "Masked SLA files"sv, { ".sl1"sv, ".sl1s"sv } },
/* FT_DRC */ { "Draco files"sv, { ".drc"sv } },
/* FT_INI */ { L("INI files"), { ".ini"sv } },
/* FT_SVG */ { L("SVG files"), { ".svg"sv } },
/* FT_TEX */ { L("Texture"), { ".png"sv, ".svg"sv } },
/* FT_SL1 */ { L("Masked SLA files"), { ".sl1"sv, ".sl1s"sv } },
/* FT_DRC */ { L("Draco files"), { ".drc"sv } },
};
// This function produces a Win32 file dialog file template mask to be consumed by wxWidgets on all platforms.
@@ -605,7 +605,8 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension)
mask += ";*";
mask += boost::to_upper_copy(std::string(ext));
}
return GUI::format_wxstr("%s (%s)|%s", data.title, title, mask);
const wxString translated_title = Slic3r::GUI::I18N::translate(data.title_id);
return GUI::format_wxstr("%s (%s)|%s", translated_title, title, mask);
}
static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }
@@ -4401,7 +4402,7 @@ wxString GUI_App::transition_tridid(int trid_id) const
if (trid_id == VIRTUAL_TRAY_MAIN_ID || trid_id == VIRTUAL_TRAY_DEPUTY_ID)
{
assert(0);
return wxString("Ext");
return _L("Ext");
}
wxString maping_dict[] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };