New shorcut _L() for _(L())
New shorcut _u8L() for _utf8(L())
This commit is contained in:
parent
7f376fa927
commit
fcb04039e8
2 changed files with 5 additions and 3 deletions
|
@ -409,7 +409,7 @@ find_package(cereal REQUIRED)
|
|||
# l10n
|
||||
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
|
||||
add_custom_target(gettext_make_pot
|
||||
COMMAND xgettext --keyword=L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --debug
|
||||
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}/PrusaSlicer.pot"
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#ifndef _
|
||||
#define _(s) Slic3r::GUI::I18N::translate((s))
|
||||
#define _(s) Slic3r::GUI::I18N::translate((s))
|
||||
#define _L(s) Slic3r::GUI::I18N::translate((s))
|
||||
#define _utf8(s) Slic3r::GUI::I18N::translate_utf8((s))
|
||||
#define _u8L(s) Slic3r::GUI::I18N::translate_utf8((s))
|
||||
#endif /* _ */
|
||||
|
||||
#ifndef _CTX
|
||||
#define _CTX(s, ctx) Slic3r::GUI::I18N::translate((s), (ctx))
|
||||
#define _CTX(s, ctx) Slic3r::GUI::I18N::translate((s), (ctx))
|
||||
#define _CTX_utf8(s, ctx) Slic3r::GUI::I18N::translate_utf8((s), (ctx))
|
||||
#endif /* _ */
|
||||
|
||||
|
|
Loading…
Reference in a new issue