diff options
Diffstat (limited to 'source/blender')
215 files changed, 5533 insertions, 4961 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index 57f8c83eda6..837ca814fbf 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -41,6 +41,8 @@ void BLF_exit(void); void BLF_cache_clear(void); +char* BLF_gettext(const char *msgid); + int BLF_load(const char *name); int BLF_load_mem(const char *name, unsigned char *mem, int mem_size); @@ -216,4 +218,7 @@ void BLF_dir_free(char **dirs, int count); extern int blf_mono_font; extern int blf_mono_font_render; // dont mess drawing with render threads. +#define _(msgid) BLF_gettext(msgid) +#define N_(msgid) msgid + #endif /* BLF_API_H */ diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt index 82099d4f125..cc677d39b10 100644 --- a/source/blender/blenfont/CMakeLists.txt +++ b/source/blender/blenfont/CMakeLists.txt @@ -40,6 +40,7 @@ set(SRC intern/blf.c intern/blf_dir.c intern/blf_font.c + intern/blf_gettext.c intern/blf_glyph.c intern/blf_lang.c intern/blf_util.c diff --git a/source/blender/blenfont/intern/blf_gettext.c b/source/blender/blenfont/intern/blf_gettext.c new file mode 100755 index 00000000000..c82baed555c --- /dev/null +++ b/source/blender/blenfont/intern/blf_gettext.c @@ -0,0 +1,40 @@ +/* + * $Id: blf_gettext.c 37094 2011-06-02 11:22:22Z xiaoxiangquan $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2008 Blender Foundation. + * All rights reserved. + * + * Contributor(s): Blender Foundation. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/blenfont/intern/blf_gettext.c + * \ingroup blf + */ + +#include <libintl.h> +#include <string.h> + +char* BLF_gettext(const char *msgid) +{ + if( msgid!=NULL && strlen(msgid)>0 ) + return gettext( msgid ); + return ""; +} diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index e7f9d1746ad..cc55eb585ed 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -41,6 +41,7 @@ #include <locale.h> #include "libintl.h" +#include "DNA_userdef_types.h" #include "DNA_listBase.h" #include "DNA_vec_types.h" @@ -65,6 +66,60 @@ static char global_messagepath[1024]; static char global_language[32]; static char global_encoding_name[32]; +/* map from the rna_userdef.c:rna_def_userdef_system(BlenderRNA *brna):language_items */ +static char locale_default[] = ""; +static char locale_english[] = "en_US"; +static char locale_japanese[] = "ja_JP"; +static char locale_dutch[] = "nl_NL"; +static char locale_italian[] = "it_IT"; +static char locale_german[] = "de_DE"; +static char locale_finnish[] = "fi_FI"; +static char locale_swedish[] = "sv_SE"; +static char locale_french[] = "fr_FR"; +static char locale_spanish[] = "es_ES"; +static char locale_catalan[] = "ca_AD"; +static char locale_czech[] = "cs_CZ"; +static char locale_bra_portuguese[] = "pt_BR"; +static char locale_sim_chinese[] = "zh_CN"; +static char locale_tra_chinese[] = "zh_TW"; +static char locale_russian[] = "ru_RU"; +static char locale_croatian[] = "hr_HR"; +static char locale_serbian[] = "sr_RS"; +static char locale_ukrainian[] = "uk_UA"; +static char locale_polish[] = "pl_PL"; +static char locale_romanian[] = "ro_RO"; +static char locale_arabic[] = "ar_EG"; +static char locale_bulgarian[] = "bg_BG"; +static char locale_greek[] = "el_GR"; +static char locale_korean[] = "ko_KR"; + +static char *lang_to_locale[] = { + locale_default, + locale_english, /* us english is the default language of blender */ + locale_japanese, + locale_dutch, + locale_italian, + locale_german, + locale_finnish, + locale_swedish, + locale_french, + locale_spanish, + locale_catalan, + locale_czech, + locale_bra_portuguese, + locale_sim_chinese, + locale_tra_chinese, + locale_russian, + locale_croatian, + locale_serbian, + locale_ukrainian, + locale_polish, + locale_romanian, + locale_arabic, + locale_bulgarian, + locale_greek, + locale_korean, +}; void BLF_lang_init(void) { @@ -82,34 +137,33 @@ void BLF_lang_init(void) /* XXX WARNING!!! IN osx somehow the previous function call jumps in this one??? (ton, ppc) */ void BLF_lang_set(const char *str) { - if(str==NULL) { - return; - } - else { - -#if defined (_WIN32) || defined(__APPLE__) - BLI_setenv("LANG", str); -#else - char *locreturn= setlocale(LC_ALL, str); - if (locreturn == NULL) { - char *lang= BLI_sprintfN("%s.UTF-8", str); + char *locreturn; + if(str==NULL) + str = lang_to_locale[U.language]; + BLI_setenv("LANG", str); + BLI_setenv("LANGUAGE", str); - locreturn= setlocale(LC_ALL, lang); - if (locreturn == NULL) { - printf("could not change language to %s nor %s\n", str, lang); - } + locreturn= setlocale(LC_ALL, str); + if (locreturn == NULL) { + char *lang= BLI_sprintfN("%s.UTF-8", str); - MEM_freeN(lang); + locreturn= setlocale(LC_ALL, lang); + if (locreturn == NULL) { + printf("could not change language to %s nor %s\n", str, lang); } - setlocale(LC_NUMERIC, "C"); -#endif - textdomain(DOMAIN_NAME); - bindtextdomain(DOMAIN_NAME, global_messagepath); - /* bind_textdomain_codeset(DOMAIN_NAME, global_encoding_name); */ - BLI_strncpy(global_language, str, sizeof(global_language)); - + MEM_freeN(lang); } + + setlocale(LC_NUMERIC, "C"); + + textdomain(DOMAIN_NAME); + bindtextdomain(DOMAIN_NAME, global_messagepath); + /* bind_textdomain_codeset(DOMAIN_NAME, global_encoding_name); */ + BLI_strncpy(global_language, str, sizeof(global_language)); + +// printf( "<<< %s %s %s \n", setlocale(LC_MESSAGES,NULL), getenv("LANG"), getenv("LANGUAGE") ); + } void BLF_lang_encoding(const char *str) diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h index 1735848e774..fc5c5a80131 100644..100755 --- a/source/blender/blenlib/BLI_callbacks.h +++ b/source/blender/blenlib/BLI_callbacks.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: BLI_callbacks.h 37799 2011-06-24 23:14:26Z gsrb3d $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h index 59c01348c07..27b1a67b32c 100644 --- a/source/blender/blenlib/BLI_fileops.h +++ b/source/blender/blenlib/BLI_fileops.h @@ -53,6 +53,7 @@ int BLI_exists(const char *file); int BLI_copy_fileops(const char *file, const char *to); int BLI_rename(const char *from, const char *to); int BLI_gzip(const char *from, const char *to); +int BLI_ungzip_to_mem(const char *from_file, char *to_mem, const int size); int BLI_delete(const char *file, int dir, int recursive); int BLI_move(const char *file, const char *to); int BLI_touch(const char *file); diff --git a/source/blender/blenlib/intern/callbacks.c b/source/blender/blenlib/intern/callbacks.c index a033e01696d..2599c218123 100644..100755 --- a/source/blender/blenlib/intern/callbacks.c +++ b/source/blender/blenlib/intern/callbacks.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: callbacks.c 37799 2011-06-24 23:14:26Z gsrb3d $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 2e0f4b483b1..b72f31dd128 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -102,6 +102,24 @@ int BLI_gzip(const char *from, const char *to) { return rval; } +/* gzip the file in from_file and write it to memery to_mem, at most size bytes. + return the unziped size + */ +int BLI_ungzip_to_mem(const char *from_file, char *to_mem, const int size) +{ + gzFile gzfile; + int readsize; + + gzfile = gzopen( from_file, "rb" ); + readsize = gzread( gzfile, to_mem, size); + + if (readsize < 0) + readsize = EOF; + + return readsize; +} + + /* return 1 when file can be written */ int BLI_is_writable(const char *filename) { diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt index 83fe91d6f76..6195289f2a6 100644 --- a/source/blender/editors/animation/CMakeLists.txt +++ b/source/blender/editors/animation/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/animation/SConscript b/source/blender/editors/animation/SConscript index 96b05b8bccc..61cf0890bc7 100644 --- a/source/blender/editors/animation/SConscript +++ b/source/blender/editors/animation/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader' env.BlenderLib ( 'bf_editors_animation', sources, Split(incs), [], libtype=['core'], priority=[125] ) diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 9145cc2b79d..ee3fe741b86 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -39,6 +39,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" #include "DNA_anim_types.h" #include "DNA_object_types.h" @@ -583,10 +584,10 @@ enum { /* defines for rearranging channels */ static EnumPropertyItem prop_animchannel_rearrange_types[] = { - {REARRANGE_ANIMCHAN_TOP, "TOP", 0, "To Top", ""}, - {REARRANGE_ANIMCHAN_UP, "UP", 0, "Up", ""}, - {REARRANGE_ANIMCHAN_DOWN, "DOWN", 0, "Down", ""}, - {REARRANGE_ANIMCHAN_BOTTOM, "BOTTOM", 0, "To Bottom", ""}, + {REARRANGE_ANIMCHAN_TOP, "TOP", 0, N_("To Top"), ""}, + {REARRANGE_ANIMCHAN_UP, "UP", 0, N_("Up"), ""}, + {REARRANGE_ANIMCHAN_DOWN, "DOWN", 0, N_("Down"), ""}, + {REARRANGE_ANIMCHAN_BOTTOM, "BOTTOM", 0, N_("To Bottom"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1075,9 +1076,9 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op) static void ANIM_OT_channels_move (wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Channels"; + ot->name= _("Move Channels"); ot->idname= "ANIM_OT_channels_move"; - ot->description = "Rearrange selected animation channels"; + ot->description = _("Rearrange selected animation channels"); /* api callbacks */ ot->exec= animchannels_rearrange_exec; @@ -1087,7 +1088,7 @@ static void ANIM_OT_channels_move (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "direction", prop_animchannel_rearrange_types, REARRANGE_ANIMCHAN_DOWN, "Direction", ""); + ot->prop= RNA_def_enum(ot->srna, "direction", RNA_enum_items_gettexted(prop_animchannel_rearrange_types), REARRANGE_ANIMCHAN_DOWN, _("Direction"), ""); } /* ******************** Delete Channel Operator *********************** */ @@ -1178,9 +1179,9 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op)) static void ANIM_OT_channels_delete (wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Channels"; + ot->name= _("Delete Channels"); ot->idname= "ANIM_OT_channels_delete"; - ot->description= "Delete all selected animation channels"; + ot->description= _("Delete all selected animation channels"); /* api callbacks */ ot->exec= animchannels_delete_exec; @@ -1255,9 +1256,9 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op)) static void ANIM_OT_channels_visibility_set (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Visibility"; + ot->name= _("Set Visibility"); ot->idname= "ANIM_OT_channels_visibility_set"; - ot->description= "Make only the selected animation channels visible in the Graph Editor"; + ot->description= _("Make only the selected animation channels visible in the Graph Editor"); /* api callbacks */ ot->exec= animchannels_visibility_set_exec; @@ -1328,9 +1329,9 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *UNUSED(o static void ANIM_OT_channels_visibility_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Visibility"; + ot->name= _("Toggle Visibility"); ot->idname= "ANIM_OT_channels_visibility_toggle"; - ot->description= "Toggle visibility in Graph Editor of all selected animation channels"; + ot->description= _("Toggle visibility in Graph Editor of all selected animation channels"); /* api callbacks */ ot->exec= animchannels_visibility_toggle_exec; @@ -1344,18 +1345,18 @@ static void ANIM_OT_channels_visibility_toggle (wmOperatorType *ot) /* defines for setting animation-channel flags */ static EnumPropertyItem prop_animchannel_setflag_types[] = { - {ACHANNEL_SETFLAG_TOGGLE, "TOGGLE", 0, "Toggle", ""}, - {ACHANNEL_SETFLAG_CLEAR, "DISABLE", 0, "Disable", ""}, - {ACHANNEL_SETFLAG_ADD, "ENABLE", 0, "Enable", ""}, - {ACHANNEL_SETFLAG_INVERT, "INVERT", 0, "Invert", ""}, + {ACHANNEL_SETFLAG_TOGGLE, "TOGGLE", 0, N_("Toggle"), ""}, + {ACHANNEL_SETFLAG_CLEAR, "DISABLE", 0, N_("Disable"), ""}, + {ACHANNEL_SETFLAG_ADD, "ENABLE", 0, N_("Enable"), ""}, + {ACHANNEL_SETFLAG_INVERT, "INVERT", 0, N_("Invert"), ""}, {0, NULL, 0, NULL, NULL} }; /* defines for set animation-channel settings */ // TODO: could add some more types, but those are really quite dependent on the mode... static EnumPropertyItem prop_animchannel_settings_types[] = { - {ACHANNEL_SETTING_PROTECT, "PROTECT", 0, "Protect", ""}, - {ACHANNEL_SETTING_MUTE, "MUTE", 0, "Mute", ""}, + {ACHANNEL_SETTING_PROTECT, "PROTECT", 0, N_("Protect"), ""}, + {ACHANNEL_SETTING_MUTE, "MUTE", 0, N_("Mute"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1460,9 +1461,9 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op) static void ANIM_OT_channels_setting_enable (wmOperatorType *ot) { /* identifiers */ - ot->name= "Enable Channel Setting"; + ot->name= _("Enable Channel Setting"); ot->idname= "ANIM_OT_channels_setting_enable"; - ot->description= "Enable specified setting on all selected animation channels"; + ot->description= _("Enable specified setting on all selected animation channels"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1474,17 +1475,17 @@ static void ANIM_OT_channels_setting_enable (wmOperatorType *ot) /* props */ /* flag-setting mode */ - RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_ADD, "Mode", ""); + RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_animchannel_setflag_types), ACHANNEL_SETFLAG_ADD, _("Mode"), ""); /* setting to set */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_animchannel_settings_types), 0, _("Type"), ""); } static void ANIM_OT_channels_setting_disable (wmOperatorType *ot) { /* identifiers */ - ot->name= "Disable Channel Setting"; + ot->name= _("Disable Channel Setting"); ot->idname= "ANIM_OT_channels_setting_disable"; - ot->description= "Disable specified setting on all selected animation channels"; + ot->description= _("Disable specified setting on all selected animation channels"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1496,17 +1497,17 @@ static void ANIM_OT_channels_setting_disable (wmOperatorType *ot) /* props */ /* flag-setting mode */ - RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_CLEAR, "Mode", ""); + RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_CLEAR, _("Mode"), ""); /* setting to set */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, _("Type"), ""); } static void ANIM_OT_channels_setting_invert (wmOperatorType *ot) { /* identifiers */ - ot->name= "Invert Channel Setting"; + ot->name= _("Invert Channel Setting"); ot->idname= "ANIM_OT_channels_setting_toggle"; - ot->description= "Invert specified setting on all selected animation channels"; + ot->description= _("Invert specified setting on all selected animation channels"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1518,17 +1519,17 @@ static void ANIM_OT_channels_setting_invert (wmOperatorType *ot) /* props */ /* flag-setting mode */ - RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_INVERT, "Mode", ""); + RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_INVERT, _("Mode"), ""); /* setting to set */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, _("Type"), ""); } static void ANIM_OT_channels_setting_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Channel Setting"; + ot->name= _("Toggle Channel Setting"); ot->idname= "ANIM_OT_channels_setting_toggle"; - ot->description= "Toggle specified setting on all selected animation channels"; + ot->description= _("Toggle specified setting on all selected animation channels"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1540,17 +1541,17 @@ static void ANIM_OT_channels_setting_toggle (wmOperatorType *ot) /* props */ /* flag-setting mode */ - RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, "Mode", ""); + RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, _("Mode"), ""); /* setting to set */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, _("Type"), ""); } static void ANIM_OT_channels_editable_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Channel Editability"; + ot->name= _("Toggle Channel Editability"); ot->idname= "ANIM_OT_channels_editable_toggle"; - ot->description= "Toggle editability of selected channels"; + ot->description= _("Toggle editability of selected channels"); /* api callbacks */ ot->exec= animchannels_setflag_exec; @@ -1561,9 +1562,9 @@ static void ANIM_OT_channels_editable_toggle (wmOperatorType *ot) /* props */ /* flag-setting mode */ - RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, "Mode", ""); + RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, _("Mode"), ""); /* setting to set */ - RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, ACHANNEL_SETTING_PROTECT, "Type", ""); + RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, ACHANNEL_SETTING_PROTECT, _("Type"), ""); } /* ********************** Expand Channels Operator *********************** */ @@ -1593,9 +1594,9 @@ static int animchannels_expand_exec (bContext *C, wmOperator *op) static void ANIM_OT_channels_expand (wmOperatorType *ot) { /* identifiers */ - ot->name= "Expand Channels"; + ot->name= _("Expand Channels"); ot->idname= "ANIM_OT_channels_expand"; - ot->description= "Expand (i.e. open) all selected expandable animation channels"; + ot->description= _("Expand (i.e. open) all selected expandable animation channels"); /* api callbacks */ ot->exec= animchannels_expand_exec; @@ -1605,7 +1606,7 @@ static void ANIM_OT_channels_expand (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "all", 1, "All", "Expand all channels (not just selected ones)"); + ot->prop= RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Expand all channels (not just selected ones)")); } /* ********************** Collapse Channels Operator *********************** */ @@ -1635,9 +1636,9 @@ static int animchannels_collapse_exec (bContext *C, wmOperator *op) static void ANIM_OT_channels_collapse (wmOperatorType *ot) { /* identifiers */ - ot->name= "Collapse Channels"; + ot->name= _("Collapse Channels"); ot->idname= "ANIM_OT_channels_collapse"; - ot->description= "Collapse (i.e. close) all selected expandable animation channels"; + ot->description= _("Collapse (i.e. close) all selected expandable animation channels"); /* api callbacks */ ot->exec= animchannels_collapse_exec; @@ -1647,7 +1648,7 @@ static void ANIM_OT_channels_collapse (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "all", 1, "All", "Collapse all channels (not just selected ones)"); + ot->prop= RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Collapse all channels (not just selected ones)")); } /* ******************* Reenable Disabled Operator ******************* */ @@ -1711,9 +1712,9 @@ static int animchannels_enable_exec (bContext *C, wmOperator *UNUSED(op)) static void ANIM_OT_channels_fcurves_enable (wmOperatorType *ot) { /* identifiers */ - ot->name= "Revive Disabled F-Curves"; + ot->name= _("Revive Disabled F-Curves"); ot->idname= "ANIM_OT_channels_fcurves_enable"; - ot->description= "Clears 'disabled' tag from all F-Curves to get broken F-Curves working again"; + ot->description= _("Clears 'disabled' tag from all F-Curves to get broken F-Curves working again"); /* api callbacks */ ot->exec= animchannels_enable_exec; @@ -1748,9 +1749,9 @@ static int animchannels_deselectall_exec (bContext *C, wmOperator *op) static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select All"; + ot->name= _("Select All"); ot->idname= "ANIM_OT_channels_select_all_toggle"; - ot->description= "Toggle selection of all animation channels"; + ot->description= _("Toggle selection of all animation channels"); /* api callbacks */ ot->exec= animchannels_deselectall_exec; @@ -1760,7 +1761,7 @@ static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + ot->prop= RNA_def_boolean(ot->srna, "invert", 0, _("Invert"), ""); } /* ******************** Borderselect Operator *********************** */ @@ -1873,9 +1874,9 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op) static void ANIM_OT_channels_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; + ot->name= _("Border Select"); ot->idname= "ANIM_OT_channels_select_border"; - ot->description= "Select all animation channels within the specified region"; + ot->description= _("Select all animation channels within the specified region"); /* api callbacks */ ot->invoke= WM_border_select_invoke; @@ -2191,9 +2192,9 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent * static void ANIM_OT_channels_click (wmOperatorType *ot) { /* identifiers */ - ot->name= "Mouse Click on Channels"; + ot->name= _("Mouse Click on Channels"); ot->idname= "ANIM_OT_channels_click"; - ot->description= "Handle mouse-clicks over animation channels"; + ot->description= _("Handle mouse-clicks over animation channels"); /* api callbacks */ ot->invoke= animchannels_mouseclick_invoke; @@ -2203,8 +2204,8 @@ static void ANIM_OT_channels_click (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY - RNA_def_boolean(ot->srna, "children_only", 0, "Select Children Only", ""); // CTRLKEY|SHIFTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "children_only", 0, _("Select Children Only"), ""); // CTRLKEY|SHIFTKEY } /* ************************************************************************** */ diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index b3338396598..56841702127 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -45,6 +45,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_fcurve.h" #include "BKE_main.h" @@ -577,8 +579,8 @@ static int ed_marker_add(bContext *C, wmOperator *UNUSED(op)) static void MARKER_OT_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Time Marker"; - ot->description= "Add a new time marker"; + ot->name= _("Add Time Marker"); + ot->description= _("Add a new time marker"); ot->idname= "MARKER_OT_add"; /* api callbacks */ @@ -880,8 +882,8 @@ static int ed_marker_move_exec(bContext *C, wmOperator *op) static void MARKER_OT_move(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Time Marker"; - ot->description= "Move selected time marker(s)"; + ot->name= _("Move Time Marker"); + ot->description= _("Move selected time marker(s)"); ot->idname= "MARKER_OT_move"; /* api callbacks */ @@ -895,7 +897,7 @@ static void MARKER_OT_move(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; /* rna storage */ - RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, _("Frames"), "", INT_MIN, INT_MAX); } /* ************************** duplicate markers *************************** */ @@ -975,8 +977,8 @@ static int ed_marker_duplicate_invoke_wrapper(bContext *C, wmOperator *op, wmEve static void MARKER_OT_duplicate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Time Marker"; - ot->description= "Duplicate selected time marker(s)"; + ot->name= _("Duplicate Time Marker"); + ot->description= _("Duplicate selected time marker(s)"); ot->idname= "MARKER_OT_duplicate"; /* api callbacks */ @@ -990,7 +992,7 @@ static void MARKER_OT_duplicate(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* rna storage */ - RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, _("Frames"), "", INT_MIN, INT_MAX); } /* ************************** selection ************************************/ @@ -1098,8 +1100,8 @@ static int ed_marker_select_invoke_wrapper(bContext *C, wmOperator *op, wmEvent static void MARKER_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Time Marker"; - ot->description= "Select time marker(s)"; + ot->name= _("Select Time Marker"); + ot->description= _("Select time marker(s)"); ot->idname= "MARKER_OT_select"; /* api callbacks */ @@ -1109,9 +1111,9 @@ static void MARKER_OT_select(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "extend the selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("extend the selection")); #ifdef DURIAN_CAMERA_SWITCH - RNA_def_boolean(ot->srna, "camera", 0, "Camera", "Select the camera"); + RNA_def_boolean(ot->srna, "camera", 0, _("Camera"), _("Select the camera")); #endif } @@ -1182,8 +1184,8 @@ static int ed_marker_select_border_invoke_wrapper(bContext *C, wmOperator *op, w static void MARKER_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Marker Border select"; - ot->description= "Select all time markers using border selection"; + ot->name= _("Marker Border select"); + ot->description= _("Select all time markers using border selection"); ot->idname= "MARKER_OT_select_border"; /* api callbacks */ @@ -1239,8 +1241,8 @@ static int ed_marker_select_all_exec(bContext *C, wmOperator *op) static void MARKER_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "(De)select all markers"; - ot->description= "Change selection of all time markers"; + ot->name= _("(De)select all markers"); + ot->description= _("Change selection of all time markers"); ot->idname= "MARKER_OT_select_all"; /* api callbacks */ @@ -1292,8 +1294,8 @@ static int ed_marker_delete_invoke_wrapper(bContext *C, wmOperator *op, wmEvent static void MARKER_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Markers"; - ot->description= "Delete selected time marker(s)"; + ot->name= _("Delete Markers"); + ot->description= _("Delete selected time marker(s)"); ot->idname= "MARKER_OT_delete"; /* api callbacks */ @@ -1340,8 +1342,8 @@ static int ed_marker_rename_invoke_wrapper(bContext *C, wmOperator *op, wmEvent static void MARKER_OT_rename(wmOperatorType *ot) { /* identifiers */ - ot->name= "Rename Marker"; - ot->description= "Rename first selected time marker"; + ot->name= _("Rename Marker"); + ot->description= _("Rename first selected time marker"); ot->idname= "MARKER_OT_rename"; /* api callbacks */ @@ -1353,7 +1355,7 @@ static void MARKER_OT_rename(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_string(ot->srna, "name", "RenamedMarker", sizeof(((TimeMarker *)NULL)->name), "Name", "New name for marker"); + ot->prop = RNA_def_string(ot->srna, "name", "RenamedMarker", sizeof(((TimeMarker *)NULL)->name), _("Name"), _("New name for marker")); //RNA_def_boolean(ot->srna, "ensure_unique", 0, "Ensure Unique", "Ensure that new name is unique within collection of markers"); } @@ -1393,8 +1395,8 @@ static void MARKER_OT_make_links_scene(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Make Links to Scene"; - ot->description= "Copy selected markers to another scene"; + ot->name= _("Make Links to Scene"); + ot->description= _("Copy selected markers to another scene"); ot->idname= "MARKER_OT_make_links_scene"; /* api callbacks */ @@ -1406,7 +1408,7 @@ static void MARKER_OT_make_links_scene(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", ""); + prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, _("Scene"), ""); RNA_def_enum_funcs(prop, RNA_scene_itemf); ot->prop= prop; @@ -1443,8 +1445,8 @@ static int ed_marker_camera_bind_exec(bContext *C, wmOperator *UNUSED(op)) static void MARKER_OT_camera_bind(wmOperatorType *ot) { /* identifiers */ - ot->name= "Bind Camera to Markers"; - ot->description= "Bind the active camera to selected markers(s)"; + ot->name= _("Bind Camera to Markers"); + ot->description= _("Bind the active camera to selected markers(s)"); ot->idname= "MARKER_OT_camera_bind"; /* api callbacks */ diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 7a94a21d41e..e3438032fec 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -37,6 +37,7 @@ #include "BLO_sys_types.h" #include "BLI_utildefines.h" +#include "BLF_api.h" #include "DNA_anim_types.h" #include "DNA_scene_types.h" @@ -161,9 +162,9 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event) static void ANIM_OT_change_frame(wmOperatorType *ot) { /* identifiers */ - ot->name= "Change frame"; + ot->name= _("Change frame"); ot->idname= "ANIM_OT_change_frame"; - ot->description= "Interactively change the current frame number"; + ot->description= _("Interactively change the current frame number"); /* api callbacks */ ot->exec= change_frame_exec; @@ -175,7 +176,7 @@ static void ANIM_OT_change_frame(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO; /* rna */ - RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME); + RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, _("Frame"), "", MINAFRAME, MAXFRAME); } /* ****************** set preview range operator ****************************/ @@ -216,9 +217,9 @@ static int previewrange_define_exec(bContext *C, wmOperator *op) static void ANIM_OT_previewrange_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Preview Range"; + ot->name= _("Set Preview Range"); ot->idname= "ANIM_OT_previewrange_set"; - ot->description= "Interactively define frame range used for playback"; + ot->description= _("Interactively define frame range used for playback"); /* api callbacks */ ot->invoke= WM_border_select_invoke; @@ -233,11 +234,11 @@ static void ANIM_OT_previewrange_set(wmOperatorType *ot) /* rna */ /* used to define frame range */ - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); /* these are not used, but are needed by borderselect gesture operator stuff */ - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } /* ****************** clear preview range operator ****************************/ @@ -264,9 +265,9 @@ static int previewrange_clear_exec(bContext *C, wmOperator *UNUSED(op)) static void ANIM_OT_previewrange_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Preview Range"; + ot->name= _("Clear Preview Range"); ot->idname= "ANIM_OT_previewrange_clear"; - ot->description= "Clear Preview Range"; + ot->description= _("Clear Preview Range"); /* api callbacks */ ot->exec= previewrange_clear_exec; @@ -332,9 +333,9 @@ static int toggle_time_exec(bContext *C, wmOperator *UNUSED(op)) static void ANIM_OT_time_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Frames/Seconds"; + ot->name= _("Toggle Frames/Seconds"); ot->idname= "ANIM_OT_time_toggle"; - ot->description= "Toggle whether timing is displayed in frames or seconds for active timeline view"; + ot->description= _("Toggle whether timing is displayed in frames or seconds for active timeline view"); /* api callbacks */ ot->exec= toggle_time_exec; diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 75b54a7529a..a8043c806f1 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -40,6 +40,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_object_types.h" #include "DNA_material_types.h" @@ -534,7 +536,7 @@ void ANIM_OT_driver_button_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Create drivers for all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Create drivers for all elements of the array.")); } /* Remove Driver Button Operator ------------------------ */ @@ -586,7 +588,7 @@ void ANIM_OT_driver_button_remove (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Delete drivers for all elements of the array.")); } /* Copy Driver Button Operator ------------------------ */ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 1ba695209b2..deb21719369 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -45,6 +45,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" @@ -1140,9 +1142,9 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Insert Keyframe"; + ot->name= _("Insert Keyframe"); ot->idname= "ANIM_OT_keyframe_insert"; - ot->description= "Insert keyframes on the current frame for all properties in the specified Keying Set"; + ot->description= _("Insert keyframes on the current frame for all properties in the specified Keying Set"); /* callbacks */ ot->exec= insert_key_exec; @@ -1152,7 +1154,7 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* keyingset to use (dynamic enum) */ - prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use"); + prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, _("Keying Set"), _("The Keying Set to use")); RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf); RNA_def_property_flag(prop, PROP_HIDDEN); ot->prop= prop; @@ -1160,7 +1162,7 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot) /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - prop= RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + prop= RNA_def_boolean(ot->srna, "confirm_success", 1, _("Confirm Successful Insert"), _("Show a popup when the keyframes get successfully added")); RNA_def_property_flag(prop, PROP_HIDDEN); } @@ -1193,9 +1195,9 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Insert Keyframe Menu"; + ot->name= _("Insert Keyframe Menu"); ot->idname= "ANIM_OT_keyframe_insert_menu"; - ot->description= "Insert Keyframes for specified Keying Set, with menu of available Keying Sets if undefined"; + ot->description= _("Insert Keyframes for specified Keying Set, with menu of available Keying Sets if undefined"); /* callbacks */ ot->invoke= insert_key_menu_invoke; @@ -1206,7 +1208,7 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* keyingset to use (dynamic enum) */ - prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use"); + prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, _("Keying Set"), _("The Keying Set to use")); RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf); RNA_def_property_flag(prop, PROP_HIDDEN); ot->prop= prop; @@ -1215,14 +1217,14 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot) * - by default, this is disabled so that if a menu is shown, this doesn't come up too */ // XXX should this just be always on? - prop= RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + prop= RNA_def_boolean(ot->srna, "confirm_success", 0, _("Confirm Successful Insert"), _("Show a popup when the keyframes get successfully added")); RNA_def_property_flag(prop, PROP_HIDDEN); /* whether the menu should always be shown * - by default, the menu should only be shown when there is no active Keying Set (2.5 behaviour), * although in some cases it might be useful to always shown (pre 2.5 behaviour) */ - prop= RNA_def_boolean(ot->srna, "always_prompt", 0, "Always Show Menu", ""); + prop= RNA_def_boolean(ot->srna, "always_prompt", 0, _("Always Show Menu"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); } @@ -1287,9 +1289,9 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Delete Keying-Set Keyframe"; + ot->name= _("Delete Keying-Set Keyframe"); ot->idname= "ANIM_OT_keyframe_delete"; - ot->description= "Delete keyframes on the current frame for all properties in the specified Keying Set"; + ot->description= _("Delete keyframes on the current frame for all properties in the specified Keying Set"); /* callbacks */ ot->exec= delete_key_exec; @@ -1299,7 +1301,7 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* keyingset to use (dynamic enum) */ - prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use"); + prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, _("Keying Set"), _("The Keying Set to use")); RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf); RNA_def_property_flag(prop, PROP_HIDDEN); ot->prop= prop; @@ -1307,7 +1309,7 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot) /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + RNA_def_boolean(ot->srna, "confirm_success", 1, _("Confirm Successful Insert"), _("Show a popup when the keyframes get successfully added")); } /* Delete Key Operator ------------------------ */ @@ -1359,8 +1361,8 @@ static int delete_key_v3d_exec (bContext *C, wmOperator *op) void ANIM_OT_keyframe_delete_v3d (wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Keyframe"; - ot->description= "Remove keyframes on current frame for selected object"; + ot->name= _("Delete Keyframe"); + ot->description= _("Remove keyframes on current frame for selected object"); ot->idname= "ANIM_OT_keyframe_delete_v3d"; /* callbacks */ @@ -1449,7 +1451,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op) void ANIM_OT_keyframe_insert_button (wmOperatorType *ot) { /* identifiers */ - ot->name= "Insert Keyframe (Buttons)"; + ot->name= _("Insert Keyframe (Buttons)"); ot->idname= "ANIM_OT_keyframe_insert_button"; /* callbacks */ @@ -1460,7 +1462,7 @@ void ANIM_OT_keyframe_insert_button (wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Insert a keyframe for all element of the array.")); } /* Delete Key Button Operator ------------------------ */ @@ -1521,7 +1523,7 @@ static int delete_key_button_exec (bContext *C, wmOperator *op) void ANIM_OT_keyframe_delete_button (wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Keyframe (Buttons)"; + ot->name= _("Delete Keyframe (Buttons)"); ot->idname= "ANIM_OT_keyframe_delete_button"; /* callbacks */ @@ -1532,7 +1534,7 @@ void ANIM_OT_keyframe_delete_button (wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyfames from all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Delete keyfames from all elements of the array.")); } /* ******************************************* */ diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index c525c9af626..2a64894ca2a 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -45,6 +45,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_scene_types.h" #include "DNA_object_types.h" @@ -142,9 +144,9 @@ static int add_default_keyingset_exec (bContext *C, wmOperator *UNUSED(op)) void ANIM_OT_keying_set_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Empty Keying Set"; + ot->name= _("Add Empty Keying Set"); ot->idname= "ANIM_OT_keying_set_add"; - ot->description= "Add a new (empty) Keying Set to the active Scene"; + ot->description= _("Add a new (empty) Keying Set to the active Scene"); /* callbacks */ ot->exec= add_default_keyingset_exec; @@ -189,9 +191,9 @@ static int remove_active_keyingset_exec (bContext *C, wmOperator *op) void ANIM_OT_keying_set_remove (wmOperatorType *ot) { /* identifiers */ - ot->name= "Removed Active Keying Set"; + ot->name= _("Removed Active Keying Set"); ot->idname= "ANIM_OT_keying_set_remove"; - ot->description= "Remove the active Keying Set"; + ot->description= _("Remove the active Keying Set"); /* callbacks */ ot->exec= remove_active_keyingset_exec; @@ -231,9 +233,9 @@ static int add_empty_ks_path_exec (bContext *C, wmOperator *op) void ANIM_OT_keying_set_path_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Empty Keying Set Path"; + ot->name= _("Add Empty Keying Set Path"); ot->idname= "ANIM_OT_keying_set_path_add"; - ot->description= "Add empty path to active Keying Set"; + ot->description= _("Add empty path to active Keying Set"); /* callbacks */ ot->exec= add_empty_ks_path_exec; @@ -274,9 +276,9 @@ static int remove_active_ks_path_exec (bContext *C, wmOperator *op) void ANIM_OT_keying_set_path_remove (wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Active Keying Set Path"; + ot->name= _("Remove Active Keying Set Path"); ot->idname= "ANIM_OT_keying_set_path_remove"; - ot->description= "Remove active Path from active Keying Set"; + ot->description= _("Remove active Path from active Keying Set"); /* callbacks */ ot->exec= remove_active_ks_path_exec; @@ -372,7 +374,7 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op) void ANIM_OT_keyingset_button_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add to Keying Set"; + ot->name= _("Add to Keying Set"); ot->idname= "ANIM_OT_keyingset_button_add"; /* callbacks */ @@ -383,7 +385,7 @@ void ANIM_OT_keyingset_button_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Add all elements of the array to a Keying Set."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Add all elements of the array to a Keying Set.")); } /* Remove from KeyingSet Button Operator ------------------------ */ @@ -451,7 +453,7 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op) void ANIM_OT_keyingset_button_remove (wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove from Keying Set"; + ot->name= _("Remove from Keying Set"); ot->idname= "ANIM_OT_keyingset_button_remove"; /* callbacks */ @@ -494,7 +496,7 @@ static int keyingset_active_menu_exec (bContext *C, wmOperator *op) void ANIM_OT_keying_set_active_set (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Active Keying Set"; + ot->name= _("Set Active Keying Set"); ot->idname= "ANIM_OT_keying_set_active_set"; /* callbacks */ @@ -508,7 +510,7 @@ void ANIM_OT_keying_set_active_set (wmOperatorType *ot) /* keyingset to use * - here the type is int not enum, since many of the indices here are determined dynamically */ - RNA_def_int(ot->srna, "type", 0, INT_MIN, INT_MAX, "Keying Set Number", "Index (determined internally) of the Keying Set to use", 0, 1); + RNA_def_int(ot->srna, "type", 0, INT_MIN, INT_MAX, _("Keying Set Number"), _("Index (determined internally) of the Keying Set to use"), 0, 1); } /* ******************************************* */ diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt index 9a44525611a..7ecbdc9ebe5 100644 --- a/source/blender/editors/armature/CMakeLists.txt +++ b/source/blender/editors/armature/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/armature/SConscript b/source/blender/editors/armature/SConscript index beabd912a20..d790a392407 100644 --- a/source/blender/editors/armature/SConscript +++ b/source/blender/editors/armature/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf ../../blenloader' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf ../../blenloader' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../makesrna #/intern/opennl/extern' diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index 16b748737ca..88393f97077 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -39,6 +39,7 @@ #include "BLI_math.h" #include "BLI_blenlib.h" +#include "BLF_api.h" #include "RNA_access.h" @@ -168,14 +169,14 @@ void ED_operatormacros_armature(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", _("Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER); if(ot) { WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate"); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); } - ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", _("Extrude"), OPTYPE_UNDO|OPTYPE_REGISTER); if(ot) { otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); RNA_boolean_set(otmacro->ptr, "forked", 0); @@ -185,7 +186,7 @@ void ED_operatormacros_armature(void) // XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate? // that would require fixing a properties bug 19733 - ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", _("Extrude Forked"), OPTYPE_UNDO|OPTYPE_REGISTER); if(ot) { otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); RNA_boolean_set(otmacro->ptr, "forked", 1); diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 628cdbf21e9..b0432d980dc 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -53,6 +53,8 @@ #include "BLI_editVert.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" @@ -714,9 +716,9 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op) void POSE_OT_armature_apply (wmOperatorType *ot) { /* identifiers */ - ot->name= "Apply Pose as Rest Pose"; + ot->name= _("Apply Pose as Rest Pose"); ot->idname= "POSE_OT_armature_apply"; - ot->description= "Apply the current pose as the new rest pose"; + ot->description= _("Apply the current pose as the new rest pose"); /* callbacks */ ot->exec= apply_armature_pose2bones_exec; @@ -765,9 +767,9 @@ static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op) void POSE_OT_visual_transform_apply (wmOperatorType *ot) { /* identifiers */ - ot->name= "Apply Visual Transform to Pose"; + ot->name= _("Apply Visual Transform to Pose"); ot->idname= "POSE_OT_visual_transform_apply"; - ot->description= "Apply final constrained position of pose bones to their transform."; + ot->description= _("Apply final constrained position of pose bones to their transform."); /* callbacks */ ot->exec= pose_visual_transform_apply_exec; @@ -1228,9 +1230,9 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_separate (wmOperatorType *ot) { /* identifiers */ - ot->name= "Separate Bones"; + ot->name= _("Separate Bones"); ot->idname= "ARMATURE_OT_separate"; - ot->description= "Isolate selected bones into a separate armature"; + ot->description= _("Isolate selected bones into a separate armature"); /* callbacks */ ot->invoke= WM_operator_confirm; @@ -1452,9 +1454,9 @@ static int pose_select_linked_poll(bContext *C) void POSE_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Connected"; + ot->name= _("Select Connected"); ot->idname= "POSE_OT_select_linked"; - ot->description= "Select bones related to selected ones by parent/child relationships"; + ot->description= _("Select bones related to selected ones by parent/child relationships"); /* api callbacks */ ot->exec= NULL; @@ -1465,7 +1467,7 @@ void POSE_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); } /* **************** END Posemode stuff ********************** */ @@ -1546,9 +1548,9 @@ static int armature_select_linked_poll(bContext *C) void ARMATURE_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Connected"; + ot->name= _("Select Connected"); ot->idname= "ARMATURE_OT_select_linked"; - ot->description= "Select bones related to selected ones by parent/child relationships"; + ot->description= _("Select bones related to selected ones by parent/child relationships"); /* api callbacks */ ot->exec= NULL; @@ -1559,7 +1561,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties s*/ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); } /* does bones and points */ @@ -1731,9 +1733,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Selected Bone(s)"; + ot->name= _("Delete Selected Bone(s)"); ot->idname= "ARMATURE_OT_delete"; - ot->description= "Remove selected bones from the armature"; + ot->description= _("Remove selected bones from the armature"); /* api callbacks */ ot->invoke = WM_operator_confirm; @@ -1980,12 +1982,12 @@ float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const short static EnumPropertyItem prop_calc_roll_types[] = { - {0, "X", 0, "X Axis", ""}, - {1, "Y", 0, "Y Axis", ""}, - {2, "Z", 0, "Z Axis", ""}, - {5, "ACTIVE", 0, "Active Bone", ""}, - {6, "VIEW", 0, "View Axis", ""}, - {7, "CURSOR", 0, "Cursor", ""}, + {0, "X", 0, N_("X Axis"), ""}, + {1, "Y", 0, N_("Y Axis"), ""}, + {2, "Z", 0, N_("Z Axis"), ""}, + {5, "ACTIVE", 0, N_("Active Bone"), ""}, + {6, "VIEW", 0, N_("View Axis"), ""}, + {7, "CURSOR", 0, N_("Cursor"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -2086,9 +2088,9 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op) void ARMATURE_OT_calculate_roll(wmOperatorType *ot) { /* identifiers */ - ot->name= "Recalculate Roll"; + ot->name= _("Recalculate Roll"); ot->idname= "ARMATURE_OT_calculate_roll"; - ot->description= "Automatically fix alignment of select bones' axes"; + ot->description= _("Automatically fix alignment of select bones' axes"); /* api callbacks */ ot->invoke = WM_menu_invoke; @@ -2099,9 +2101,9 @@ void ARMATURE_OT_calculate_roll(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", ""); - RNA_def_boolean(ot->srna, "axis_flip", 0, "Flip Axis", "Negate the alignment axis."); - RNA_def_boolean(ot->srna, "axis_only", 0, "Shortest Rotation", "Ignore the axis direction, use the shortest rotation to align."); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_calc_roll_types), 0, _("Type"), ""); + RNA_def_boolean(ot->srna, "axis_flip", 0, _("Flip Axis"), _("Negate the alignment axis.")); + RNA_def_boolean(ot->srna, "axis_only", 0, _("Shortest Rotation"), _("Ignore the axis direction, use the shortest rotation to align.")); } /* **************** undo for armatures ************** */ @@ -2393,9 +2395,9 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, wmEvent *e void ARMATURE_OT_click_extrude(wmOperatorType *ot) { /* identifiers */ - ot->name= "Click-Extrude"; + ot->name= _("Click-Extrude"); ot->idname= "ARMATURE_OT_click_extrude"; - ot->description= "Create a new bone going from the last selected joint to the mouse position"; + ot->description= _("Create a new bone going from the last selected joint to the mouse position"); /* api callbacks */ ot->invoke = armature_click_extrude_invoke; @@ -2662,9 +2664,9 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_duplicate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Selected Bone(s)"; + ot->name= _("Duplicate Selected Bone(s)"); ot->idname= "ARMATURE_OT_duplicate"; - ot->description= "Make copies of the selected bones within the same armature"; + ot->description= _("Make copies of the selected bones within the same armature"); /* api callbacks */ ot->exec = armature_duplicate_selected_exec; @@ -2936,9 +2938,9 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op) void ARMATURE_OT_fill (wmOperatorType *ot) { /* identifiers */ - ot->name= "Fill Between Joints"; + ot->name= _("Fill Between Joints"); ot->idname= "ARMATURE_OT_fill"; - ot->description= "Add bone between selected joint(s) and/or 3D-Cursor"; + ot->description= _("Add bone between selected joint(s) and/or 3D-Cursor"); /* callbacks */ ot->exec= armature_fill_bones_exec; @@ -3112,14 +3114,14 @@ static int armature_merge_exec (bContext *C, wmOperator *op) void ARMATURE_OT_merge (wmOperatorType *ot) { static EnumPropertyItem merge_types[] = { - {1, "WITHIN_CHAIN", 0, "Within Chains", ""}, + {1, "WITHIN_CHAIN", 0, N_("Within Chains"), ""}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= "Merge Bones"; + ot->name= _("Merge Bones"); ot->idname= "ARMATURE_OT_merge"; - ot->description= "Merge continuous chains of selected bones"; + ot->description= _("Merge continuous chains of selected bones"); /* callbacks */ ot->invoke= WM_menu_invoke; @@ -3130,7 +3132,7 @@ void ARMATURE_OT_merge (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", merge_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(merge_types), 0, _("Type"), ""); } /* ************** END Add/Remove stuff in editmode ************ */ @@ -3166,9 +3168,9 @@ static int armature_hide_exec(bContext *C, wmOperator *op) void ARMATURE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected Bones"; + ot->name= _("Hide Selected Bones"); ot->idname= "ARMATURE_OT_hide"; - ot->description= "Tag selected bones to not be visible in Edit Mode"; + ot->description= _("Tag selected bones to not be visible in Edit Mode"); /* api callbacks */ ot->exec= armature_hide_exec; @@ -3178,7 +3180,7 @@ void ARMATURE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op)) @@ -3206,9 +3208,9 @@ static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal Bones"; + ot->name= _("Reveal Bones"); ot->idname= "ARMATURE_OT_reveal"; - ot->description= "Unhide all bones that have been tagged to be hidden in Edit Mode"; + ot->description= _("Unhide all bones that have been tagged to be hidden in Edit Mode"); /* api callbacks */ ot->exec= armature_reveal_exec; @@ -3415,9 +3417,9 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) void ARMATURE_OT_extrude(wmOperatorType *ot) { /* identifiers */ - ot->name= "Extrude"; + ot->name= _("Extrude"); ot->idname= "ARMATURE_OT_extrude"; - ot->description= "Create new bones from the selected joints"; + ot->description= _("Create new bones from the selected joints"); /* api callbacks */ ot->exec= armature_extrude_exec; @@ -3427,7 +3429,7 @@ void ARMATURE_OT_extrude(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "forked", 0, "Forked", ""); + RNA_def_boolean(ot->srna, "forked", 0, _("Forked"), ""); } /* ********************** Bone Add ********************/ @@ -3478,9 +3480,9 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Bone"; + ot->name= _("Add Bone"); ot->idname= "ARMATURE_OT_bone_primitive_add"; - ot->description= "Add a new bone located at the 3D-Cursor"; + ot->description= _("Add a new bone located at the 3D-Cursor"); /* api callbacks */ ot->exec = armature_bone_primitive_add_exec; @@ -3489,7 +3491,7 @@ void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "name", "Bone", 32, "Name", "Name of the newly created bone"); + RNA_def_string(ot->srna, "name", "Bone", 32, _("Name"), _("Name of the newly created bone")); } @@ -3568,9 +3570,9 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op) void ARMATURE_OT_subdivide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Subdivide Multi"; + ot->name= _("Subdivide Multi"); ot->idname= "ARMATURE_OT_subdivide"; - ot->description= "Break selected bones into chains of smaller bones"; + ot->description= _("Break selected bones into chains of smaller bones"); /* api callbacks */ ot->exec = armature_subdivide_exec; @@ -3580,7 +3582,7 @@ void ARMATURE_OT_subdivide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* Properties */ - RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10); + RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, _("Number of Cuts"), "", 1, 10); } /* ----------- */ @@ -3670,9 +3672,9 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_switch_direction(wmOperatorType *ot) { /* identifiers */ - ot->name= "Switch Direction"; + ot->name= _("Switch Direction"); ot->idname= "ARMATURE_OT_switch_direction"; - ot->description= "Change the direction that a chain of bones points in (head <-> tail swap)"; + ot->description= _("Change the direction that a chain of bones points in (head <-> tail swap)"); /* api callbacks */ ot->exec = armature_switch_direction_exec; @@ -3744,8 +3746,8 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo } static EnumPropertyItem prop_editarm_make_parent_types[] = { - {ARM_PAR_CONNECT, "CONNECTED", 0, "Connected", ""}, - {ARM_PAR_OFFSET, "OFFSET", 0, "Keep Offset", ""}, + {ARM_PAR_CONNECT, "CONNECTED", 0, N_("Connected"), ""}, + {ARM_PAR_OFFSET, "OFFSET", 0, N_("Keep Offset"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -3845,9 +3847,9 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEve void ARMATURE_OT_parent_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Parent"; + ot->name= _("Make Parent"); ot->idname= "ARMATURE_OT_parent_set"; - ot->description= "Set the active bone as the parent of the selected bones"; + ot->description= _("Set the active bone as the parent of the selected bones"); /* api callbacks */ ot->invoke = armature_parent_set_invoke; @@ -3857,12 +3859,12 @@ void ARMATURE_OT_parent_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", prop_editarm_make_parent_types, 0, "ParentType", "Type of parenting"); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_editarm_make_parent_types), 0, _("ParentType"), _("Type of parenting")); } static EnumPropertyItem prop_editarm_clear_parent_types[] = { - {1, "CLEAR", 0, "Clear Parent", ""}, - {2, "DISCONNECT", 0, "Disconnect Bone", ""}, + {1, "CLEAR", 0, N_("Clear Parent"), ""}, + {2, "DISCONNECT", 0, N_("Disconnect Bone"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -3899,9 +3901,9 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op) void ARMATURE_OT_parent_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Parent"; + ot->name= _("Clear Parent"); ot->idname= "ARMATURE_OT_parent_clear"; - ot->description= "Remove the parent-child relationship between selected bones and their parents"; + ot->description= _("Remove the parent-child relationship between selected bones and their parents"); /* api callbacks */ ot->invoke = WM_menu_invoke; @@ -3911,7 +3913,7 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - ot->prop= RNA_def_enum(ot->srna, "type", prop_editarm_clear_parent_types, 0, "ClearType", "What way to clear parenting"); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_editarm_clear_parent_types), 0, _("ClearType"), _("What way to clear parenting")); } /* **************** Selections ******************/ @@ -3936,9 +3938,9 @@ static int armature_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Inverse"; + ot->name= _("Select Inverse"); ot->idname= "ARMATURE_OT_select_inverse"; - ot->description= "Flip the selection status of bones (selected -> unselected, unselected -> selected)"; + ot->description= _("Flip the selection status of bones (selected -> unselected, unselected -> selected)"); /* api callbacks */ ot->exec= armature_select_inverse_exec; @@ -3996,9 +3998,9 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op) void ARMATURE_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; + ot->name= _("Select or Deselect All"); ot->idname= "ARMATURE_OT_select_all"; - ot->description= "Toggle selection status of all bones"; + ot->description= _("Toggle selection status of all bones"); /* api callbacks */ ot->exec= armature_de_select_all_exec; @@ -4071,15 +4073,15 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op) void ARMATURE_OT_select_hierarchy(wmOperatorType *ot) { static EnumPropertyItem direction_items[]= { - {BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""}, - {BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""}, + {BONE_SELECT_PARENT, "PARENT", 0, N_("Select Parent"), ""}, + {BONE_SELECT_CHILD, "CHILD", 0, N_("Select Child"), ""}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= "Select Hierarchy"; + ot->name= _("Select Hierarchy"); ot->idname= "ARMATURE_OT_select_hierarchy"; - ot->description= "Select immediate parent/children of selected bones"; + ot->description= _("Select immediate parent/children of selected bones"); /* api callbacks */ ot->exec= armature_select_hierarchy_exec; @@ -4089,9 +4091,9 @@ void ARMATURE_OT_select_hierarchy(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "direction", direction_items, - BONE_SELECT_PARENT, "Direction", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Add to Selection", ""); + RNA_def_enum(ot->srna, "direction", RNA_enum_items_gettexted(direction_items), + BONE_SELECT_PARENT, _("Direction"), ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Add to Selection"), ""); } /* ***************** EditBone Alignment ********************* */ @@ -4216,9 +4218,9 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op) void ARMATURE_OT_align(wmOperatorType *ot) { /* identifiers */ - ot->name= "Align Bones"; + ot->name= _("Align Bones"); ot->idname= "ARMATURE_OT_align"; - ot->description= "Align selected bones to the active bone (or to their parent)"; + ot->description= _("Align selected bones to the active bone (or to their parent)"); /* api callbacks */ ot->invoke = WM_operator_confirm; @@ -4931,9 +4933,9 @@ static int pose_clear_scale_exec(bContext *C, wmOperator *op) void POSE_OT_scale_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Pose Scale"; + ot->name= _("Clear Pose Scale"); ot->idname= "POSE_OT_scale_clear"; - ot->description = "Reset scaling of selected bones to their default values"; + ot->description = _("Reset scaling of selected bones to their default values"); /* api callbacks */ ot->exec = pose_clear_scale_exec; @@ -4952,9 +4954,9 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op) void POSE_OT_rot_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Pose Rotation"; + ot->name= _("Clear Pose Rotation"); ot->idname= "POSE_OT_rot_clear"; - ot->description = "Reset rotations of selected bones to their default values"; + ot->description = _("Reset rotations of selected bones to their default values"); /* api callbacks */ ot->exec = pose_clear_rot_exec; @@ -4973,9 +4975,9 @@ static int pose_clear_loc_exec(bContext *C, wmOperator *op) void POSE_OT_loc_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Pose Location"; + ot->name= _("Clear Pose Location"); ot->idname= "POSE_OT_loc_clear"; - ot->description = "Reset locations of selected bones to their default values"; + ot->description = _("Reset locations of selected bones to their default values"); /* api callbacks */ ot->exec = pose_clear_loc_exec; @@ -4994,9 +4996,9 @@ static int pose_clear_transforms_exec(bContext *C, wmOperator *op) void POSE_OT_transforms_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Pose Transforms"; + ot->name= _("Clear Pose Transforms"); ot->idname= "POSE_OT_transforms_clear"; - ot->description = "Reset location, rotation, and scaling of selected bones to their default values"; + ot->description = _("Reset location, rotation, and scaling of selected bones to their default values"); /* api callbacks */ ot->exec = pose_clear_transforms_exec; @@ -5028,9 +5030,9 @@ static int pose_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void POSE_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Inverse"; + ot->name= _("Select Inverse"); ot->idname= "POSE_OT_select_inverse"; - ot->description= "Flip the selection status of bones (selected -> unselected, unselected -> selected)"; + ot->description= _("Flip the selection status of bones (selected -> unselected, unselected -> selected)"); /* api callbacks */ ot->exec= pose_select_inverse_exec; @@ -5079,9 +5081,9 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op) void POSE_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; + ot->name= _("Select or Deselect All"); ot->idname= "POSE_OT_select_all"; - ot->description= "Toggle selection status of all bones"; + ot->description= _("Toggle selection status of all bones"); /* api callbacks */ ot->exec= pose_de_select_all_exec; @@ -5123,9 +5125,9 @@ static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op)) void POSE_OT_select_parent(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Parent Bone"; + ot->name= _("Select Parent Bone"); ot->idname= "POSE_OT_select_parent"; - ot->description= "Select bones that are parents of the currently selected bones"; + ot->description= _("Select bones that are parents of the currently selected bones"); /* api callbacks */ ot->exec= pose_select_parent_exec; @@ -5188,9 +5190,9 @@ static int pose_hide_exec(bContext *C, wmOperator *op) void POSE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected"; + ot->name= _("Hide Selected"); ot->idname= "POSE_OT_hide"; - ot->description= "Tag selected bones to not be visible in Pose Mode"; + ot->description= _("Tag selected bones to not be visible in Pose Mode"); /* api callbacks */ ot->exec= pose_hide_exec; @@ -5200,7 +5202,7 @@ void POSE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", ""); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), ""); } static int show_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr)) @@ -5234,9 +5236,9 @@ static int pose_reveal_exec(bContext *C, wmOperator *UNUSED(op)) void POSE_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal Selected"; + ot->name= _("Reveal Selected"); ot->idname= "POSE_OT_reveal"; - ot->description= "Unhide all bones that have been tagged to be hidden in Pose Mode"; + ot->description= _("Unhide all bones that have been tagged to be hidden in Pose Mode"); /* api callbacks */ ot->exec= pose_reveal_exec; @@ -5449,9 +5451,9 @@ static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) void ARMATURE_OT_flip_names (wmOperatorType *ot) { /* identifiers */ - ot->name= "Flip Names"; + ot->name= _("Flip Names"); ot->idname= "ARMATURE_OT_flip_names"; - ot->description= "Flips (and corrects) the axis suffixes of the names of selected bones"; + ot->description= _("Flips (and corrects) the axis suffixes of the names of selected bones"); /* api callbacks */ ot->exec= armature_flip_names_exec; @@ -5495,15 +5497,15 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op) void ARMATURE_OT_autoside_names (wmOperatorType *ot) { static EnumPropertyItem axis_items[]= { - {0, "XAXIS", 0, "X-Axis", "Left/Right"}, - {1, "YAXIS", 0, "Y-Axis", "Front/Back"}, - {2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"}, + {0, "XAXIS", 0, N_("X-Axis"), N_("Left/Right")}, + {1, "YAXIS", 0, N_("Y-Axis"), N_("Front/Back")}, + {2, "ZAXIS", 0, N_("Z-Axis"), N_("Top/Bottom")}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "AutoName by Axis"; + ot->name= _("AutoName by Axis"); ot->idname= "ARMATURE_OT_autoside_names"; - ot->description= "Automatically renames the selected bones according to which side of the target axis they fall on"; + ot->description= _("Automatically renames the selected bones according to which side of the target axis they fall on"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -5514,7 +5516,7 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* settings */ - ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with."); + ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, _("Axis"), _("Axis tag names with.")); } diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 97f85b92b32..20f1c72ed9e 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -44,6 +44,8 @@ #include "BLI_graph.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_sketch.h" @@ -2841,7 +2843,7 @@ int ED_operator_sketch_mode(const bContext *C) void SKETCH_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "delete"; + ot->name= _("delete"); ot->idname= "SKETCH_OT_delete"; /* api callbacks */ @@ -2856,7 +2858,7 @@ void SKETCH_OT_delete(wmOperatorType *ot) void SKETCH_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "select"; + ot->name= _("select"); ot->idname= "SKETCH_OT_select"; /* api callbacks */ @@ -2871,7 +2873,7 @@ void SKETCH_OT_select(wmOperatorType *ot) void SKETCH_OT_cancel_stroke(wmOperatorType *ot) { /* identifiers */ - ot->name= "cancel stroke"; + ot->name= _("cancel stroke"); ot->idname= "SKETCH_OT_cancel_stroke"; /* api callbacks */ @@ -2886,7 +2888,7 @@ void SKETCH_OT_cancel_stroke(wmOperatorType *ot) void SKETCH_OT_convert(wmOperatorType *ot) { /* identifiers */ - ot->name= "convert"; + ot->name= _("convert"); ot->idname= "SKETCH_OT_convert"; /* api callbacks */ @@ -2901,7 +2903,7 @@ void SKETCH_OT_convert(wmOperatorType *ot) void SKETCH_OT_finish_stroke(wmOperatorType *ot) { /* identifiers */ - ot->name= "end stroke"; + ot->name= _("end stroke"); ot->idname= "SKETCH_OT_finish_stroke"; /* api callbacks */ @@ -2916,7 +2918,7 @@ void SKETCH_OT_finish_stroke(wmOperatorType *ot) void SKETCH_OT_draw_preview(wmOperatorType *ot) { /* identifiers */ - ot->name= "draw preview"; + ot->name= _("draw preview"); ot->idname= "SKETCH_OT_draw_preview"; /* api callbacks */ @@ -2924,7 +2926,7 @@ void SKETCH_OT_draw_preview(wmOperatorType *ot) ot->poll= ED_operator_sketch_mode_active_stroke; - RNA_def_boolean(ot->srna, "snap", 0, "Snap", ""); + RNA_def_boolean(ot->srna, "snap", 0, _("Snap"), ""); /* flags */ // ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2933,7 +2935,7 @@ void SKETCH_OT_draw_preview(wmOperatorType *ot) void SKETCH_OT_draw_stroke(wmOperatorType *ot) { /* identifiers */ - ot->name= "draw stroke"; + ot->name= _("draw stroke"); ot->idname= "SKETCH_OT_draw_stroke"; /* api callbacks */ @@ -2943,7 +2945,7 @@ void SKETCH_OT_draw_stroke(wmOperatorType *ot) ot->poll= (int (*)(bContext *))ED_operator_sketch_mode; - RNA_def_boolean(ot->srna, "snap", 0, "Snap", ""); + RNA_def_boolean(ot->srna, "snap", 0, _("Snap"), ""); /* flags */ ot->flag= OPTYPE_BLOCKING; // OPTYPE_REGISTER|OPTYPE_UNDO @@ -2952,7 +2954,7 @@ void SKETCH_OT_draw_stroke(wmOperatorType *ot) void SKETCH_OT_gesture(wmOperatorType *ot) { /* identifiers */ - ot->name= "gesture"; + ot->name= _("gesture"); ot->idname= "SKETCH_OT_gesture"; /* api callbacks */ @@ -2962,7 +2964,7 @@ void SKETCH_OT_gesture(wmOperatorType *ot) ot->poll= ED_operator_sketch_mode_gesture; - RNA_def_boolean(ot->srna, "snap", 0, "Snap", ""); + RNA_def_boolean(ot->srna, "snap", 0, _("Snap"), ""); /* flags */ ot->flag= OPTYPE_BLOCKING; // OPTYPE_UNDO diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c index 3d6888d87dc..2ec91cca250 100644 --- a/source/blender/editors/armature/poseSlide.c +++ b/source/blender/editors/armature/poseSlide.c @@ -45,6 +45,8 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_object_types.h" @@ -682,9 +684,9 @@ static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *ps /* common code for defining RNA properties */ static void pose_slide_opdef_properties (wmOperatorType *ot) { - RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, "Previous Keyframe", "Frame number of keyframe immediately before the current frame.", 0, 50); - RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, "Next Keyframe", "Frame number of keyframe immediately after the current frame.", 0, 50); - RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, "Percentage", "Weighting factor for the sliding operation", 0.3, 0.7); + RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, _("Previous Keyframe"), _("Frame number of keyframe immediately before the current frame."), 0, 50); + RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, _("Next Keyframe"), _("Frame number of keyframe immediately after the current frame."), 0, 50); + RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, _("Percentage"), _("Weighting factor for the sliding operation"), 0.3, 0.7); } /* ------------------------------------ */ @@ -726,9 +728,9 @@ static int pose_slide_push_exec (bContext *C, wmOperator *op) void POSE_OT_push (wmOperatorType *ot) { /* identifiers */ - ot->name= "Push Pose"; + ot->name= _("Push Pose"); ot->idname= "POSE_OT_push"; - ot->description= "Exaggerate the current pose"; + ot->description= _("Exaggerate the current pose"); /* callbacks */ ot->exec= pose_slide_push_exec; @@ -783,9 +785,9 @@ static int pose_slide_relax_exec (bContext *C, wmOperator *op) void POSE_OT_relax (wmOperatorType *ot) { /* identifiers */ - ot->name= "Relax Pose"; + ot->name= _("Relax Pose"); ot->idname= "POSE_OT_relax"; - ot->description= "Make the current pose more similar to its surrounding ones"; + ot->description= _("Make the current pose more similar to its surrounding ones"); /* callbacks */ ot->exec= pose_slide_relax_exec; @@ -840,9 +842,9 @@ static int pose_slide_breakdown_exec (bContext *C, wmOperator *op) void POSE_OT_breakdown (wmOperatorType *ot) { /* identifiers */ - ot->name= "Pose Breakdowner"; + ot->name= _("Pose Breakdowner"); ot->idname= "POSE_OT_breakdown"; - ot->description= "Create a suitable breakdown pose on the current frame"; + ot->description= _("Create a suitable breakdown pose on the current frame"); /* callbacks */ ot->exec= pose_slide_breakdown_exec; @@ -1195,18 +1197,18 @@ static int pose_propagate_exec (bContext *C, wmOperator *op) void POSE_OT_propagate (wmOperatorType *ot) { static EnumPropertyItem terminate_items[]= { - {POSE_PROPAGATE_SMART_HOLDS, "WHILE_HELD", 0, "While Held", "Propagate pose to all keyframes after current frame that don't change (Default behaviour)"}, - {POSE_PROPAGATE_NEXT_KEY, "NEXT_KEY", 0, "To Next Keyframe", "Propagate pose to first keyframe following the current frame only"}, - {POSE_PROPAGATE_LAST_KEY, "LAST_KEY", 0, "To Last Keyframe", "Propagate pose to the last keyframe only (i.e. making action cyclic)"}, - {POSE_PROPAGATE_BEFORE_FRAME, "BEFORE_FRAME", 0, "Before Frame", "Propagate pose to all keyframes between current frame and 'Frame' property"}, - {POSE_PROPAGATE_BEFORE_END, "BEFORE_END", 0, "Before Last Keyframe", "Propagate pose to all keyframes from current frame until no more are found"}, - {POSE_PROPAGATE_SELECTED_MARKERS, "SELECTED_MARKERS", 0, "On Selected Markers", "Propagate pose to all keyframes occurring on frames with Scene Markers after the current frame"}, + {POSE_PROPAGATE_SMART_HOLDS, "WHILE_HELD", 0, N_("While Held"), N_("Propagate pose to all keyframes after current frame that don't change (Default behaviour)")}, + {POSE_PROPAGATE_NEXT_KEY, "NEXT_KEY", 0, N_("To Next Keyframe"), N_("Propagate pose to first keyframe following the current frame only")}, + {POSE_PROPAGATE_LAST_KEY, "LAST_KEY", 0, N_("To Last Keyframe"), N_("Propagate pose to the last keyframe only (i.e. making action cyclic)")}, + {POSE_PROPAGATE_BEFORE_FRAME, "BEFORE_FRAME", 0, N_("Before Frame"), N_("Propagate pose to all keyframes between current frame and 'Frame' property")}, + {POSE_PROPAGATE_BEFORE_END, "BEFORE_END", 0, N_("Before Last Keyframe"), N_("Propagate pose to all keyframes from current frame until no more are found")}, + {POSE_PROPAGATE_SELECTED_MARKERS, "SELECTED_MARKERS", 0, N_("On Selected Markers"), N_("Propagate pose to all keyframes occurring on frames with Scene Markers after the current frame")}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Propagate Pose"; + ot->name= _("Propagate Pose"); ot->idname= "POSE_OT_propagate"; - ot->description= "Copy selected aspects of the current pose to subsequent poses already keyframed"; + ot->description= _("Copy selected aspects of the current pose to subsequent poses already keyframed"); /* callbacks */ ot->exec= pose_propagate_exec; @@ -1217,8 +1219,8 @@ void POSE_OT_propagate (wmOperatorType *ot) /* properties */ // TODO: add "fade out" control for tapering off amount of propagation as time goes by? - ot->prop= RNA_def_enum(ot->srna, "mode", terminate_items, POSE_PROPAGATE_SMART_HOLDS, "Terminate Mode", "Method used to determine when to stop propagating pose to keyframes"); - RNA_def_float(ot->srna, "end_frame", 250.0, FLT_MIN, FLT_MAX, "End Frame", "Frame to stop propagating frames to (for 'Before Frame' mode)", 1.0, 250.0); + ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(terminate_items), POSE_PROPAGATE_SMART_HOLDS, _("Terminate Mode"), _("Method used to determine when to stop propagating pose to keyframes")); + RNA_def_float(ot->srna, "end_frame", 250.0, FLT_MIN, FLT_MAX, _("End Frame"), _("Frame to stop propagating frames to (for 'Before Frame' mode)"), 1.0, 250.0); } /* **************************************************** */ diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 5b4da1a38df..dc47ad1a1e1 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -45,6 +45,8 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_object_types.h" @@ -221,9 +223,9 @@ static int poselib_new_exec (bContext *C, wmOperator *UNUSED(op)) void POSELIB_OT_new (wmOperatorType *ot) { /* identifiers */ - ot->name = "New Pose Library"; + ot->name = _("New Pose Library"); ot->idname = "POSELIB_OT_new"; - ot->description = "Add New Pose Library to active Object"; + ot->description = _("Add New Pose Library to active Object"); /* callbacks */ ot->exec = poselib_new_exec; @@ -256,9 +258,9 @@ static int poselib_unlink_exec (bContext *C, wmOperator *UNUSED(op)) void POSELIB_OT_unlink (wmOperatorType *ot) { /* identifiers */ - ot->name = "Unlink Pose Library"; + ot->name = _("Unlink Pose Library"); ot->idname = "POSELIB_OT_unlink"; - ot->description = "Remove Pose Library from active Object"; + ot->description = _("Remove Pose Library from active Object"); /* callbacks */ ot->exec = poselib_unlink_exec; @@ -337,9 +339,9 @@ static int poselib_sanitise_exec (bContext *C, wmOperator *op) void POSELIB_OT_action_sanitise (wmOperatorType *ot) { /* identifiers */ - ot->name = "Sanitise Pose Library Action"; + ot->name = _("Sanitise Pose Library Action"); ot->idname = "POSELIB_OT_action_sanitise"; - ot->description = "Make action suitable for use as a Pose Library"; + ot->description = _("Make action suitable for use as a Pose Library"); /* callbacks */ ot->exec = poselib_sanitise_exec; @@ -391,15 +393,15 @@ static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); /* add new (adds to the first unoccupied frame) */ - uiItemIntO(layout, "Add New", ICON_NONE, "POSELIB_OT_pose_add", "frame", poselib_get_free_index(ob->poselib)); + uiItemIntO(layout, _("Add New"), ICON_NONE, "POSELIB_OT_pose_add", "frame", poselib_get_free_index(ob->poselib)); /* check if we have any choices to add a new pose in any other way */ if ((ob->poselib) && (ob->poselib->markers.first)) { /* add new (on current frame) */ - uiItemIntO(layout, "Add New (Current Frame)", ICON_NONE, "POSELIB_OT_pose_add", "frame", CFRA); + uiItemIntO(layout, _("Add New (Current Frame)"), ICON_NONE, "POSELIB_OT_pose_add", "frame", CFRA); /* replace existing - submenu */ - uiItemMenuF(layout, "Replace Existing...", 0, poselib_add_menu_invoke__replacemenu, NULL); + uiItemMenuF(layout, _("Replace Existing..."), 0, poselib_add_menu_invoke__replacemenu, NULL); } uiPupMenuEnd(C, pup); @@ -463,9 +465,9 @@ static int poselib_add_exec (bContext *C, wmOperator *op) void POSELIB_OT_pose_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "PoseLib Add Pose"; + ot->name= _("PoseLib Add Pose"); ot->idname= "POSELIB_OT_pose_add"; - ot->description= "Add the current Pose to the active Pose Library"; + ot->description= _("Add the current Pose to the active Pose Library"); /* api callbacks */ ot->invoke= poselib_add_menu_invoke; @@ -476,8 +478,8 @@ void POSELIB_OT_pose_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "frame", 1, 0, INT_MAX, "Frame", "Frame to store pose on", 0, INT_MAX); - RNA_def_string(ot->srna, "name", "Pose", 64, "Pose Name", "Name of newly added Pose"); + RNA_def_int(ot->srna, "frame", 1, 0, INT_MAX, _("Frame"), _("Frame to store pose on"), 0, INT_MAX); + RNA_def_string(ot->srna, "name", "Pose", 64, _("Pose Name"), _("Name of newly added Pose")); } /* ----- */ @@ -564,9 +566,9 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "PoseLib Remove Pose"; + ot->name= _("PoseLib Remove Pose"); ot->idname= "POSELIB_OT_pose_remove"; - ot->description= "Remove nth pose from the active Pose Library"; + ot->description= _("Remove nth pose from the active Pose Library"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -577,7 +579,7 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "pose", DummyRNA_DEFAULT_items, 0, "Pose", "The pose to remove"); + prop= RNA_def_enum(ot->srna, "pose", DummyRNA_DEFAULT_items, 0, _("Pose"), _("The pose to remove")); RNA_def_enum_funcs(prop, poselib_stored_pose_itemf); ot->prop= prop; } @@ -649,9 +651,9 @@ void POSELIB_OT_pose_rename (wmOperatorType *ot) }; /* identifiers */ - ot->name= "PoseLib Rename Pose"; + ot->name= _("PoseLib Rename Pose"); ot->idname= "POSELIB_OT_pose_rename"; - ot->description= "Rename specified pose from the active Pose Library"; + ot->description= _("Rename specified pose from the active Pose Library"); /* api callbacks */ ot->invoke= poselib_rename_invoke; @@ -1576,9 +1578,9 @@ static int poselib_preview_exec (bContext *C, wmOperator *op) void POSELIB_OT_browse_interactive (wmOperatorType *ot) { /* identifiers */ - ot->name= "PoseLib Browse Poses"; + ot->name= _("PoseLib Browse Poses"); ot->idname= "POSELIB_OT_browse_interactive"; - ot->description= "Interactively browse poses in 3D-View"; + ot->description= _("Interactively browse poses in 3D-View"); /* callbacks */ ot->invoke= poselib_preview_invoke; @@ -1592,7 +1594,7 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot) /* properties */ // TODO: make the pose_index into a proper enum instead of a cryptic int... - ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); + ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, _("Pose"), _("Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)"), 0, INT_MAX); // XXX: percentage vs factor? /* not used yet */ @@ -1602,9 +1604,9 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot) void POSELIB_OT_apply_pose (wmOperatorType *ot) { /* identifiers */ - ot->name = "Apply Pose Library Pose"; + ot->name = _("Apply Pose Library Pose"); ot->idname = "POSELIB_OT_apply_pose"; - ot->description = "Apply specified Pose Library pose to the rig"; + ot->description = _("Apply specified Pose Library pose to the rig"); /* callbacks */ ot->exec= poselib_preview_exec; @@ -1615,5 +1617,5 @@ void POSELIB_OT_apply_pose (wmOperatorType *ot) /* properties */ // TODO: make the pose_index into a proper enum instead of a cryptic int... - ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); + ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, _("Pose"), _("Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)"), 0, INT_MAX); } diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 8176aa5893b..cd632333ce7 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -43,6 +43,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" @@ -282,9 +284,9 @@ static int pose_calculate_paths_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_paths_calculate (wmOperatorType *ot) { /* identifiers */ - ot->name= "Calculate Bone Paths"; + ot->name= _("Calculate Bone Paths"); ot->idname= "POSE_OT_paths_calculate"; - ot->description= "Calculate paths for the selected bones"; + ot->description= _("Calculate paths for the selected bones"); /* api callbacks */ ot->exec= pose_calculate_paths_exec; @@ -350,9 +352,9 @@ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_paths_clear (wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Bone Paths"; + ot->name= _("Clear Bone Paths"); ot->idname= "POSE_OT_paths_clear"; - ot->description= "Clear path caches for selected bones"; + ot->description= _("Clear path caches for selected bones"); /* api callbacks */ ot->exec= pose_clear_paths_exec; @@ -410,9 +412,9 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op void POSE_OT_select_constraint_target(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Constraint Target"; + ot->name= _("Select Constraint Target"); ot->idname= "POSE_OT_select_constraint_target"; - ot->description= "Select bones used as targets for the currently selected bones"; + ot->description= _("Select bones used as targets for the currently selected bones"); /* api callbacks */ ot->exec= pose_select_constraint_target_exec; @@ -481,15 +483,15 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op) void POSE_OT_select_hierarchy(wmOperatorType *ot) { static EnumPropertyItem direction_items[]= { - {BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""}, - {BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""}, + {BONE_SELECT_PARENT, "PARENT", 0, N_("Select Parent"), ""}, + {BONE_SELECT_CHILD, "CHILD", 0, N_("Select Child"), ""}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= "Select Hierarchy"; + ot->name= _("Select Hierarchy"); ot->idname= "POSE_OT_select_hierarchy"; - ot->description= "Select immediate parent/children of selected bones"; + ot->description= _("Select immediate parent/children of selected bones"); /* api callbacks */ ot->exec= pose_select_hierarchy_exec; @@ -499,8 +501,8 @@ void POSE_OT_select_hierarchy(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "direction", direction_items, BONE_SELECT_PARENT, "Direction", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Add to Selection", ""); + ot->prop= RNA_def_enum(ot->srna, "direction", RNA_enum_items_gettexted(direction_items), BONE_SELECT_PARENT, _("Direction"), ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Add to Selection"), ""); } @@ -640,14 +642,14 @@ static int pose_select_grouped_exec (bContext *C, wmOperator *op) void POSE_OT_select_grouped (wmOperatorType *ot) { static EnumPropertyItem prop_select_grouped_types[] = { - {0, "LAYER", 0, "Layer", "Shared layers"}, - {1, "GROUP", 0, "Group", "Shared group"}, + {0, "LAYER", 0, N_("Layer"), N_("Shared layers")}, + {1, "GROUP", 0, N_("Group"), N_("Shared group")}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= "Select Grouped"; - ot->description = "Select all visible bones grouped by similar properties"; + ot->name= _("Select Grouped"); + ot->description = _("Select all visible bones grouped by similar properties"); ot->idname= "POSE_OT_select_grouped"; /* api callbacks */ @@ -659,8 +661,8 @@ void POSE_OT_select_grouped (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); - ot->prop= RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", ""); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_select_grouped_types), 0, _("Type"), ""); } @@ -706,9 +708,9 @@ static int pose_bone_flip_active_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_select_flip_active(wmOperatorType *ot) { /* identifiers */ - ot->name= "Flip Selected Active Bone"; + ot->name= _("Flip Selected Active Bone"); ot->idname= "POSE_OT_select_flip_active"; - ot->description= "Activate the bone with a flipped name."; + ot->description= _("Activate the bone with a flipped name."); /* api callbacks */ ot->exec= pose_bone_flip_active_exec; @@ -971,9 +973,9 @@ static int pose_copy_exec (bContext *C, wmOperator *op) void POSE_OT_copy (wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Pose"; + ot->name= _("Copy Pose"); ot->idname= "POSE_OT_copy"; - ot->description= "Copies the current pose of the selected bones to copy/paste buffer"; + ot->description= _("Copies the current pose of the selected bones to copy/paste buffer"); /* api callbacks */ ot->exec= pose_copy_exec; @@ -1156,9 +1158,9 @@ static int pose_paste_exec (bContext *C, wmOperator *op) void POSE_OT_paste (wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste Pose"; + ot->name= _("Paste Pose"); ot->idname= "POSE_OT_paste"; - ot->description= "Pastes the stored pose on to the current pose"; + ot->description= _("Pastes the stored pose on to the current pose"); /* api callbacks */ ot->exec= pose_paste_exec; @@ -1168,8 +1170,8 @@ void POSE_OT_paste (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "flipped", 0, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose"); - RNA_def_boolean(ot->srna, "selected_mask", 0, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose"); + RNA_def_boolean(ot->srna, "flipped", 0, _("Flipped on X-Axis"), _("Paste the stored pose flipped on to current pose")); + RNA_def_boolean(ot->srna, "selected_mask", 0, _("On Selected Only"), _("Only paste the stored pose on to selected bones in the current pose")); } /* ********************************************** */ @@ -1202,9 +1204,9 @@ static int pose_group_add_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Bone Group"; + ot->name= _("Add Bone Group"); ot->idname= "POSE_OT_group_add"; - ot->description= "Add a new bone group"; + ot->description= _("Add a new bone group"); /* api callbacks */ ot->exec= pose_group_add_exec; @@ -1242,9 +1244,9 @@ static int pose_group_remove_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_remove (wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Bone Group"; + ot->name= _("Remove Bone Group"); ot->idname= "POSE_OT_group_remove"; - ot->description= "Removes the active bone group"; + ot->description= _("Removes the active bone group"); /* api callbacks */ ot->exec= pose_group_remove_exec; @@ -1357,9 +1359,9 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op) void POSE_OT_group_assign (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Selected to Bone Group"; + ot->name= _("Add Selected to Bone Group"); ot->idname= "POSE_OT_group_assign"; - ot->description= "Add selected bones to the chosen bone group"; + ot->description= _("Add selected bones to the chosen bone group"); /* api callbacks */ ot->invoke= pose_groups_menu_invoke; @@ -1370,7 +1372,7 @@ void POSE_OT_group_assign (wmOperatorType *ot) ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "type", 0, 0, 10, "Bone Group Index", "", 0, INT_MAX); + RNA_def_int(ot->srna, "type", 0, 0, 10, _("Bone Group Index"), "", 0, INT_MAX); } @@ -1413,9 +1415,9 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_unassign (wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Selected from Bone Groups"; + ot->name= _("Remove Selected from Bone Groups"); ot->idname= "POSE_OT_group_unassign"; - ot->description= "Remove selected bones from all bone groups"; + ot->description= _("Remove selected bones from all bone groups"); /* api callbacks */ ot->exec= pose_group_unassign_exec; @@ -1471,9 +1473,9 @@ static int pose_group_select_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_select (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Bones of Bone Group"; + ot->name= _("Select Bones of Bone Group"); ot->idname= "POSE_OT_group_select"; - ot->description= "Select bones in active Bone Group"; + ot->description= _("Select bones in active Bone Group"); /* api callbacks */ ot->exec= pose_group_select_exec; @@ -1509,9 +1511,9 @@ static int pose_group_deselect_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_group_deselect (wmOperatorType *ot) { /* identifiers */ - ot->name= "Deselect Bone Group"; + ot->name= _("Deselect Bone Group"); ot->idname= "POSE_OT_group_deselect"; - ot->description= "Deselect bones of active Bone Group"; + ot->description= _("Deselect bones of active Bone Group"); /* api callbacks */ ot->exec= pose_group_deselect_exec; @@ -1554,9 +1556,9 @@ static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_flip_names (wmOperatorType *ot) { /* identifiers */ - ot->name= "Flip Names"; + ot->name= _("Flip Names"); ot->idname= "POSE_OT_flip_names"; - ot->description= "Flips (and corrects) the axis suffixes of the the names of selected bones"; + ot->description= _("Flips (and corrects) the axis suffixes of the the names of selected bones"); /* api callbacks */ ot->exec= pose_flip_names_exec; @@ -1601,15 +1603,15 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op) void POSE_OT_autoside_names (wmOperatorType *ot) { static EnumPropertyItem axis_items[]= { - {0, "XAXIS", 0, "X-Axis", "Left/Right"}, - {1, "YAXIS", 0, "Y-Axis", "Front/Back"}, - {2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"}, + {0, "XAXIS", 0, N_("X-Axis"), N_("Left/Right")}, + {1, "YAXIS", 0, N_("Y-Axis"), N_("Front/Back")}, + {2, "ZAXIS", 0, N_("Z-Axis"), N_("Top/Bottom")}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "AutoName by Axis"; + ot->name= _("AutoName by Axis"); ot->idname= "POSE_OT_autoside_names"; - ot->description= "Automatically renames the selected bones according to which side of the target axis they fall on"; + ot->description= _("Automatically renames the selected bones according to which side of the target axis they fall on"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1620,7 +1622,7 @@ void POSE_OT_autoside_names (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* settings */ - ot->prop= RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with."); + ot->prop= RNA_def_enum(ot->srna, "axis", RNA_enum_items_gettexted(axis_items), 0, _("Axis"), _("Axis tag names with.")); } /* ********************************************** */ @@ -1666,9 +1668,9 @@ static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op) void ARMATURE_OT_layers_show_all (wmOperatorType *ot) { /* identifiers */ - ot->name= "Show All Layers"; + ot->name= _("Show All Layers"); ot->idname= "ARMATURE_OT_layers_show_all"; - ot->description= "Make all armature layers visible"; + ot->description= _("Make all armature layers visible"); /* callbacks */ ot->exec= pose_armature_layers_showall_exec; @@ -1678,7 +1680,7 @@ void ARMATURE_OT_layers_show_all (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All Layers", "Enable all layers or just the first 16 (top row)"); + ot->prop = RNA_def_boolean(ot->srna, "all", 1, _("All Layers"), _("Enable all layers or just the first 16 (top row)")); } /* ------------------- */ @@ -1732,9 +1734,9 @@ static int pose_armature_layers_exec (bContext *C, wmOperator *op) void POSE_OT_armature_layers (wmOperatorType *ot) { /* identifiers */ - ot->name= "Change Armature Layers"; + ot->name= _("Change Armature Layers"); ot->idname= "POSE_OT_armature_layers"; - ot->description= "Change the visible armature layers"; + ot->description= _("Change the visible armature layers"); /* callbacks */ ot->invoke= pose_armature_layers_invoke; @@ -1745,15 +1747,15 @@ void POSE_OT_armature_layers (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers to make visible"); + RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, _("Layer"), _("Armature layers to make visible")); } void ARMATURE_OT_armature_layers (wmOperatorType *ot) { /* identifiers */ - ot->name= "Change Armature Layers"; + ot->name= _("Change Armature Layers"); ot->idname= "ARMATURE_OT_armature_layers"; - ot->description= "Change the visible armature layers"; + ot->description= _("Change the visible armature layers"); /* callbacks */ ot->invoke= pose_armature_layers_invoke; @@ -1764,7 +1766,7 @@ void ARMATURE_OT_armature_layers (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers to make visible"); + RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, _("Layer"), _("Armature layers to make visible")); } /* ------------------- */ @@ -1826,9 +1828,9 @@ static int pose_bone_layers_exec (bContext *C, wmOperator *op) void POSE_OT_bone_layers (wmOperatorType *ot) { /* identifiers */ - ot->name= "Change Bone Layers"; + ot->name= _("Change Bone Layers"); ot->idname= "POSE_OT_bone_layers"; - ot->description= "Change the layers that the selected bones belong to"; + ot->description= _("Change the layers that the selected bones belong to"); /* callbacks */ ot->invoke= pose_bone_layers_invoke; @@ -1839,7 +1841,7 @@ void POSE_OT_bone_layers (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers that bone belongs to"); + RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, _("Layer"), _("Armature layers that bone belongs to")); } /* ------------------- */ @@ -1898,9 +1900,9 @@ static int armature_bone_layers_exec (bContext *C, wmOperator *op) void ARMATURE_OT_bone_layers (wmOperatorType *ot) { /* identifiers */ - ot->name= "Change Bone Layers"; + ot->name= _("Change Bone Layers"); ot->idname= "ARMATURE_OT_bone_layers"; - ot->description= "Change the layers that the selected bones belong to"; + ot->description= _("Change the layers that the selected bones belong to"); /* callbacks */ ot->invoke= armature_bone_layers_invoke; @@ -1911,7 +1913,7 @@ void ARMATURE_OT_bone_layers (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers that bone belongs to"); + RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, _("Layer"), _("Armature layers that bone belongs to")); } /* ********************************************** */ @@ -1966,9 +1968,9 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op)) void POSE_OT_quaternions_flip (wmOperatorType *ot) { /* identifiers */ - ot->name = "Flip Quats"; + ot->name = _("Flip Quats"); ot->idname= "POSE_OT_quaternions_flip"; - ot->description= "Flip quaternion values to achieve desired rotations, while maintaining the same orientations"; + ot->description= _("Flip quaternion values to achieve desired rotations, while maintaining the same orientations"); /* callbacks */ ot->exec= pose_flip_quats_exec; diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt index 9bad02eca1f..6e975e20cd7 100644 --- a/source/blender/editors/curve/CMakeLists.txt +++ b/source/blender/editors/curve/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/curve/SConscript b/source/blender/editors/curve/SConscript index efb56ce5466..c23773f7fb0 100644 --- a/source/blender/editors/curve/SConscript +++ b/source/blender/editors/curve/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../blenloader' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 06d88b16fa8..a866df86278 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -56,6 +56,8 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_depsgraph.h" @@ -1426,7 +1428,7 @@ static int separate_exec(bContext *C, wmOperator *op) void CURVE_OT_separate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Separate"; + ot->name= _("Separate"); ot->idname= "CURVE_OT_separate"; /* api callbacks */ @@ -2034,8 +2036,8 @@ static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_switch_direction(wmOperatorType *ot) { /* identifiers */ - ot->name= "Switch Direction"; - ot->description= "Switch direction of selected splines"; + ot->name= _("Switch Direction"); + ot->description= _("Switch direction of selected splines"); ot->idname= "CURVE_OT_switch_direction"; /* api callbacks */ @@ -2082,8 +2084,8 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op) void CURVE_OT_spline_weight_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Goal Weight"; - ot->description= "Set softbody goal weight for selected points"; + ot->name= _("Set Goal Weight"); + ot->description= _("Set softbody goal weight for selected points"); ot->idname= "CURVE_OT_spline_weight_set"; /* api callbacks */ @@ -2095,7 +2097,7 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_factor(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f); + RNA_def_float_factor(ot->srna, "weight", 1.0f, 0.0f, 1.0f, _("Weight"), "", 0.0f, 1.0f); } /******************* set radius operator ******************/ @@ -2134,8 +2136,8 @@ static int set_radius_exec(bContext *C, wmOperator *op) void CURVE_OT_radius_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Curve Radius"; - ot->description= "Set per-point radius which is used for bevel tapering"; + ot->name= _("Set Curve Radius"); + ot->description= _("Set per-point radius which is used for bevel tapering"); ot->idname= "CURVE_OT_radius_set"; /* api callbacks */ @@ -2147,7 +2149,7 @@ void CURVE_OT_radius_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float(ot->srna, "radius", 1.0f, 0.0f, FLT_MAX, "Radius", "", 0.0001f, 10.0f); + RNA_def_float(ot->srna, "radius", 1.0f, 0.0f, FLT_MAX, _("Radius"), "", 0.0001f, 10.0f); } /********************* smooth operator ********************/ @@ -2210,8 +2212,8 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_smooth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth"; - ot->description= "Flatten angles of selected points"; + ot->name= _("Smooth"); + ot->description= _("Flatten angles of selected points"); ot->idname= "CURVE_OT_smooth"; /* api callbacks */ @@ -2376,8 +2378,8 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_smooth_radius(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth Curve Radius"; - ot->description= "Flatten radiuses of selected points"; + ot->name= _("Smooth Curve Radius"); + ot->description= _("Flatten radiuses of selected points"); ot->idname= "CURVE_OT_smooth_radius"; /* api clastbacks */ @@ -2530,7 +2532,7 @@ static int de_select_first_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_de_select_first(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect First"; + ot->name= _("Select or Deselect First"); ot->idname= "CURVE_OT_de_select_first"; /* api cfirstbacks */ @@ -2554,7 +2556,7 @@ static int de_select_last_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_de_select_last(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect Last"; + ot->name= _("Select or Deselect Last"); ot->idname= "CURVE_OT_de_select_last"; /* api clastbacks */ @@ -2632,7 +2634,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op) void CURVE_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; + ot->name= _("Select or Deselect All"); ot->idname= "CURVE_OT_select_all"; /* api callbacks */ @@ -2706,7 +2708,7 @@ static int hide_exec(bContext *C, wmOperator *op) void CURVE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected"; + ot->name= _("Hide Selected"); ot->idname= "CURVE_OT_hide"; /* api callbacks */ @@ -2717,7 +2719,7 @@ void CURVE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } /********************** reveal operator *********************/ @@ -2766,7 +2768,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal Hidden"; + ot->name= _("Reveal Hidden"); ot->idname= "CURVE_OT_reveal"; /* api callbacks */ @@ -2824,7 +2826,7 @@ static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Inverse"; + ot->name= _("Select Inverse"); ot->idname= "CURVE_OT_select_inverse"; /* api callbacks */ @@ -3263,8 +3265,8 @@ static int subdivide_exec(bContext *C, wmOperator *op) void CURVE_OT_subdivide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Subdivide"; - ot->description= "Subdivide selected segments"; + ot->name= _("Subdivide"); + ot->description= _("Subdivide selected segments"); ot->idname= "CURVE_OT_subdivide"; /* api callbacks */ @@ -3274,7 +3276,7 @@ void CURVE_OT_subdivide(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of cuts", "", 1, 10); + RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, _("Number of cuts"), "", 1, 10); } /******************** find nearest ************************/ @@ -3578,16 +3580,16 @@ static int set_spline_type_exec(bContext *C, wmOperator *op) void CURVE_OT_spline_type_set(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { - {CU_POLY, "POLY", 0, "Poly", ""}, - {CU_BEZIER, "BEZIER", 0, "Bezier", ""}, -// {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""}, -// {CU_BSPLINE, "B_SPLINE", 0, "B-Spline", ""}, - {CU_NURBS, "NURBS", 0, "NURBS", ""}, + {CU_POLY, "POLY", 0, N_("Poly"), ""}, + {CU_BEZIER, "BEZIER", 0, N_("Bezier"), ""}, +// {CU_CARDINAL, "CARDINAL", 0, N_("Cardinal"), ""}, +// {CU_BSPLINE, "B_SPLINE", 0, N_("B-Spline"), ""}, + {CU_NURBS, "NURBS", 0, N_("NURBS"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Set Spline Type"; - ot->description = "Set type of active spline"; + ot->name= _("Set Spline Type"); + ot->description = _("Set type of active spline"); ot->idname= "CURVE_OT_spline_type_set"; /* api callbacks */ @@ -3599,7 +3601,7 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, CU_POLY, "Type", "Spline type"); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(type_items), CU_POLY, _("Type"), _("Spline type")); } /***************** set handle type operator *******************/ @@ -3621,16 +3623,16 @@ void CURVE_OT_handle_type_set(wmOperatorType *ot) { /* keep in sync with graphkeys_handle_type_items */ static EnumPropertyItem editcurve_handle_type_items[]= { - {HD_AUTO, "AUTOMATIC", 0, "Automatic", ""}, - {HD_VECT, "VECTOR", 0, "Vector", ""}, - {5, "ALIGNED", 0, "Aligned", ""}, - {6, "FREE_ALIGN", 0, "Free", ""}, - {3, "TOGGLE_FREE_ALIGN", 0, "Toggle Free/Align", ""}, + {HD_AUTO, "AUTOMATIC", 0, N_("Automatic"), ""}, + {HD_VECT, "VECTOR", 0, N_("Vector"), ""}, + {5, "ALIGNED", 0, N_("Aligned"), ""}, + {6, "FREE_ALIGN", 0, N_("Free"), ""}, + {3, "TOGGLE_FREE_ALIGN", 0, N_("Toggle Free/Align"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Set Handle Type"; - ot->description = "Set type of handles for selected control points"; + ot->name= _("Set Handle Type"); + ot->description = _("Set type of handles for selected control points"); ot->idname= "CURVE_OT_handle_type_set"; /* api callbacks */ @@ -3642,7 +3644,7 @@ void CURVE_OT_handle_type_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", editcurve_handle_type_items, 1, "Type", "Spline type"); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(editcurve_handle_type_items), 1, _("Type"), _("Spline type")); } /***************** make segment operator **********************/ @@ -4164,7 +4166,7 @@ static int make_segment_exec(bContext *C, wmOperator *op) void CURVE_OT_make_segment(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Segment"; + ot->name= _("Make Segment"); ot->idname= "CURVE_OT_make_segment"; /* api callbacks */ @@ -4394,7 +4396,7 @@ static int spin_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void CURVE_OT_spin(wmOperatorType *ot) { /* identifiers */ - ot->name= "Spin"; + ot->name= _("Spin"); ot->idname= "CURVE_OT_spin"; /* api callbacks */ @@ -4405,8 +4407,8 @@ void CURVE_OT_spin(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, "Center", "Center in global view space", -FLT_MAX, FLT_MAX); - RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -FLT_MAX, FLT_MAX); + RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, _("Center"), _("Center in global view space"), -FLT_MAX, FLT_MAX); + RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, _("Axis"), _("Axis in global view space"), -FLT_MAX, FLT_MAX); } /***************** add vertex operator **********************/ @@ -4705,7 +4707,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event) void CURVE_OT_vertex_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Vertex"; + ot->name= _("Add Vertex"); ot->idname= "CURVE_OT_vertex_add"; /* api callbacks */ @@ -4717,7 +4719,7 @@ void CURVE_OT_vertex_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location to add new vertex at.", -1e4, 1e4); + RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, _("Location"), _("Location to add new vertex at."), -1e4, 1e4); } /***************** extrude operator **********************/ @@ -4765,8 +4767,8 @@ static int extrude_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void CURVE_OT_extrude(wmOperatorType *ot) { /* identifiers */ - ot->name= "Extrude"; - ot->description = "Extrude selected control point(s) and move"; + ot->name= _("Extrude"); + ot->description = _("Extrude selected control point(s) and move"); ot->idname= "CURVE_OT_extrude"; /* api callbacks */ @@ -4778,7 +4780,7 @@ void CURVE_OT_extrude(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); } /***************** make cyclic operator **********************/ @@ -4889,13 +4891,13 @@ static int toggle_cyclic_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve void CURVE_OT_cyclic_toggle(wmOperatorType *ot) { static EnumPropertyItem direction_items[]= { - {0, "CYCLIC_U", 0, "Cyclic U", ""}, - {1, "CYCLIC_V", 0, "Cyclic V", ""}, + {0, "CYCLIC_U", 0, N_("Cyclic U"), ""}, + {1, "CYCLIC_V", 0, N_("Cyclic V"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Toggle Cyclic"; - ot->description = "Make active spline closed/opened loop"; + ot->name= _("Toggle Cyclic"); + ot->description = _("Make active spline closed/opened loop"); ot->idname= "CURVE_OT_cyclic_toggle"; /* api callbacks */ @@ -4907,7 +4909,7 @@ void CURVE_OT_cyclic_toggle(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to make surface cyclic in."); + RNA_def_enum(ot->srna, "direction", direction_items, 0, _("Direction"), _("Direction to make surface cyclic in.")); } /***************** select linked operator ******************/ @@ -4971,7 +4973,7 @@ static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve void CURVE_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked All"; + ot->name= _("Select Linked All"); ot->idname= "CURVE_OT_select_linked"; /* api callbacks */ @@ -5031,7 +5033,7 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event void CURVE_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; + ot->name= _("Select Linked"); ot->idname= "CURVE_OT_select_linked_pick"; /* api callbacks */ @@ -5042,7 +5044,7 @@ void CURVE_OT_select_linked_pick(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked control points rather than selecting them."); + RNA_def_boolean(ot->srna, "deselect", 0, _("Deselect"), _("Deselect linked control points rather than selecting them.")); } /***************** select row operator **********************/ @@ -5109,7 +5111,7 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_row(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Control Point Row"; + ot->name= _("Select Control Point Row"); ot->idname= "CURVE_OT_select_row"; /* api callbacks */ @@ -5136,7 +5138,7 @@ static int select_next_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_next(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Next"; + ot->name= _("Select Next"); ot->idname= "CURVE_OT_select_next"; /* api callbacks */ @@ -5163,7 +5165,7 @@ static int select_previous_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_previous(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Previous"; + ot->name= _("Select Previous"); ot->idname= "CURVE_OT_select_previous"; /* api callbacks */ @@ -5250,7 +5252,7 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_more(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select More"; + ot->name= _("Select More"); ot->idname= "CURVE_OT_select_more"; /* api callbacks */ @@ -5411,7 +5413,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_select_less(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Less"; + ot->name= _("Select Less"); ot->idname= "CURVE_OT_select_less"; /* api callbacks */ @@ -5474,7 +5476,7 @@ static int select_random_exec(bContext *C, wmOperator *op) void CURVE_OT_select_random(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Random"; + ot->name= _("Select Random"); ot->idname= "CURVE_OT_select_random"; /* api callbacks */ @@ -5485,8 +5487,8 @@ void CURVE_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly.", 0.f, 100.0f); - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first."); + RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, _("Percent"), _("Percentage of elements to select randomly."), 0.f, 100.0f); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend Selection"), _("Extend selection instead of deselecting everything first.")); } /********************* every nth number of point *******************/ @@ -5599,7 +5601,7 @@ static int select_nth_exec(bContext *C, wmOperator *op) void CURVE_OT_select_nth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Nth"; + ot->name= _("Select Nth"); ot->description= ""; ot->idname= "CURVE_OT_select_nth"; @@ -5610,7 +5612,7 @@ void CURVE_OT_select_nth(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "nth", 2, 2, 100, "Nth Selection", "", 1, INT_MAX); + RNA_def_int(ot->srna, "nth", 2, 2, 100, _("Nth Selection"), "", 1, INT_MAX); } /********************** add duplicate operator *********************/ @@ -5638,8 +5640,8 @@ static int duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void CURVE_OT_duplicate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Curve"; - ot->description = "Duplicate selected control points and segments between them"; + ot->name= _("Duplicate Curve"); + ot->description = _("Duplicate selected control points and segments between them"); ot->idname= "CURVE_OT_duplicate"; /* api callbacks */ @@ -5651,7 +5653,7 @@ void CURVE_OT_duplicate(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); } /********************** delete operator *********************/ @@ -5998,14 +6000,14 @@ static int delete_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void CURVE_OT_delete(wmOperatorType *ot) { static EnumPropertyItem type_items[] = { - {0, "SELECTED", 0, "Select", ""}, - {1, "SEGMENT", 0, "Segment", ""}, - {2, "ALL", 0, "All", ""}, + {0, "SELECTED", 0, N_("Select"), ""}, + {1, "SEGMENT", 0, N_("Segment"), ""}, + {2, "ALL", 0, N_("All"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Delete"; - ot->description = "Delete selected control points or segments"; + ot->name= _("Delete"); + ot->description = _("Delete selected control points or segments"); ot->idname= "CURVE_OT_delete"; /* api callbacks */ @@ -6017,7 +6019,7 @@ void CURVE_OT_delete(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Which elements to delete."); + RNA_def_enum(ot->srna, "type", type_items, 0, _("Type"), _("Which elements to delete.")); } /********************** shade smooth/flat operator *********************/ @@ -6048,7 +6050,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) void CURVE_OT_shade_smooth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Smooth"; + ot->name= _("Shade Smooth"); ot->idname= "CURVE_OT_shade_smooth"; /* api callbacks */ @@ -6062,7 +6064,7 @@ void CURVE_OT_shade_smooth(wmOperatorType *ot) void CURVE_OT_shade_flat(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Flat"; + ot->name= _("Shade Flat"); ot->idname= "CURVE_OT_shade_flat"; /* api callbacks */ @@ -6641,8 +6643,8 @@ static int add_primitive_bezier_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Bezier"; - ot->description= "Construct a Bezier Curve"; + ot->name= _("Add Bezier"); + ot->description= _("Construct a Bezier Curve"); ot->idname= "CURVE_OT_primitive_bezier_curve_add"; /* api callbacks */ @@ -6664,8 +6666,8 @@ static int add_primitive_bezier_circle_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Bezier Circle"; - ot->description= "Construct a Bezier Circle"; + ot->name= _("Add Bezier Circle"); + ot->description= _("Construct a Bezier Circle"); ot->idname= "CURVE_OT_primitive_bezier_circle_add"; /* api callbacks */ @@ -6687,8 +6689,8 @@ static int add_primitive_nurbs_curve_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Nurbs Curve"; - ot->description= "Construct a Nurbs Curve"; + ot->name= _("Add Nurbs Curve"); + ot->description= _("Construct a Nurbs Curve"); ot->idname= "CURVE_OT_primitive_nurbs_curve_add"; /* api callbacks */ @@ -6710,8 +6712,8 @@ static int add_primitive_nurbs_circle_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Nurbs Circle"; - ot->description= "Construct a Nurbs Circle"; + ot->name= _("Add Nurbs Circle"); + ot->description= _("Construct a Nurbs Circle"); ot->idname= "CURVE_OT_primitive_nurbs_circle_add"; /* api callbacks */ @@ -6733,8 +6735,8 @@ static int add_primitive_curve_path_exec(bContext *C, wmOperator *op) void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Path"; - ot->description= "Construct a Path"; + ot->name= _("Add Path"); + ot->description= _("Construct a Path"); ot->idname= "CURVE_OT_primitive_nurbs_path_add"; /* api callbacks */ @@ -6757,8 +6759,8 @@ static int add_primitive_nurbs_surface_curve_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Curve"; - ot->description= "Construct a Nurbs surface Curve"; + ot->name= _("Add Surface Curve"); + ot->description= _("Construct a Nurbs surface Curve"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_curve_add"; /* api callbacks */ @@ -6780,8 +6782,8 @@ static int add_primitive_nurbs_surface_circle_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Circle"; - ot->description= "Construct a Nurbs surface Circle"; + ot->name= _("Add Surface Circle"); + ot->description= _("Construct a Nurbs surface Circle"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_circle_add"; /* api callbacks */ @@ -6803,8 +6805,8 @@ static int add_primitive_nurbs_surface_surface_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Patch"; - ot->description= "Construct a Nurbs surface Patch"; + ot->name= _("Add Surface Patch"); + ot->description= _("Construct a Nurbs surface Patch"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_surface_add"; /* api callbacks */ @@ -6826,8 +6828,8 @@ static int add_primitive_nurbs_surface_cylinder_exec(bContext *C, wmOperator *op void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Cylinder"; - ot->description= "Construct a Nurbs surface Cylinder"; + ot->name= _("Add Surface Cylinder"); + ot->description= _("Construct a Nurbs surface Cylinder"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_cylinder_add"; /* api callbacks */ @@ -6849,8 +6851,8 @@ static int add_primitive_nurbs_surface_sphere_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Sphere"; - ot->description= "Construct a Nurbs surface Sphere"; + ot->name= _("Add Surface Sphere"); + ot->description= _("Construct a Nurbs surface Sphere"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_sphere_add"; /* api callbacks */ @@ -6872,8 +6874,8 @@ static int add_primitive_nurbs_surface_torus_exec(bContext *C, wmOperator *op) void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Surface Torus"; - ot->description= "Construct a Nurbs surface Torus"; + ot->name= _("Add Surface Torus"); + ot->description= _("Construct a Nurbs surface Torus"); ot->idname= "SURFACE_OT_primitive_nurbs_surface_torus_add"; /* api callbacks */ @@ -6927,7 +6929,7 @@ static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op)) void CURVE_OT_tilt_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Tilt"; + ot->name= _("Clear Tilt"); ot->idname= "CURVE_OT_tilt_clear"; /* api callbacks */ diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 649ff9e953a..39f905281d4 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -47,6 +47,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_curve_types.h" #include "DNA_object_types.h" #include "DNA_vfont_types.h" @@ -315,8 +317,8 @@ static int insert_lorem_exec(bContext *C, wmOperator *UNUSED(op)) void FONT_OT_insert_lorem(wmOperatorType *ot) { /* identifiers */ - ot->name= "Insert Lorem"; - ot->description= "Insert placeholder text"; + ot->name= _("Insert Lorem"); + ot->description= _("Insert placeholder text"); ot->idname= "FONT_OT_insert_lorem"; /* api callbacks */ @@ -403,8 +405,8 @@ static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) void FONT_OT_file_paste(wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste File"; - ot->description= "Paste contents from file"; + ot->name= _("Paste File"); + ot->description= _("Paste contents from file"); ot->idname= "FONT_OT_file_paste"; /* api callbacks */ @@ -452,8 +454,8 @@ static int paste_buffer_exec(bContext *C, wmOperator *UNUSED(op)) void FONT_OT_buffer_paste(wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste Buffer"; - ot->description= "Paste text from OS buffer"; + ot->name= _("Paste Buffer"); + ot->description= _("Paste text from OS buffer"); ot->idname= "FONT_OT_buffer_paste"; /* api callbacks */ @@ -610,10 +612,10 @@ static int kill_selection(Object *obedit, int ins) /* 1 == new character */ /******************* set style operator ********************/ static EnumPropertyItem style_items[]= { - {CU_CHINFO_BOLD, "BOLD", 0, "Bold", ""}, - {CU_CHINFO_ITALIC, "ITALIC", 0, "Italic", ""}, - {CU_CHINFO_UNDERLINE, "UNDERLINE", 0, "Underline", ""}, - {CU_CHINFO_SMALLCAPS, "SMALL_CAPS", 0, "Small Caps", ""}, + {CU_CHINFO_BOLD, "BOLD", 0, N_("Bold"), ""}, + {CU_CHINFO_ITALIC, "ITALIC", 0, N_("Italic"), ""}, + {CU_CHINFO_UNDERLINE, "UNDERLINE", 0, N_("Underline"), ""}, + {CU_CHINFO_SMALLCAPS, "SMALL_CAPS", 0, N_("Small Caps"), ""}, {0, NULL, 0, NULL, NULL}}; static int set_style(bContext *C, const int style, const int clear) @@ -650,8 +652,8 @@ static int set_style_exec(bContext *C, wmOperator *op) void FONT_OT_style_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Style"; - ot->description= "Set font style"; + ot->name= _("Set Style"); + ot->description= _("Set font style"); ot->idname= "FONT_OT_style_set"; /* api callbacks */ @@ -662,8 +664,8 @@ void FONT_OT_style_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to."); - RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear style rather than setting it."); + RNA_def_enum(ot->srna, "style", RNA_enum_items_gettexted(style_items), CU_CHINFO_BOLD, _("Style"), _("Style to set selection to.")); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), _("Clear style rather than setting it.")); } /******************* toggle style operator ********************/ @@ -688,8 +690,8 @@ static int toggle_style_exec(bContext *C, wmOperator *op) void FONT_OT_style_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Style"; - ot->description= "Toggle font style"; + ot->name= _("Toggle Style"); + ot->description= _("Toggle font style"); ot->idname= "FONT_OT_style_toggle"; /* api callbacks */ @@ -700,7 +702,7 @@ void FONT_OT_style_toggle(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to."); + RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, _("Style"), _("Style to set selection to.")); } /******************* copy text operator ********************/ @@ -731,8 +733,8 @@ static int copy_text_exec(bContext *C, wmOperator *UNUSED(op)) void FONT_OT_text_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Text"; - ot->description= "Copy selected text to clipboard"; + ot->name= _("Copy Text"); + ot->description= _("Copy selected text to clipboard"); ot->idname= "FONT_OT_text_copy"; /* api callbacks */ @@ -762,8 +764,8 @@ static int cut_text_exec(bContext *C, wmOperator *UNUSED(op)) void FONT_OT_text_cut(wmOperatorType *ot) { /* identifiers */ - ot->name= "Cut Text"; - ot->description= "Cut selected text to clipboard"; + ot->name= _("Cut Text"); + ot->description= _("Cut selected text to clipboard"); ot->idname= "FONT_OT_text_cut"; /* api callbacks */ @@ -820,8 +822,8 @@ static int paste_text_exec(bContext *C, wmOperator *op) void FONT_OT_text_paste(wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste Text"; - ot->description= "Paste text from clipboard"; + ot->name= _("Paste Text"); + ot->description= _("Paste text from clipboard"); ot->idname= "FONT_OT_text_paste"; /* api callbacks */ @@ -835,16 +837,16 @@ void FONT_OT_text_paste(wmOperatorType *ot) /************************ move operator ************************/ static EnumPropertyItem move_type_items[]= { - {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""}, - {LINE_END, "LINE_END", 0, "Line End", ""}, - {PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""}, - {NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""}, - {PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""}, - {NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""}, - {PREV_LINE, "PREVIOUS_LINE", 0, "Previous Line", ""}, - {NEXT_LINE, "NEXT_LINE", 0, "Next Line", ""}, - {PREV_PAGE, "PREVIOUS_PAGE", 0, "Previous Page", ""}, - {NEXT_PAGE, "NEXT_PAGE", 0, "Next Page", ""}, + {LINE_BEGIN, "LINE_BEGIN", 0, N_("Line Begin"), ""}, + {LINE_END, "LINE_END", 0, N_("Line End"), ""}, + {PREV_CHAR, "PREVIOUS_CHARACTER", 0, N_("Previous Character"), ""}, + {NEXT_CHAR, "NEXT_CHARACTER", 0, N_("Next Character"), ""}, + {PREV_WORD, "PREVIOUS_WORD", 0, N_("Previous Word"), ""}, + {NEXT_WORD, "NEXT_WORD", 0, N_("Next Word"), ""}, + {PREV_LINE, "PREVIOUS_LINE", 0, N_("Previous Line"), ""}, + {NEXT_LINE, "NEXT_LINE", 0, N_("Next Line"), ""}, + {PREV_PAGE, "PREVIOUS_PAGE", 0, N_("Previous Page"), ""}, + {NEXT_PAGE, "NEXT_PAGE", 0, N_("Next Page"), ""}, {0, NULL, 0, NULL, NULL}}; static int move_cursor(bContext *C, int type, int select) @@ -956,8 +958,8 @@ static int move_exec(bContext *C, wmOperator *op) void FONT_OT_move(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Cursor"; - ot->description= "Move cursor to position type"; + ot->name= _("Move Cursor"); + ot->description= _("Move cursor to position type"); ot->idname= "FONT_OT_move"; /* api callbacks */ @@ -968,7 +970,7 @@ void FONT_OT_move(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to."); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(move_type_items), LINE_BEGIN, _("Type"), _("Where to move cursor to.")); } /******************* move select operator ********************/ @@ -983,8 +985,8 @@ static int move_select_exec(bContext *C, wmOperator *op) void FONT_OT_move_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Select"; - ot->description= "Make selection from current cursor position to new cursor position type"; + ot->name= _("Move Select"); + ot->description= _("Make selection from current cursor position to new cursor position type"); ot->idname= "FONT_OT_move_select"; /* api callbacks */ @@ -995,7 +997,7 @@ void FONT_OT_move_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection."); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(move_type_items), LINE_BEGIN, _("Type"), _("Where to move cursor to, to make a selection.")); } /************************* change spacing **********************/ @@ -1025,8 +1027,8 @@ static int change_spacing_exec(bContext *C, wmOperator *op) void FONT_OT_change_spacing(wmOperatorType *ot) { /* identifiers */ - ot->name= "Change Spacing"; - ot->description= "Change font spacing"; + ot->name= _("Change Spacing"); + ot->description= _("Change font spacing"); ot->idname= "FONT_OT_change_spacing"; /* api callbacks */ @@ -1037,7 +1039,7 @@ void FONT_OT_change_spacing(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "delta", 1, -20, 20, "Delta", "Amount to decrease or increasing character spacing with.", -20, 20); + RNA_def_int(ot->srna, "delta", 1, -20, 20, _("Delta"), _("Amount to decrease or increasing character spacing with."), -20, 20); } /************************* change character **********************/ @@ -1070,8 +1072,8 @@ static int change_character_exec(bContext *C, wmOperator *op) void FONT_OT_change_character(wmOperatorType *ot) { /* identifiers */ - ot->name= "Change Character"; - ot->description= "Change font character code"; + ot->name= _("Change Character"); + ot->description= _("Change font character code"); ot->idname= "FONT_OT_change_character"; /* api callbacks */ @@ -1082,7 +1084,7 @@ void FONT_OT_change_character(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "delta", 1, -255, 255, "Delta", "Number to increase or decrease character code with.", -255, 255); + RNA_def_int(ot->srna, "delta", 1, -255, 255, _("Delta"), _("Number to increase or decrease character code with."), -255, 255); } /******************* line break operator ********************/ @@ -1113,8 +1115,8 @@ static int line_break_exec(bContext *C, wmOperator *op) void FONT_OT_line_break(wmOperatorType *ot) { /* identifiers */ - ot->name= "Line Break"; - ot->description= "Insert line break at cursor position"; + ot->name= _("Line Break"); + ot->description= _("Insert line break at cursor position"); ot->idname= "FONT_OT_line_break"; /* api callbacks */ @@ -1131,12 +1133,12 @@ void FONT_OT_line_break(wmOperatorType *ot) /******************* delete operator **********************/ static EnumPropertyItem delete_type_items[]= { - {DEL_ALL, "ALL", 0, "All", ""}, - {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""}, - {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""}, - {DEL_SELECTION, "SELECTION", 0, "Selection", ""}, - {DEL_NEXT_SEL, "NEXT_OR_SELECTION", 0, "Next or Selection", ""}, - {DEL_PREV_SEL, "PREVIOUS_OR_SELECTION", 0, "Previous or Selection", ""}, + {DEL_ALL, "ALL", 0, N_("All"), ""}, + {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, N_("Next Character"), ""}, + {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, N_("Previous Character"), ""}, + {DEL_SELECTION, "SELECTION", 0, N_("Selection"), ""}, + {DEL_NEXT_SEL, "NEXT_OR_SELECTION", 0, N_("Next or Selection"), ""}, + {DEL_PREV_SEL, "PREVIOUS_OR_SELECTION", 0, N_("Previous or Selection"), ""}, {0, NULL, 0, NULL, NULL}}; static int delete_exec(bContext *C, wmOperator *op) @@ -1203,8 +1205,8 @@ static int delete_exec(bContext *C, wmOperator *op) void FONT_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete"; - ot->description= "Delete text by cursor position"; + ot->name= _("Delete"); + ot->description= _("Delete text by cursor position"); ot->idname= "FONT_OT_delete"; /* api callbacks */ @@ -1215,7 +1217,7 @@ void FONT_OT_delete(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "type", delete_type_items, DEL_ALL, "Type", "Which part of the text to delete."); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(delete_type_items), DEL_ALL, _("Type"), _("Which part of the text to delete.")); } /*********************** insert text operator *************************/ @@ -1352,8 +1354,8 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt) void FONT_OT_text_insert(wmOperatorType *ot) { /* identifiers */ - ot->name= "Insert Text"; - ot->description= "Insert text at cursor position"; + ot->name= _("Insert Text"); + ot->description= _("Insert text at cursor position"); ot->idname= "FONT_OT_text_insert"; /* api callbacks */ @@ -1365,8 +1367,8 @@ void FONT_OT_text_insert(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); - RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed character will strike through previous, for special character input."); + RNA_def_string(ot->srna, "text", "", 0, _("Text"), _("Text to insert at the cursor position.")); + RNA_def_boolean(ot->srna, "accent", 0, _("Accent mode"), _("Next typed character will strike through previous, for special character input.")); } @@ -1391,8 +1393,8 @@ static int textbox_add_exec(bContext *C, wmOperator *UNUSED(op)) void FONT_OT_textbox_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Textbox"; - ot->description= "Add a new text box"; + ot->name= _("Add Textbox"); + ot->description= _("Add a new text box"); ot->idname= "FONT_OT_textbox_add"; /* api callbacks */ @@ -1434,8 +1436,8 @@ static int textbox_remove_exec(bContext *C, wmOperator *op) void FONT_OT_textbox_remove(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Textbox"; - ot->description= "Remove the textbox"; + ot->name= _("Remove Textbox"); + ot->description= _("Remove the textbox"); ot->idname= "FONT_OT_textbox_remove"; /* api callbacks */ @@ -1445,7 +1447,7 @@ void FONT_OT_textbox_remove(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The current text box.", 0, INT_MAX); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), _("The current text box."), 0, INT_MAX); } @@ -1525,8 +1527,8 @@ void free_editText(Object *obedit) /********************** set case operator *********************/ static EnumPropertyItem case_items[]= { - {CASE_LOWER, "LOWER", 0, "Lower", ""}, - {CASE_UPPER, "UPPER", 0, "Upper", ""}, + {CASE_LOWER, "LOWER", 0, N_("Lower"), ""}, + {CASE_UPPER, "UPPER", 0, N_("Upper"), ""}, {0, NULL, 0, NULL, NULL}}; static int set_case(bContext *C, int ccase) @@ -1572,8 +1574,8 @@ static int set_case_exec(bContext *C, wmOperator *op) void FONT_OT_case_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Case"; - ot->description= "Set font case"; + ot->name= _("Set Case"); + ot->description= _("Set font case"); ot->idname= "FONT_OT_case_set"; /* api callbacks */ @@ -1584,7 +1586,7 @@ void FONT_OT_case_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case."); + RNA_def_enum(ot->srna, "case", RNA_enum_items_gettexted(case_items), CASE_LOWER, _("Case"), _("Lower or upper case.")); } /********************** toggle case operator *********************/ @@ -1615,8 +1617,8 @@ static int toggle_case_exec(bContext *C, wmOperator *UNUSED(op)) void FONT_OT_case_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Case"; - ot->description= "Toggle font case"; + ot->name= _("Toggle Case"); + ot->description= _("Toggle font case"); ot->idname= "FONT_OT_case_toggle"; /* api callbacks */ @@ -1715,7 +1717,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void FONT_OT_open(wmOperatorType *ot) { /* identifiers */ - ot->name= "Open Font"; + ot->name= _("Open Font"); ot->idname= "FONT_OT_open"; /* api callbacks */ @@ -1758,9 +1760,9 @@ static int font_unlink_exec(bContext *C, wmOperator *op) void FONT_OT_unlink(wmOperatorType *ot) { /* identifiers */ - ot->name= "Unlink"; + ot->name= _("Unlink"); ot->idname= "FONT_OT_unlink"; - ot->description= "Unlink active font data block"; + ot->description= _("Unlink active font data block"); /* api callbacks */ ot->exec= font_unlink_exec; diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index 17e3a868a8c..fc85dcf5fa8 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -20,7 +20,8 @@ # ***** END GPL LICENSE BLOCK ***** set(INC - + ../../blenlib + ../../../../intern/guardedalloc ) set(INC_SYS @@ -31,6 +32,7 @@ set(INC_SYS set(SRC Bfont.c bfont.ttf.c + bunifont.ttf.c ) if(WITH_BLENDER) diff --git a/source/blender/editors/datafiles/bunifont.ttf.c b/source/blender/editors/datafiles/bunifont.ttf.c new file mode 100755 index 00000000000..7af80842e50 --- /dev/null +++ b/source/blender/editors/datafiles/bunifont.ttf.c @@ -0,0 +1,39 @@ +/** \file blender/editors/datafiles/bunifont.ttf.c + * \ingroup eddatafiles + */ +/* DataToC output of file <bfont_ttf> */ + +#include <stdio.h> +#include "BLI_path_util.h" +#include "BLI_string.h" +#include "BLI_fileops.h" +#include "BLI_memarena.h" +#include "MEM_guardedalloc.h" + +const int datatoc_bunifont_ttf_size = 16179552; +static char* datatoc_bunifont_ttf = 0; + +static char unifont_path[1024]; +const char unifont_filename[]="unifont.ttf.gz"; + +char *get_datatoc_bunifont_ttf(void) +{ + if( datatoc_bunifont_ttf==NULL ) + { + char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts"); + BLI_snprintf( unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename ); + + if( BLI_exists(unifont_path) ) + { + datatoc_bunifont_ttf = (char*)MEM_mallocN( datatoc_bunifont_ttf_size, "get_datatoc_bunifont_ttf" ); + BLI_ungzip_to_mem( unifont_path, datatoc_bunifont_ttf, datatoc_bunifont_ttf_size ); + } + } + return datatoc_bunifont_ttf; +} + +void free_datatoc_bunifont_ttf(void) +{ + if( datatoc_bunifont_ttf!=NULL ) + MEM_freeN( datatoc_bunifont_ttf ); +} diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt index 7a2f196fd6d..278a185eebd 100644 --- a/source/blender/editors/gpencil/CMakeLists.txt +++ b/source/blender/editors/gpencil/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/gpencil/SConscript b/source/blender/editors/gpencil/SConscript index d2fd9e5fe9d..7847744a6f1 100644 --- a/source/blender/editors/gpencil/SConscript +++ b/source/blender/editors/gpencil/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../blenloader' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index f4da734473d..d5a128b5c5b 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -42,6 +42,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_gpencil.h" #include "BKE_context.h" #include "BKE_global.h" @@ -1756,18 +1758,18 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) /* ------------------------------- */ static EnumPropertyItem prop_gpencil_drawmodes[] = { - {GP_PAINTMODE_DRAW, "DRAW", 0, "Draw Freehand", ""}, - {GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, "Draw Straight Lines", ""}, - {GP_PAINTMODE_ERASER, "ERASER", 0, "Eraser", ""}, + {GP_PAINTMODE_DRAW, "DRAW", 0, N_("Draw Freehand"), ""}, + {GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, N_("Draw Straight Lines"), ""}, + {GP_PAINTMODE_ERASER, "ERASER", 0, N_("Eraser"), ""}, {0, NULL, 0, NULL, NULL} }; void GPENCIL_OT_draw (wmOperatorType *ot) { /* identifiers */ - ot->name= "Grease Pencil Draw"; + ot->name= _("Grease Pencil Draw"); ot->idname= "GPENCIL_OT_draw"; - ot->description= "Make annotations on the active data"; + ot->description= _("Make annotations on the active data"); /* api callbacks */ ot->exec= gpencil_draw_exec; @@ -1780,7 +1782,7 @@ void GPENCIL_OT_draw (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* settings for drawing */ - RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to intepret mouse movements."); + RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_gpencil_drawmodes), 0, _("Mode"), _("Way to intepret mouse movements.")); RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); } diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index ee29df3fffb..6831f80092c 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -56,6 +56,9 @@ extern char datatoc_bfont_ttf[]; extern int datatoc_bmonofont_ttf_size; extern char datatoc_bmonofont_ttf[]; +extern int datatoc_bunifont_ttf_size; +extern char* get_datatoc_bunifont_ttf(); + /* Brush icon datafiles */ /* TODO: this could be simplified by putting all the brush icons in one file */ diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 61e19655f8d..852b0465910 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -774,7 +774,7 @@ void uiStyleFontDrawRotated(struct uiFontStyle *fs, struct rcti *rect, const cha int UI_GetStringWidth(const char *str); // XXX temp void UI_DrawString(float x, float y, const char *str); // XXX temp void UI_DrawTriIcon(float x, float y, char dir); - +uiStyle* UI_GetStyle(void); /* linker workaround ack! */ void UI_template_fix_linking(void); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 8aed0d58a07..ef8bff1fd7d 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -228,7 +228,7 @@ void ui_block_translate(uiBlock *block, int x, int y) static void ui_text_bounds_block(uiBlock *block, float offset) { - uiStyle *style= U.uistyles.first; // XXX pass on as arg + uiStyle *style=UI_GetStyle(); uiBut *bt; int i = 0, j, x1addval= offset, nextcol; int lastcol= 0, col= 0; @@ -908,7 +908,7 @@ static void ui_but_to_pixelrect(rcti *rect, const ARegion *ar, uiBlock *block, u /* uses local copy of style, to scale things down, and allow widgets to change stuff */ void uiDrawBlock(const bContext *C, uiBlock *block) { - uiStyle style= *((uiStyle *)U.uistyles.first); // XXX pass on as arg + uiStyle style= *UI_GetStyle(); // XXX pass on as arg ARegion *ar; uiBut *but; rcti rect; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index c5275ea98b5..1a36130b522 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1270,7 +1270,7 @@ static int ui_textedit_delete_selection(uiBut *but, uiHandleButtonData *data) /* note, but->block->aspect is used here, when drawing button style is getting scaled too */ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, short x) { - uiStyle *style= U.uistyles.first; // XXX pass on as arg + uiStyle *style= UI_GetStyle(); // XXX pass on as arg uiFontStyle *fstyle = &style->widget; int startx= but->x1; char *origstr; @@ -4101,7 +4101,7 @@ static uiBlock *menu_change_shortcut(bContext *C, ARegion *ar, void *arg) wmKeyMapItem *kmi; PointerRNA ptr; uiLayout *layout; - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); IDProperty *prop= (but->opptr)? but->opptr->data: NULL; int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km); @@ -4132,7 +4132,7 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) wmKeyMapItem *kmi; PointerRNA ptr; uiLayout *layout; - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); IDProperty *prop= (but->opptr)? but->opptr->data: NULL; /* XXX this guess_opname can potentially return a different keymap than being found on adding later... */ diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 2f0bcc9d5b4..2d0f49f293b 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -43,6 +43,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_idprop.h" @@ -2784,7 +2786,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in empty= uiDefAutoButsRNA(layout, &ptr, check_prop, label_align) == 0; if(empty && (flag & UI_LAYOUT_OP_SHOW_EMPTY)) { - uiItemL(layout, "No Properties.", ICON_NONE); + uiItemL(layout, _("No Properties."), ICON_NONE); } } diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index e9fad382beb..6a35ba9baf1 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -44,6 +44,8 @@ #include "BLI_math_color.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_text.h" /* for UI_OT_reports_to_text */ @@ -215,9 +217,9 @@ static int reset_default_theme_exec(bContext *C, wmOperator *UNUSED(op)) static void UI_OT_reset_default_theme(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset to Default Theme"; + ot->name= _("Reset to Default Theme"); ot->idname= "UI_OT_reset_default_theme"; - ot->description= "Reset to the default theme colors"; + ot->description= _("Reset to the default theme colors"); /* callbacks */ ot->exec= reset_default_theme_exec; @@ -305,9 +307,9 @@ static int reset_default_button_exec(bContext *C, wmOperator *op) static void UI_OT_reset_default_button(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset to Default Value"; + ot->name= _("Reset to Default Value"); ot->idname= "UI_OT_reset_default_button"; - ot->description= "Reset this property's value to its default value"; + ot->description= _("Reset this property's value to its default value"); /* callbacks */ ot->poll= reset_default_button_poll; @@ -317,7 +319,7 @@ static void UI_OT_reset_default_button(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Reset to default values all elements of the array.")); } /* Copy To Selected Operator ------------------------ */ @@ -397,9 +399,9 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op) static void UI_OT_copy_to_selected_button(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy To Selected"; + ot->name= _("Copy To Selected"); ot->idname= "UI_OT_copy_to_selected_button"; - ot->description= "Copy property from this object to selected objects or bones"; + ot->description= _("Copy property from this object to selected objects or bones"); /* callbacks */ ot->poll= copy_to_selected_button_poll; @@ -409,7 +411,7 @@ static void UI_OT_copy_to_selected_button(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Reset to default values all elements of the array.")); } /* Reports to Textblock Operator ------------------------ */ diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 3b20533dcd4..01dcdda97a1 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -173,7 +173,7 @@ static void ui_panel_copy_offset(Panel *pa, Panel *papar) Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int *open) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); Panel *pa, *patab, *palast, *panext; char *drawname= pt->label; char *idname= pt->idname; @@ -292,7 +292,7 @@ void uiEndPanel(uiBlock *block, int width, int height) static void ui_offset_panel_block(uiBlock *block) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiBut *but; int ofsy; @@ -667,7 +667,7 @@ static int compare_panel(const void *a1, const void *a2) /* returns 1 when it did something */ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); Panel *pa; PanelSort *ps, *panelsort, *psnext; int a, tot=0, done; diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 9e7717260e6..17c064f3ba2 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -318,7 +318,7 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar) rcti bbox= data->bbox; int a; - ui_draw_menu_back(U.uistyles.first, NULL, &data->bbox); + ui_draw_menu_back(UI_GetStyle(), NULL, &data->bbox); /* draw text */ uiStyleFontSet(&data->fstyle); @@ -345,7 +345,7 @@ static void ui_tooltip_region_free_cb(ARegion *ar) ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) { - uiStyle *style= U.uistyles.first; // XXX pass on as arg + uiStyle *style= UI_GetStyle(); static ARegionType type; ARegion *ar; uiTooltipData *data; @@ -403,7 +403,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) prop= (but->opptr)? but->opptr->data: NULL; if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, buf, sizeof(buf))) { - BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Shortcut: %s", buf); + BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), _("Shortcut: %s"), buf); data->color[data->totline]= 0x888888; data->totline++; } @@ -984,7 +984,7 @@ static void ui_searchbox_region_free_cb(ARegion *ar) ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but) { - uiStyle *style= U.uistyles.first; // XXX pass on as arg + uiStyle *style= UI_GetStyle(); static ARegionType type; ARegion *ar; uiSearchboxData *data; @@ -2299,7 +2299,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg, char *str) { wmWindow *window= CTX_wm_window(C); - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiPopupBlockHandle *handle; uiPopupMenu *pup; @@ -2348,7 +2348,7 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut /* only return handler, and set optional title */ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiPopupMenu *pup= MEM_callocN(sizeof(uiPopupMenu), "popup menu"); uiBut *but; diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 5f2a757d2e3..7d1596459dd 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -76,7 +76,7 @@ /* ********************************************** */ -static uiStyle *ui_style_new(ListBase *styles, const char *name) +static uiStyle *ui_style_new(ListBase *styles, const char *name, short uifont_id) { uiStyle *style= MEM_callocN(sizeof(uiStyle), "new style"); @@ -85,7 +85,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name) style->panelzoom= 1.0; /* unused */ - style->paneltitle.uifont_id= UIFONT_DEFAULT; + style->paneltitle.uifont_id= uifont_id; style->paneltitle.points= 12; style->paneltitle.kerning= 1; style->paneltitle.shadow= 1; @@ -94,7 +94,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name) style->paneltitle.shadowalpha= 0.15f; style->paneltitle.shadowcolor= 1.0f; - style->grouplabel.uifont_id= UIFONT_DEFAULT; + style->grouplabel.uifont_id= uifont_id; style->grouplabel.points= 12; style->grouplabel.kerning= 1; style->grouplabel.shadow= 3; @@ -102,7 +102,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name) style->grouplabel.shady= -1; style->grouplabel.shadowalpha= 0.25f; - style->widgetlabel.uifont_id= UIFONT_DEFAULT; + style->widgetlabel.uifont_id= uifont_id; style->widgetlabel.points= 11; style->widgetlabel.kerning= 1; style->widgetlabel.shadow= 3; @@ -111,7 +111,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name) style->widgetlabel.shadowalpha= 0.15f; style->widgetlabel.shadowcolor= 1.0f; - style->widget.uifont_id= UIFONT_DEFAULT; + style->widget.uifont_id= uifont_id; style->widget.points= 11; style->widget.kerning= 1; style->widget.shadowalpha= 0.25f; @@ -251,11 +251,19 @@ void uiStyleFontDrawRotated(uiFontStyle *fs, rcti *rect, const char *str) } /* ************** helpers ************************ */ +/* XXX: read a style configure */ +uiStyle* UI_GetStyle(void) +{ + uiStyle *style = NULL; + /* offset is two struct uiStyle pointers */ + /* style = BLI_findstring( &U.uistyles, "Unifont Style", sizeof(style)*2 ) */; + return (style != NULL) ? style : U.uistyles.first; +} /* temporarily, does widget font */ int UI_GetStringWidth(const char *str) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiFontStyle *fstyle= &style->widget; int width; @@ -274,7 +282,7 @@ int UI_GetStringWidth(const char *str) /* temporarily, does widget font */ void UI_DrawString(float x, float y, const char *str) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); if (style->widget.kerning == 1) BLF_enable(style->widget.uifont_id, BLF_KERNING_DEFAULT); @@ -313,7 +321,7 @@ void uiStyleInit(void) for(font= U.uifonts.first; font; font= font->next) { if(font->uifont_id==UIFONT_DEFAULT) { - font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size); + font->blf_id= BLF_load_mem_unique("default", (unsigned char *)get_datatoc_bunifont_ttf(), datatoc_bunifont_ttf_size); } else { font->blf_id= BLF_load(font->filename); @@ -337,7 +345,7 @@ void uiStyleInit(void) } if(style==NULL) { - ui_style_new(&U.uistyles, "Default Style"); + ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT ); } // XXX, this should be moved into a style, but for now best only load the monospaced font once. diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 34315494e14..c1784da48bd 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -301,29 +301,29 @@ static const char *template_id_browse_tip(StructRNA *type) { if(type) { switch(RNA_type_to_ID_code(type)) { - case ID_SCE: return "Browse Scene to be linked"; - case ID_OB: return "Browse Object to be linked"; - case ID_ME: return "Browse Mesh Data to be linked"; - case ID_CU: return "Browse Curve Data to be linked"; - case ID_MB: return "Browse MetaBall Data to be linked"; - case ID_MA: return "Browse Material to be linked"; - case ID_TE: return "Browse Texture to be linked"; - case ID_IM: return "Browse Image to be linked"; - case ID_LA: return "Browse Lattice Data to be linked"; - case ID_CA: return "Browse Camera Data to be linked"; - case ID_WO: return "Browse World Settings to be linked"; - case ID_SCR: return "Choose Screen lay-out"; - case ID_TXT: return "Browse Text to be linked"; - case ID_SO: return "Browse Sound to be linked"; - case ID_AR: return "Browse Armature data to be linked"; - case ID_AC: return "Browse Action to be linked"; - case ID_NT: return "Browse Node Tree to be linked"; - case ID_BR: return "Browse Brush to be linked"; - case ID_PA: return "Browse Particle System to be linked"; - case ID_GD: return "Browse Grease Pencil Data to be linked"; + case ID_SCE: return _("Browse Scene to be linked"); + case ID_OB: return _("Browse Object to be linked"); + case ID_ME: return _("Browse Mesh Data to be linked"); + case ID_CU: return _("Browse Curve Data to be linked"); + case ID_MB: return _("Browse MetaBall Data to be linked"); + case ID_MA: return _("Browse Material to be linked"); + case ID_TE: return _("Browse Texture to be linked"); + case ID_IM: return _("Browse Image to be linked"); + case ID_LA: return _("Browse Lattice Data to be linked"); + case ID_CA: return _("Browse Camera Data to be linked"); + case ID_WO: return _("Browse World Settings to be linked"); + case ID_SCR: return _("Choose Screen lay-out"); + case ID_TXT: return _("Browse Text to be linked"); + case ID_SO: return _("Browse Sound to be linked"); + case ID_AR: return _("Browse Armature data to be linked"); + case ID_AC: return _("Browse Action to be linked"); + case ID_NT: return _("Browse Node Tree to be linked"); + case ID_BR: return _("Browse Brush to be linked"); + case ID_PA: return _("Browse Particle System to be linked"); + case ID_GD: return _("Browse Grease Pencil Data to be linked"); } } - return "Browse ID data to be linked"; + return _("Browse ID data to be linked"); } static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, StructRNA *type, int flag, const char *newop, const char *openop, const char *unlinkop) @@ -386,12 +386,12 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str if(id->lib) { if(id->flag & LIB_INDIRECT) { but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0, - "Indirect library datablock, cannot change."); + _("Indirect library datablock, cannot change.")); uiButSetFlag(but, UI_BUT_DISABLED); } else { but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0, - "Direct linked library datablock, click to make local."); + _("Direct linked library datablock, click to make local.")); if(!id_make_local(id, 1 /* test */) || (idfrom && idfrom->lib)) uiButSetFlag(but, UI_BUT_DISABLED); } @@ -405,9 +405,9 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str sprintf(str, "%d", id->us); if(id->us<10) - but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy."); + but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0, _("Displays number of users of this data. Click to make a single-user copy.")); else - but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X+10,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy."); + but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X+10,UI_UNIT_Y, NULL, 0, 0, 0, 0, _("Displays number of users of this data. Click to make a single-user copy.")); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE)); if(!id_copy(id, NULL, 1 /* test only */) || (idfrom && idfrom->lib) || !editable) @@ -425,11 +425,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6; if(newop) { - but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL); + but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": _("New"), 0, 0, w, UI_UNIT_Y, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW)); } else { - but= uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); + but= uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": _("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW)); } @@ -441,11 +441,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str int w= id?UI_UNIT_X: (flag & UI_ID_ADD_NEW)? UI_UNIT_X*3: UI_UNIT_X*6; if(openop) { - but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": "Open", 0, 0, w, UI_UNIT_Y, NULL); + but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": _("Open"), 0, 0, w, UI_UNIT_Y, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN)); } else { - but= uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": "Open", 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); + but= uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": _("Open"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN)); } @@ -461,7 +461,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str uiButSetNFunc(but, NULL, MEM_dupallocN(template), NULL); } else { - but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Unlink datablock. Shift + Click to set users to zero, data will then not be saved"); + but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, _("Unlink datablock. Shift + Click to set users to zero, data will then not be saved")); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE)); if(RNA_property_flag(template->prop) & PROP_NEVER_NULL) @@ -718,7 +718,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif sprintf(str, "%s parent deform", md->name); uiDefBut(block, LABEL, 0, str, 0, 0, 185, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name"); - but = uiDefBut(block, BUT, 0, "Make Real", 0, 0, 80, 16, NULL, 0.0, 0.0, 0.0, 0.0, "Convert virtual modifier to a real modifier"); + but = uiDefBut(block, BUT, 0, _("Make Real"), 0, 0, 80, 16, NULL, 0.0, 0.0, 0.0, 0.0, _("Convert virtual modifier to a real modifier")); uiButSetFunc(but, modifiers_convertToReal, ob, md); } else { @@ -752,7 +752,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif if ((ob->type==OB_MESH) && modifier_couldBeCage(scene, md) && (index <= lastCageIndex)) { /* -- convert to rna ? */ - but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, "Apply modifier to editing cage during Editmode"); + but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, _("Apply modifier to editing cage during Editmode")); if (index < cageIndex) uiButSetFlag(but, UI_BUT_DISABLED); uiButSetFunc(but, modifiers_setOnCage, ob, md); @@ -764,7 +764,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif if (ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) { /* add disabled pre-tesselated button, so users could have message for this modifiers */ - but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, "This modifier could be applied on splines' points only"); + but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, _("This modifier could be applied on splines' points only")); uiButSetFlag(but, UI_BUT_DISABLED); } else if (mti->type != eModifierTypeType_Constructive) { /* constructive modifiers tesselates curve before applying */ @@ -814,17 +814,17 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif } else { uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT); - uiItemEnumO(row, "OBJECT_OT_modifier_apply", "Apply", 0, "apply_as", MODIFIER_APPLY_DATA); + uiItemEnumO(row, "OBJECT_OT_modifier_apply", _("Apply"), 0, "apply_as", MODIFIER_APPLY_DATA); if (modifier_sameTopology(md)) - uiItemEnumO(row, "OBJECT_OT_modifier_apply", "Apply as Shape", 0, "apply_as", MODIFIER_APPLY_SHAPE); + uiItemEnumO(row, "OBJECT_OT_modifier_apply", _("Apply as Shape"), 0, "apply_as", MODIFIER_APPLY_SHAPE); } uiBlockClearButLock(block); uiBlockSetButLock(block, ob && ob->id.lib, ERROR_LIBDATA_MESSAGE); if (!ELEM5(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem, eModifierType_Cloth, eModifierType_Smoke)) - uiItemO(row, "Copy", ICON_NONE, "OBJECT_OT_modifier_copy"); + uiItemO(row, _("Copy"), ICON_NONE, "OBJECT_OT_modifier_copy"); } /* result is the layout block inside the box, that we return so that modifier settings can be drawn */ @@ -1001,8 +1001,8 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) uiBlockSetEmboss(block, UI_EMBOSSN); /* draw a ghost icon (for proxy) and also a lock beside it, to show that constraint is "proxy locked" */ - uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_GHOST, xco+244, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Proxy Protected"); - uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_LOCKED, xco+262, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Proxy Protected"); + uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_GHOST, xco+244, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, _("Proxy Protected")); + uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_LOCKED, xco+262, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, _("Proxy Protected")); uiBlockSetEmboss(block, UI_EMBOSS); } @@ -1188,14 +1188,14 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M RNA_pointer_create(id, &RNA_Texture, tex, &texture_ptr); uiLayoutRow(layout, 1); - uiDefButS(block, ROW, B_MATPRV, "Texture", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_TEXTURE, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, _("Texture"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_TEXTURE, 0, 0, ""); if(GS(parent->name) == ID_MA) - uiDefButS(block, ROW, B_MATPRV, "Material", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, _("Material"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); else if(GS(parent->name) == ID_LA) - uiDefButS(block, ROW, B_MATPRV, "Lamp", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, _("Lamp"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); else if(GS(parent->name) == ID_WO) - uiDefButS(block, ROW, B_MATPRV, "World", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); - uiDefButS(block, ROW, B_MATPRV, "Both", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, _("World"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, _("Both"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, ""); /* Alpha buton for texture preview */ if(*pr_texture!=TEX_PR_OTHER) { @@ -1286,21 +1286,21 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand if(coba==NULL) return; - bt= uiDefBut(block, BUT, 0, "Add", 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband"); + bt= uiDefBut(block, BUT, 0, _("Add"), 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0, _("Add a new color stop to the colorband")); uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba); - bt= uiDefBut(block, BUT, 0, "Delete", 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Delete the active position"); + bt= uiDefBut(block, BUT, 0, _("Delete"), 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0, _("Delete the active position")); uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba); /* XXX, todo for later - convert to operator - campbell */ - bt= uiDefBut(block, BUT, 0, "F", 95+xoffs,line1_y,20,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Flip colorband"); + bt= uiDefBut(block, BUT, 0, "F", 95+xoffs,line1_y,20,UI_UNIT_Y, NULL, 0, 0, 0, 0, _("Flip colorband")); uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba); uiDefButS(block, NUM, 0, "", 120+xoffs,line1_y,80, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, "Choose active color stop"); - bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4", - 210+xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops"); + bt= uiDefButS(block, MENU, 0, _("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4"), + 210+xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, _("Set interpolation between color stops")); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); uiBlockEndAlign(block); @@ -1329,9 +1329,9 @@ static void colorband_buttons_small(uiLayout *layout, uiBlock *block, ColorBand float xs= butr->xmin; uiBlockBeginAlign(block); - bt= uiDefBut(block, BUT, 0, "Add", xs,butr->ymin+UI_UNIT_Y,2.0f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband"); + bt= uiDefBut(block, BUT, 0, _("Add"), xs,butr->ymin+UI_UNIT_Y,2.0f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, _("Add a new color stop to the colorband")); uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba); - bt= uiDefBut(block, BUT, 0, "Delete", xs+2.0f*unit,butr->ymin+UI_UNIT_Y,1.5f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Delete the active position"); + bt= uiDefBut(block, BUT, 0, _("Delete"), xs+2.0f*unit,butr->ymin+UI_UNIT_Y,1.5f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, _("Delete the active position")); uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba); bt= uiDefBut(block, BUT, 0, "F", xs+3.5f*unit,butr->ymin+UI_UNIT_Y,0.5f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Flip the color ramp"); uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba); @@ -1596,10 +1596,10 @@ static uiBlock *curvemap_clipping_func(bContext *C, struct ARegion *ar, void *cu uiButSetFunc(bt, curvemap_buttons_setclip, cumap, NULL); uiBlockBeginAlign(block); - uiDefButF(block, NUM, 0, "Min X ", 0,4*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, ""); - uiDefButF(block, NUM, 0, "Min Y ", 0,3*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, ""); - uiDefButF(block, NUM, 0, "Max X ", 0,2*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "Max Y ", 0,UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, ""); + uiDefButF(block, NUM, 0, _("Min X "), 0,4*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, ""); + uiDefButF(block, NUM, 0, _("Min Y "), 0,3*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, ""); + uiDefButF(block, NUM, 0, _("Max X "), 0,2*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, ""); + uiDefButF(block, NUM, 0, _("Max Y "), 0,UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, ""); uiBlockSetDirection(block, UI_RIGHT); @@ -1648,12 +1648,12 @@ static uiBlock *curvemap_tools_func(bContext *C, struct ARegion *ar, void *cumap block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS); uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset View", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Vector Handle", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Auto Handle", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Horizontal", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 4, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Extrapolated", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 5, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Curve", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Reset View"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Vector Handle"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Auto Handle"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Extend Horizontal"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 4, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Extend Extrapolated"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 5, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Reset Curve"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 50); @@ -1670,10 +1670,10 @@ static uiBlock *curvemap_brush_tools_func(bContext *C, struct ARegion *ar, void block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS); uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset View", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Vector Handle", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Auto Handle", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Curve", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Reset View"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Vector Handle"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Auto Handle"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, _("Reset Curve"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 50); @@ -1790,24 +1790,24 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe uiBlockSetEmboss(block, UI_EMBOSSN); - bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom in"); + bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, _("Zoom in")); uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL); - bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom out"); + bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, _("Zoom out")); uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL); if(brush) - bt= uiDefIconBlockBut(block, curvemap_brush_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, "Tools"); + bt= uiDefIconBlockBut(block, curvemap_brush_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, _("Tools")); else - bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, "Tools"); + bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, _("Tools")); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT; - bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, dx, "Clipping Options"); + bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, dx, _("Clipping Options")); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); - bt= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points"); + bt= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, _("Delete points")); uiButSetNFunc(bt, curvemap_buttons_delete, MEM_dupallocN(cb), cumap); uiBlockSetEmboss(block, UI_EMBOSS); @@ -1826,7 +1826,7 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe uiItemR(uiLayoutColumn(split, 0), ptr, "white_level", UI_ITEM_R_EXPAND, NULL, ICON_NONE); uiLayoutRow(layout, 0); - bt=uiDefBut(block, BUT, 0, "Reset", 0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Reset Black/White point and curves"); + bt=uiDefBut(block, BUT, 0, "Reset", 0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, _("Reset Black/White point and curves")); uiButSetNFunc(bt, curvemap_buttons_reset, MEM_dupallocN(cb), cumap); } @@ -2413,16 +2413,16 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) (void)ui_abs; // UNUSED uiDefIconBut(block, BUT, handle_event, ICON_PANEL_CLOSE, - 0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, "Stop this job"); + 0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, _("Stop this job")); uiDefBut(block, PROGRESSBAR, 0, WM_jobs_name(wm, owner), - UI_UNIT_X, 0, 100, UI_UNIT_Y, NULL, 0.0f, 0.0f, WM_jobs_progress(wm, owner), 0, "Progress"); + UI_UNIT_X, 0, 100, UI_UNIT_Y, NULL, 0.0f, 0.0f, WM_jobs_progress(wm, owner), 0, _("Progress")); uiLayoutRow(layout, 0); } if(WM_jobs_test(wm, screen)) - uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, "Capture", 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Stop screencast"); + uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, _("Capture"), 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, _("Stop screencast")); if(screen->animtimer) - uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, "Anim Player", 0,0,100,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Stop animation playback"); + uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, _("Anim Player"), 0,0,100,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, _("Stop animation playback")); } /************************* Reports for Last Operator Template **************************/ @@ -2484,7 +2484,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) uiBlockSetEmboss(block, UI_EMBOSSN); if (reports->list.first != reports->list.last) - uiDefIconButO(block, BUT, "UI_OT_reports_to_textblock", WM_OP_INVOKE_REGION_WIN, icon, 2, 0, UI_UNIT_X, UI_UNIT_Y, "Click to see rest of reports in textblock: 'Recent Reports'"); + uiDefIconButO(block, BUT, "UI_OT_reports_to_textblock", WM_OP_INVOKE_REGION_WIN, icon, 2, 0, UI_UNIT_X, UI_UNIT_Y, _("Click to see rest of reports in textblock: 'Recent Reports'")); else uiDefIconBut(block, LABEL, 0, icon, 2, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 1ec125c2f26..8f20f47f539 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -37,6 +37,8 @@ #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" @@ -117,7 +119,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind } case PROP_COLLECTION: { char text[256]; - sprintf(text, "%d items", RNA_property_collection_length(ptr, prop)); + sprintf(text, _("%d items"), RNA_property_collection_length(ptr, prop)); but= uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL); uiButSetFlag(but, UI_BUT_DISABLED); break; diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 43bf2f59e04..3f5bc21814d 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -168,7 +168,7 @@ static void view2d_masks(View2D *v2d) void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) { short tot_changed= 0, init= 0; - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); /* initialise data if there is a need for such */ if ((v2d->flag & V2D_IS_INITIALISED) == 0) { diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 434334258af..8cdb67a13fd 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -39,6 +39,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "RNA_access.h" @@ -51,6 +53,7 @@ #include "ED_screen.h" #include "UI_view2d.h" +#include "UI_interface.h" #include "PIL_time.h" /* USER_ZOOM_CONT */ @@ -292,8 +295,8 @@ static int view_pan_cancel(bContext *UNUSED(C), wmOperator *op) static void VIEW2D_OT_pan(wmOperatorType *ot) { /* identifiers */ - ot->name= "Pan View"; - ot->description= "Pan the view"; + ot->name= _("Pan View"); + ot->description= _("Pan the view"); ot->idname= "VIEW2D_OT_pan"; /* api callbacks */ @@ -306,8 +309,8 @@ static void VIEW2D_OT_pan(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); } /* ------------------ Scrollwheel Versions (2) ---------------------- */ @@ -342,16 +345,16 @@ static int view_scrollright_exec(bContext *C, wmOperator *op) static void VIEW2D_OT_scroll_right(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroll Right"; - ot->description= "Scroll the view right"; + ot->name= _("Scroll Right"); + ot->description= _("Scroll the view right"); ot->idname= "VIEW2D_OT_scroll_right"; /* api callbacks */ ot->exec= view_scrollright_exec; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); } @@ -386,16 +389,16 @@ static int view_scrollleft_exec(bContext *C, wmOperator *op) static void VIEW2D_OT_scroll_left(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroll Left"; - ot->description= "Scroll the view left"; + ot->name= _("Scroll Left"); + ot->description= _("Scroll the view left"); ot->idname= "VIEW2D_OT_scroll_left"; /* api callbacks */ ot->exec= view_scrollleft_exec; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); } @@ -434,17 +437,17 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op) static void VIEW2D_OT_scroll_down(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroll Down"; - ot->description= "Scroll the view down"; + ot->name= _("Scroll Down"); + ot->description= _("Scroll the view down"); ot->idname= "VIEW2D_OT_scroll_down"; /* api callbacks */ ot->exec= view_scrolldown_exec; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); - RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll down one page."); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); + RNA_def_boolean(ot->srna, "page", 0, _("Page"), _("Scroll down one page.")); } @@ -484,17 +487,17 @@ static int view_scrollup_exec(bContext *C, wmOperator *op) static void VIEW2D_OT_scroll_up(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroll Up"; - ot->description= "Scroll the view up"; + ot->name= _("Scroll Up"); + ot->description= _("Scroll the view up"); ot->idname= "VIEW2D_OT_scroll_up"; /* api callbacks */ ot->exec= view_scrollup_exec; /* rna - must keep these in sync with the other operators */ - RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX); - RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll up one page."); + RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, _("Delta X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, _("Delta Y"), "", INT_MIN, INT_MAX); + RNA_def_boolean(ot->srna, "page", 0, _("Page"), _("Scroll up one page.")); } /* ********************************************************* */ @@ -712,8 +715,8 @@ static int view_zoomin_invoke(bContext *C, wmOperator *op, wmEvent *event) static void VIEW2D_OT_zoom_in(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom In"; - ot->description= "Zoom in the view"; + ot->name= _("Zoom In"); + ot->description= _("Zoom in the view"); ot->idname= "VIEW2D_OT_zoom_in"; /* api callbacks */ @@ -722,8 +725,8 @@ static void VIEW2D_OT_zoom_in(wmOperatorType *ot) ot->poll= view_zoom_poll; /* rna - must keep these in sync with the other operators */ - RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, "Zoom Factor X", "", -FLT_MAX, FLT_MAX); - RNA_def_float(ot->srna, "zoomfacy", 0, -FLT_MAX, FLT_MAX, "Zoom Factor Y", "", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, _("Zoom Factor X"), "", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "zoomfacy", 0, -FLT_MAX, FLT_MAX, _("Zoom Factor Y"), "", -FLT_MAX, FLT_MAX); } /* this operator only needs this single callback, where it callsthe view_zoom_*() methods */ @@ -769,8 +772,8 @@ static int view_zoomout_invoke(bContext *C, wmOperator *op, wmEvent *event) static void VIEW2D_OT_zoom_out(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom Out"; - ot->description= "Zoom out the view"; + ot->name= _("Zoom Out"); + ot->description= _("Zoom out the view"); ot->idname= "VIEW2D_OT_zoom_out"; /* api callbacks */ @@ -779,8 +782,8 @@ static void VIEW2D_OT_zoom_out(wmOperatorType *ot) ot->poll= view_zoom_poll; /* rna - must keep these in sync with the other operators */ - RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, "Zoom Factor X", "", -FLT_MAX, FLT_MAX); - RNA_def_float(ot->srna, "zoomfacy", 0, -FLT_MAX, FLT_MAX, "Zoom Factor Y", "", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, _("Zoom Factor X"), "", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "zoomfacy", 0, -FLT_MAX, FLT_MAX, _("Zoom Factor Y"), "", -FLT_MAX, FLT_MAX); } /* ********************************************************* */ @@ -1064,8 +1067,8 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event) static void VIEW2D_OT_zoom(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom 2D View"; - ot->description= "Zoom in/out the view"; + ot->name= _("Zoom 2D View"); + ot->description= _("Zoom in/out the view"); ot->idname= "VIEW2D_OT_zoom"; /* api callbacks */ @@ -1080,8 +1083,8 @@ static void VIEW2D_OT_zoom(wmOperatorType *ot) // ot->flag= OPTYPE_BLOCKING; /* rna - must keep these in sync with the other operators */ - RNA_def_float(ot->srna, "deltax", 0, -FLT_MAX, FLT_MAX, "Delta X", "", -FLT_MAX, FLT_MAX); - RNA_def_float(ot->srna, "deltay", 0, -FLT_MAX, FLT_MAX, "Delta Y", "", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "deltax", 0, -FLT_MAX, FLT_MAX, _("Delta X"), "", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "deltay", 0, -FLT_MAX, FLT_MAX, _("Delta Y"), "", -FLT_MAX, FLT_MAX); } /* ********************************************************* */ @@ -1165,8 +1168,8 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op) static void VIEW2D_OT_zoom_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom to Border"; - ot->description= "Zoom in the view to the nearest item contained in the border"; + ot->name= _("Zoom to Border"); + ot->description= _("Zoom in the view to the nearest item contained in the border"); ot->idname= "VIEW2D_OT_zoom_border"; /* api callbacks */ @@ -1178,11 +1181,11 @@ static void VIEW2D_OT_zoom_border(wmOperatorType *ot) ot->poll= view_zoom_poll; /* rna */ - RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Gesture Mode", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, _("Gesture Mode"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } /* ********************************************************* */ @@ -1567,8 +1570,8 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) static void VIEW2D_OT_scroller_activate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroller Activate"; - ot->description= "Scroll view by mouse click and drag"; + ot->name= _("Scroller Activate"); + ot->description= _("Scroll view by mouse click and drag"); ot->idname= "VIEW2D_OT_scroller_activate"; /* flags */ @@ -1587,7 +1590,7 @@ static void VIEW2D_OT_scroller_activate(wmOperatorType *ot) static int reset_exec(bContext *C, wmOperator *UNUSED(op)) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); ARegion *ar= CTX_wm_region(C); View2D *v2d= &ar->v2d; int winx, winy; @@ -1635,8 +1638,8 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op)) static void VIEW2D_OT_reset(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset View"; - ot->description= "Reset the view"; + ot->name= _("Reset View"); + ot->description= _("Reset the view"); ot->idname= "VIEW2D_OT_reset"; /* api callbacks */ diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt index 02a25a2a122..3c78983f82d 100644 --- a/source/blender/editors/mesh/CMakeLists.txt +++ b/source/blender/editors/mesh/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript index 34936c025bc..c1b37ec53cd 100644 --- a/source/blender/editors/mesh/SConscript +++ b/source/blender/editors/mesh/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../blenloader' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index ec08bfccda3..9d99849c4d2 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -50,6 +50,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_DerivedMesh.h" #include "BKE_context.h" #include "BKE_depsgraph.h" @@ -1312,9 +1314,9 @@ void remake_editMesh(Scene *scene, Object *ob) /* *************** Operator: separate parts *************/ static EnumPropertyItem prop_separate_types[] = { - {0, "SELECTED", 0, "Selection", ""}, - {1, "MATERIAL", 0, "By Material", ""}, - {2, "LOOSE", 0, "By loose parts", ""}, + {0, "SELECTED", 0, N_("Selection"), ""}, + {1, "MATERIAL", 0, N_("By Material"), ""}, + {2, "LOOSE", 0, N_("By loose parts"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1541,8 +1543,8 @@ static int mesh_separate_exec(bContext *C, wmOperator *op) void MESH_OT_separate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Separate"; - ot->description= "Separate selected geometry into a new mesh"; + ot->name= _("Separate"); + ot->description= _("Separate selected geometry into a new mesh"); ot->idname= "MESH_OT_separate"; /* api callbacks */ @@ -1553,7 +1555,7 @@ void MESH_OT_separate(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - ot->prop= RNA_def_enum(ot->srna, "type", prop_separate_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_separate_types), 0, _("Type"), ""); } diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index fa3619883f4..d81a7cd8233 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -52,6 +52,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_library.h" @@ -272,8 +274,8 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate or Extrude at 3D Cursor"; - ot->description= "Duplicate and extrude selected vertices, edges or faces towards 3D Cursor"; + ot->name= _("Duplicate or Extrude at 3D Cursor"); + ot->description= _("Duplicate and extrude selected vertices, edges or faces towards 3D Cursor"); ot->idname= "MESH_OT_dupli_extrude_cursor"; /* api callbacks */ @@ -283,7 +285,7 @@ void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "rotate_source", 1, "Rotate Source", "Rotate initial selection giving better shape"); + RNA_def_boolean(ot->srna, "rotate_source", 1, _("Rotate Source"), _("Rotate initial selection giving better shape")); } @@ -405,8 +407,8 @@ static int make_fgon_exec(bContext *C, wmOperator *op) void MESH_OT_fgon_make(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Make F-gon"; - ot->description= "Make fgon from selected faces"; + ot->name= _("Make F-gon"); + ot->description= _("Make fgon from selected faces"); ot->idname= "MESH_OT_fgon_make"; /* api callbacks */ @@ -437,8 +439,8 @@ static int clear_fgon_exec(bContext *C, wmOperator *op) void MESH_OT_fgon_clear(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear F-gon"; - ot->description= "Clear fgon from selected face"; + ot->name= _("Clear F-gon"); + ot->description= _("Clear fgon from selected face"); ot->idname= "MESH_OT_fgon_clear"; /* api callbacks */ @@ -849,8 +851,8 @@ static int addedgeface_mesh_exec(bContext *C, wmOperator *op) void MESH_OT_edge_face_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Edge/Face"; - ot->description= "Add an edge or face to selected"; + ot->name= _("Make Edge/Face"); + ot->description= _("Add an edge or face to selected"); ot->idname= "MESH_OT_edge_face_add"; /* api callbacks */ @@ -1405,8 +1407,8 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op) void MESH_OT_primitive_plane_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Plane"; - ot->description= "Construct a filled planar mesh with 4 vertices"; + ot->name= _("Add Plane"); + ot->description= _("Construct a filled planar mesh with 4 vertices"); ot->idname= "MESH_OT_primitive_plane_add"; /* api callbacks */ @@ -1438,8 +1440,8 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op) void MESH_OT_primitive_cube_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Cube"; - ot->description= "Construct a cube mesh"; + ot->name= _("Add Cube"); + ot->description= _("Construct a cube mesh"); ot->idname= "MESH_OT_primitive_cube_add"; /* api callbacks */ @@ -1473,8 +1475,8 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op) void MESH_OT_primitive_circle_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Circle"; - ot->description= "Construct a circle mesh"; + ot->name= _("Add Circle"); + ot->description= _("Construct a circle mesh"); ot->idname= "MESH_OT_primitive_circle_add"; /* api callbacks */ @@ -1486,9 +1488,9 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 3, 500); - RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); - RNA_def_boolean(ot->srna, "fill", 0, "Fill", ""); + RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, _("Vertices"), "", 3, 500); + RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, _("Radius"), "", 0.001, 100.00); + RNA_def_boolean(ot->srna, "fill", 0, _("Fill"), ""); ED_object_add_generic_props(ot, TRUE); } @@ -1514,8 +1516,8 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op) void MESH_OT_primitive_cylinder_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Cylinder"; - ot->description= "Construct a cylinder mesh"; + ot->name= _("Add Cylinder"); + ot->description= _("Construct a cylinder mesh"); ot->idname= "MESH_OT_primitive_cylinder_add"; /* api callbacks */ @@ -1527,10 +1529,10 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500); - RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); - RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00); - RNA_def_boolean(ot->srna, "cap_ends", 1, "Cap Ends", ""); + RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, _("Vertices"), "", 2, 500); + RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, _("Radius"), "", 0.001, 100.00); + RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, _("Depth"), "", 0.001, 100.00); + RNA_def_boolean(ot->srna, "cap_ends", 1, _("Cap Ends"), ""); ED_object_add_generic_props(ot, TRUE); } @@ -1555,8 +1557,8 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op) void MESH_OT_primitive_cone_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Cone"; - ot->description= "Construct a conic mesh (ends filled)"; + ot->name= _("Add Cone"); + ot->description= _("Construct a conic mesh (ends filled)"); ot->idname= "MESH_OT_primitive_cone_add"; /* api callbacks */ @@ -1568,10 +1570,10 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500); - RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); - RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00); - RNA_def_boolean(ot->srna, "cap_end", 1, "Cap End", ""); + RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, _("Vertices"), "", 2, 500); + RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, _("Radius"), "", 0.001, 100.00); + RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, _("Depth"), "", 0.001, 100.00); + RNA_def_boolean(ot->srna, "cap_end", 1, _("Cap End"), ""); ED_object_add_generic_props(ot, TRUE); } @@ -1596,8 +1598,8 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op) void MESH_OT_primitive_grid_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Grid"; - ot->description= "Construct a grid mesh"; + ot->name= _("Add Grid"); + ot->description= _("Construct a grid mesh"); ot->idname= "MESH_OT_primitive_grid_add"; /* api callbacks */ @@ -1609,9 +1611,9 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "x_subdivisions", 10, INT_MIN, INT_MAX, "X Subdivisions", "", 3, 1000); - RNA_def_int(ot->srna, "y_subdivisions", 10, INT_MIN, INT_MAX, "Y Subdivisions", "", 3, 1000); - RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, "Size", "", 0.001, FLT_MAX); + RNA_def_int(ot->srna, "x_subdivisions", 10, INT_MIN, INT_MAX, _("X Subdivisions"), "", 3, 1000); + RNA_def_int(ot->srna, "y_subdivisions", 10, INT_MIN, INT_MAX, _("Y Subdivisions"), "", 3, 1000); + RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, _("Size"), "", 0.001, FLT_MAX); ED_object_add_generic_props(ot, TRUE); } @@ -1634,8 +1636,8 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op) void MESH_OT_primitive_monkey_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Monkey"; - ot->description= "Construct a Suzanne mesh"; + ot->name= _("Add Monkey"); + ot->description= _("Construct a Suzanne mesh"); ot->idname= "MESH_OT_primitive_monkey_add"; /* api callbacks */ @@ -1669,8 +1671,8 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op) void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add UV Sphere"; - ot->description= "Construct a UV sphere mesh"; + ot->name= _("Add UV Sphere"); + ot->description= _("Construct a UV sphere mesh"); ot->idname= "MESH_OT_primitive_uv_sphere_add"; /* api callbacks */ @@ -1682,9 +1684,9 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "segments", 32, INT_MIN, INT_MAX, "Segments", "", 3, 500); - RNA_def_int(ot->srna, "ring_count", 16, INT_MIN, INT_MAX, "Rings", "", 3, 500); - RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, "Size", "", 0.001, 100.00); + RNA_def_int(ot->srna, "segments", 32, INT_MIN, INT_MAX, _("Segments"), "", 3, 500); + RNA_def_int(ot->srna, "ring_count", 16, INT_MIN, INT_MAX, _("Rings"), "", 3, 500); + RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, _("Size"), "", 0.001, 100.00); ED_object_add_generic_props(ot, TRUE); } @@ -1708,8 +1710,8 @@ static int add_primitive_icosphere_exec(bContext *C, wmOperator *op) void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Ico Sphere"; - ot->description= "Construct an Icosphere mesh"; + ot->name= _("Add Ico Sphere"); + ot->description= _("Construct an Icosphere mesh"); ot->idname= "MESH_OT_primitive_ico_sphere_add"; /* api callbacks */ @@ -1721,8 +1723,8 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "subdivisions", 2, 0, INT_MAX, "Subdivisions", "", 0, 8); - RNA_def_float(ot->srna, "size", 1.0f, 0.0f, FLT_MAX, "Size", "", 0.001f, 100.00); + RNA_def_int(ot->srna, "subdivisions", 2, 0, INT_MAX, _("Subdivisions"), "", 0, 8); + RNA_def_float(ot->srna, "size", 1.0f, 0.0f, FLT_MAX, _("Size"), "", 0.001f, 100.00); ED_object_add_generic_props(ot, TRUE); } @@ -1756,8 +1758,8 @@ static int mesh_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev void MESH_OT_duplicate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Mesh"; - ot->description= "Duplicate selected vertices, edges or faces"; + ot->name= _("Duplicate Mesh"); + ot->description= _("Duplicate selected vertices, edges or faces"); ot->idname= "MESH_OT_duplicate"; /* api callbacks */ @@ -1767,6 +1769,6 @@ void MESH_OT_duplicate(wmOperatorType *ot) ot->poll= ED_operator_editmesh; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); } diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index acbe5ef2144..fbc531d0e92 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -55,6 +55,8 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv #include "BLI_editVert.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_mesh.h" @@ -447,9 +449,9 @@ typedef struct CutCurve { #define KNIFE_MULTICUT 3 static EnumPropertyItem knife_items[]= { - {KNIFE_EXACT, "EXACT", 0, "Exact", ""}, - {KNIFE_MIDPOINT, "MIDPOINTS", 0, "Midpoints", ""}, - {KNIFE_MULTICUT, "MULTICUT", 0, "Multicut", ""}, + {KNIFE_EXACT, "EXACT", 0, N_("Exact"), ""}, + {KNIFE_MIDPOINT, "MIDPOINTS", 0, N_("Midpoints"), ""}, + {KNIFE_MULTICUT, "MULTICUT", 0, N_("Multicut"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -712,8 +714,8 @@ void MESH_OT_knife_cut(wmOperatorType *ot) { PropertyRNA *prop; - ot->name= "Knife Cut"; - ot->description= "Cut selected edges and faces into parts"; + ot->name= _("Knife Cut"); + ot->description= _("Cut selected edges and faces into parts"); ot->idname= "MESH_OT_knife_cut"; ot->invoke= WM_gesture_lines_invoke; @@ -726,14 +728,14 @@ void MESH_OT_knife_cut(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", knife_items, KNIFE_EXACT, "Type", ""); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(knife_items), KNIFE_EXACT, _("Type"), ""); prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); - RNA_def_int(ot->srna, "num_cuts", 1, 1, MAX_CUTS, "Number of Cuts", "Only for Multi-Cut", 1, MAX_CUTS); + RNA_def_int(ot->srna, "num_cuts", 1, 1, MAX_CUTS, _("Number of Cuts"), _("Only for Multi-Cut"), 1, MAX_CUTS); // doesn't work atm.. RNA_def_enum(ot->srna, "corner_cut_pattern", corner_type_items, SUBDIV_CORNER_INNERVERT, "Corner Cut Pattern", "Topology pattern to use to fill a face after cutting across its corner"); /* internal */ - RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX); + RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, _("Cursor"), "", 0, INT_MAX); } /* ******************************************************* */ diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 9497370a4fa..748ce641b24 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -55,6 +55,8 @@ editmesh_mods.c, UI level access, no geometry changes #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_displist.h" #include "BKE_depsgraph.h" @@ -712,22 +714,22 @@ static int unified_findnearest(ViewContext *vc, EditVert **eve, EditEdge **eed, #define SIMFACE_TOT 207 static EnumPropertyItem prop_similar_types[] = { - {SIMVERT_NORMAL, "NORMAL", 0, "Normal", ""}, - {SIMVERT_FACE, "FACE", 0, "Amount of Vertices in Face", ""}, - {SIMVERT_VGROUP, "VGROUP", 0, "Vertex Groups", ""}, - {SIMEDGE_LENGTH, "LENGTH", 0, "Length", ""}, - {SIMEDGE_DIR, "DIR", 0, "Direction", ""}, - {SIMEDGE_FACE, "FACE", 0, "Amount of Vertices in Face", ""}, - {SIMEDGE_FACE_ANGLE, "FACE_ANGLE", 0, "Face Angles", ""}, - {SIMEDGE_CREASE, "CREASE", 0, "Crease", ""}, - {SIMEDGE_SEAM, "SEAM", 0, "Seam", ""}, - {SIMEDGE_SHARP, "SHARP", 0, "Sharpness", ""}, - {SIMFACE_MATERIAL, "MATERIAL", 0, "Material", ""}, - {SIMFACE_IMAGE, "IMAGE", 0, "Image", ""}, - {SIMFACE_AREA, "AREA", 0, "Area", ""}, - {SIMFACE_PERIMETER, "PERIMETER", 0, "Perimeter", ""}, - {SIMFACE_NORMAL, "NORMAL", 0, "Normal", ""}, - {SIMFACE_COPLANAR, "COPLANAR", 0, "Co-planar", ""}, + {SIMVERT_NORMAL, "NORMAL", 0, N_("Normal"), ""}, + {SIMVERT_FACE, "FACE", 0, N_("Amount of Vertices in Face"), ""}, + {SIMVERT_VGROUP, "VGROUP", 0, N_("Vertex Groups"), ""}, + {SIMEDGE_LENGTH, "LENGTH", 0, N_("Length"), ""}, + {SIMEDGE_DIR, "DIR", 0, N_("Direction"), ""}, + {SIMEDGE_FACE, "FACE", 0, N_("Amount of Vertices in Face"), ""}, + {SIMEDGE_FACE_ANGLE, "FACE_ANGLE", 0, N_("Face Angles"), ""}, + {SIMEDGE_CREASE, "CREASE", 0, N_("Crease"), ""}, + {SIMEDGE_SEAM, "SEAM", 0, N_("Seam"), ""}, + {SIMEDGE_SHARP, "SHARP", 0, N_("Sharpness"), ""}, + {SIMFACE_MATERIAL, "MATERIAL", 0, N_("Material"), ""}, + {SIMFACE_IMAGE, "IMAGE", 0, N_("Image"), ""}, + {SIMFACE_AREA, "AREA", 0, N_("Area"), ""}, + {SIMFACE_PERIMETER, "PERIMETER", 0, N_("Perimeter"), ""}, + {SIMFACE_NORMAL, "NORMAL", 0, N_("Normal"), ""}, + {SIMFACE_COPLANAR, "COPLANAR", 0, N_("Co-planar"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1288,8 +1290,8 @@ void MESH_OT_select_similar(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Select Similar"; - ot->description= "Select similar vertices, edges or faces by property types"; + ot->name= _("Select Similar"); + ot->description= _("Select similar vertices, edges or faces by property types"); ot->idname= "MESH_OT_select_similar"; /* api callbacks */ @@ -1301,10 +1303,10 @@ void MESH_OT_select_similar(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "type", prop_similar_types, SIMVERT_NORMAL, "Type", ""); + prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_similar_types), SIMVERT_NORMAL, _("Type"), ""); RNA_def_enum_funcs(prop, select_similar_type_itemf); ot->prop= prop; - RNA_def_float(ot->srna, "threshold", 0.01f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 100.f); + RNA_def_float(ot->srna, "threshold", 0.01f, 0.0f, FLT_MAX, _("Threshold"), "", 0.0f, 100.f); } /* ******************************************* */ @@ -2040,8 +2042,8 @@ static int loop_multiselect(bContext *C, wmOperator *op) void MESH_OT_loop_multi_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Multi Select Loops"; - ot->description= "Select a loop of connected edges by connection type"; + ot->name= _("Multi Select Loops"); + ot->description= _("Select a loop of connected edges by connection type"); ot->idname= "MESH_OT_loop_multi_select"; /* api callbacks */ @@ -2052,7 +2054,7 @@ void MESH_OT_loop_multi_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "ring", 0, "Ring", ""); + RNA_def_boolean(ot->srna, "ring", 0, _("Ring"), ""); } @@ -2130,8 +2132,8 @@ static int mesh_select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event) void MESH_OT_loop_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Loop Select"; - ot->description= "Select a loop of connected edges"; + ot->name= _("Loop Select"); + ot->description= _("Select a loop of connected edges"); ot->idname= "MESH_OT_loop_select"; /* api callbacks */ @@ -2142,8 +2144,8 @@ void MESH_OT_loop_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); - RNA_def_boolean(ot->srna, "ring", 0, "Select Ring", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); + RNA_def_boolean(ot->srna, "ring", 0, _("Select Ring"), ""); } /* ******************* mesh shortest path select, uses prev-selected edge ****************** */ @@ -2261,8 +2263,8 @@ static int mesh_shortest_path_select_poll(bContext *C) void MESH_OT_select_shortest_path(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shortest Path Select"; - ot->description= "Select shortest path between two selections"; + ot->name= _("Shortest Path Select"); + ot->description= _("Select shortest path between two selections"); ot->idname= "MESH_OT_select_shortest_path"; /* api callbacks */ @@ -2273,7 +2275,7 @@ void MESH_OT_select_shortest_path(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); } @@ -2569,8 +2571,8 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event void MESH_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; - ot->description= "(un)select all vertices linked to the active mesh"; + ot->name= _("Select Linked"); + ot->description= _("(un)select all vertices linked to the active mesh"); ot->idname= "MESH_OT_select_linked_pick"; /* api callbacks */ @@ -2580,8 +2582,8 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", ""); - RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", "Limit selection by seam boundaries (faces only)"); + RNA_def_boolean(ot->srna, "deselect", 0, _("Deselect"), ""); + RNA_def_boolean(ot->srna, "limit", 0, _("Limit by Seams"), _("Limit selection by seam boundaries (faces only)")); } @@ -2658,8 +2660,8 @@ static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve void MESH_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked All"; - ot->description= "Select all vertices linked to the active mesh"; + ot->name= _("Select Linked All"); + ot->description= _("Select all vertices linked to the active mesh"); ot->idname= "MESH_OT_select_linked"; /* api callbacks */ @@ -2670,7 +2672,7 @@ void MESH_OT_select_linked(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", "Limit selection by seam boundaries (faces only)"); + RNA_def_boolean(ot->srna, "limit", 0, _("Limit by Seams"), _("Limit selection by seam boundaries (faces only)")); } @@ -2795,8 +2797,8 @@ static int hide_mesh_exec(bContext *C, wmOperator *op) void MESH_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selection"; - ot->description= "Hide (un)selected vertices, edges or faces"; + ot->name= _("Hide Selection"); + ot->description= _("Hide (un)selected vertices, edges or faces"); ot->idname= "MESH_OT_hide"; /* api callbacks */ @@ -2807,7 +2809,7 @@ void MESH_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } void EM_reveal_mesh(EditMesh *em) @@ -2862,8 +2864,8 @@ static int reveal_mesh_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal Hidden"; - ot->description= "Reveal all hidden vertices, edges and faces"; + ot->name= _("Reveal Hidden"); + ot->description= _("Reveal all hidden vertices, edges and faces"); ot->idname= "MESH_OT_reveal"; /* api callbacks */ @@ -2913,14 +2915,14 @@ static int select_by_number_vertices_exec(bContext *C, wmOperator *op) void MESH_OT_select_by_number_vertices(wmOperatorType *ot) { static const EnumPropertyItem type_items[]= { - {3, "TRIANGLES", 0, "Triangles", NULL}, - {4, "QUADS", 0, "Quads", NULL}, - {5, "OTHER", 0, "Other", NULL}, + {3, "TRIANGLES", 0, N_("Triangles"), NULL}, + {4, "QUADS", 0, N_("Quads"), NULL}, + {5, "OTHER", 0, N_("Other"), NULL}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Select by Number of Vertices"; - ot->description= "Select vertices or faces by vertex count"; + ot->name= _("Select by Number of Vertices"); + ot->description= _("Select vertices or faces by vertex count"); ot->idname= "MESH_OT_select_by_number_vertices"; /* api callbacks */ @@ -2932,7 +2934,7 @@ void MESH_OT_select_by_number_vertices(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, 3, "Type", "Type of elements to select."); + ot->prop= RNA_def_enum(ot->srna, "type", type_items, 3, _("Type"), _("Type of elements to select.")); } @@ -2953,8 +2955,8 @@ static int select_mirror_exec(bContext *C, wmOperator *op) void MESH_OT_select_mirror(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Mirror"; - ot->description= "Select mesh items at mirrored locations"; + ot->name= _("Select Mirror"); + ot->description= _("Select mesh items at mirrored locations"); ot->idname= "MESH_OT_select_mirror"; /* api callbacks */ @@ -2965,7 +2967,7 @@ void MESH_OT_select_mirror(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the existing selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend the existing selection")); } static int select_sharp_edges_exec(bContext *C, wmOperator *op) @@ -3074,8 +3076,8 @@ static int select_sharp_edges_exec(bContext *C, wmOperator *op) void MESH_OT_edges_select_sharp(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Sharp Edges"; - ot->description= "Marked selected edges as sharp"; + ot->name= _("Select Sharp Edges"); + ot->description= _("Marked selected edges as sharp"); ot->idname= "MESH_OT_edges_select_sharp"; /* api callbacks */ @@ -3086,7 +3088,7 @@ void MESH_OT_edges_select_sharp(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float(ot->srna, "sharpness", 0.01f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f); + RNA_def_float(ot->srna, "sharpness", 0.01f, 0.0f, FLT_MAX, _("sharpness"), "", 0.0f, 180.0f); } @@ -3242,8 +3244,8 @@ static int select_linked_flat_faces_exec(bContext *C, wmOperator *op) void MESH_OT_faces_select_linked_flat(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked Flat Faces"; - ot->description= "Select linked faces by angle"; + ot->name= _("Select Linked Flat Faces"); + ot->description= _("Select linked faces by angle"); ot->idname= "MESH_OT_faces_select_linked_flat"; /* api callbacks */ @@ -3254,7 +3256,7 @@ void MESH_OT_faces_select_linked_flat(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float(ot->srna, "sharpness", 135.0f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f); + RNA_def_float(ot->srna, "sharpness", 135.0f, 0.0f, FLT_MAX, _("sharpness"), "", 0.0f, 180.0f); } static void select_non_manifold(EditMesh *em, wmOperator *op ) @@ -3343,8 +3345,8 @@ static int select_non_manifold_exec(bContext *C, wmOperator *op) void MESH_OT_select_non_manifold(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Non Manifold"; - ot->description= "Select all non-manifold vertices or edges"; + ot->name= _("Select Non Manifold"); + ot->description= _("Select all non-manifold vertices or edges"); ot->idname= "MESH_OT_select_non_manifold"; /* api callbacks */ @@ -3407,8 +3409,8 @@ static int select_inverse_mesh_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Inverse"; - ot->description= "Select inverse of (un)selected vertices, edges or faces"; + ot->name= _("Select Inverse"); + ot->description= _("Select inverse of (un)selected vertices, edges or faces"); ot->idname= "MESH_OT_select_inverse"; /* api callbacks */ @@ -3469,8 +3471,8 @@ static int select_all_exec(bContext *C, wmOperator *op) void MESH_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; - ot->description= "Change selection of all vertices, edges or faces"; + ot->name= _("Select or Deselect All"); + ot->description= _("Change selection of all vertices, edges or faces"); ot->idname= "MESH_OT_select_all"; /* api callbacks */ @@ -3542,8 +3544,8 @@ static int select_more(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_select_more(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select More"; - ot->description= "Select more vertices, edges or faces connected to initial selection"; + ot->name= _("Select More"); + ot->description= _("Select more vertices, edges or faces connected to initial selection"); ot->idname= "MESH_OT_select_more"; /* api callbacks */ @@ -3632,8 +3634,8 @@ static int select_less(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_select_less(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Less"; - ot->description= "Select less vertices, edges or faces connected to initial selection"; + ot->name= _("Select Less"); + ot->description= _("Select less vertices, edges or faces connected to initial selection"); ot->idname= "MESH_OT_select_less"; /* api callbacks */ @@ -3702,8 +3704,8 @@ static int mesh_select_random_exec(bContext *C, wmOperator *op) void MESH_OT_select_random(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Random"; - ot->description= "Randomly select vertices"; + ot->name= _("Select Random"); + ot->description= _("Randomly select vertices"); ot->idname= "MESH_OT_select_random"; /* api callbacks */ @@ -3714,8 +3716,8 @@ void MESH_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly.", 0.f, 100.0f); - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first."); + RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, _("Percent"), _("Percentage of elements to select randomly."), 0.f, 100.0f); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend Selection"), _("Extend selection instead of deselecting everything first.")); } void EM_select_by_material(EditMesh *em, int index) @@ -3797,8 +3799,8 @@ static int editmesh_mark_seam(bContext *C, wmOperator *op) void MESH_OT_mark_seam(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mark Seam"; - ot->description= "(un)mark selected edges as a seam"; + ot->name= _("Mark Seam"); + ot->description= _("(un)mark selected edges as a seam"); ot->idname= "MESH_OT_mark_seam"; /* api callbacks */ @@ -3808,7 +3810,7 @@ void MESH_OT_mark_seam(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "clear", 0, "Clear", ""); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), ""); } static int editmesh_mark_sharp(bContext *C, wmOperator *op) @@ -3849,8 +3851,8 @@ static int editmesh_mark_sharp(bContext *C, wmOperator *op) void MESH_OT_mark_sharp(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mark Sharp"; - ot->description= "(un)mark selected edges as sharp"; + ot->name= _("Mark Sharp"); + ot->description= _("(un)mark selected edges as sharp"); ot->idname= "MESH_OT_mark_sharp"; /* api callbacks */ @@ -3860,7 +3862,7 @@ void MESH_OT_mark_sharp(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "clear", 0, "Clear", ""); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), ""); } /* **************** NORMALS ************** */ @@ -4093,8 +4095,8 @@ static int normals_make_consistent_exec(bContext *C, wmOperator *op) void MESH_OT_normals_make_consistent(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Normals Consistent"; - ot->description= "Flip all selected vertex and face normals in a consistent direction"; + ot->name= _("Make Normals Consistent"); + ot->description= _("Flip all selected vertex and face normals in a consistent direction"); ot->idname= "MESH_OT_normals_make_consistent"; /* api callbacks */ @@ -4104,7 +4106,7 @@ void MESH_OT_normals_make_consistent(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "inside", 0, "Inside", ""); + RNA_def_boolean(ot->srna, "inside", 0, _("Inside"), ""); } /* **************** VERTEX DEFORMS *************** */ @@ -4271,8 +4273,8 @@ static int smooth_vertex_exec(bContext *C, wmOperator *op) void MESH_OT_vertices_smooth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth Vertex"; - ot->description= "Flatten angles of selected vertices"; + ot->name= _("Smooth Vertex"); + ot->description= _("Flatten angles of selected vertices"); ot->idname= "MESH_OT_vertices_smooth"; /* api callbacks */ @@ -4282,10 +4284,10 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Smooth Iterations", "", 1, INT_MAX); - RNA_def_boolean(ot->srna, "xaxis", 1, "X-Axis", "Smooth along the X axis."); - RNA_def_boolean(ot->srna, "yaxis", 1, "Y-Axis", "Smooth along the Y axis."); - RNA_def_boolean(ot->srna, "zaxis", 1, "Z-Axis", "Smooth along the Z axis."); + RNA_def_int(ot->srna, "repeat", 1, 1, 100, _("Smooth Iterations"), "", 1, INT_MAX); + RNA_def_boolean(ot->srna, "xaxis", 1, _("X-Axis"), _("Smooth along the X axis.")); + RNA_def_boolean(ot->srna, "yaxis", 1, _("Y-Axis"), _("Smooth along the Y axis.")); + RNA_def_boolean(ot->srna, "zaxis", 1, _("Z-Axis"), _("Smooth along the Z axis.")); } static int mesh_noise_exec(bContext *C, wmOperator *op) @@ -4345,8 +4347,8 @@ static int mesh_noise_exec(bContext *C, wmOperator *op) void MESH_OT_noise(wmOperatorType *ot) { /* identifiers */ - ot->name= "Noise"; - ot->description= "Use vertex coordinate as texture coordinate"; + ot->name= _("Noise"); + ot->description= _("Use vertex coordinate as texture coordinate"); ot->idname= "MESH_OT_noise"; /* api callbacks */ @@ -4356,7 +4358,7 @@ void MESH_OT_noise(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_float(ot->srna, "factor", 0.1f, -FLT_MAX, FLT_MAX, "Factor", "", 0.0f, 1.0f); + RNA_def_float(ot->srna, "factor", 0.1f, -FLT_MAX, FLT_MAX, _("Factor"), "", 0.0f, 1.0f); } void flipface(EditMesh *em, EditFace *efa) @@ -4407,8 +4409,8 @@ static int flip_normals(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_flip_normals(wmOperatorType *ot) { /* identifiers */ - ot->name= "Flip Normals"; - ot->description= "Toggle the direction of selected face's vertex and face normals"; + ot->name= _("Flip Normals"); + ot->description= _("Toggle the direction of selected face's vertex and face normals"); ot->idname= "MESH_OT_flip_normals"; /* api callbacks */ @@ -4449,8 +4451,8 @@ void MESH_OT_solidify(wmOperatorType *ot) { PropertyRNA *prop; /* identifiers */ - ot->name= "Solidify"; - ot->description= "Create a solid skin by extruding, compensating for sharp angles"; + ot->name= _("Solidify"); + ot->description= _("Create a solid skin by extruding, compensating for sharp angles"); ot->idname= "MESH_OT_solidify"; /* api callbacks */ @@ -4460,7 +4462,7 @@ void MESH_OT_solidify(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - prop= RNA_def_float(ot->srna, "thickness", 0.01f, -FLT_MAX, FLT_MAX, "Thickness", "", -10.0f, 10.0f); + prop= RNA_def_float(ot->srna, "thickness", 0.01f, -FLT_MAX, FLT_MAX, _("Thickness"), "", -10.0f, 10.0f); RNA_def_property_ui_range(prop, -10, 10, 0.1, 4); } @@ -4484,7 +4486,7 @@ static int mesh_select_nth_exec(bContext *C, wmOperator *op) void MESH_OT_select_nth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Nth"; + ot->name= _("Select Nth"); ot->description= ""; ot->idname= "MESH_OT_select_nth"; @@ -4495,6 +4497,6 @@ void MESH_OT_select_nth(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "nth", 2, 2, 100, "Nth Selection", "", 1, INT_MAX); + RNA_def_int(ot->srna, "nth", 2, 2, 100, _("Nth Selection"), "", 1, INT_MAX); } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index bfae101d38e..1453b23da26 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -65,6 +65,8 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise #include "BLI_heap.h" #include "BLI_scanfill.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_global.h" @@ -506,8 +508,8 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Remove Doubles"; - ot->description= "Remove duplicate vertices"; + ot->name= _("Remove Doubles"); + ot->description= _("Remove duplicate vertices"); ot->idname= "MESH_OT_remove_doubles"; /* api callbacks */ @@ -517,7 +519,7 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - prop= RNA_def_float(ot->srna, "limit", 0.0001f, 0.000001f, 50.0f, "Merge Threshold", "Minimum distance between merged verts", 0.00001f, 2.0f); + prop= RNA_def_float(ot->srna, "limit", 0.0001f, 0.000001f, 50.0f, _("Merge Threshold"), _("Minimum distance between merged verts"), 0.00001f, 2.0f); RNA_def_property_ui_range(prop, 0.000001f, 50.0f, 0.001, 5); } @@ -578,8 +580,8 @@ static int mesh_vertices_sort_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_vertices_sort(wmOperatorType *ot) { /* identifiers */ - ot->name= "Vertex Sort"; - ot->description= "Sort vertex order"; + ot->name= _("Vertex Sort"); + ot->description= _("Sort vertex order"); ot->idname= "MESH_OT_vertices_sort"; /* api callbacks */ @@ -661,8 +663,8 @@ static int mesh_vertices_randomize_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_vertices_randomize(wmOperatorType *ot) { /* identifiers */ - ot->name= "Vertex Randomize"; - ot->description= "Randomize vertex order"; + ot->name= _("Vertex Randomize"); + ot->description= _("Randomize vertex order"); ot->idname= "MESH_OT_vertices_randomize"; /* api callbacks */ @@ -755,10 +757,10 @@ static int mesh_extrude_exec(bContext *C, wmOperator *op) } static EnumPropertyItem extrude_items[] = { - {1, "REGION", 0, "Region", ""}, - {2, "FACES", 0, "Individual Faces", ""}, - {3, "EDGES", 0, "Only Edges", ""}, - {4, "VERTS", 0, "Only Vertices", ""}, + {1, "REGION", 0, N_("Region"), ""}, + {2, "FACES", 0, N_("Individual Faces"), ""}, + {3, "EDGES", 0, N_("Only Edges"), ""}, + {4, "VERTS", 0, N_("Only Vertices"), ""}, {0, NULL, 0, NULL, NULL}}; @@ -835,8 +837,8 @@ void MESH_OT_extrude(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Extrude"; - ot->description= "Extrude selected vertices, edges or faces"; + ot->name= _("Extrude"); + ot->description= _("Extrude selected vertices, edges or faces"); ot->idname= "MESH_OT_extrude"; /* api callbacks */ @@ -848,7 +850,8 @@ void MESH_OT_extrude(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "type", extrude_items, 0, "Type", ""); + /* gettext extrude_items will raise segment fault */ + prop= RNA_def_enum(ot->srna, "type", extrude_items, 0, _("Type"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); RNA_def_enum_funcs(prop, mesh_extrude_itemf); ot->prop= prop; @@ -879,8 +882,8 @@ static int split_mesh(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_split(wmOperatorType *ot) { /* identifiers */ - ot->name= "Split"; - ot->description= "Split selected geometry into separate disconnected mesh"; + ot->name= _("Split"); + ot->description= _("Split selected geometry into separate disconnected mesh"); ot->idname= "MESH_OT_split"; /* api callbacks */ @@ -946,8 +949,8 @@ static int extrude_repeat_mesh_invoke(bContext *C, wmOperator *op, wmEvent *UNUS void MESH_OT_extrude_repeat(wmOperatorType *ot) { /* identifiers */ - ot->name= "Extrude Repeat Mesh"; - ot->description= "Extrude selected vertices, edges or faces repeatedly"; + ot->name= _("Extrude Repeat Mesh"); + ot->description= _("Extrude selected vertices, edges or faces repeatedly"); ot->idname= "MESH_OT_extrude_repeat"; /* api callbacks */ @@ -959,9 +962,9 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float(ot->srna, "offset", 2.0f, 0.0f, 100.0f, "Offset", "", 0.0f, 100.0f); - RNA_def_int(ot->srna, "steps", 10, 0, 180, "Steps", "", 0, 180); - RNA_def_float_vector(ot->srna, "direction", 3, NULL, -FLT_MAX, FLT_MAX, "Direction", "Direction of extrude", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "offset", 2.0f, 0.0f, 100.0f, _("Offset"), "", 0.0f, 100.0f); + RNA_def_int(ot->srna, "steps", 10, 0, 180, _("Steps"), "", 0, 180); + RNA_def_float_vector(ot->srna, "direction", 3, NULL, -FLT_MAX, FLT_MAX, _("Direction"), _("Direction of extrude"), -FLT_MAX, FLT_MAX); } /* ************************** spin operator ******************** */ @@ -1082,8 +1085,8 @@ static int spin_mesh_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void MESH_OT_spin(wmOperatorType *ot) { /* identifiers */ - ot->name= "Spin"; - ot->description= "Extrude selected vertices in a circle around the cursor in indicated viewport"; + ot->name= _("Spin"); + ot->description= _("Extrude selected vertices in a circle around the cursor in indicated viewport"); ot->idname= "MESH_OT_spin"; /* api callbacks */ @@ -1095,12 +1098,12 @@ void MESH_OT_spin(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, 128); - RNA_def_boolean(ot->srna, "dupli", 0, "Dupli", "Make Duplicates"); - RNA_def_float(ot->srna, "degrees", 90.0f, -FLT_MAX, FLT_MAX, "Degrees", "Degrees", -360.0f, 360.0f); + RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, _("Steps"), _("Steps"), 0, 128); + RNA_def_boolean(ot->srna, "dupli", 0, _("Dupli"), _("Make Duplicates")); + RNA_def_float(ot->srna, "degrees", 90.0f, -FLT_MAX, FLT_MAX, _("Degrees"), _("Degrees"), -360.0f, 360.0f); - RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, "Center", "Center in global view space", -FLT_MAX, FLT_MAX); - RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -FLT_MAX, FLT_MAX); + RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, _("Center"), _("Center in global view space"), -FLT_MAX, FLT_MAX); + RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, _("Axis"), _("Axis in global view space"), -FLT_MAX, FLT_MAX); } @@ -1188,8 +1191,8 @@ static int screw_mesh_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) void MESH_OT_screw(wmOperatorType *ot) { /* identifiers */ - ot->name= "Screw"; - ot->description= "Extrude selected vertices in screw-shaped rotation around the cursor in indicated viewport"; + ot->name= _("Screw"); + ot->description= _("Extrude selected vertices in screw-shaped rotation around the cursor in indicated viewport"); ot->idname= "MESH_OT_screw"; /* api callbacks */ @@ -1201,11 +1204,11 @@ void MESH_OT_screw(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /*props */ - RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, 256); - RNA_def_int(ot->srna, "turns", 1, 0, INT_MAX, "Turns", "Turns", 0, 256); + RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, _("Steps"), _("Steps"), 0, 256); + RNA_def_int(ot->srna, "turns", 1, 0, INT_MAX, _("Turns"), _("Turns"), 0, 256); - RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, "Center", "Center in global view space", -FLT_MAX, FLT_MAX); - RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -FLT_MAX, FLT_MAX); + RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, _("Center"), _("Center in global view space"), -FLT_MAX, FLT_MAX); + RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, _("Axis"), _("Axis in global view space"), -FLT_MAX, FLT_MAX); } static void erase_edges(EditMesh *em, ListBase *l) @@ -1393,13 +1396,13 @@ static void delete_mesh(EditMesh *em, wmOperator *op, int event) /* Note, these values must match delete_mesh() event values */ static EnumPropertyItem prop_mesh_delete_types[] = { - {10,"VERT", 0, "Vertices", ""}, - {1, "EDGE", 0, "Edges", ""}, - {2, "FACE", 0, "Faces", ""}, - {3, "ALL", 0, "All", ""}, - {4, "EDGE_FACE",0, "Edges & Faces", ""}, - {5, "ONLY_FACE",0, "Only Faces", ""}, - {6, "EDGE_LOOP",0, "Edge Loop", ""}, + {10,"VERT", 0, N_("Vertices"), ""}, + {1, "EDGE", 0, N_("Edges"), ""}, + {2, "FACE", 0, N_("Faces"), ""}, + {3, "ALL", 0, N_("All"), ""}, + {4, "EDGE_FACE",0, N_("Edges & Faces"), ""}, + {5, "ONLY_FACE",0, N_("Only Faces"), ""}, + {6, "EDGE_LOOP",0, N_("Edge Loop"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1424,8 +1427,8 @@ static int delete_mesh_exec(bContext *C, wmOperator *op) void MESH_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete"; - ot->description= "Delete selected vertices, edges or faces"; + ot->name= _("Delete"); + ot->description= _("Delete selected vertices, edges or faces"); ot->idname= "MESH_OT_delete"; /* api callbacks */ @@ -1438,7 +1441,7 @@ void MESH_OT_delete(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /*props */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_mesh_delete_types, 10, "Type", "Method used for deleting mesh data"); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_mesh_delete_types), 10, _("Type"), _("Method used for deleting mesh data")); } @@ -5113,8 +5116,8 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) void MESH_OT_rip(wmOperatorType *ot) { /* identifiers */ - ot->name= "Rip"; - ot->description= "Rip selection from mesh (quads only)"; + ot->name= _("Rip"); + ot->description= _("Rip selection from mesh (quads only)"); ot->idname= "MESH_OT_rip"; /* api callbacks */ @@ -5194,8 +5197,8 @@ static int shape_propagate_to_all_exec(bContext *C, wmOperator *op) void MESH_OT_shape_propagate_to_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shape Propagate"; - ot->description= "Apply selected vertex locations to all other shape keys"; + ot->name= _("Shape Propagate"); + ot->description= _("Apply selected vertex locations to all other shape keys"); ot->idname= "MESH_OT_shape_propagate_to_all"; /* api callbacks */ @@ -5300,8 +5303,8 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot) static EnumPropertyItem shape_items[]= {{0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Blend From Shape"; - ot->description= "Blend in shape from a shape key"; + ot->name= _("Blend From Shape"); + ot->description= _("Blend in shape from a shape key"); ot->idname= "MESH_OT_blend_from_shape"; /* api callbacks */ @@ -5313,10 +5316,10 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "shape", shape_items, 0, "Shape", "Shape key to use for blending."); + prop= RNA_def_enum(ot->srna, "shape", shape_items, 0, _("Shape"), _("Shape key to use for blending.")); RNA_def_enum_funcs(prop, shape_itemf); - RNA_def_float(ot->srna, "blend", 1.0f, -FLT_MAX, FLT_MAX, "Blend", "Blending factor.", -2.0f, 2.0f); - RNA_def_boolean(ot->srna, "add", 0, "Add", "Add rather than blend between shapes."); + RNA_def_float(ot->srna, "blend", 1.0f, -FLT_MAX, FLT_MAX, _("Blend"), _("Blending factor."), -2.0f, 2.0f); + RNA_def_boolean(ot->srna, "add", 0, _("Add"), _("Add rather than blend between shapes.")); } /************************ Merge Operator *************************/ @@ -5968,11 +5971,11 @@ static int merge_exec(bContext *C, wmOperator *op) } static EnumPropertyItem merge_type_items[]= { - {6, "FIRST", 0, "At First", ""}, - {1, "LAST", 0, "At Last", ""}, - {3, "CENTER", 0, "At Center", ""}, - {4, "CURSOR", 0, "At Cursor", ""}, - {5, "COLLAPSE", 0, "Collapse", ""}, + {6, "FIRST", 0, N_("At First"), ""}, + {1, "LAST", 0, N_("At Last"), ""}, + {3, "CENTER", 0, N_("At Center"), ""}, + {4, "CURSOR", 0, N_("At Cursor"), ""}, + {5, "COLLAPSE", 0, N_("Collapse"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free) @@ -6016,8 +6019,8 @@ void MESH_OT_merge(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Merge"; - ot->description= "Merge selected vertices"; + ot->name= _("Merge"); + ot->description= _("Merge selected vertices"); ot->idname= "MESH_OT_merge"; /* api callbacks */ @@ -6029,10 +6032,10 @@ void MESH_OT_merge(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "type", merge_type_items, 3, "Type", "Merge method to use."); + prop= RNA_def_enum(ot->srna, "type", merge_type_items, 3, _("Type"), _("Merge method to use.")); RNA_def_enum_funcs(prop, merge_type_itemf); ot->prop= prop; - RNA_def_boolean(ot->srna, "uvs", 0, "UVs", "Move UVs according to merge."); + RNA_def_boolean(ot->srna, "uvs", 0, _("UVs"), _("Move UVs according to merge.")); } /************************ Vertex Path Operator *************************/ @@ -6219,13 +6222,13 @@ static int select_vertex_path_exec(bContext *C, wmOperator *op) void MESH_OT_select_vertex_path(wmOperatorType *ot) { static const EnumPropertyItem type_items[] = { - {PATH_SELECT_EDGE_LENGTH, "EDGE_LENGTH", 0, "Edge Length", NULL}, - {PATH_SELECT_TOPOLOGICAL, "TOPOLOGICAL", 0, "Topological", NULL}, + {PATH_SELECT_EDGE_LENGTH, "EDGE_LENGTH", 0, N_("Edge Length"), NULL}, + {PATH_SELECT_TOPOLOGICAL, "TOPOLOGICAL", 0, N_("Topological"), NULL}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Select Vertex Path"; - ot->description= "Select shortest path between two vertices by distance type"; + ot->name= _("Select Vertex Path"); + ot->description= _("Select shortest path between two vertices by distance type"); ot->idname= "MESH_OT_select_vertex_path"; /* api callbacks */ @@ -6236,7 +6239,7 @@ void MESH_OT_select_vertex_path(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, PATH_SELECT_EDGE_LENGTH, "Type", "Method to compute distance."); + ot->prop= RNA_def_enum(ot->srna, "type", type_items, PATH_SELECT_EDGE_LENGTH, _("Type"), _("Method to compute distance.")); } /********************** Region/Loop Operators *************************/ @@ -6286,8 +6289,8 @@ static int region_to_loop(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_region_to_loop(wmOperatorType *ot) { /* identifiers */ - ot->name= "Region to Loop"; - ot->description= "Select a region as a loop of connected edges"; + ot->name= _("Region to Loop"); + ot->description= _("Select a region as a loop of connected edges"); ot->idname= "MESH_OT_region_to_loop"; /* api callbacks */ @@ -6462,8 +6465,8 @@ static int loop_to_region(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_loop_to_region(wmOperatorType *ot) { /* identifiers */ - ot->name= "Loop to Region"; - ot->description= "Select a loop of connected edges as a region"; + ot->name= _("Loop to Region"); + ot->description= _("Select a loop of connected edges as a region"); ot->idname= "MESH_OT_loop_to_region"; /* api callbacks */ @@ -6757,8 +6760,8 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op) void MESH_OT_uvs_rotate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Rotate UVs"; - ot->description= "Rotate selected UVs"; + ot->name= _("Rotate UVs"); + ot->description= _("Rotate selected UVs"); ot->idname= "MESH_OT_uvs_rotate"; /* api callbacks */ @@ -6769,14 +6772,14 @@ void MESH_OT_uvs_rotate(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate UVs around."); + RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, _("Direction"), _("Direction to rotate UVs around.")); } void MESH_OT_uvs_mirror(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mirror UVs"; - ot->description= "Mirror selected UVs"; + ot->name= _("Mirror UVs"); + ot->description= _("Mirror selected UVs"); ot->idname= "MESH_OT_uvs_mirror"; /* api callbacks */ @@ -6787,14 +6790,14 @@ void MESH_OT_uvs_mirror(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror UVs around."); + RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, _("Axis"), _("Axis to mirror UVs around.")); } void MESH_OT_colors_rotate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Rotate Colors"; - ot->description= "Rotate UV/image color layer"; + ot->name= _("Rotate Colors"); + ot->description= _("Rotate UV/image color layer"); ot->idname= "MESH_OT_colors_rotate"; /* api callbacks */ @@ -6805,14 +6808,14 @@ void MESH_OT_colors_rotate(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate edge around."); + RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, _("Direction"), _("Direction to rotate edge around.")); } void MESH_OT_colors_mirror(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mirror Colors"; - ot->description= "Mirror UV/image color layer"; + ot->name= _("Mirror Colors"); + ot->description= _("Mirror UV/image color layer"); ot->idname= "MESH_OT_colors_mirror"; /* api callbacks */ @@ -6823,7 +6826,7 @@ void MESH_OT_colors_mirror(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror colors around."); + RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, _("Axis"), _("Axis to mirror colors around.")); } /********************** Subdivide Operator *************************/ @@ -6855,8 +6858,8 @@ static int subdivide_exec(bContext *C, wmOperator *op) void MESH_OT_subdivide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Subdivide"; - ot->description= "Subdivide selected edges"; + ot->name= _("Subdivide"); + ot->description= _("Subdivide selected edges"); ot->idname= "MESH_OT_subdivide"; /* api callbacks */ @@ -6867,10 +6870,10 @@ void MESH_OT_subdivide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10); - RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor.", 0.0f, 1.0f); - RNA_def_float(ot->srna, "fractal", 0.0, 0.0f, FLT_MAX, "Fractal", "Fractal randomness factor.", 0.0f, 1000.0f); - RNA_def_enum(ot->srna, "corner_cut_pattern", corner_type_items, SUBDIV_CORNER_INNERVERT, "Corner Cut Pattern", "Topology pattern to use to fill a face after cutting across its corner"); + RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, _("Number of Cuts"), "", 1, 10); + RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, _("Smoothness"), _("Smoothness factor."), 0.0f, 1.0f); + RNA_def_float(ot->srna, "fractal", 0.0, 0.0f, FLT_MAX, _("Fractal"), _("Fractal randomness factor."), 0.0f, 1000.0f); + RNA_def_enum(ot->srna, "corner_cut_pattern", corner_type_items, SUBDIV_CORNER_INNERVERT, _("Corner Cut Pattern"), _("Topology pattern to use to fill a face after cutting across its corner")); } /********************** Fill Operators *************************/ @@ -7138,8 +7141,8 @@ static int fill_mesh_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_fill(wmOperatorType *ot) { /* identifiers */ - ot->name= "Fill"; - ot->description= "Create a segment, edge or face"; + ot->name= _("Fill"); + ot->description= _("Create a segment, edge or face"); ot->idname= "MESH_OT_fill"; /* api callbacks */ @@ -7168,8 +7171,8 @@ static int beautify_fill_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_beautify_fill(wmOperatorType *ot) { /* identifiers */ - ot->name= "Beautify Fill"; - ot->description= "Rearrange geometry on a selected surface to avoid skinny faces"; + ot->name= _("Beautify Fill"); + ot->description= _("Rearrange geometry on a selected surface to avoid skinny faces"); ot->idname= "MESH_OT_beautify_fill"; /* api callbacks */ @@ -7334,16 +7337,16 @@ static int sort_faces_exec(bContext *C, wmOperator *op) void MESH_OT_sort_faces(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { - { 1, "VIEW_AXIS", 0, "View Axis", "" }, - { 2, "CURSOR_DISTANCE", 0, "Cursor Distance", "" }, - { 3, "MATERIAL", 0, "Material", "" }, - { 4, "SELECTED", 0, "Selected", "" }, - { 5, "RANDOMIZE", 0, "Randomize", "" }, + { 1, "VIEW_AXIS", 0, N_("View Axis"), "" }, + { 2, "CURSOR_DISTANCE", 0, N_("Cursor Distance"), "" }, + { 3, "MATERIAL", 0, N_("Material"), "" }, + { 4, "SELECTED", 0, N_("Selected"), "" }, + { 5, "RANDOMIZE", 0, N_("Randomize"), "" }, { 0, NULL, 0, NULL, NULL }}; /* identifiers */ - ot->name= "Sort Faces"; // XXX (Ctrl to reverse)%t| - ot->description= "The faces of the active Mesh Object are sorted, based on the current view."; + ot->name= _("Sort Faces"); // XXX (Ctrl to reverse)%t| + ot->description= _("The faces of the active Mesh Object are sorted, based on the current view."); ot->idname= "MESH_OT_sort_faces"; /* api callbacks */ @@ -7355,7 +7358,7 @@ void MESH_OT_sort_faces(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(type_items), 0, _("Type"), ""); } /********************** Quad/Tri Operators *************************/ @@ -7377,8 +7380,8 @@ static int quads_convert_to_tris_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_quads_convert_to_tris(wmOperatorType *ot) { /* identifiers */ - ot->name= "Quads to Tris"; - ot->description= "Convert selected quads to triangles"; + ot->name= _("Quads to Tris"); + ot->description= _("Convert selected quads to triangles"); ot->idname= "MESH_OT_quads_convert_to_tris"; /* api callbacks */ @@ -7406,8 +7409,8 @@ static int tris_convert_to_quads_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_tris_convert_to_quads(wmOperatorType *ot) { /* identifiers */ - ot->name= "Tris to Quads"; - ot->description= "Convert selected triangles to quads"; + ot->name= _("Tris to Quads"); + ot->description= _("Convert selected triangles to quads"); ot->idname= "MESH_OT_tris_convert_to_quads"; /* api callbacks */ @@ -7435,8 +7438,8 @@ static int edge_flip_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_edge_flip(wmOperatorType *ot) { /* identifiers */ - ot->name= "Edge Flip"; - ot->description= "Flip selected edge or adjoining faces"; + ot->name= _("Edge Flip"); + ot->description= _("Flip selected edge or adjoining faces"); ot->idname= "MESH_OT_edge_flip"; /* api callbacks */ @@ -7483,8 +7486,8 @@ static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_faces_shade_smooth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Smooth"; - ot->description= "Display faces 'smooth' (using vertex normals)"; + ot->name= _("Shade Smooth"); + ot->description= _("Display faces 'smooth' (using vertex normals)"); ot->idname= "MESH_OT_faces_shade_smooth"; /* api callbacks */ @@ -7511,8 +7514,8 @@ static int mesh_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op)) void MESH_OT_faces_shade_flat(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Flat"; - ot->description= "Display faces 'flat'"; + ot->name= _("Shade Flat"); + ot->description= _("Display faces 'flat'"); ot->idname= "MESH_OT_faces_shade_flat"; /* api callbacks */ @@ -7576,20 +7579,20 @@ static int select_axis_exec(bContext *C, wmOperator *op) void MESH_OT_select_axis(wmOperatorType *ot) { static EnumPropertyItem axis_mode_items[] = { - {0, "POSITIVE", 0, "Positive Axis", ""}, - {1, "NEGATIVE", 0, "Negative Axis", ""}, - {-1, "ALIGNED", 0, "Aligned Axis", ""}, + {0, "POSITIVE", 0, N_("Positive Axis"), ""}, + {1, "NEGATIVE", 0, N_("Negative Axis"), ""}, + {-1, "ALIGNED", 0, N_("Aligned Axis"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem axis_items_xyz[] = { - {0, "X_AXIS", 0, "X Axis", ""}, - {1, "Y_AXIS", 0, "Y Axis", ""}, - {2, "Z_AXIS", 0, "Z Axis", ""}, + {0, "X_AXIS", 0, N_("X Axis"), ""}, + {1, "Y_AXIS", 0, N_("Y Axis"), ""}, + {2, "Z_AXIS", 0, N_("Z Axis"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Select Axis"; - ot->description= "Select all data in the mesh on a single axis"; + ot->name= _("Select Axis"); + ot->description= _("Select all data in the mesh on a single axis"); ot->idname= "MESH_OT_select_axis"; /* api callbacks */ @@ -7600,7 +7603,7 @@ void MESH_OT_select_axis(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "mode", axis_mode_items, 0, "Axis Mode", "Axis side to use when selecting"); - RNA_def_enum(ot->srna, "axis", axis_items_xyz, 0, "Axis", "Select the axis to compare each vertex on"); + RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(axis_mode_items), 0, _("Axis Mode"), _("Axis side to use when selecting")); + RNA_def_enum(ot->srna, "axis", RNA_enum_items_gettexted(axis_items_xyz), 0, _("Axis"), _("Select the axis to compare each vertex on")); } diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index 0ec356a88ae..62a512fe11a 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -53,6 +53,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_blender.h" #include "BKE_context.h" #include "BKE_depsgraph.h" @@ -510,9 +512,9 @@ static int ringcut_modal (bContext *C, wmOperator *op, wmEvent *event) void MESH_OT_edgering_select (wmOperatorType *ot) { /* description */ - ot->name= "Edge Ring Select"; + ot->name= _("Edge Ring Select"); ot->idname= "MESH_OT_edgering_select"; - ot->description= "Select an edge ring"; + ot->description= _("Select an edge ring"); /* callbacks */ ot->invoke= ringsel_invoke; @@ -521,15 +523,15 @@ void MESH_OT_edgering_select (wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend the selection")); } void MESH_OT_loopcut (wmOperatorType *ot) { /* description */ - ot->name= "Loop Cut"; + ot->name= _("Loop Cut"); ot->idname= "MESH_OT_loopcut"; - ot->description= "Add a new loop between existing loops"; + ot->description= _("Add a new loop between existing loops"); /* callbacks */ ot->invoke= ringcut_invoke; @@ -541,5 +543,5 @@ void MESH_OT_loopcut (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* properties */ - RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10); + RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, _("Number of Cuts"), "", 1, 10); } diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 282eeef906f..077ad756150 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -42,6 +42,8 @@ #include "BLI_blenlib.h" #include "BLI_editVert.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "RNA_access.h" @@ -172,52 +174,52 @@ void ED_operatormacros_mesh(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot= WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO|OPTYPE_REGISTER); - ot->description = "Cut mesh loop and slide it"; + ot= WM_operatortype_append_macro("MESH_OT_loopcut_slide", _("Loop Cut and Slide"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot->description = _("Cut mesh loop and slide it"); WM_operatortype_macro_define(ot, "MESH_OT_loopcut"); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide"); RNA_struct_idprops_unset(otmacro->ptr, "release_confirm"); - ot= WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); - ot->description = "Duplicate mesh and move"; + ot= WM_operatortype_append_macro("MESH_OT_duplicate_move", _("Add Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot->description = _("Duplicate mesh and move"); WM_operatortype_macro_define(ot, "MESH_OT_duplicate"); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", 0); - ot= WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO|OPTYPE_REGISTER); - ot->description = "Rip polygons and move the result"; + ot= WM_operatortype_append_macro("MESH_OT_rip_move", _("Rip"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot->description = _("Rip polygons and move the result"); WM_operatortype_macro_define(ot, "MESH_OT_rip"); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", 0); - ot= WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO|OPTYPE_REGISTER); - ot->description = "Extrude region and move result"; + ot= WM_operatortype_append_macro("MESH_OT_extrude_region_move", _("Extrude Region and Move"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot->description = _("Extrude region and move result"); otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude"); RNA_enum_set(otmacro->ptr, "type", 1); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", 0); - ot= WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO|OPTYPE_REGISTER); - ot->description = "Extrude faces and move result"; + ot= WM_operatortype_append_macro("MESH_OT_extrude_faces_move", _("Extrude Individual Faces and Move"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot->description = _("Extrude faces and move result"); otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude"); RNA_enum_set(otmacro->ptr, "type", 2); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", 0); - ot= WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO|OPTYPE_REGISTER); - ot->description = "Extrude edges and move result"; + ot= WM_operatortype_append_macro("MESH_OT_extrude_edges_move", _("Extrude Only Edges and Move"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot->description = _("Extrude edges and move result"); otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude"); RNA_enum_set(otmacro->ptr, "type", 3); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", 0); - ot= WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO|OPTYPE_REGISTER); - ot->description = "Extrude vertices and move result"; + ot= WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", _("Extrude Only Vertices and Move"), OPTYPE_UNDO|OPTYPE_REGISTER); + ot->description = _("Extrude vertices and move result"); otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude"); RNA_enum_set(otmacro->ptr, "type", 4); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); diff --git a/source/blender/editors/metaball/CMakeLists.txt b/source/blender/editors/metaball/CMakeLists.txt index 76561b12183..41ed5da4f09 100644 --- a/source/blender/editors/metaball/CMakeLists.txt +++ b/source/blender/editors/metaball/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/metaball/SConscript b/source/blender/editors/metaball/SConscript index b1a1ce935db..327e85b95f9 100644 --- a/source/blender/editors/metaball/SConscript +++ b/source/blender/editors/metaball/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../blenloader' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index b007e30422d..c14f57d6c8c 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -42,6 +42,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_meta_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -168,8 +170,8 @@ static int select_all_exec(bContext *C, wmOperator *op) void MBALL_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; - ot->description= "Change selection of all meta elements"; + ot->name= _("Select or Deselect All"); + ot->description= _("Change selection of all meta elements"); ot->idname= "MBALL_OT_select_all"; /* callback functions */ @@ -209,8 +211,8 @@ static int select_inverse_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) void MBALL_OT_select_inverse_metaelems(wmOperatorType *ot) { /* identifiers */ - ot->name= "Inverse"; - ot->description= "Select inverse of (un)selected metaelements"; + ot->name= _("Inverse"); + ot->description= _("Select inverse of (un)selected metaelements"); ot->idname= "MBALL_OT_select_inverse_metaelems"; /* callback functions */ @@ -255,8 +257,8 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op) void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Random..."; - ot->description= "Randomly select metaelements"; + ot->name= _("Random..."); + ot->description= _("Randomly select metaelements"); ot->idname= "MBALL_OT_select_random_metaelems"; /* callback functions */ @@ -268,7 +270,7 @@ void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of metaelems to select randomly.", 0.0001f, 1.0f); + RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, _("Percent"), _("Percentage of metaelems to select randomly."), 0.0001f, 1.0f); } /***************************** Duplicate operator *****************************/ @@ -314,8 +316,8 @@ static int duplicate_metaelems_invoke(bContext *C, wmOperator *op, wmEvent *UNUS void MBALL_OT_duplicate_metaelems(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Metaelements"; - ot->description= "Delete selected metaelement(s)"; + ot->name= _("Duplicate Metaelements"); + ot->description= _("Delete selected metaelement(s)"); ot->idname= "MBALL_OT_duplicate_metaelems"; /* callback functions */ @@ -327,7 +329,7 @@ void MBALL_OT_duplicate_metaelems(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); } /***************************** Delete operator *****************************/ @@ -360,8 +362,8 @@ static int delete_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) void MBALL_OT_delete_metaelems(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete"; - ot->description= "Delete selected metaelement(s)"; + ot->name= _("Delete"); + ot->description= _("Delete selected metaelement(s)"); ot->idname= "MBALL_OT_delete_metaelems"; /* callback functions */ @@ -400,8 +402,8 @@ static int hide_metaelems_exec(bContext *C, wmOperator *op) void MBALL_OT_hide_metaelems(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide"; - ot->description= "Hide (un)selected metaelement(s)"; + ot->name= _("Hide"); + ot->description= _("Hide (un)selected metaelement(s)"); ot->idname= "MBALL_OT_hide_metaelems"; /* callback functions */ @@ -412,7 +414,7 @@ void MBALL_OT_hide_metaelems(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } /***************************** Unhide operator *****************************/ @@ -441,8 +443,8 @@ static int reveal_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) void MBALL_OT_reveal_metaelems(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal"; - ot->description= "Reveal all hidden metaelements"; + ot->name= _("Reveal"); + ot->description= _("Reveal all hidden metaelements"); ot->idname= "MBALL_OT_reveal_metaelems"; /* callback functions */ diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt index 14b40d55f11..ff542701a68 100644 --- a/source/blender/editors/object/CMakeLists.txt +++ b/source/blender/editors/object/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript index 660643fbb0f..9460530d5aa 100644 --- a/source/blender/editors/object/SConscript +++ b/source/blender/editors/object/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc ../../blenloader' incs += ' ../../makesrna ../../python ../../ikplugin' incs += ' ../../render/extern/include ../../gpu' # for object_bake.c diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index f5f97c6a5f6..160df57d5f4 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -50,6 +50,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_anim.h" #include "BKE_animsys.h" #include "BKE_armature.h" @@ -174,15 +176,15 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode) PropertyRNA *prop; /* note: this property gets hidden for add-camera operator */ - RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view"); + RNA_def_boolean(ot->srna, "view_align", 0, _("Align to View"), _("Align the new object to the view")); if(do_editmode) { - prop= RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode", "Enter editmode when adding this object"); + prop= RNA_def_boolean(ot->srna, "enter_editmode", 0, _("Enter Editmode"), _("Enter editmode when adding this object")); RNA_def_property_flag(prop, PROP_HIDDEN); } - RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location for the newly added object", -FLT_MAX, FLT_MAX); - RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", "Rotation for the newly added object", -FLT_MAX, FLT_MAX); + RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, _("Location"), _("Location for the newly added object"), -FLT_MAX, FLT_MAX); + RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, _("Rotation"), _("Rotation for the newly added object"), -FLT_MAX, FLT_MAX); prop = RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", ""); RNA_def_property_flag(prop, PROP_HIDDEN); @@ -336,8 +338,8 @@ static int object_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Object"; - ot->description = "Add an object to the scene"; + ot->name= _("Add Object"); + ot->description = _("Add an object to the scene"); ot->idname= "OBJECT_OT_add"; /* api callbacks */ @@ -349,7 +351,7 @@ void OBJECT_OT_add(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(object_type_items), 0, _("Type"), ""); ED_object_add_generic_props(ot, TRUE); } @@ -357,18 +359,18 @@ void OBJECT_OT_add(wmOperatorType *ot) /********************* Add Effector Operator ********************/ /* copy from rna_object_force.c*/ static EnumPropertyItem field_type_items[] = { - {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", ""}, - {PFIELD_WIND, "WIND", ICON_FORCE_WIND, "Wind", ""}, - {PFIELD_VORTEX, "VORTEX", ICON_FORCE_VORTEX, "Vortex", ""}, - {PFIELD_MAGNET, "MAGNET", ICON_FORCE_MAGNETIC, "Magnetic", ""}, - {PFIELD_HARMONIC, "HARMONIC", ICON_FORCE_HARMONIC, "Harmonic", ""}, - {PFIELD_CHARGE, "CHARGE", ICON_FORCE_CHARGE, "Charge", ""}, - {PFIELD_LENNARDJ, "LENNARDJ", ICON_FORCE_LENNARDJONES, "Lennard-Jones", ""}, - {PFIELD_TEXTURE, "TEXTURE", ICON_FORCE_TEXTURE, "Texture", ""}, - {PFIELD_GUIDE, "GUIDE", ICON_FORCE_CURVE, "Curve Guide", ""}, - {PFIELD_BOID, "BOID", ICON_FORCE_BOID, "Boid", ""}, - {PFIELD_TURBULENCE, "TURBULENCE", ICON_FORCE_TURBULENCE, "Turbulence", ""}, - {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, "Drag", ""}, + {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, N_("Force"), ""}, + {PFIELD_WIND, "WIND", ICON_FORCE_WIND, N_("Wind"), ""}, + {PFIELD_VORTEX, "VORTEX", ICON_FORCE_VORTEX, N_("Vortex"), ""}, + {PFIELD_MAGNET, "MAGNET", ICON_FORCE_MAGNETIC, N_("Magnetic"), ""}, + {PFIELD_HARMONIC, "HARMONIC", ICON_FORCE_HARMONIC, N_("Harmonic"), ""}, + {PFIELD_CHARGE, "CHARGE", ICON_FORCE_CHARGE, N_("Charge"), ""}, + {PFIELD_LENNARDJ, "LENNARDJ", ICON_FORCE_LENNARDJONES, N_("Lennard-Jones"), ""}, + {PFIELD_TEXTURE, "TEXTURE", ICON_FORCE_TEXTURE, N_("Texture"), ""}, + {PFIELD_GUIDE, "GUIDE", ICON_FORCE_CURVE, N_("Curve Guide"), ""}, + {PFIELD_BOID, "BOID", ICON_FORCE_BOID, N_("Boid"), ""}, + {PFIELD_TURBULENCE, "TURBULENCE", ICON_FORCE_TURBULENCE, N_("Turbulence"), ""}, + {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, N_("Drag"), ""}, {0, NULL, 0, NULL, NULL}}; /* for effector add primitive operators */ @@ -428,8 +430,8 @@ static int effector_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_effector_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Effector"; - ot->description = "Add an empty object with a physics effector to the scene"; + ot->name= _("Add Effector"); + ot->description = _("Add an empty object with a physics effector to the scene"); ot->idname= "OBJECT_OT_effector_add"; /* api callbacks */ @@ -441,7 +443,7 @@ void OBJECT_OT_effector_add(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - ot->prop= RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(field_type_items), 0, _("Type"), ""); ED_object_add_generic_props(ot, TRUE); } @@ -483,8 +485,8 @@ void OBJECT_OT_camera_add(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Add Camera"; - ot->description = "Add a camera object to the scene"; + ot->name= _("Add Camera"); + ot->description = _("Add a camera object to the scene"); ot->idname= "OBJECT_OT_camera_add"; /* api callbacks */ @@ -561,8 +563,8 @@ static int object_metaball_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUS void OBJECT_OT_metaball_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Metaball"; - ot->description= "Add an metaball object to the scene"; + ot->name= _("Add Metaball"); + ot->description= _("Add an metaball object to the scene"); ot->idname= "OBJECT_OT_metaball_add"; /* api callbacks */ @@ -573,7 +575,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", metaelem_type_items, 0, "Primitive", ""); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(metaelem_type_items), 0, _("Primitive"), ""); ED_object_add_generic_props(ot, TRUE); } @@ -601,8 +603,8 @@ static int object_add_text_exec(bContext *C, wmOperator *op) void OBJECT_OT_text_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Text"; - ot->description = "Add a text object to the scene"; + ot->name= _("Add Text"); + ot->description = _("Add a text object to the scene"); ot->idname= "OBJECT_OT_text_add"; /* api callbacks */ @@ -656,8 +658,8 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_armature_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Armature"; - ot->description = "Add an armature object to the scene"; + ot->name= _("Add Armature"); + ot->description = _("Add an armature object to the scene"); ot->idname= "OBJECT_OT_armature_add"; /* api callbacks */ @@ -706,16 +708,16 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_lamp_add(wmOperatorType *ot) { static EnumPropertyItem lamp_type_items[] = { - {LA_LOCAL, "POINT", ICON_LAMP_POINT, "Point", "Omnidirectional point light source"}, - {LA_SUN, "SUN", ICON_LAMP_SUN, "Sun", "Constant direction parallel ray light source"}, - {LA_SPOT, "SPOT", ICON_LAMP_SPOT, "Spot", "Directional cone light source"}, - {LA_HEMI, "HEMI", ICON_LAMP_HEMI, "Hemi", "180 degree constant light source"}, - {LA_AREA, "AREA", ICON_LAMP_AREA, "Area", "Directional area light source"}, + {LA_LOCAL, "POINT", ICON_LAMP_POINT, N_("Point"), N_("Omnidirectional point light source")}, + {LA_SUN, "SUN", ICON_LAMP_SUN, N_("Sun"), N_("Constant direction parallel ray light source")}, + {LA_SPOT, "SPOT", ICON_LAMP_SPOT, N_("Spot"), N_("Directional cone light source")}, + {LA_HEMI, "HEMI", ICON_LAMP_HEMI, N_("Hemi"), N_("180 degree constant light source")}, + {LA_AREA, "AREA", ICON_LAMP_AREA, N_("Area"), N_("Directional area light source")}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Add Lamp"; - ot->description = "Add a lamp object to the scene"; + ot->name= _("Add Lamp"); + ot->description = _("Add a lamp object to the scene"); ot->idname= "OBJECT_OT_lamp_add"; /* api callbacks */ @@ -727,7 +729,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(lamp_type_items), 0, _("Type"), ""); ED_object_add_generic_props(ot, FALSE); } @@ -770,8 +772,8 @@ void OBJECT_OT_group_instance_add(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Add Group Instance"; - ot->description = "Add a dupligroup instance"; + ot->name= _("Add Group Instance"); + ot->description = _("Add a dupligroup instance"); ot->idname= "OBJECT_OT_group_instance_add"; /* api callbacks */ @@ -784,7 +786,7 @@ void OBJECT_OT_group_instance_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", ""); + prop= RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, _("Group"), ""); RNA_def_enum_funcs(prop, RNA_group_itemf); ot->prop= prop; ED_object_add_generic_props(ot, FALSE); @@ -835,8 +837,8 @@ static int object_delete_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete"; - ot->description = "Delete selected objects"; + ot->name= _("Delete"); + ot->description = _("Delete selected objects"); ot->idname= "OBJECT_OT_delete"; /* api callbacks */ @@ -1015,8 +1017,8 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Duplicates Real"; - ot->description = "Make dupli objects attached to this object real"; + ot->name= _("Make Duplicates Real"); + ot->description = _("Make dupli objects attached to this object real"); ot->idname= "OBJECT_OT_duplicates_make_real"; /* api callbacks */ @@ -1031,8 +1033,8 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot) /**************************** Convert **************************/ static EnumPropertyItem convert_target_items[]= { - {OB_CURVE, "CURVE", ICON_OUTLINER_OB_CURVE, "Curve from Mesh/Text", ""}, - {OB_MESH, "MESH", ICON_OUTLINER_OB_MESH, "Mesh from Curve/Meta/Surf/Text", ""}, + {OB_CURVE, "CURVE", ICON_OUTLINER_OB_CURVE, N_("Curve from Mesh/Text"), ""}, + {OB_MESH, "MESH", ICON_OUTLINER_OB_MESH, N_("Mesh from Curve/Meta/Surf/Text"), ""}, {0, NULL, 0, NULL, NULL}}; static void curvetomesh(Scene *scene, Object *ob) @@ -1380,8 +1382,8 @@ static int convert_exec(bContext *C, wmOperator *op) void OBJECT_OT_convert(wmOperatorType *ot) { /* identifiers */ - ot->name= "Convert to"; - ot->description = "Convert selected objects to another type"; + ot->name= _("Convert to"); + ot->description = _("Convert selected objects to another type"); ot->idname= "OBJECT_OT_convert"; /* api callbacks */ @@ -1393,8 +1395,8 @@ void OBJECT_OT_convert(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "target", convert_target_items, OB_MESH, "Target", "Type of object to convert to"); - RNA_def_boolean(ot->srna, "keep_original", 0, "Keep Original", "Keep original objects instead of replacing them"); + ot->prop= RNA_def_enum(ot->srna, "target", RNA_enum_items_gettexted(convert_target_items), OB_MESH, _("Target"), _("Type of object to convert to")); + RNA_def_boolean(ot->srna, "keep_original", 0, _("Keep Original"), _("Keep original objects instead of replacing them")); } /**************************** Duplicate ************************/ @@ -1702,8 +1704,8 @@ void OBJECT_OT_duplicate(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Duplicate Objects"; - ot->description = "Duplicate selected objects"; + ot->name= _("Duplicate Objects"); + ot->description = _("Duplicate selected objects"); ot->idname= "OBJECT_OT_duplicate"; /* api callbacks */ @@ -1714,8 +1716,8 @@ void OBJECT_OT_duplicate(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data"); - prop= RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_boolean(ot->srna, "linked", 0, _("Linked"), _("Duplicate object but not object data, linking to the original data")); + prop= RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); } @@ -1773,8 +1775,8 @@ static int add_named_exec(bContext *C, wmOperator *op) void OBJECT_OT_add_named(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Named Object"; - ot->description = "Add named object"; + ot->name= _("Add Named Object"); + ot->description = _("Add named object"); ot->idname= "OBJECT_OT_add_named"; /* api callbacks */ @@ -1784,8 +1786,8 @@ void OBJECT_OT_add_named(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data"); - RNA_def_string(ot->srna, "name", "Cube", 24, "Name", "Object name to add"); + RNA_def_boolean(ot->srna, "linked", 0, _("Linked"), _("Duplicate object but not object data, linking to the original data")); + RNA_def_string(ot->srna, "name", "Cube", 24, _("Name"), _("Object name to add")); } @@ -1831,8 +1833,8 @@ static int join_exec(bContext *C, wmOperator *op) void OBJECT_OT_join(wmOperatorType *ot) { /* identifiers */ - ot->name= "Join"; - ot->description = "Join selected objects into active object"; + ot->name= _("Join"); + ot->description = _("Join selected objects into active object"); ot->idname= "OBJECT_OT_join"; /* api callbacks */ @@ -1880,8 +1882,8 @@ static int join_shapes_exec(bContext *C, wmOperator *op) void OBJECT_OT_join_shapes(wmOperatorType *ot) { /* identifiers */ - ot->name= "Join as Shapes"; - ot->description = "Merge selected objects to shapes of active object"; + ot->name= _("Join as Shapes"); + ot->description = _("Merge selected objects to shapes of active object"); ot->idname= "OBJECT_OT_join_shapes"; /* api callbacks */ diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 450bd70a568..6cd49ac3861 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -42,6 +42,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_constraint_types.h" #include "DNA_curve_types.h" #include "DNA_scene_types.h" @@ -484,8 +486,8 @@ void object_test_constraints (Object *owner) #define EDIT_CONSTRAINT_OWNER_BONE 1 static EnumPropertyItem constraint_owner_items[] = { - {EDIT_CONSTRAINT_OWNER_OBJECT, "OBJECT", 0, "Object", "Edit a constraint on the active object"}, - {EDIT_CONSTRAINT_OWNER_BONE, "BONE", 0, "Bone", "Edit a constraint on the active bone"}, + {EDIT_CONSTRAINT_OWNER_OBJECT, "OBJECT", 0, N_("Object"), N_("Edit a constraint on the active object")}, + {EDIT_CONSTRAINT_OWNER_BONE, "BONE", 0, N_("Bone"), N_("Edit a constraint on the active bone")}, {0, NULL, 0, NULL, NULL}}; @@ -507,8 +509,8 @@ static int edit_constraint_poll(bContext *C) static void edit_constraint_properties(wmOperatorType *ot) { - RNA_def_string(ot->srna, "constraint", "", 32, "Constraint", "Name of the constraint to edit"); - RNA_def_enum(ot->srna, "owner", constraint_owner_items, 0, "Owner", "The owner of this constraint"); + RNA_def_string(ot->srna, "constraint", "", 32, _("Constraint"), _("Name of the constraint to edit")); + RNA_def_enum(ot->srna, "owner", RNA_enum_items_gettexted(constraint_owner_items), 0, _("Owner"), _("The owner of this constraint")); } static int edit_constraint_invoke_properties(bContext *C, wmOperator *op) @@ -609,9 +611,9 @@ static int stretchto_reset_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e void CONSTRAINT_OT_stretchto_reset (wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset Original Length"; + ot->name= _("Reset Original Length"); ot->idname= "CONSTRAINT_OT_stretchto_reset"; - ot->description= "Reset original length of bone for Stretch To Constraint"; + ot->description= _("Reset original length of bone for Stretch To Constraint"); ot->exec= stretchto_reset_exec; ot->invoke= stretchto_reset_invoke; @@ -652,9 +654,9 @@ static int limitdistance_reset_invoke(bContext *C, wmOperator *op, wmEvent *UNUS void CONSTRAINT_OT_limitdistance_reset (wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset Distance"; + ot->name= _("Reset Distance"); ot->idname= "CONSTRAINT_OT_limitdistance_reset"; - ot->description= "Reset limiting distance for Limit Distance Constraint"; + ot->description= _("Reset limiting distance for Limit Distance Constraint"); ot->exec= limitdistance_reset_exec; ot->invoke= limitdistance_reset_invoke; @@ -742,9 +744,9 @@ static int childof_set_inverse_invoke(bContext *C, wmOperator *op, wmEvent *UNUS void CONSTRAINT_OT_childof_set_inverse (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Inverse"; + ot->name= _("Set Inverse"); ot->idname= "CONSTRAINT_OT_childof_set_inverse"; - ot->description= "Set inverse correction for ChildOf constraint"; + ot->description= _("Set inverse correction for ChildOf constraint"); ot->exec= childof_set_inverse_exec; ot->invoke= childof_set_inverse_invoke; @@ -786,9 +788,9 @@ static int childof_clear_inverse_invoke(bContext *C, wmOperator *op, wmEvent *UN void CONSTRAINT_OT_childof_clear_inverse (wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Inverse"; + ot->name= _("Clear Inverse"); ot->idname= "CONSTRAINT_OT_childof_clear_inverse"; - ot->description= "Clear inverse correction for ChildOf constraint"; + ot->description= _("Clear inverse correction for ChildOf constraint"); ot->exec= childof_clear_inverse_exec; ot->invoke= childof_clear_inverse_invoke; @@ -872,9 +874,9 @@ static int constraint_delete_exec (bContext *C, wmOperator *UNUSED(op)) void CONSTRAINT_OT_delete (wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Constraint"; + ot->name= _("Delete Constraint"); ot->idname= "CONSTRAINT_OT_delete"; - ot->description= "Remove constraint from constraint stack"; + ot->description= _("Remove constraint from constraint stack"); /* callbacks */ ot->exec= constraint_delete_exec; @@ -917,9 +919,9 @@ static int constraint_move_down_invoke(bContext *C, wmOperator *op, wmEvent *UNU void CONSTRAINT_OT_move_down (wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Constraint Down"; + ot->name= _("Move Constraint Down"); ot->idname= "CONSTRAINT_OT_move_down"; - ot->description= "Move constraint down in constraint stack"; + ot->description= _("Move constraint down in constraint stack"); /* callbacks */ ot->exec= constraint_move_down_exec; @@ -964,9 +966,9 @@ static int constraint_move_up_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE void CONSTRAINT_OT_move_up (wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Constraint Up"; + ot->name= _("Move Constraint Up"); ot->idname= "CONSTRAINT_OT_move_up"; - ot->description= "Move constraint up in constraint stack"; + ot->description= _("Move constraint up in constraint stack"); /* callbacks */ ot->exec= constraint_move_up_exec; @@ -1011,9 +1013,9 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) void POSE_OT_constraints_clear(wmOperatorType *ot) { /* identifiers */ - ot->name = "Clear Pose Constraints"; + ot->name = _("Clear Pose Constraints"); ot->idname= "POSE_OT_constraints_clear"; - ot->description= "Clear all the constraints for the selected bones"; + ot->description= _("Clear all the constraints for the selected bones"); /* callbacks */ ot->exec= pose_constraints_clear_exec; @@ -1046,9 +1048,9 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_constraints_clear(wmOperatorType *ot) { /* identifiers */ - ot->name = "Clear Object Constraints"; + ot->name = _("Clear Object Constraints"); ot->idname= "OBJECT_OT_constraints_clear"; - ot->description= "Clear all the constraints for the active Object only"; + ot->description= _("Clear all the constraints for the active Object only"); /* callbacks */ ot->exec= object_constraints_clear_exec; @@ -1092,9 +1094,9 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op) void POSE_OT_constraints_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Constraints to Selected"; + ot->name= _("Copy Constraints to Selected"); ot->idname= "POSE_OT_constraints_copy"; - ot->description = "Copy constraints to other selected bones."; + ot->description = _("Copy constraints to other selected bones."); /* api callbacks */ ot->exec= pose_constraint_copy_exec; @@ -1128,9 +1130,9 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_constraints_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Constraints to Selected"; + ot->name= _("Copy Constraints to Selected"); ot->idname= "OBJECT_OT_constraints_copy"; - ot->description = "Copy constraints to other selected objects."; + ot->description = _("Copy constraints to other selected objects."); /* api callbacks */ ot->exec= object_constraint_copy_exec; @@ -1440,8 +1442,8 @@ static int pose_constraint_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_constraint_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Constraint"; - ot->description = "Add a constraint to the active object"; + ot->name= _("Add Constraint"); + ot->description = _("Add a constraint to the active object"); ot->idname= "OBJECT_OT_constraint_add"; /* api callbacks */ @@ -1453,14 +1455,14 @@ void OBJECT_OT_constraint_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, _("Type"), ""); } void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Constraint (with Targets)"; - ot->description = "Add a constraint to the active object, with target (where applicable) set to the selected Objects/Bones"; + ot->name= _("Add Constraint (with Targets)"); + ot->description = _("Add a constraint to the active object, with target (where applicable) set to the selected Objects/Bones"); ot->idname= "OBJECT_OT_constraint_add_with_targets"; /* api callbacks */ @@ -1472,14 +1474,14 @@ void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, _("Type"), ""); } void POSE_OT_constraint_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Constraint"; - ot->description = "Add a constraint to the active bone"; + ot->name= _("Add Constraint"); + ot->description = _("Add a constraint to the active bone"); ot->idname= "POSE_OT_constraint_add"; /* api callbacks */ @@ -1491,14 +1493,14 @@ void POSE_OT_constraint_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, _("Type"), ""); } void POSE_OT_constraint_add_with_targets(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Constraint (with Targets)"; - ot->description = "Add a constraint to the active bone, with target (where applicable) set to the selected Objects/Bones"; + ot->name= _("Add Constraint (with Targets)"); + ot->description = _("Add a constraint to the active bone, with target (where applicable) set to the selected Objects/Bones"); ot->idname= "POSE_OT_constraint_add_with_targets"; /* api callbacks */ @@ -1510,7 +1512,7 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, _("Type"), ""); } /************************ IK Constraint operators *********************/ @@ -1583,8 +1585,8 @@ static int pose_ik_add_exec(bContext *C, wmOperator *op) void POSE_OT_ik_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add IK to Bone"; - ot->description= "Add IK Constraint to the active Bone"; + ot->name= _("Add IK to Bone"); + ot->description= _("Add IK Constraint to the active Bone"); ot->idname= "POSE_OT_ik_add"; /* api callbacks */ @@ -1596,7 +1598,7 @@ void POSE_OT_ik_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "with_targets", 1, "With Targets", "Assign IK Constraint with targets derived from the select bones/objects"); + RNA_def_boolean(ot->srna, "with_targets", 1, _("With Targets"), _("Assign IK Constraint with targets derived from the select bones/objects")); } /* ------------------ */ @@ -1634,8 +1636,8 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op)) void POSE_OT_ik_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove IK"; - ot->description= "Remove all IK Constraints from selected bones"; + ot->name= _("Remove IK"); + ot->description= _("Remove all IK Constraints from selected bones"); ot->idname= "POSE_OT_ik_clear"; /* api callbacks */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 395705dc029..9a649477191 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -46,6 +46,8 @@ #include "BLI_ghash.h" #include "BLI_rand.h" +#include "BLF_api.h" + #include "DNA_armature_types.h" #include "DNA_curve_types.h" #include "DNA_group_types.h" @@ -158,8 +160,8 @@ void OBJECT_OT_hide_view_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Restrict View"; - ot->description = "Reveal the object by setting the hide flag"; + ot->name= _("Clear Restrict View"); + ot->description = _("Reveal the object by setting the hide flag"); ot->idname= "OBJECT_OT_hide_view_clear"; /* api callbacks */ @@ -211,8 +213,8 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_hide_view_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Restrict View"; - ot->description = "Hide the object by setting the hide flag"; + ot->name= _("Set Restrict View"); + ot->description = _("Hide the object by setting the hide flag"); ot->idname= "OBJECT_OT_hide_view_set"; /* api callbacks */ @@ -222,7 +224,7 @@ void OBJECT_OT_hide_view_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected objects.")); } @@ -250,8 +252,8 @@ void OBJECT_OT_hide_render_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Restrict Render"; - ot->description = "Reveal the render object by setting the hide render flag"; + ot->name= _("Clear Restrict Render"); + ot->description = _("Reveal the render object by setting the hide render flag"); ot->idname= "OBJECT_OT_hide_render_clear"; /* api callbacks */ @@ -286,8 +288,8 @@ static int object_hide_render_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_hide_render_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Restrict Render"; - ot->description = "Hide the render object by setting the hide render flag"; + ot->name= _("Set Restrict Render"); + ot->description = _("Hide the render object by setting the hide render flag"); ot->idname= "OBJECT_OT_hide_render_set"; /* api callbacks */ @@ -297,7 +299,7 @@ void OBJECT_OT_hide_render_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected objects.")); } /* ******************* toggle editmode operator ***************** */ @@ -545,8 +547,8 @@ void OBJECT_OT_editmode_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Editmode"; - ot->description = "Toggle object's editmode"; + ot->name= _("Toggle Editmode"); + ot->description = _("Toggle object's editmode"); ot->idname= "OBJECT_OT_editmode_toggle"; /* api callbacks */ @@ -583,9 +585,9 @@ static int posemode_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_posemode_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Pose Mode"; + ot->name= _("Toggle Pose Mode"); ot->idname= "OBJECT_OT_posemode_toggle"; - ot->description= "Enables or disables posing/selecting bones"; + ot->description= _("Enables or disables posing/selecting bones"); /* api callbacks */ ot->exec= posemode_exec; @@ -1519,8 +1521,8 @@ void OBJECT_OT_forcefield_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Force Field"; - ot->description = "Toggle object's force field"; + ot->name= _("Toggle Force Field"); + ot->description = _("Toggle object's force field"); ot->idname= "OBJECT_OT_forcefield_toggle"; /* api callbacks */ @@ -1585,9 +1587,9 @@ static int object_calculate_paths_exec (bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_paths_calculate (wmOperatorType *ot) { /* identifiers */ - ot->name= "Calculate Object Paths"; + ot->name= _("Calculate Object Paths"); ot->idname= "OBJECT_OT_paths_calculate"; - ot->description= "Calculate paths for the selected bones"; + ot->description= _("Calculate paths for the selected bones"); /* api callbacks */ ot->exec= object_calculate_paths_exec; @@ -1629,9 +1631,9 @@ static int object_clear_paths_exec (bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_paths_clear (wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Object Paths"; + ot->name= _("Clear Object Paths"); ot->idname= "OBJECT_OT_paths_clear"; - ot->description= "Clear path caches for selected bones"; + ot->description= _("Clear path caches for selected bones"); /* api callbacks */ ot->exec= object_clear_paths_exec; @@ -1688,8 +1690,8 @@ static int shade_poll(bContext *C) void OBJECT_OT_shade_flat(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Flat"; - ot->description= "Display faces 'flat'"; + ot->name= _("Shade Flat"); + ot->description= _("Display faces 'flat'"); ot->idname= "OBJECT_OT_shade_flat"; /* api callbacks */ @@ -1703,8 +1705,8 @@ void OBJECT_OT_shade_flat(wmOperatorType *ot) void OBJECT_OT_shade_smooth(wmOperatorType *ot) { /* identifiers */ - ot->name= "Shade Smooth"; - ot->description= "Display faces 'smooth' (using vertex normals)"; + ot->name= _("Shade Smooth"); + ot->description= _("Display faces 'smooth' (using vertex normals)"); ot->idname= "OBJECT_OT_shade_smooth"; /* api callbacks */ @@ -1994,8 +1996,8 @@ void OBJECT_OT_mode_set(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Set Object Mode"; - ot->description = "Sets the object interaction mode"; + ot->name= _("Set Object Mode"); + ot->description = _("Sets the object interaction mode"); ot->idname= "OBJECT_OT_mode_set"; /* api callbacks */ @@ -2006,10 +2008,10 @@ void OBJECT_OT_mode_set(wmOperatorType *ot) /* flags */ ot->flag= 0; /* no register/undo here, leave it to operators being called */ - prop= RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", ""); + prop= RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, _("Mode"), ""); RNA_def_enum_funcs(prop, object_mode_set_itemsf); - RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", ""); + RNA_def_boolean(ot->srna, "toggle", 0, _("Toggle"), ""); } @@ -2054,8 +2056,8 @@ static int game_property_new(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_game_property_new(wmOperatorType *ot) { /* identifiers */ - ot->name= "New Game Property"; - ot->description= "Create a new property available to the game engine"; + ot->name= _("New Game Property"); + ot->description= _("Create a new property available to the game engine"); ot->idname= "OBJECT_OT_game_property_new"; /* api callbacks */ @@ -2092,8 +2094,8 @@ static int game_property_remove(bContext *C, wmOperator *op) void OBJECT_OT_game_property_remove(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Game Property"; - ot->description= "Remove game property"; + ot->name= _("Remove Game Property"); + ot->description= _("Remove game property"); ot->idname= "OBJECT_OT_game_property_remove"; /* api callbacks */ @@ -2103,7 +2105,7 @@ void OBJECT_OT_game_property_remove(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Property index to remove ", 0, INT_MAX); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), _("Property index to remove "), 0, INT_MAX); } #define COPY_PROPERTIES_REPLACE 1 @@ -2111,9 +2113,9 @@ void OBJECT_OT_game_property_remove(wmOperatorType *ot) #define COPY_PROPERTIES_COPY 3 static EnumPropertyItem game_properties_copy_operations[] ={ - {COPY_PROPERTIES_REPLACE, "REPLACE", 0, "Replace Properties", ""}, - {COPY_PROPERTIES_MERGE, "MERGE", 0, "Merge Properties", ""}, - {COPY_PROPERTIES_COPY, "COPY", 0, "Copy a Property", ""}, + {COPY_PROPERTIES_REPLACE, "REPLACE", 0, N_("Replace Properties"), ""}, + {COPY_PROPERTIES_MERGE, "MERGE", 0, N_("Merge Properties"), ""}, + {COPY_PROPERTIES_COPY, "COPY", 0, N_("Copy a Property"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem gameprops_items[]= { @@ -2189,7 +2191,7 @@ void OBJECT_OT_game_property_copy(wmOperatorType *ot) { PropertyRNA *prop; /* identifiers */ - ot->name= "Copy Game Property"; + ot->name= _("Copy Game Property"); ot->idname= "OBJECT_OT_game_property_copy"; /* api callbacks */ @@ -2199,8 +2201,8 @@ void OBJECT_OT_game_property_copy(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "operation", game_properties_copy_operations, 3, "Operation", ""); - prop=RNA_def_enum(ot->srna, "property", gameprops_items, 0, "Property", "Properties to copy"); + RNA_def_enum(ot->srna, "operation", game_properties_copy_operations, 3, _("Operation"), ""); + prop=RNA_def_enum(ot->srna, "property", gameprops_items, 0, _("Property"), _("Properties to copy")); RNA_def_enum_funcs(prop, gameprops_itemf); ot->prop=prop; } @@ -2218,7 +2220,7 @@ static int game_property_clear_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_game_property_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Game Property"; + ot->name= _("Clear Game Property"); ot->idname= "OBJECT_OT_game_property_clear"; /* api callbacks */ @@ -2275,8 +2277,8 @@ static int logicbricks_copy_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_logic_bricks_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Logic Bricks to Selected"; - ot->description = "Copy logic bricks to other selected objects."; + ot->name= _("Copy Logic Bricks to Selected"); + ot->description = _("Copy logic bricks to other selected objects."); ot->idname= "OBJECT_OT_logic_bricks_copy"; /* api callbacks */ diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index b1ab68ff087..374f2ff918d 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -37,6 +37,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_group_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -95,8 +97,8 @@ static int objects_add_active_exec(bContext *C, wmOperator *op) void GROUP_OT_objects_add_active(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Selected To Active Group"; - ot->description = "Add the object to an object group that contains the active object"; + ot->name= _("Add Selected To Active Group"); + ot->description = _("Add the object to an object group that contains the active object"); ot->idname= "GROUP_OT_objects_add_active"; /* api callbacks */ @@ -142,8 +144,8 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op) void GROUP_OT_objects_remove_active(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Selected From Active Group"; - ot->description = "Remove the object from an object group that contains the active object"; + ot->name= _("Remove Selected From Active Group"); + ot->description = _("Remove the object from an object group that contains the active object"); ot->idname= "GROUP_OT_objects_remove_active"; /* api callbacks */ @@ -176,8 +178,8 @@ static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op)) void GROUP_OT_objects_remove(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove From Groups"; - ot->description = "Remove selected objects from all groups"; + ot->name= _("Remove From Groups"); + ot->description = _("Remove selected objects from all groups"); ot->idname= "GROUP_OT_objects_remove"; /* api callbacks */ @@ -213,8 +215,8 @@ static int group_create_exec(bContext *C, wmOperator *op) void GROUP_OT_create(wmOperatorType *ot) { /* identifiers */ - ot->name= "Create New Group"; - ot->description = "Create an object group from selected objects"; + ot->name= _("Create New Group"); + ot->description = _("Create an object group from selected objects"); ot->idname= "GROUP_OT_create"; /* api callbacks */ @@ -224,7 +226,7 @@ void GROUP_OT_create(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "name", "Group", 32, "Name", "Name of the new group"); + RNA_def_string(ot->srna, "name", "Group", 32, _("Name"), _("Name of the new group")); } /****************** properties window operators *********************/ @@ -249,9 +251,9 @@ static int group_add_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_group_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add to Group"; + ot->name= _("Add to Group"); ot->idname= "OBJECT_OT_group_add"; - ot->description = "Add an object to a new group"; + ot->description = _("Add an object to a new group"); /* api callbacks */ ot->exec= group_add_exec; @@ -281,9 +283,9 @@ void OBJECT_OT_group_link(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Link to Group"; + ot->name= _("Link to Group"); ot->idname= "OBJECT_OT_group_link"; - ot->description = "Add an object to an existing group"; + ot->description = _("Add an object to an existing group"); /* api callbacks */ ot->exec= group_link_exec; @@ -293,7 +295,7 @@ void OBJECT_OT_group_link(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", ""); + prop= RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, _("Group"), ""); RNA_def_enum_funcs(prop, RNA_group_local_itemf); ot->prop= prop; } @@ -317,7 +319,7 @@ static int group_remove_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_group_remove(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Group"; + ot->name= _("Remove Group"); ot->idname= "OBJECT_OT_group_remove"; /* api callbacks */ diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 14ce223db5e..688e1209750 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -39,6 +39,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_curve_types.h" #include "DNA_key_types.h" #include "DNA_lattice_types.h" @@ -241,8 +243,8 @@ static int select_all_exec(bContext *C, wmOperator *op) void LATTICE_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; - ot->description= "Change selection of all UVW control points"; + ot->name= _("Select or Deselect All"); + ot->description= _("Change selection of all UVW control points"); ot->idname= "LATTICE_OT_select_all"; /* api callbacks */ @@ -289,8 +291,8 @@ static int make_regular_exec(bContext *C, wmOperator *UNUSED(op)) void LATTICE_OT_make_regular(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Regular"; - ot->description= "Set UVW control points a uniform distance apart"; + ot->name= _("Make Regular"); + ot->description= _("Set UVW control points a uniform distance apart"); ot->idname= "LATTICE_OT_make_regular"; /* api callbacks */ diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index ff9b13379a2..e6a3df57c2d 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -41,6 +41,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "RNA_access.h" @@ -218,7 +220,7 @@ void ED_operatormacros_object(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", _("Duplicate Objects"), OPTYPE_UNDO|OPTYPE_REGISTER); if(ot) { WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate"); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); @@ -226,7 +228,7 @@ void ED_operatormacros_object(void) } /* grr, should be able to pass options on... */ - ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", _("Duplicate Linked"), OPTYPE_UNDO|OPTYPE_REGISTER); if(ot) { otmacro= WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate"); RNA_boolean_set(otmacro->ptr, "linked", 1); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index f21241b6e7a..aaff55be8cf 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -54,6 +54,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_action.h" #include "BKE_animsys.h" #include "BKE_armature.h" @@ -249,8 +251,8 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_parent_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Vertex Parent"; - ot->description = "Parent selected objects to the selected vertices"; + ot->name= _("Make Vertex Parent"); + ot->description = _("Parent selected objects to the selected vertices"); ot->idname= "OBJECT_OT_vertex_parent_set"; /* api callbacks */ @@ -389,9 +391,9 @@ void OBJECT_OT_proxy_make (wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Make Proxy"; + ot->name= _("Make Proxy"); ot->idname= "OBJECT_OT_proxy_make"; - ot->description= "Add empty object to become local replacement data of a library-linked object"; + ot->description= _("Add empty object to become local replacement data of a library-linked object"); /* callbacks */ ot->invoke= make_proxy_invoke; @@ -402,8 +404,8 @@ void OBJECT_OT_proxy_make (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "object", "", MAX_ID_NAME-2, "Proxy Object", "Name of lib-linked/grouped object to make a proxy for."); - prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Type", "Group object"); /* XXX, relies on hard coded ID at the moment */ + RNA_def_string(ot->srna, "object", "", MAX_ID_NAME-2, _("Proxy Object"), _("Name of lib-linked/grouped object to make a proxy for.")); + prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, _("Type"), _("Group object")); /* XXX, relies on hard coded ID at the moment */ RNA_def_enum_funcs(prop, proxy_group_object_itemf); ot->prop= prop; } @@ -411,9 +413,9 @@ void OBJECT_OT_proxy_make (wmOperatorType *ot) /********************** Clear Parent Operator ******************* */ static EnumPropertyItem prop_clear_parent_types[] = { - {0, "CLEAR", 0, "Clear Parent", ""}, - {1, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation", ""}, - {2, "CLEAR_INVERSE", 0, "Clear Parent Inverse", ""}, + {0, "CLEAR", 0, N_("Clear Parent"), ""}, + {1, "CLEAR_KEEP_TRANSFORM", 0, N_("Clear and Keep Transformation"), ""}, + {2, "CLEAR_INVERSE", 0, N_("Clear Parent Inverse"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -454,8 +456,8 @@ static int parent_clear_exec(bContext *C, wmOperator *op) void OBJECT_OT_parent_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Parent"; - ot->description = "Clear the object's parenting"; + ot->name= _("Clear Parent"); + ot->description = _("Clear the object's parenting"); ot->idname= "OBJECT_OT_parent_clear"; /* api callbacks */ @@ -467,7 +469,7 @@ void OBJECT_OT_parent_clear(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - ot->prop= RNA_def_enum(ot->srna, "type", prop_clear_parent_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_clear_parent_types), 0, _("Type"), ""); } /* ******************** Make Parent Operator *********************** */ @@ -486,18 +488,18 @@ void OBJECT_OT_parent_clear(wmOperatorType *ot) #define PAR_TRIA 11 static EnumPropertyItem prop_make_parent_types[] = { - {PAR_OBJECT, "OBJECT", 0, "Object", ""}, - {PAR_ARMATURE, "ARMATURE", 0, "Armature Deform", ""}, - {PAR_ARMATURE_NAME, "ARMATURE_NAME", 0, " With Empty Groups", ""}, - {PAR_ARMATURE_AUTO, "ARMATURE_AUTO", 0, " With Automatic Weights", ""}, - {PAR_ARMATURE_ENVELOPE, "ARMATURE_ENVELOPE", 0, " With Envelope Weights", ""}, - {PAR_BONE, "BONE", 0, "Bone", ""}, - {PAR_CURVE, "CURVE", 0, "Curve Deform", ""}, - {PAR_FOLLOW, "FOLLOW", 0, "Follow Path", ""}, - {PAR_PATH_CONST, "PATH_CONST", 0, "Path Constraint", ""}, - {PAR_LATTICE, "LATTICE", 0, "Lattice Deform", ""}, - {PAR_VERTEX, "VERTEX", 0, "Vertex", ""}, - {PAR_TRIA, "TRIA", 0, "Triangle", ""}, + {PAR_OBJECT, "OBJECT", 0, N_("Object"), ""}, + {PAR_ARMATURE, "ARMATURE", 0, N_("Armature Deform"), ""}, + {PAR_ARMATURE_NAME, "ARMATURE_NAME", 0, N_(" With Empty Groups"), ""}, + {PAR_ARMATURE_AUTO, "ARMATURE_AUTO", 0, N_(" With Automatic Weights"), ""}, + {PAR_ARMATURE_ENVELOPE, "ARMATURE_ENVELOPE", 0, N_(" With Envelope Weights"), ""}, + {PAR_BONE, "BONE", 0, N_("Bone"), ""}, + {PAR_CURVE, "CURVE", 0, N_("Curve Deform"), ""}, + {PAR_FOLLOW, "FOLLOW", 0, N_("Follow Path"), ""}, + {PAR_PATH_CONST, "PATH_CONST", 0, N_("Path Constraint"), ""}, + {PAR_LATTICE, "LATTICE", 0, N_("Lattice Deform"), ""}, + {PAR_VERTEX, "VERTEX", 0, N_("Vertex"), ""}, + {PAR_TRIA, "TRIA", 0, N_("Triangle"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -727,8 +729,8 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSE void OBJECT_OT_parent_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Parent"; - ot->description = "Set the object's parenting"; + ot->name= _("Make Parent"); + ot->description = _("Set the object's parenting"); ot->idname= "OBJECT_OT_parent_set"; /* api callbacks */ @@ -740,7 +742,7 @@ void OBJECT_OT_parent_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_make_parent_types), 0, _("Type"), ""); } /* ************ Make Parent Without Inverse Operator ******************* */ @@ -784,8 +786,8 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_parent_no_inverse_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Parent without Inverse"; - ot->description = "Set the object's parenting without setting the inverse parent correction"; + ot->name= _("Make Parent without Inverse"); + ot->description = _("Set the object's parenting without setting the inverse parent correction"); ot->idname= "OBJECT_OT_parent_no_inverse_set"; /* api callbacks */ @@ -826,8 +828,8 @@ void OBJECT_OT_slow_parent_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Slow Parent"; - ot->description = "Clear the object's slow parent"; + ot->name= _("Clear Slow Parent"); + ot->description = _("Clear the object's slow parent"); ot->idname= "OBJECT_OT_slow_parent_clear"; /* api callbacks */ @@ -865,8 +867,8 @@ void OBJECT_OT_slow_parent_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Slow Parent"; - ot->description = "Set the object's slow parent"; + ot->name= _("Set Slow Parent"); + ot->description = _("Set the object's slow parent"); ot->idname= "OBJECT_OT_slow_parent_set"; /* api callbacks */ @@ -881,8 +883,8 @@ void OBJECT_OT_slow_parent_set(wmOperatorType *ot) /* ******************** Clear Track Operator ******************* */ static EnumPropertyItem prop_clear_track_types[] = { - {0, "CLEAR", 0, "Clear Track", ""}, - {1, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation (Clear Track)", ""}, + {0, "CLEAR", 0, N_("Clear Track"), ""}, + {1, "CLEAR_KEEP_TRANSFORM", 0, N_("Clear and Keep Transformation (Clear Track)"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -926,8 +928,8 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) void OBJECT_OT_track_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear track"; - ot->description = "Clear tracking constraint or flag from object"; + ot->name= _("Clear track"); + ot->description = _("Clear tracking constraint or flag from object"); ot->idname= "OBJECT_OT_track_clear"; /* api callbacks */ @@ -939,15 +941,15 @@ void OBJECT_OT_track_clear(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - ot->prop= RNA_def_enum(ot->srna, "type", prop_clear_track_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_clear_track_types), 0, _("Type"), ""); } /************************** Make Track Operator *****************************/ static EnumPropertyItem prop_make_track_types[] = { - {1, "DAMPTRACK", 0, "Damped Track Constraint", ""}, - {2, "TRACKTO", 0, "Track To Constraint", ""}, - {3, "LOCKTRACK", 0, "Lock Track Constraint", ""}, + {1, "DAMPTRACK", 0, N_("Damped Track Constraint"), ""}, + {2, "TRACKTO", 0, N_("Track To Constraint"), ""}, + {3, "LOCKTRACK", 0, N_("Lock Track Constraint"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1031,8 +1033,8 @@ static int track_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_track_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Track"; - ot->description = "Make the object track another object, either by constraint or old way or locked track"; + ot->name= _("Make Track"); + ot->description = _("Make the object track another object, either by constraint or old way or locked track"); ot->idname= "OBJECT_OT_track_set"; /* api callbacks */ @@ -1045,7 +1047,7 @@ void OBJECT_OT_track_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_make_track_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_make_track_types), 0, _("Type"), ""); } /************************** Move to Layer Operator *****************************/ @@ -1142,8 +1144,8 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) void OBJECT_OT_move_to_layer(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move to Layer"; - ot->description = "Move the object to different layers"; + ot->name= _("Move to Layer"); + ot->description = _("Move the object to different layers"); ot->idname= "OBJECT_OT_move_to_layer"; /* api callbacks */ @@ -1155,7 +1157,7 @@ void OBJECT_OT_move_to_layer(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", ""); + RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, _("Layer"), ""); } /************************** Link to Scene Operator *****************************/ @@ -1318,8 +1320,8 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Link Objects to Scene"; - ot->description = "Link selection to another scene"; + ot->name= _("Link Objects to Scene"); + ot->description = _("Link selection to another scene"); ot->idname= "OBJECT_OT_make_links_scene"; /* api callbacks */ @@ -1331,7 +1333,7 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", ""); + prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, _("Scene"), ""); RNA_def_enum_funcs(prop, RNA_scene_local_itemf); ot->prop= prop; } @@ -1339,16 +1341,16 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot) void OBJECT_OT_make_links_data(wmOperatorType *ot) { static EnumPropertyItem make_links_items[]= { - {MAKE_LINKS_OBDATA, "OBDATA", 0, "Object Data", ""}, - {MAKE_LINKS_MATERIALS, "MATERIAL", 0, "Materials", ""}, - {MAKE_LINKS_ANIMDATA, "ANIMATION", 0, "Animation Data", ""}, - {MAKE_LINKS_DUPLIGROUP, "DUPLIGROUP", 0, "DupliGroup", ""}, - {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, "Modifiers", ""}, + {MAKE_LINKS_OBDATA, "OBDATA", 0, N_("Object Data"), ""}, + {MAKE_LINKS_MATERIALS, "MATERIAL", 0, N_("Materials"), ""}, + {MAKE_LINKS_ANIMDATA, "ANIMATION", 0, N_("Animation Data"), ""}, + {MAKE_LINKS_DUPLIGROUP, "DUPLIGROUP", 0, N_("DupliGroup"), ""}, + {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, N_("Modifiers"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Link Data"; - ot->description = "Make links from the active object to other selected objects"; + ot->name= _("Link Data"); + ot->description = _("Make links from the active object to other selected objects"); ot->idname= "OBJECT_OT_make_links_data"; /* api callbacks */ @@ -1359,7 +1361,7 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(make_links_items), 0, "Type", ""); } @@ -1783,14 +1785,14 @@ static int make_local_exec(bContext *C, wmOperator *op) void OBJECT_OT_make_local(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { - {1, "SELECTED_OBJECTS", 0, "Selected Objects", ""}, - {2, "SELECTED_OBJECTS_DATA", 0, "Selected Objects and Data", ""}, - {3, "ALL", 0, "All", ""}, + {1, "SELECTED_OBJECTS", 0, N_("Selected Objects"), ""}, + {2, "SELECTED_OBJECTS_DATA", 0, N_("Selected Objects and Data"), ""}, + {3, "ALL", 0, N_("All"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Make Local"; - ot->description = "Make library linked datablocks local to this file"; + ot->name= _("Make Local"); + ot->description = _("Make library linked datablocks local to this file"); ot->idname= "OBJECT_OT_make_local"; /* api callbacks */ @@ -1802,7 +1804,7 @@ void OBJECT_OT_make_local(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(type_items), 0, _("Type"), ""); } static int make_single_user_exec(bContext *C, wmOperator *op) @@ -1837,13 +1839,13 @@ static int make_single_user_exec(bContext *C, wmOperator *op) void OBJECT_OT_make_single_user(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { - {SELECT, "SELECTED_OBJECTS", 0, "Selected Objects", ""}, - {0, "ALL", 0, "All", ""}, + {SELECT, "SELECTED_OBJECTS", 0, N_("Selected Objects"), ""}, + {0, "ALL", 0, N_("All"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Make Single User"; - ot->description = "Make linked data local to each object"; + ot->name= _("Make Single User"); + ot->description = _("Make linked data local to each object"); ot->idname= "OBJECT_OT_make_single_user"; /* api callbacks */ @@ -1855,13 +1857,13 @@ void OBJECT_OT_make_single_user(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, SELECT, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(type_items), SELECT, _("Type"), ""); - RNA_def_boolean(ot->srna, "object", 0, "Object", "Make single user objects"); - RNA_def_boolean(ot->srna, "obdata", 0, "Object Data", "Make single user object data"); - RNA_def_boolean(ot->srna, "material", 0, "Materials", "Make materials local to each datablock"); - RNA_def_boolean(ot->srna, "texture", 0, "Textures", "Make textures local to each material"); - RNA_def_boolean(ot->srna, "animation", 0, "Object Animation", "Make animation data local to each object"); + RNA_def_boolean(ot->srna, "object", 0, _("Object"), _("Make single user objects")); + RNA_def_boolean(ot->srna, "obdata", 0, _("Object Data"), _("Make single user object data")); + RNA_def_boolean(ot->srna, "material", 0, _("Materials"), _("Make materials local to each datablock")); + RNA_def_boolean(ot->srna, "texture", 0, _("Textures"), _("Make textures local to each material")); + RNA_def_boolean(ot->srna, "animation", 0, _("Object Animation"), _("Make animation data local to each object")); } static int drop_named_material_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -1890,7 +1892,7 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot) { /* identifiers */ - ot->name= "Drop Named Material on Object"; + ot->name= _("Drop Named Material on Object"); ot->description = ""; ot->idname= "OBJECT_OT_drop_named_material"; @@ -1902,5 +1904,5 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "name", "Material", 24, "Name", "Material name to assign."); + RNA_def_string(ot->srna, "name", "Material", 24, _("Name"), _("Material name to assign.")); } diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index a3bd399a60c..0e88c84ea2a 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -49,6 +49,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_group.h" #include "BKE_main.h" @@ -150,8 +152,8 @@ static int object_select_by_type_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_by_type(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select By Type"; - ot->description = "Select all visible objects that are of a type"; + ot->name= _("Select By Type"); + ot->description = _("Select all visible objects that are of a type"); ot->idname= "OBJECT_OT_select_by_type"; /* api callbacks */ @@ -163,21 +165,21 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); - ot->prop= RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", ""); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(object_type_items), 1, _("Type"), ""); } /*********************** Selection by Links *********************/ static EnumPropertyItem prop_select_linked_types[] = { //{1, "IPO", 0, "Object IPO", ""}, // XXX depreceated animation system stuff... - {2, "OBDATA", 0, "Object Data", ""}, - {3, "MATERIAL", 0, "Material", ""}, - {4, "TEXTURE", 0, "Texture", ""}, - {5, "DUPGROUP", 0, "Dupligroup", ""}, - {6, "PARTICLE", 0, "Particle System", ""}, - {7, "LIBRARY", 0, "Library", ""}, - {8, "LIBRARY_OBDATA", 0, "Library (Object Data)", ""}, + {2, "OBDATA", 0, N_("Object Data"), ""}, + {3, "MATERIAL", 0, N_("Material"), ""}, + {4, "TEXTURE", 0, N_("Texture"), ""}, + {5, "DUPGROUP", 0, N_("Dupligroup"), ""}, + {6, "PARTICLE", 0, N_("Particle System"), ""}, + {7, "LIBRARY", 0, N_("Library"), ""}, + {8, "LIBRARY_OBDATA", 0, N_("Library (Object Data)"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -332,8 +334,8 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; - ot->description = "Select all visible objects that are linked"; + ot->name= _("Select Linked"); + ot->description = _("Select all visible objects that are linked"); ot->idname= "OBJECT_OT_select_linked"; /* api callbacks */ @@ -345,24 +347,24 @@ void OBJECT_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); - ot->prop= RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", ""); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_select_linked_types), 0, _("Type"), ""); } /*********************** Selected Grouped ********************/ static EnumPropertyItem prop_select_grouped_types[] = { - {1, "CHILDREN_RECURSIVE", 0, "Children", ""}, - {2, "CHILDREN", 0, "Immediate Children", ""}, - {3, "PARENT", 0, "Parent", ""}, - {4, "SIBLINGS", 0, "Siblings", "Shared Parent"}, - {5, "TYPE", 0, "Type", "Shared object type"}, - {6, "LAYER", 0, "Layer", "Shared layers"}, - {7, "GROUP", 0, "Group", "Shared group"}, - {8, "HOOK", 0, "Hook", ""}, - {9, "PASS", 0, "Pass", "Render pass Index"}, - {10, "COLOR", 0, "Color", "Object Color"}, - {11, "PROPERTIES", 0, "Properties", "Game Properties"}, + {1, "CHILDREN_RECURSIVE", 0, N_("Children"), ""}, + {2, "CHILDREN", 0, N_("Immediate Children"), ""}, + {3, "PARENT", 0, N_("Parent"), ""}, + {4, "SIBLINGS", 0, N_("Siblings"), N_("Shared Parent")}, + {5, "TYPE", 0, N_("Type"), N_("Shared object type")}, + {6, "LAYER", 0, N_("Layer"), N_("Shared layers")}, + {7, "GROUP", 0, N_("Group"), N_("Shared group")}, + {8, "HOOK", 0, N_("Hook"), ""}, + {9, "PASS", 0, N_("Pass"), N_("Render pass Index")}, + {10, "COLOR", 0, N_("Color"), N_("Object Color")}, + {11, "PROPERTIES", 0, N_("Properties"), N_("Game Properties")}, {0, NULL, 0, NULL, NULL} }; @@ -620,8 +622,8 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_grouped(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Grouped"; - ot->description = "Select all visible objects grouped by various properties"; + ot->name= _("Select Grouped"); + ot->description = _("Select all visible objects grouped by various properties"); ot->idname= "OBJECT_OT_select_grouped"; /* api callbacks */ @@ -633,8 +635,8 @@ void OBJECT_OT_select_grouped(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); - ot->prop= RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", ""); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_select_grouped_types), 0, _("Type"), ""); } /************************* Select by Layer **********************/ @@ -669,8 +671,8 @@ static int object_select_by_layer_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_by_layer(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select by Layer"; - ot->description = "Select all visible objects on a layer"; + ot->name= _("Select by Layer"); + ot->description = _("Select all visible objects on a layer"); ot->idname= "OBJECT_OT_select_by_layer"; /* api callbacks */ @@ -682,8 +684,8 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first."); - RNA_def_int(ot->srna, "layers", 1, 1, 20, "Layer", "", 1, 20); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first.")); + RNA_def_int(ot->srna, "layers", 1, 1, 20, _("Layer"), "", 1, 20); } /************************** Select Inverse *************************/ @@ -708,8 +710,8 @@ void OBJECT_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Inverse"; - ot->description = "Invert selection of all visible objects"; + ot->name= _("Select Inverse"); + ot->description = _("Invert selection of all visible objects"); ot->idname= "OBJECT_OT_select_inverse"; /* api callbacks */ @@ -769,8 +771,8 @@ void OBJECT_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; - ot->description = "Change selection of all visible objects in scene"; + ot->name= _("Select or Deselect All"); + ot->description = _("Change selection of all visible objects in scene"); ot->idname= "OBJECT_OT_select_all"; /* api callbacks */ @@ -818,8 +820,8 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Same Group"; - ot->description = "Select object in the same group"; + ot->name= _("Select Same Group"); + ot->description = _("Select object in the same group"); ot->idname= "OBJECT_OT_select_same_group"; /* api callbacks */ @@ -829,7 +831,7 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "group", "", 32, "Group", "Name of the group to select."); + RNA_def_string(ot->srna, "group", "", 32, _("Group"), _("Name of the group to select.")); } /**************************** Select Mirror ****************************/ @@ -871,8 +873,8 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Mirror"; - ot->description = "Select the Mirror objects of the selected object eg. L.sword -> R.sword"; + ot->name= _("Select Mirror"); + ot->description = _("Select the Mirror objects of the selected object eg. L.sword -> R.sword"); ot->idname= "OBJECT_OT_select_mirror"; /* api callbacks */ @@ -882,7 +884,7 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend selection instead of deselecting everything first.")); } @@ -928,8 +930,8 @@ void OBJECT_OT_select_name(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Name"; - ot->description = "Select an object with this name"; + ot->name= _("Select Name"); + ot->description = _("Select an object with this name"); ot->idname= "OBJECT_OT_select_name"; /* api callbacks */ @@ -939,8 +941,8 @@ void OBJECT_OT_select_name(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "name", "", 0, "Name", "Object name to select."); - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_string(ot->srna, "name", "", 0, _("Name"), _("Object name to select.")); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend selection instead of deselecting everything first.")); } /**************************** Select Random ****************************/ @@ -975,8 +977,8 @@ static int object_select_random_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_random(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Random"; - ot->description = "Set select on random visible objects"; + ot->name= _("Select Random"); + ot->description = _("Set select on random visible objects"); ot->idname= "OBJECT_OT_select_random"; /* api callbacks */ @@ -988,8 +990,8 @@ void OBJECT_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of objects to select randomly", 0.f, 100.0f); - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first."); + RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, _("Percent"), _("Percentage of objects to select randomly"), 0.f, 100.0f); + RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend Selection"), _("Extend selection instead of deselecting everything first.")); } diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index fd2e7fd7c99..e62fa403518 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -45,6 +45,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_curve_types.h" #include "DNA_key_types.h" #include "DNA_lattice_types.h" @@ -297,9 +299,9 @@ static int shape_key_add_exec(bContext *C, wmOperator *op) void OBJECT_OT_shape_key_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Shape Key"; + ot->name= _("Add Shape Key"); ot->idname= "OBJECT_OT_shape_key_add"; - ot->description= "Add shape key to the object"; + ot->description= _("Add shape key to the object"); /* api callbacks */ ot->poll= shape_key_mode_poll; @@ -309,7 +311,7 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "from_mix", 1, "From Mix", "Create the new shape key from the existing mix of keys."); + RNA_def_boolean(ot->srna, "from_mix", 1, _("From Mix"), _("Create the new shape key from the existing mix of keys.")); } static int shape_key_remove_exec(bContext *C, wmOperator *UNUSED(op)) diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index f7c6ff99bde..f26d13d2bd8 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -46,6 +46,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_depsgraph.h" @@ -270,8 +272,8 @@ static int object_location_clear_exec(bContext *C, wmOperator *op) void OBJECT_OT_location_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Location"; - ot->description = "Clear the object's location"; + ot->name= _("Clear Location"); + ot->description = _("Clear the object's location"); ot->idname= "OBJECT_OT_location_clear"; /* api callbacks */ @@ -290,8 +292,8 @@ static int object_rotation_clear_exec(bContext *C, wmOperator *op) void OBJECT_OT_rotation_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Rotation"; - ot->description = "Clear the object's rotation"; + ot->name= _("Clear Rotation"); + ot->description = _("Clear the object's rotation"); ot->idname= "OBJECT_OT_rotation_clear"; /* api callbacks */ @@ -310,8 +312,8 @@ static int object_scale_clear_exec(bContext *C, wmOperator *op) void OBJECT_OT_scale_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Scale"; - ot->description = "Clear the object's scale"; + ot->name= _("Clear Scale"); + ot->description = _("Clear the object's scale"); ot->idname= "OBJECT_OT_scale_clear"; /* api callbacks */ @@ -355,8 +357,8 @@ static int object_origin_clear_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_origin_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Origin"; - ot->description = "Clear the object's origin"; + ot->name= _("Clear Origin"); + ot->description = _("Clear the object's origin"); ot->idname= "OBJECT_OT_origin_clear"; /* api callbacks */ @@ -584,8 +586,8 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_visual_transform_apply(wmOperatorType *ot) { /* identifiers */ - ot->name= "Apply Visual Transform"; - ot->description = "Apply the object's visual transformation to its data"; + ot->name= _("Apply Visual Transform"); + ot->description = _("Apply the object's visual transformation to its data"); ot->idname= "OBJECT_OT_visual_transform_apply"; /* api callbacks */ @@ -613,8 +615,8 @@ static int object_transform_apply_exec(bContext *C, wmOperator *op) void OBJECT_OT_transform_apply(wmOperatorType *ot) { /* identifiers */ - ot->name= "Apply Object Transform"; - ot->description = "Apply the object's transformation to its data"; + ot->name= _("Apply Object Transform"); + ot->description = _("Apply the object's transformation to its data"); ot->idname= "OBJECT_OT_transform_apply"; /* api callbacks */ @@ -624,9 +626,9 @@ void OBJECT_OT_transform_apply(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "location", 0, "Location", ""); - RNA_def_boolean(ot->srna, "rotation", 0, "Rotation", ""); - RNA_def_boolean(ot->srna, "scale", 0, "Scale", ""); + RNA_def_boolean(ot->srna, "location", 0, _("Location"), ""); + RNA_def_boolean(ot->srna, "rotation", 0, _("Rotation"), ""); + RNA_def_boolean(ot->srna, "scale", 0, _("Scale"), ""); } /********************* Set Object Center ************************/ @@ -916,21 +918,21 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_origin_set(wmOperatorType *ot) { static EnumPropertyItem prop_set_center_types[] = { - {GEOMETRY_TO_ORIGIN, "GEOMETRY_ORIGIN", 0, "Geometry to Origin", "Move object geometry to object origin"}, - {ORIGIN_TO_GEOMETRY, "ORIGIN_GEOMETRY", 0, "Origin to Geometry", "Move object origin to center of object geometry"}, - {ORIGIN_TO_CURSOR, "ORIGIN_CURSOR", 0, "Origin to 3D Cursor", "Move object origin to position of the 3d cursor"}, + {GEOMETRY_TO_ORIGIN, "GEOMETRY_ORIGIN", 0, N_("Geometry to Origin"), N_("Move object geometry to object origin")}, + {ORIGIN_TO_GEOMETRY, "ORIGIN_GEOMETRY", 0, N_("Origin to Geometry"), N_("Move object origin to center of object geometry")}, + {ORIGIN_TO_CURSOR, "ORIGIN_CURSOR", 0, N_("Origin to 3D Cursor"), N_("Move object origin to position of the 3d cursor")}, {0, NULL, 0, NULL, NULL} }; static EnumPropertyItem prop_set_bounds_types[] = { - {V3D_CENTROID, "MEDIAN", 0, "Median Center", ""}, - {V3D_CENTER, "BOUNDS", 0, "Bounds Center", ""}, + {V3D_CENTROID, "MEDIAN", 0, N_("Median Center"), ""}, + {V3D_CENTER, "BOUNDS", 0, N_("Bounds Center"), ""}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= "Set Origin"; - ot->description = "Set the object's origin, by either moving the data, or set to center of data, or use 3d cursor"; + ot->name= _("Set Origin"); + ot->description = _("Set the object's origin, by either moving the data, or set to center of data, or use 3d cursor"); ot->idname= "OBJECT_OT_origin_set"; /* api callbacks */ @@ -942,7 +944,7 @@ void OBJECT_OT_origin_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - ot->prop= RNA_def_enum(ot->srna, "type", prop_set_center_types, 0, "Type", ""); - RNA_def_enum(ot->srna, "center", prop_set_bounds_types, V3D_CENTROID, "Center", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_set_center_types), 0, _("Type"), ""); + RNA_def_enum(ot->srna, "center", RNA_enum_items_gettexted(prop_set_bounds_types), V3D_CENTROID, _("Center"), ""); } diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 52ba9460818..eed92549652 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -53,6 +53,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_customdata.h" #include "BKE_deform.h" @@ -1580,7 +1582,7 @@ static int vertex_group_remove_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_remove(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Vertex Group"; + ot->name= _("Remove Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_remove"; /* api callbacks */ @@ -1591,7 +1593,7 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups."); + RNA_def_boolean(ot->srna, "all", 0, _("All"), _("Remove from all vertex groups.")); } static int vertex_group_assign_exec(bContext *C, wmOperator *op) @@ -1612,7 +1614,7 @@ static int vertex_group_assign_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_assign(wmOperatorType *ot) { /* identifiers */ - ot->name= "Assign Vertex Group"; + ot->name= _("Assign Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_assign"; /* api callbacks */ @@ -1623,7 +1625,7 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "new", 0, "New", "Assign vertex to new vertex group."); + RNA_def_boolean(ot->srna, "new", 0, _("New"), _("Assign vertex to new vertex group.")); } static int vertex_group_remove_from_exec(bContext *C, wmOperator *op) @@ -1651,7 +1653,7 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove from Vertex Group"; + ot->name= _("Remove from Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_remove_from"; /* api callbacks */ @@ -1662,7 +1664,7 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups."); + RNA_def_boolean(ot->srna, "all", 0, _("All"), _("Remove from all vertex groups.")); } static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1819,7 +1821,7 @@ static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Normalize All Vertex Groups"; + ot->name= _("Normalize All Vertex Groups"); ot->idname= "OBJECT_OT_vertex_group_normalize_all"; /* api callbacks */ @@ -1829,7 +1831,7 @@ void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "lock_active", TRUE, "Lock Active", "Keep the values of the active group while normalizing others."); + RNA_def_boolean(ot->srna, "lock_active", TRUE, _("Lock Active"), _("Keep the values of the active group while normalizing others.")); } static int vertex_group_invert_exec(bContext *C, wmOperator *op) @@ -1849,7 +1851,7 @@ static int vertex_group_invert_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_invert(wmOperatorType *ot) { /* identifiers */ - ot->name= "Invert Vertex Group"; + ot->name= _("Invert Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_invert"; /* api callbacks */ @@ -1859,8 +1861,8 @@ void OBJECT_OT_vertex_group_invert(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "auto_assign", TRUE, "Add Weights", "Add verts from groups that have zero weight before inverting."); - RNA_def_boolean(ot->srna, "auto_remove", TRUE, "Remove Weights", "Remove verts from groups that have zero weight after inverting."); + RNA_def_boolean(ot->srna, "auto_assign", TRUE, _("Add Weights"), _("Add verts from groups that have zero weight before inverting.")); + RNA_def_boolean(ot->srna, "auto_remove", TRUE, _("Remove Weights"), _("Remove verts from groups that have zero weight after inverting.")); } @@ -1914,9 +1916,9 @@ static int vertex_group_clean_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_clean(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clean Vertex Group"; + ot->name= _("Clean Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_clean"; - ot->description= "Remove Vertex Group assignments which aren't required"; + ot->description= _("Remove Vertex Group assignments which aren't required"); /* api callbacks */ ot->poll= vertex_group_poll; @@ -1925,9 +1927,9 @@ void OBJECT_OT_vertex_group_clean(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, 1.0, "Limit", "Remove weights under this limit.", 0.001f, 0.99f); - RNA_def_boolean(ot->srna, "all_groups", FALSE, "All Groups", "Clean all vertex groups."); - RNA_def_boolean(ot->srna, "keep_single", FALSE, "Keep Single", "Keep verts assigned to at least one group when cleaning."); + RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, 1.0, _("Limit"), _("Remove weights under this limit."), 0.001f, 0.99f); + RNA_def_boolean(ot->srna, "all_groups", FALSE, _("All Groups"), _("Clean all vertex groups.")); + RNA_def_boolean(ot->srna, "keep_single", FALSE, _("Keep Single"), _("Keep verts assigned to at least one group when cleaning.")); } @@ -1947,9 +1949,9 @@ static int vertex_group_mirror_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mirror Vertex Group"; + ot->name= _("Mirror Vertex Group"); ot->idname= "OBJECT_OT_vertex_group_mirror"; - ot->description= "Mirror all vertex groups, flip weights and/or names, editing only selected vertices, flipping when both sides are selected otherwise copy from unselected"; + ot->description= _("Mirror all vertex groups, flip weights and/or names, editing only selected vertices, flipping when both sides are selected otherwise copy from unselected"); /* api callbacks */ ot->poll= vertex_group_poll_edit; @@ -1959,8 +1961,8 @@ void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "mirror_weights", TRUE, "Mirror Weights", "Mirror weights."); - RNA_def_boolean(ot->srna, "flip_group_names", TRUE, "Flip Groups", "Flip vertex group names."); + RNA_def_boolean(ot->srna, "mirror_weights", TRUE, _("Mirror Weights"), _("Mirror weights.")); + RNA_def_boolean(ot->srna, "flip_group_names", TRUE, _("Flip Groups"), _("Flip vertex group names.")); } diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt index f32b23cd3ee..931c6f9334f 100644 --- a/source/blender/editors/physics/CMakeLists.txt +++ b/source/blender/editors/physics/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript index 274819c918c..e5f5e6d1b09 100644 --- a/source/blender/editors/physics/SConscript +++ b/source/blender/editors/physics/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../blenloader' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index b8cdc18e739..0da0edaa497 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -53,6 +53,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_DerivedMesh.h" #include "BKE_depsgraph.h" @@ -1356,7 +1358,7 @@ static int select_all_exec(bContext *C, wmOperator *op) void PARTICLE_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Selection of all particles"; + ot->name= _("Selection of all particles"); ot->idname= "PARTICLE_OT_select_all"; /* api callbacks */ @@ -1430,7 +1432,7 @@ static int select_roots_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_select_roots(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Roots"; + ot->name= _("Select Roots"); ot->idname= "PARTICLE_OT_select_roots"; /* api callbacks */ @@ -1470,7 +1472,7 @@ static int select_tips_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_select_tips(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Tips"; + ot->name= _("Select Tips"); ot->idname= "PARTICLE_OT_select_tips"; /* api callbacks */ @@ -1514,7 +1516,7 @@ static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *event) void PARTICLE_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; + ot->name= _("Select Linked"); ot->idname= "PARTICLE_OT_select_linked"; /* api callbacks */ @@ -1526,8 +1528,8 @@ void PARTICLE_OT_select_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked keys rather than selecting them."); - RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "", 0, 16384); + RNA_def_boolean(ot->srna, "deselect", 0, _("Deselect"), _("Deselect linked keys rather than selecting them.")); + RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, _("Location"), "", 0, 16384); } /************************ border select operator ************************/ @@ -1702,7 +1704,7 @@ static int hide_exec(bContext *C, wmOperator *op) void PARTICLE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected"; + ot->name= _("Hide Selected"); ot->idname= "PARTICLE_OT_hide"; /* api callbacks */ @@ -1713,7 +1715,7 @@ void PARTICLE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } /*************************** reveal operator **************************/ @@ -1744,7 +1746,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal"; + ot->name= _("Reveal"); ot->idname= "PARTICLE_OT_reveal"; /* api callbacks */ @@ -1802,7 +1804,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_select_less(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Less"; + ot->name= _("Select Less"); ot->idname= "PARTICLE_OT_select_less"; /* api callbacks */ @@ -1863,7 +1865,7 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_select_more(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select More"; + ot->name= _("Select More"); ot->idname= "PARTICLE_OT_select_more"; /* api callbacks */ @@ -1900,7 +1902,7 @@ static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Inverse"; + ot->name= _("Select Inverse"); ot->idname= "PARTICLE_OT_select_inverse"; /* api callbacks */ @@ -1996,7 +1998,7 @@ static int rekey_exec(bContext *C, wmOperator *op) void PARTICLE_OT_rekey(wmOperatorType *ot) { /* identifiers */ - ot->name= "Rekey"; + ot->name= _("Rekey"); ot->idname= "PARTICLE_OT_rekey"; /* api callbacks */ @@ -2008,7 +2010,7 @@ void PARTICLE_OT_rekey(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "keys", 2, 2, INT_MAX, "Number of Keys", "", 2, 100); + RNA_def_int(ot->srna, "keys", 2, 2, INT_MAX, _("Number of Keys"), "", 2, 100); } static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float path_time) @@ -2326,7 +2328,7 @@ static int subdivide_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_subdivide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Subdivide"; + ot->name= _("Subdivide"); ot->idname= "PARTICLE_OT_subdivide"; /* api callbacks */ @@ -2414,7 +2416,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) void PARTICLE_OT_remove_doubles(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Doubles"; + ot->name= _("Remove Doubles"); ot->idname= "PARTICLE_OT_remove_doubles"; /* api callbacks */ @@ -2425,7 +2427,7 @@ void PARTICLE_OT_remove_doubles(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float(ot->srna, "threshold", 0.0002f, 0.0f, FLT_MAX, "Threshold", "Threshold distance withing which particles are removed", 0.00001f, 0.1f); + RNA_def_float(ot->srna, "threshold", 0.0002f, 0.0f, FLT_MAX, _("Threshold"), _("Threshold distance withing which particles are removed"), 0.00001f, 0.1f); } @@ -2464,7 +2466,7 @@ static int weight_set_exec(bContext *C, wmOperator *op) void PARTICLE_OT_weight_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weight Set"; + ot->name= _("Weight Set"); ot->idname= "PARTICLE_OT_weight_set"; /* api callbacks */ @@ -2474,7 +2476,7 @@ void PARTICLE_OT_weight_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_float(ot->srna, "factor", 1, 0, 1, "Factor", "", 0, 1); + RNA_def_float(ot->srna, "factor", 1, 0, 1, _("Factor"), "", 0, 1); } /************************ cursor drawing *******************************/ @@ -2567,7 +2569,7 @@ static int delete_exec(bContext *C, wmOperator *op) void PARTICLE_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete"; + ot->name= _("Delete"); ot->idname= "PARTICLE_OT_delete"; /* api callbacks */ @@ -2579,7 +2581,7 @@ void PARTICLE_OT_delete(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", delete_type_items, DEL_PARTICLE, "Type", "Delete a full particle or only keys."); + ot->prop= RNA_def_enum(ot->srna, "type", delete_type_items, DEL_PARTICLE, _("Type"), _("Delete a full particle or only keys.")); } /*************************** mirror operator **************************/ @@ -2727,7 +2729,7 @@ static int mirror_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_mirror(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mirror"; + ot->name= _("Mirror"); ot->idname= "PARTICLE_OT_mirror"; /* api callbacks */ @@ -3744,7 +3746,7 @@ static int brush_edit_cancel(bContext *UNUSED(C), wmOperator *op) void PARTICLE_OT_brush_edit(wmOperatorType *ot) { /* identifiers */ - ot->name= "Brush Edit"; + ot->name= _("Brush Edit"); ot->idname= "PARTICLE_OT_brush_edit"; /* api callbacks */ @@ -3758,7 +3760,7 @@ void PARTICLE_OT_brush_edit(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* properties */ - RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); + RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, _("Stroke"), ""); } /*********************** undo ***************************/ @@ -4234,7 +4236,7 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_particle_edit_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Particle Edit Toggle"; + ot->name= _("Particle Edit Toggle"); ot->idname= "PARTICLE_OT_particle_edit_toggle"; /* api callbacks */ @@ -4283,7 +4285,7 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op)) void PARTICLE_OT_edited_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Edited"; + ot->name= _("Clear Edited"); ot->idname= "PARTICLE_OT_edited_clear"; /* api callbacks */ diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 8ec95e9b107..7f0cedb71c9 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -43,6 +43,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" @@ -609,8 +611,8 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op) void PARTICLE_OT_disconnect_hair(wmOperatorType *ot) { - ot->name= "Disconnect Hair"; - ot->description= "Disconnect hair from the emitter mesh"; + ot->name= _("Disconnect Hair"); + ot->description= _("Disconnect hair from the emitter mesh"); ot->idname= "PARTICLE_OT_disconnect_hair"; ot->exec= disconnect_hair_exec; @@ -618,7 +620,7 @@ void PARTICLE_OT_disconnect_hair(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh"); + RNA_def_boolean(ot->srna, "all", 0, _("All hair"), _("Disconnect all hair systems from the emitter mesh")); } static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) @@ -747,8 +749,8 @@ static int connect_hair_exec(bContext *C, wmOperator *op) void PARTICLE_OT_connect_hair(wmOperatorType *ot) { - ot->name= "Connect Hair"; - ot->description= "Connect hair to the emitter mesh"; + ot->name= _("Connect Hair"); + ot->description= _("Connect hair to the emitter mesh"); ot->idname= "PARTICLE_OT_connect_hair"; ot->exec= connect_hair_exec; @@ -756,6 +758,6 @@ void PARTICLE_OT_connect_hair(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "all", 0, "All hair", "Connect all hair systems to the emitter mesh"); + RNA_def_boolean(ot->srna, "all", 0, _("All hair"), _("Connect all hair systems to the emitter mesh")); } diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index 797ead3cd90..b245fc05d86 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -39,6 +39,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "BKE_context.h" @@ -155,8 +157,8 @@ static int ptcache_free_bake_all_exec(bContext *C, wmOperator *UNUSED(op)) void PTCACHE_OT_bake_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Bake All Physics"; - ot->description= "Bake all physics"; + ot->name= _("Bake All Physics"); + ot->description= _("Bake all physics"); ot->idname= "PTCACHE_OT_bake_all"; /* api callbacks */ @@ -166,7 +168,7 @@ void PTCACHE_OT_bake_all(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "bake", 1, "Bake", ""); + RNA_def_boolean(ot->srna, "bake", 1, _("Bake"), ""); } void PTCACHE_OT_free_bake_all(wmOperatorType *ot) { @@ -269,8 +271,8 @@ static int ptcache_bake_from_cache_exec(bContext *C, wmOperator *UNUSED(op)) void PTCACHE_OT_bake(wmOperatorType *ot) { /* identifiers */ - ot->name= "Bake Physics"; - ot->description= "Bake physics"; + ot->name= _("Bake Physics"); + ot->description= _("Bake physics"); ot->idname= "PTCACHE_OT_bake"; /* api callbacks */ @@ -280,7 +282,7 @@ void PTCACHE_OT_bake(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "bake", 0, "Bake", ""); + RNA_def_boolean(ot->srna, "bake", 0, _("Bake"), ""); } void PTCACHE_OT_free_bake(wmOperatorType *ot) { diff --git a/source/blender/editors/render/SConscript b/source/blender/editors/render/SConscript index 2b9737557cd..4404ea2687c 100644 --- a/source/blender/editors/render/SConscript +++ b/source/blender/editors/render/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenlib ../../blenfont ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 42a163d3da5..6d3bbb45fb7 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -41,6 +41,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "BKE_blender.h" @@ -600,8 +602,8 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) void RENDER_OT_render(wmOperatorType *ot) { /* identifiers */ - ot->name= "Render"; - ot->description= "Render active scene"; + ot->name= _("Render"); + ot->description= _("Render active scene"); ot->idname= "RENDER_OT_render"; /* api callbacks */ @@ -611,9 +613,9 @@ void RENDER_OT_render(wmOperatorType *ot) /*ot->poll= ED_operator_screenactive;*/ /* this isnt needed, causes failer in background mode */ - RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene"); - RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)"); - RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, "Render Layer", "Single render layer to re-render"); - RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME-2, "Scene", "Re-render single layer in this scene"); + RNA_def_boolean(ot->srna, "animation", 0, _("Animation"), _("Render files from the animation range of this scene")); + RNA_def_boolean(ot->srna, "write_still", 0, _("Write Image"), _("Save rendered the image to the output path (used only when animation is disabled)")); + RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, _("Render Layer"), _("Single render layer to re-render")); + RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME-2, _("Scene"), _("Re-render single layer in this scene")); } diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 3256112426b..deb226e0113 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -43,6 +43,8 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "DNA_object_types.h" @@ -597,8 +599,8 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op) void RENDER_OT_opengl(wmOperatorType *ot) { /* identifiers */ - ot->name= "OpenGL Render"; - ot->description= "OpenGL render active viewport"; + ot->name= _("OpenGL Render"); + ot->description= _("OpenGL render active viewport"); ot->idname= "RENDER_OT_opengl"; /* api callbacks */ @@ -609,9 +611,9 @@ void RENDER_OT_opengl(wmOperatorType *ot) ot->poll= ED_operator_screenactive; - RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene"); - RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)"); - RNA_def_boolean(ot->srna, "view_context", 1, "View Context", "Use the current 3D view for rendering, else use scene settings."); + RNA_def_boolean(ot->srna, "animation", 0, _("Animation"), _("Render files from the animation range of this scene")); + RNA_def_boolean(ot->srna, "write_still", 0, _("Write Image"), _("Save rendered the image to the output path (used only when animation is disabled)")); + RNA_def_boolean(ot->srna, "view_context", 1, _("View Context"), _("Use the current 3D view for rendering, else use scene settings.")); } /* function for getting an opengl buffer from a View3D, used by sequencer */ diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index cfed2750e18..67f828008e3 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -50,6 +50,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_animsys.h" #include "BKE_context.h" #include "BKE_depsgraph.h" @@ -106,9 +108,9 @@ static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_material_slot_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Material Slot"; + ot->name= _("Add Material Slot"); ot->idname= "OBJECT_OT_material_slot_add"; - ot->description="Add a new material slot"; + ot->description=_("Add a new material slot"); /* api callbacks */ ot->exec= material_slot_add_exec; @@ -142,9 +144,9 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op) void OBJECT_OT_material_slot_remove(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Material Slot"; + ot->name= _("Remove Material Slot"); ot->idname= "OBJECT_OT_material_slot_remove"; - ot->description="Remove the selected material slot"; + ot->description=_("Remove the selected material slot"); /* api callbacks */ ot->exec= material_slot_remove_exec; @@ -202,9 +204,9 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_material_slot_assign(wmOperatorType *ot) { /* identifiers */ - ot->name= "Assign Material Slot"; + ot->name= _("Assign Material Slot"); ot->idname= "OBJECT_OT_material_slot_assign"; - ot->description="Assign the material in the selected material slot to the selected vertices"; + ot->description=_("Assign the material in the selected material slot to the selected vertices"); /* api callbacks */ ot->exec= material_slot_assign_exec; @@ -289,9 +291,9 @@ static int material_slot_select_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_material_slot_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Material Slot"; + ot->name= _("Select Material Slot"); ot->idname= "OBJECT_OT_material_slot_select"; - ot->description="Select vertices assigned to the selected material slot"; + ot->description=_("Select vertices assigned to the selected material slot"); /* api callbacks */ ot->exec= material_slot_select_exec; @@ -308,9 +310,9 @@ static int material_slot_deselect_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_material_slot_deselect(wmOperatorType *ot) { /* identifiers */ - ot->name= "Deselect Material Slot"; + ot->name= _("Deselect Material Slot"); ot->idname= "OBJECT_OT_material_slot_deselect"; - ot->description="Deselect vertices assigned to the selected material slot"; + ot->description=_("Deselect vertices assigned to the selected material slot"); /* api callbacks */ ot->exec= material_slot_deselect_exec; @@ -348,9 +350,9 @@ static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op)) void OBJECT_OT_material_slot_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Material to Others"; + ot->name= _("Copy Material to Others"); ot->idname= "OBJECT_OT_material_slot_copy"; - ot->description="Copies materials to other selected objects"; + ot->description=_("Copies materials to other selected objects"); /* api callbacks */ ot->exec= material_slot_copy_exec; @@ -394,9 +396,9 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op)) void MATERIAL_OT_new(wmOperatorType *ot) { /* identifiers */ - ot->name= "New Material"; + ot->name= _("New Material"); ot->idname= "MATERIAL_OT_new"; - ot->description="Add a new material"; + ot->description=_("Add a new material"); /* api callbacks */ ot->exec= new_material_exec; @@ -440,9 +442,9 @@ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op)) void TEXTURE_OT_new(wmOperatorType *ot) { /* identifiers */ - ot->name= "New Texture"; + ot->name= _("New Texture"); ot->idname= "TEXTURE_OT_new"; - ot->description="Add a new texture"; + ot->description=_("Add a new texture"); /* api callbacks */ ot->exec= new_texture_exec; @@ -486,9 +488,9 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op)) void WORLD_OT_new(wmOperatorType *ot) { /* identifiers */ - ot->name= "New World"; + ot->name= _("New World"); ot->idname= "WORLD_OT_new"; - ot->description= "Add a new world"; + ot->description= _("Add a new world"); /* api callbacks */ ot->exec= new_world_exec; @@ -514,9 +516,9 @@ static int render_layer_add_exec(bContext *C, wmOperator *UNUSED(op)) void SCENE_OT_render_layer_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Render Layer"; + ot->name= _("Add Render Layer"); ot->idname= "SCENE_OT_render_layer_add"; - ot->description="Add a render layer"; + ot->description=_("Add a render layer"); /* api callbacks */ ot->exec= render_layer_add_exec; @@ -560,9 +562,9 @@ static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op)) void SCENE_OT_render_layer_remove(wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Render Layer"; + ot->name= _("Remove Render Layer"); ot->idname= "SCENE_OT_render_layer_remove"; - ot->description="Remove the selected render layer"; + ot->description=_("Remove the selected render layer"); /* api callbacks */ ot->exec= render_layer_remove_exec; @@ -638,15 +640,15 @@ static int texture_slot_move(bContext *C, wmOperator *op) void TEXTURE_OT_slot_move(wmOperatorType *ot) { static EnumPropertyItem slot_move[] = { - {-1, "UP", 0, "Up", ""}, - {1, "DOWN", 0, "Down", ""}, + {-1, "UP", 0, N_("Up"), ""}, + {1, "DOWN", 0, N_("Down"), ""}, {0, NULL, 0, NULL, NULL} }; /* identifiers */ - ot->name= "Move Texture Slot"; + ot->name= _("Move Texture Slot"); ot->idname= "TEXTURE_OT_slot_move"; - ot->description="Move texture slots up and down"; + ot->description=_("Move texture slots up and down"); /* api callbacks */ ot->exec= texture_slot_move; @@ -654,7 +656,7 @@ void TEXTURE_OT_slot_move(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", slot_move, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(slot_move), 0, _("Type"), ""); } @@ -777,9 +779,9 @@ static int envmap_save_poll(bContext *C) void TEXTURE_OT_envmap_save(wmOperatorType *ot) { /* identifiers */ - ot->name= "Save Environment Map"; + ot->name= _("Save Environment Map"); ot->idname= "TEXTURE_OT_envmap_save"; - ot->description="Save the current generated Environment map to an image file"; + ot->description=_("Save the current generated Environment map to an image file"); /* api callbacks */ ot->exec= envmap_save_exec; @@ -822,9 +824,9 @@ static int envmap_clear_poll(bContext *C) void TEXTURE_OT_envmap_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Environment Map"; + ot->name= _("Clear Environment Map"); ot->idname= "TEXTURE_OT_envmap_clear"; - ot->description="Discard the environment map and free it from memory"; + ot->description=_("Discard the environment map and free it from memory"); /* api callbacks */ ot->exec= envmap_clear_exec; @@ -851,9 +853,9 @@ static int envmap_clear_all_exec(bContext *C, wmOperator *UNUSED(op)) void TEXTURE_OT_envmap_clear_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear All Environment Maps"; + ot->name= _("Clear All Environment Maps"); ot->idname= "TEXTURE_OT_envmap_clear_all"; - ot->description="Discard all environment maps in the .blend file and free them from memory"; + ot->description=_("Discard all environment maps in the .blend file and free them from memory"); /* api callbacks */ ot->exec= envmap_clear_all_exec; @@ -883,9 +885,9 @@ static int copy_material_exec(bContext *C, wmOperator *UNUSED(op)) void MATERIAL_OT_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Material"; + ot->name= _("Copy Material"); ot->idname= "MATERIAL_OT_copy"; - ot->description="Copy the material settings and nodes"; + ot->description=_("Copy the material settings and nodes"); /* api callbacks */ ot->exec= copy_material_exec; @@ -911,9 +913,9 @@ static int paste_material_exec(bContext *C, wmOperator *UNUSED(op)) void MATERIAL_OT_paste(wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste Material"; + ot->name= _("Paste Material"); ot->idname= "MATERIAL_OT_paste"; - ot->description="Paste the material settings and nodes"; + ot->description=_("Paste the material settings and nodes"); /* api callbacks */ ot->exec= paste_material_exec; @@ -1030,9 +1032,9 @@ static int copy_mtex_poll(bContext *C) void TEXTURE_OT_slot_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Texture Slot Settings"; + ot->name= _("Copy Texture Slot Settings"); ot->idname= "TEXTURE_OT_slot_copy"; - ot->description="Copy the material texture settings and nodes"; + ot->description=_("Copy the material texture settings and nodes"); /* api callbacks */ ot->exec= copy_mtex_exec; @@ -1075,9 +1077,9 @@ static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op)) void TEXTURE_OT_slot_paste(wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste Texture Slot Settings"; + ot->name= _("Paste Texture Slot Settings"); ot->idname= "TEXTURE_OT_slot_paste"; - ot->description="Copy the texture settings and nodes"; + ot->description=_("Copy the texture settings and nodes"); /* api callbacks */ ot->exec= paste_mtex_exec; diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index 9dfcde6ed0d..3fa6c2123a8 100644 --- a/source/blender/editors/render/render_view.c +++ b/source/blender/editors/render/render_view.c @@ -36,6 +36,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "BKE_blender.h" @@ -280,8 +282,8 @@ static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op)) void RENDER_OT_view_cancel(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Cancel Render View"; - ot->description= "Cancel show render view"; + ot->name= _("Cancel Render View"); + ot->description= _("Cancel show render view"); ot->idname= "RENDER_OT_view_cancel"; /* api callbacks */ @@ -347,8 +349,8 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent void RENDER_OT_view_show(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Show/Hide Render View"; - ot->description= "Toggle show render view"; + ot->name= _("Show/Hide Render View"); + ot->description= _("Toggle show render view"); ot->idname= "RENDER_OT_view_show"; /* api callbacks */ diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 82986dfbcc4..a9ba86b4861 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -43,6 +43,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_screen.h" @@ -1347,41 +1349,7 @@ void ED_area_prevspace(bContext *C, ScrArea *sa) static const char *editortype_pup(void) { - return( - "Editor type:%t" - "|3D View %x1" - - "|%l" - - "|Timeline %x15" - "|Graph Editor %x2" - "|DopeSheet %x12" - "|NLA Editor %x13" - - "|%l" - - "|UV/Image Editor %x6" - - "|Video Sequence Editor %x8" - "|Text Editor %x9" - "|Node Editor %x16" - "|Logic Editor %x17" - - "|%l" - - "|Properties %x4" - "|Outliner %x3" - "|User Preferences %x19" - "|Info%x7" - - "|%l" - - "|File Browser %x5" - - "|%l" - - "|Python Console %x18" - ); + return _("Editor type:%t|3D View %x1|%l|Timeline %x15|Graph Editor %x2|DopeSheet %x12|NLA Editor %x13|%l|UV/Image Editor %x6|Video Sequence Editor %x8|Text Editor %x9|Node Editor %x16|Logic Editor %x17|%l|Properties %x4|Outliner %x3|User Preferences %x19|Info%x7|%l|File Browser %x5|%l|Python Console %x18"); } static void spacefunc(struct bContext *C, void *UNUSED(arg1), void *UNUSED(arg2)) @@ -1403,8 +1371,7 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco) but= uiDefIconTextButC(block, ICONTEXTROW, 0, ICON_VIEW3D, editortype_pup(), xco, yco, UI_UNIT_X+10, UI_UNIT_Y, &(sa->butspacetype), 1.0, SPACEICONMAX, 0, 0, - "Displays current editor type. " - "Click for menu of available types"); + _("Displays current editor type. Click for menu of available types")); uiButSetFunc(but, spacefunc, NULL, NULL); return xco + UI_UNIT_X + 14; @@ -1445,7 +1412,7 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco) void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *context, int contextnr) { ScrArea *sa= CTX_wm_area(C); - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiBlock *block; PanelType *pt; Panel *panel; @@ -1633,7 +1600,7 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar) void ED_region_header(const bContext *C, ARegion *ar) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiBlock *block; uiLayout *layout; HeaderType *ht; diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 68326edfb11..e81b032fdf3 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -40,6 +40,8 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_armature_types.h" #include "DNA_lattice_types.h" #include "DNA_object_types.h" @@ -637,8 +639,8 @@ static int actionzone_cancel(bContext *UNUSED(C), wmOperator *op) static void SCREEN_OT_actionzone(wmOperatorType *ot) { /* identifiers */ - ot->name= "Handle area action zones"; - ot->description= "Handle area action zones for mouse actions/gestures"; + ot->name= _("Handle area action zones"); + ot->description= _("Handle area action zones for mouse actions/gestures"); ot->idname= "SCREEN_OT_actionzone"; ot->invoke= actionzone_invoke; @@ -648,7 +650,7 @@ static void SCREEN_OT_actionzone(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING; - RNA_def_int(ot->srna, "modifier", 0, 0, 2, "modifier", "modifier state", 0, 2); + RNA_def_int(ot->srna, "modifier", 0, 0, 2, _("modifier"), _("modifier state"), 0, 2); } /* ************** swap area operator *********************************** */ @@ -760,8 +762,8 @@ static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event) static void SCREEN_OT_area_swap(wmOperatorType *ot) { - ot->name= "Swap areas"; - ot->description= "Swap selected areas screen positions"; + ot->name= _("Swap areas"); + ot->description= _("Swap selected areas screen positions"); ot->idname= "SCREEN_OT_area_swap"; ot->invoke= area_swap_invoke; @@ -828,8 +830,8 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event) static void SCREEN_OT_area_dupli(wmOperatorType *ot) { - ot->name= "Duplicate Area into New Window"; - ot->description= "Duplicate selected area into new window"; + ot->name= _("Duplicate Area into New Window"); + ot->description= _("Duplicate selected area into new window"); ot->idname= "SCREEN_OT_area_dupli"; ot->invoke= area_dupli_invoke; @@ -1076,8 +1078,8 @@ static int area_move_modal(bContext *C, wmOperator *op, wmEvent *event) static void SCREEN_OT_area_move(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move area edges"; - ot->description= "Move selected area edges"; + ot->name= _("Move area edges"); + ot->description= _("Move selected area edges"); ot->idname= "SCREEN_OT_area_move"; ot->exec= area_move_exec; @@ -1091,7 +1093,7 @@ static void SCREEN_OT_area_move(wmOperatorType *ot) /* rna */ RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); } /* ************** split area operator *********************************** */ @@ -1490,14 +1492,14 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event) } static EnumPropertyItem prop_direction_items[] = { -{'h', "HORIZONTAL", 0, "Horizontal", ""}, -{'v', "VERTICAL", 0, "Vertical", ""}, +{'h', "HORIZONTAL", 0, N_("Horizontal"), ""}, +{'v', "VERTICAL", 0, N_("Vertical"), ""}, {0, NULL, 0, NULL, NULL}}; static void SCREEN_OT_area_split(wmOperatorType *ot) { - ot->name = "Split area"; - ot->description= "Split selected area into new windows"; + ot->name = _("Split area"); + ot->description= _("Split selected area into new windows"); ot->idname = "SCREEN_OT_area_split"; ot->exec= area_split_exec; @@ -1509,10 +1511,10 @@ static void SCREEN_OT_area_split(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING; /* rna */ - RNA_def_enum(ot->srna, "direction", prop_direction_items, 'h', "Direction", ""); - RNA_def_float(ot->srna, "factor", 0.5f, 0.0, 1.0, "Factor", "", 0.0, 1.0); - RNA_def_int(ot->srna, "mouse_x", -100, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mouse_y", -100, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX); + RNA_def_enum(ot->srna, "direction", RNA_enum_items_gettexted(prop_direction_items), 'h', _("Direction"), ""); + RNA_def_float(ot->srna, "factor", 0.5f, 0.0, 1.0, _("Factor"), "", 0.0, 1.0); + RNA_def_int(ot->srna, "mouse_x", -100, INT_MIN, INT_MAX, _("Mouse X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mouse_y", -100, INT_MIN, INT_MAX, _("Mouse Y"), "", INT_MIN, INT_MAX); } @@ -1714,8 +1716,8 @@ int region_scale_cancel(bContext *UNUSED(C), wmOperator *op) static void SCREEN_OT_region_scale(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scale Region Size"; - ot->description= "Scale selected area"; + ot->name= _("Scale Region Size"); + ot->description= _("Scale selected area"); ot->idname= "SCREEN_OT_region_scale"; ot->invoke= region_scale_invoke; @@ -1749,7 +1751,7 @@ static int frame_offset_exec(bContext *C, wmOperator *op) static void SCREEN_OT_frame_offset(wmOperatorType *ot) { - ot->name = "Frame Offset"; + ot->name = _("Frame Offset"); ot->idname = "SCREEN_OT_frame_offset"; ot->exec= frame_offset_exec; @@ -1758,7 +1760,7 @@ static void SCREEN_OT_frame_offset(wmOperatorType *ot) ot->flag= 0; /* rna */ - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); } @@ -1798,8 +1800,8 @@ static int frame_jump_exec(bContext *C, wmOperator *op) static void SCREEN_OT_frame_jump(wmOperatorType *ot) { - ot->name = "Jump to Endpoint"; - ot->description= "Jump to first/last frame in frame range"; + ot->name = _("Jump to Endpoint"); + ot->description= _("Jump to first/last frame in frame range"); ot->idname = "SCREEN_OT_frame_jump"; ot->exec= frame_jump_exec; @@ -1808,7 +1810,7 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* rna */ - RNA_def_boolean(ot->srna, "end", 0, "Last Frame", "Jump to the last frame of the frame range."); + RNA_def_boolean(ot->srna, "end", 0, _("Last Frame"), _("Jump to the last frame of the frame range.")); } @@ -1880,8 +1882,8 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) static void SCREEN_OT_keyframe_jump(wmOperatorType *ot) { - ot->name = "Jump to Keyframe"; - ot->description= "Jump to previous/next keyframe"; + ot->name = _("Jump to Keyframe"); + ot->description= _("Jump to previous/next keyframe"); ot->idname = "SCREEN_OT_keyframe_jump"; ot->exec= keyframe_jump_exec; @@ -1890,7 +1892,7 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* rna */ - RNA_def_boolean(ot->srna, "next", 1, "Next Keyframe", ""); + RNA_def_boolean(ot->srna, "next", 1, _("Next Keyframe"), ""); } /* ************** switch screen operator ***************************** */ @@ -1944,15 +1946,15 @@ static int screen_set_exec(bContext *C, wmOperator *op) static void SCREEN_OT_screen_set(wmOperatorType *ot) { - ot->name = "Set Screen"; - ot->description= "Cycle through available screens"; + ot->name = _("Set Screen"); + ot->description= _("Cycle through available screens"); ot->idname = "SCREEN_OT_screen_set"; ot->exec= screen_set_exec; ot->poll= ED_operator_screenactive; /* rna */ - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); } /* ************** screen full-area operator ***************************** */ @@ -1978,8 +1980,8 @@ static int screen_full_area_exec(bContext *C, wmOperator *UNUSED(op)) static void SCREEN_OT_screen_full_area(wmOperatorType *ot) { - ot->name = "Toggle Full Screen"; - ot->description= "Toggle display selected area as fullscreen"; + ot->name = _("Toggle Full Screen"); + ot->description= _("Toggle display selected area as fullscreen"); ot->idname = "SCREEN_OT_screen_full_area"; ot->exec= screen_full_area_exec; @@ -2266,8 +2268,8 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) static void SCREEN_OT_area_join(wmOperatorType *ot) { /* identifiers */ - ot->name= "Join area"; - ot->description= "Join selected areas into new window"; + ot->name= _("Join area"); + ot->description= _("Join selected areas into new window"); ot->idname= "SCREEN_OT_area_join"; /* api callbacks */ @@ -2325,8 +2327,8 @@ static int screen_area_options_invoke(bContext *C, wmOperator *op, wmEvent *even static void SCREEN_OT_area_options(wmOperatorType *ot) { /* identifiers */ - ot->name= "Area Options"; - ot->description= "Operations for splitting and merging"; + ot->name= _("Area Options"); + ot->description= _("Operations for splitting and merging"); ot->idname= "SCREEN_OT_area_options"; /* api callbacks */ @@ -2366,8 +2368,8 @@ static int spacedata_cleanup(bContext *C, wmOperator *op) static void SCREEN_OT_spacedata_cleanup(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clean-up space-data"; - ot->description= "Remove unused settings for invisible editors"; + ot->name= _("Clean-up space-data"); + ot->description= _("Remove unused settings for invisible editors"); ot->idname= "SCREEN_OT_spacedata_cleanup"; /* api callbacks */ @@ -2391,8 +2393,8 @@ static int repeat_last_exec(bContext *C, wmOperator *UNUSED(op)) static void SCREEN_OT_repeat_last(wmOperatorType *ot) { /* identifiers */ - ot->name= "Repeat Last"; - ot->description= "Repeat last action"; + ot->name= _("Repeat Last"); + ot->description= _("Repeat last action"); ot->idname= "SCREEN_OT_repeat_last"; /* api callbacks */ @@ -2444,8 +2446,8 @@ static int repeat_history_exec(bContext *C, wmOperator *op) static void SCREEN_OT_repeat_history(wmOperatorType *ot) { /* identifiers */ - ot->name= "Repeat History"; - ot->description= "Display menu for previous actions performed"; + ot->name= _("Repeat History"); + ot->description= _("Display menu for previous actions performed"); ot->idname= "SCREEN_OT_repeat_history"; /* api callbacks */ @@ -2454,7 +2456,7 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot) ot->poll= ED_operator_screenactive; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, 1000); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), "", 0, 1000); } /* ********************** redo operator ***************************** */ @@ -2472,8 +2474,8 @@ static int redo_last_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED static void SCREEN_OT_redo_last(wmOperatorType *ot) { /* identifiers */ - ot->name= "Redo Last"; - ot->description= "Display menu for last action performed"; + ot->name= _("Redo Last"); + ot->description= _("Display menu for last action performed"); ot->idname= "SCREEN_OT_redo_last"; /* api callbacks */ @@ -2575,8 +2577,8 @@ static int region_quadview_exec(bContext *C, wmOperator *op) static void SCREEN_OT_region_quadview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Quad View"; - ot->description= "Split selected area into camera, front, right & top views"; + ot->name= _("Toggle Quad View"); + ot->description= _("Split selected area into camera, front, right & top views"); ot->idname= "SCREEN_OT_region_quadview"; /* api callbacks */ @@ -2617,7 +2619,7 @@ static int region_flip_exec(bContext *C, wmOperator *UNUSED(op)) static void SCREEN_OT_region_flip(wmOperatorType *ot) { /* identifiers */ - ot->name= "Flip Region"; + ot->name= _("Flip Region"); ot->idname= "SCREEN_OT_region_flip"; /* api callbacks */ @@ -2666,7 +2668,7 @@ static int header_flip_exec(bContext *C, wmOperator *UNUSED(op)) static void SCREEN_OT_header_flip(wmOperatorType *ot) { /* identifiers */ - ot->name= "Flip Header Region"; + ot->name= _("Flip Header Region"); ot->idname= "SCREEN_OT_header_flip"; /* api callbacks */ @@ -2712,8 +2714,8 @@ static int header_toolbox_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *U static void SCREEN_OT_header_toolbox(wmOperatorType *ot) { /* identifiers */ - ot->name= "Header Toolbox"; - ot->description="Display header region toolbox"; + ot->name= _("Header Toolbox"); + ot->description=_("Display header region toolbox"); ot->idname= "SCREEN_OT_header_toolbox"; /* api callbacks */ @@ -2912,8 +2914,8 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e static void SCREEN_OT_animation_step(wmOperatorType *ot) { /* identifiers */ - ot->name= "Animation Step"; - ot->description= "Step through animation by position"; + ot->name= _("Animation Step"); + ot->description= _("Step through animation by position"); ot->idname= "SCREEN_OT_animation_step"; /* api callbacks */ @@ -2969,8 +2971,8 @@ static int screen_animation_play_exec(bContext *C, wmOperator *op) static void SCREEN_OT_animation_play(wmOperatorType *ot) { /* identifiers */ - ot->name= "Play Animation"; - ot->description= "Play animation"; + ot->name= _("Play Animation"); + ot->description= _("Play animation"); ot->idname= "SCREEN_OT_animation_play"; /* api callbacks */ @@ -2978,8 +2980,8 @@ static void SCREEN_OT_animation_play(wmOperatorType *ot) ot->poll= ED_operator_screenactive_norender; - RNA_def_boolean(ot->srna, "reverse", 0, "Play in Reverse", "Animation is played backwards"); - RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate"); + RNA_def_boolean(ot->srna, "reverse", 0, _("Play in Reverse"), _("Animation is played backwards")); + RNA_def_boolean(ot->srna, "sync", 0, _("Sync"), _("Drop frames to maintain framerate")); } static int screen_animation_cancel_exec(bContext *C, wmOperator *op) @@ -3009,8 +3011,8 @@ static int screen_animation_cancel_exec(bContext *C, wmOperator *op) static void SCREEN_OT_animation_cancel(wmOperatorType *ot) { /* identifiers */ - ot->name= "Cancel Animation"; - ot->description= "Cancel animation, returning to the original frame"; + ot->name= _("Cancel Animation"); + ot->description= _("Cancel animation, returning to the original frame"); ot->idname= "SCREEN_OT_animation_cancel"; /* api callbacks */ @@ -3018,7 +3020,7 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot) ot->poll= ED_operator_screenactive; - RNA_def_boolean(ot->srna, "restore_frame", TRUE, "Restore Frame", "Restore the frame when animation was initialized."); + RNA_def_boolean(ot->srna, "restore_frame", TRUE, _("Restore Frame"), _("Restore the frame when animation was initialized.")); } /* ************** border select operator (template) ***************************** */ @@ -3059,7 +3061,7 @@ static int border_select_do(bContext *C, wmOperator *op) static void SCREEN_OT_border_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border select"; + ot->name= _("Border select"); ot->idname= "SCREEN_OT_border_select"; /* api callbacks */ @@ -3105,8 +3107,8 @@ static int fullscreen_back_exec(bContext *C, wmOperator *op) static void SCREEN_OT_back_to_previous(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Back to Previous Screen"; - ot->description= "Revert back to the original screen layout, before fullscreen area overlay"; + ot->name= _("Back to Previous Screen"); + ot->description= _("Revert back to the original screen layout, before fullscreen area overlay"); ot->idname= "SCREEN_OT_back_to_previous"; /* api callbacks */ @@ -3140,8 +3142,8 @@ static int userpref_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *ev static void SCREEN_OT_userpref_show(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Show/Hide User Preferences"; - ot->description= "Show/hide user preferences"; + ot->name= _("Show/Hide User Preferences"); + ot->description= _("Show/hide user preferences"); ot->idname= "SCREEN_OT_userpref_show"; /* api callbacks */ @@ -3165,8 +3167,8 @@ static int screen_new_exec(bContext *C, wmOperator *UNUSED(op)) static void SCREEN_OT_new(wmOperatorType *ot) { /* identifiers */ - ot->name= "New Screen"; - ot->description= "Add a new screen"; + ot->name= _("New Screen"); + ot->description= _("Add a new screen"); ot->idname= "SCREEN_OT_new"; /* api callbacks */ @@ -3191,8 +3193,8 @@ static int screen_delete_exec(bContext *C, wmOperator *UNUSED(op)) static void SCREEN_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Screen"; //was scene - ot->description= "Delete active screen"; + ot->name= _("Delete Screen"); //was scene + ot->description= _("Delete active screen"); ot->idname= "SCREEN_OT_delete"; /* api callbacks */ @@ -3238,16 +3240,16 @@ static int scene_new_exec(bContext *C, wmOperator *op) static void SCENE_OT_new(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { - {SCE_COPY_NEW, "NEW", 0, "New", "Add new scene"}, - {SCE_COPY_EMPTY, "EMPTY", 0, "Copy Settings", "Make a copy without any objects"}, - {SCE_COPY_LINK_OB, "LINK_OBJECTS", 0, "Link Objects", "Link to the objects from the current scene"}, - {SCE_COPY_LINK_DATA, "LINK_OBJECT_DATA", 0, "Link Object Data", "Copy objects linked to data from the current scene"}, - {SCE_COPY_FULL, "FULL_COPY", 0, "Full Copy", "Make a full copy of the current scene"}, + {SCE_COPY_NEW, "NEW", 0, N_("New"), N_("Add new scene")}, + {SCE_COPY_EMPTY, "EMPTY", 0, N_("Copy Settings"), N_("Make a copy without any objects")}, + {SCE_COPY_LINK_OB, "LINK_OBJECTS", 0, N_("Link Objects"), N_("Link to the objects from the current scene")}, + {SCE_COPY_LINK_DATA, "LINK_OBJECT_DATA", 0, N_("Link Object Data"), N_("Copy objects linked to data from the current scene")}, + {SCE_COPY_FULL, "FULL_COPY", 0, N_("Full Copy"), N_("Make a full copy of the current scene")}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "New Scene"; - ot->description= "Add new scene by type"; + ot->name= _("New Scene"); + ot->description= _("Add new scene by type"); ot->idname= "SCENE_OT_new"; /* api callbacks */ @@ -3258,7 +3260,7 @@ static void SCENE_OT_new(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(type_items), 0, "Type", ""); } /********************* delete scene operator *********************/ @@ -3275,8 +3277,8 @@ static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op)) static void SCENE_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Scene"; - ot->description= "Delete active scene"; + ot->name= _("Delete Scene"); + ot->description= _("Delete active scene"); ot->idname= "SCENE_OT_delete"; /* api callbacks */ @@ -3344,15 +3346,15 @@ void ED_operatortypes_screen(void) static void keymap_modal_set(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {KM_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {KM_MODAL_APPLY, "APPLY", 0, "Apply", ""}, - {KM_MODAL_STEP10, "STEP10", 0, "Steps on", ""}, - {KM_MODAL_STEP10_OFF, "STEP10_OFF", 0, "Steps off", ""}, + {KM_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""}, + {KM_MODAL_APPLY, "APPLY", 0, N_("Apply"), ""}, + {KM_MODAL_STEP10, "STEP10", 0, N_("Steps on"), ""}, + {KM_MODAL_STEP10_OFF, "STEP10_OFF", 0, N_("Steps off"), ""}, {0, NULL, 0, NULL, NULL}}; wmKeyMap *keymap; /* Standard Modal keymap ------------------------------------------------ */ - keymap= WM_modalkeymap_add(keyconf, "Standard Modal Map", modal_items); + keymap= WM_modalkeymap_add(keyconf, "Standard Modal Map", RNA_enum_items_gettexted(modal_items)); WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, KM_MODAL_CANCEL); WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_ANY, KM_ANY, 0, KM_MODAL_APPLY); diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 3010adafe20..d9b3961c8b8 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -38,6 +38,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -203,7 +205,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot) { PropertyRNA *prop; - ot->name= "Save Screenshot"; /* weak: opname starting with 'save' makes filewindow give save-over */ + ot->name= _("Save Screenshot"); /* weak: opname starting with 'save' makes filewindow give save-over */ ot->idname= "SCREEN_OT_screenshot"; ot->invoke= screenshot_invoke; @@ -214,7 +216,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot) ot->flag= 0; WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH); - prop= RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); + prop= RNA_def_boolean(ot->srna, "full", 1, _("Full Screen"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); /* hide because once the file sel is displayed, the option no longer does anything */ } @@ -375,7 +377,7 @@ static int screencast_exec(bContext *C, wmOperator *op) void SCREEN_OT_screencast(wmOperatorType *ot) { - ot->name= "Make Screencast"; + ot->name= _("Make Screencast"); ot->idname= "SCREEN_OT_screencast"; ot->invoke= WM_operator_confirm; @@ -384,8 +386,8 @@ void SCREEN_OT_screencast(wmOperatorType *ot) ot->flag= 0; - RNA_def_property(ot->srna, "filepath", PROP_STRING, PROP_FILEPATH); - RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); + RNA_def_property(ot->srna, _("filepath"), PROP_STRING, PROP_FILEPATH); + RNA_def_boolean(ot->srna, "full", 1, _("Full Screen"), ""); } diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt index 94e08a020f6..4438bb4f035 100644 --- a/source/blender/editors/sculpt_paint/CMakeLists.txt +++ b/source/blender/editors/sculpt_paint/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/sculpt_paint/SConscript b/source/blender/editors/sculpt_paint/SConscript index 90b56ded2cd..f6b206d4555 100644 --- a/source/blender/editors/sculpt_paint/SConscript +++ b/source/blender/editors/sculpt_paint/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('*.c') defs = [] -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../render/extern/include' incs += ' ../../gpu ../../makesrna ../../blenloader' diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index c9a6aa87cd0..d0fae1ac012 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -52,6 +52,8 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "PIL_time.h" #include "IMB_imbuf.h" @@ -4962,7 +4964,7 @@ static int paint_cancel(bContext *C, wmOperator *op) void PAINT_OT_image_paint(wmOperatorType *ot) { /* identifiers */ - ot->name= "Image Paint"; + ot->name= _("Image Paint"); ot->idname= "PAINT_OT_image_paint"; /* api callbacks */ @@ -4976,7 +4978,7 @@ void PAINT_OT_image_paint(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* properties */ - RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); + RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, _("Stroke"), ""); } static int get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy) @@ -5151,7 +5153,7 @@ static int grab_clone_cancel(bContext *UNUSED(C), wmOperator *op) void PAINT_OT_grab_clone(wmOperatorType *ot) { /* identifiers */ - ot->name= "Grab Clone"; + ot->name= _("Grab Clone"); ot->idname= "PAINT_OT_grab_clone"; /* api callbacks */ @@ -5165,7 +5167,7 @@ void PAINT_OT_grab_clone(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* properties */ - RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates.", -1.0f, 1.0f); + RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, _("Delta"), _("Delta offset of clone image in 0.0..1.0 coordinates."), -1.0f, 1.0f); } /******************** sample color operator ********************/ @@ -5233,7 +5235,7 @@ static int image_paint_sample_color_poll(bContext *C) void PAINT_OT_sample_color(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sample Color"; + ot->name= _("Sample Color"); ot->idname= "PAINT_OT_sample_color"; /* api callbacks */ @@ -5246,7 +5248,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "Cursor location in region coordinates.", 0, 16384); + RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, _("Location"), _("Cursor location in region coordinates."), 0, 16384); } /******************** set clone cursor operator ********************/ @@ -5284,7 +5286,7 @@ static int set_clone_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) void PAINT_OT_clone_cursor_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Clone Cursor"; + ot->name= _("Set Clone Cursor"); ot->idname= "PAINT_OT_clone_cursor_set"; /* api callbacks */ @@ -5296,7 +5298,7 @@ void PAINT_OT_clone_cursor_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in world space coordinates.", -10000.0f, 10000.0f); + RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, _("Location"), _("Cursor location in world space coordinates."), -10000.0f, 10000.0f); } /******************** texture paint toggle operator ********************/ @@ -5366,7 +5368,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) void PAINT_OT_texture_paint_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Texture Paint Toggle"; + ot->name= _("Texture Paint Toggle"); ot->idname= "PAINT_OT_texture_paint_toggle"; /* api callbacks */ @@ -5502,9 +5504,9 @@ void PAINT_OT_project_image(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Project Image"; + ot->name= _("Project Image"); ot->idname= "PAINT_OT_project_image"; - ot->description= "Project an edited render from the active camera back onto the object"; + ot->description= _("Project an edited render from the active camera back onto the object"); /* api callbacks */ ot->invoke= WM_enum_search_invoke; @@ -5513,7 +5515,7 @@ void PAINT_OT_project_image(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - prop= RNA_def_enum(ot->srna, "image", DummyRNA_NULL_items, 0, "Image", ""); + prop= RNA_def_enum(ot->srna, "image", DummyRNA_NULL_items, 0, _("Image"), ""); RNA_def_enum_funcs(prop, RNA_image_itemf); ot->prop= prop; } @@ -5581,9 +5583,9 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) void PAINT_OT_image_from_view(wmOperatorType *ot) { /* identifiers */ - ot->name= "Image from View"; + ot->name= _("Image from View"); ot->idname= "PAINT_OT_image_from_view"; - ot->description= "Make an image from the current 3D view for re-projection"; + ot->description= _("Make an image from the current 3D view for re-projection"); /* api callbacks */ ot->exec= texture_paint_image_from_view_exec; @@ -5592,5 +5594,5 @@ void PAINT_OT_image_from_view(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER; - RNA_def_string_file_name(ot->srna, "filepath", "", FILE_MAX, "File Path", "Name of the file"); + RNA_def_string_file_name(ot->srna, "filepath", "", FILE_MAX, _("File Path"), _("Name of the file")); } diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 69af50415cc..f53bc4208e0 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -29,6 +29,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_brush_types.h" @@ -76,8 +78,8 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op)) static void BRUSH_OT_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Brush"; - ot->description= "Add brush by mode type"; + ot->name= _("Add Brush"); + ot->description= _("Add brush by mode type"); ot->idname= "BRUSH_OT_add"; /* api callbacks */ @@ -131,8 +133,8 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) static void BRUSH_OT_scale_size(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scale Sculpt/Paint Brush Size"; - ot->description= "Change brush size by a scalar"; + ot->name= _("Scale Sculpt/Paint Brush Size"); + ot->description= _("Change brush size by a scalar"); ot->idname= "BRUSH_OT_scale_size"; /* api callbacks */ @@ -141,7 +143,7 @@ static void BRUSH_OT_scale_size(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_float(ot->srna, "scalar", 1, 0, 2, "Scalar", "Factor to scale brush size by", 0, 2); + RNA_def_float(ot->srna, "scalar", 1, 0, 2, _("Scalar"), _("Factor to scale brush size by"), 0, 2); } static int vertex_color_set_exec(bContext *C, wmOperator *UNUSED(op)) @@ -158,7 +160,7 @@ static int vertex_color_set_exec(bContext *C, wmOperator *UNUSED(op)) static void PAINT_OT_vertex_color_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Vertex Colors"; + ot->name= _("Set Vertex Colors"); ot->idname= "PAINT_OT_vertex_color_set"; /* api callbacks */ @@ -187,8 +189,8 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op)) static void BRUSH_OT_reset(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset Brush"; - ot->description= "Return brush to defaults based on current tool"; + ot->name= _("Reset Brush"); + ot->description= _("Return brush to defaults based on current tool"); ot->idname= "BRUSH_OT_reset"; /* api callbacks */ @@ -250,8 +252,8 @@ static int brush_sculpt_tool_set_exec(bContext *C, wmOperator *op) static void BRUSH_OT_sculpt_tool_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sculpt Tool Set"; - ot->description= "Set the sculpt tool"; + ot->name= _("Sculpt Tool Set"); + ot->description= _("Set the sculpt tool"); ot->idname= "BRUSH_OT_sculpt_tool_set"; /* api callbacks */ @@ -261,7 +263,7 @@ static void BRUSH_OT_sculpt_tool_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "tool", brush_sculpt_tool_items, 0, "Tool", ""); + ot->prop= RNA_def_enum(ot->srna, "tool", brush_sculpt_tool_items, 0, _("Tool"), ""); } static int brush_vertex_tool_set_exec(bContext *C, wmOperator *op) @@ -275,8 +277,8 @@ static int brush_vertex_tool_set_exec(bContext *C, wmOperator *op) static void BRUSH_OT_vertex_tool_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Vertex Paint Tool Set"; - ot->description= "Set the vertex paint tool"; + ot->name= _("Vertex Paint Tool Set"); + ot->description= _("Set the vertex paint tool"); ot->idname= "BRUSH_OT_vertex_tool_set"; /* api callbacks */ @@ -286,7 +288,7 @@ static void BRUSH_OT_vertex_tool_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "tool", brush_vertex_tool_items, 0, "Tool", ""); + ot->prop= RNA_def_enum(ot->srna, "tool", brush_vertex_tool_items, 0, _("Tool"), ""); } static int brush_weight_tool_set_exec(bContext *C, wmOperator *op) @@ -300,8 +302,8 @@ static int brush_weight_tool_set_exec(bContext *C, wmOperator *op) static void BRUSH_OT_weight_tool_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weight Paint Tool Set"; - ot->description= "Set the weight paint tool"; + ot->name= _("Weight Paint Tool Set"); + ot->description= _("Set the weight paint tool"); ot->idname= "BRUSH_OT_weight_tool_set"; /* api callbacks */ @@ -311,7 +313,7 @@ static void BRUSH_OT_weight_tool_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "tool", brush_vertex_tool_items, 0, "Tool", ""); + ot->prop= RNA_def_enum(ot->srna, "tool", brush_vertex_tool_items, 0, _("Tool"), ""); } static int brush_image_tool_set_exec(bContext *C, wmOperator *op) @@ -325,8 +327,8 @@ static int brush_image_tool_set_exec(bContext *C, wmOperator *op) static void BRUSH_OT_image_tool_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Image Paint Tool Set"; - ot->description= "Set the image tool"; + ot->name= _("Image Paint Tool Set"); + ot->description= _("Set the image tool"); ot->idname= "BRUSH_OT_image_tool_set"; /* api callbacks */ diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 09f5c32bea0..a1855f254ef 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -15,6 +15,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_brush.h" #include "BKE_context.h" #include "BKE_DerivedMesh.h" @@ -271,16 +273,16 @@ static int brush_curve_preset_poll(bContext *C) void BRUSH_OT_curve_preset(wmOperatorType *ot) { static EnumPropertyItem prop_shape_items[] = { - {CURVE_PRESET_SHARP, "SHARP", 0, "Sharp", ""}, - {CURVE_PRESET_SMOOTH, "SMOOTH", 0, "Smooth", ""}, - {CURVE_PRESET_MAX, "MAX", 0, "Max", ""}, - {CURVE_PRESET_LINE, "LINE", 0, "Line", ""}, - {CURVE_PRESET_ROUND, "ROUND", 0, "Round", ""}, - {CURVE_PRESET_ROOT, "ROOT", 0, "Root", ""}, + {CURVE_PRESET_SHARP, "SHARP", 0, N_("Sharp"), ""}, + {CURVE_PRESET_SMOOTH, "SMOOTH", 0, N_("Smooth"), ""}, + {CURVE_PRESET_MAX, "MAX", 0, N_("Max"), ""}, + {CURVE_PRESET_LINE, "LINE", 0, N_("Line"), ""}, + {CURVE_PRESET_ROUND, "ROUND", 0, N_("Round"), ""}, + {CURVE_PRESET_ROOT, "ROOT", 0, N_("Root"), ""}, {0, NULL, 0, NULL, NULL}}; - ot->name= "Preset"; - ot->description= "Set brush shape"; + ot->name= _("Preset"); + ot->description= _("Set brush shape"); ot->idname= "BRUSH_OT_curve_preset"; ot->exec= brush_curve_preset_exec; @@ -288,7 +290,7 @@ void BRUSH_OT_curve_preset(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "shape", prop_shape_items, CURVE_PRESET_SMOOTH, "Mode", ""); + RNA_def_enum(ot->srna, "shape", RNA_enum_items_gettexted(prop_shape_items), CURVE_PRESET_SMOOTH, _("Mode"), ""); } @@ -302,8 +304,8 @@ static int paint_select_linked_exec(bContext *C, wmOperator *UNUSED(op)) void PAINT_OT_face_select_linked(wmOperatorType *ot) { - ot->name= "Select Linked"; - ot->description= "Select linked faces"; + ot->name= _("Select Linked"); + ot->description= _("Select linked faces"); ot->idname= "PAINT_OT_face_select_linked"; ot->exec= paint_select_linked_exec; @@ -322,8 +324,8 @@ static int paint_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent void PAINT_OT_face_select_linked_pick(wmOperatorType *ot) { - ot->name= "Select Linked Pick"; - ot->description= "Select linked faces"; + ot->name= _("Select Linked Pick"); + ot->description= _("Select linked faces"); ot->idname= "PAINT_OT_face_select_linked_pick"; ot->invoke= paint_select_linked_pick_invoke; @@ -331,7 +333,7 @@ void PAINT_OT_face_select_linked_pick(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the existing selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend the existing selection")); } @@ -346,8 +348,8 @@ static int face_select_all_exec(bContext *C, wmOperator *op) void PAINT_OT_face_select_all(wmOperatorType *ot) { - ot->name= "Face Selection"; - ot->description= "Change selection for all faces"; + ot->name= _("Face Selection"); + ot->description= _("Change selection for all faces"); ot->idname= "PAINT_OT_face_select_all"; ot->exec= face_select_all_exec; @@ -369,8 +371,8 @@ static int face_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void PAINT_OT_face_select_inverse(wmOperatorType *ot) { - ot->name= "Face Select Invert"; - ot->description= "Invert selection of faces"; + ot->name= _("Face Select Invert"); + ot->description= _("Invert selection of faces"); ot->idname= "PAINT_OT_face_select_inverse"; ot->exec= face_select_inverse_exec; @@ -390,8 +392,8 @@ static int face_select_hide_exec(bContext *C, wmOperator *op) void PAINT_OT_face_select_hide(wmOperatorType *ot) { - ot->name= "Face Select Hide"; - ot->description= "Hide selected faces"; + ot->name= _("Face Select Hide"); + ot->description= _("Hide selected faces"); ot->idname= "PAINT_OT_face_select_hide"; ot->exec= face_select_hide_exec; @@ -399,7 +401,7 @@ void PAINT_OT_face_select_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected objects.")); } static int face_select_reveal_exec(bContext *C, wmOperator *UNUSED(op)) @@ -412,8 +414,8 @@ static int face_select_reveal_exec(bContext *C, wmOperator *UNUSED(op)) void PAINT_OT_face_select_reveal(wmOperatorType *ot) { - ot->name= "Face Select Reveal"; - ot->description= "Reveal hidden faces"; + ot->name= _("Face Select Reveal"); + ot->description= _("Reveal hidden faces"); ot->idname= "PAINT_OT_face_select_reveal"; ot->exec= face_select_reveal_exec; @@ -421,5 +423,5 @@ void PAINT_OT_face_select_reveal(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected objects.")); } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 3da19ba7346..8f4458ff72a 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -48,6 +48,8 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" @@ -946,7 +948,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event) void PAINT_OT_weight_sample(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weight Paint Sample Weight"; + ot->name= _("Weight Paint Sample Weight"); ot->idname= "PAINT_OT_weight_sample"; /* api callbacks */ @@ -1044,7 +1046,7 @@ void PAINT_OT_weight_sample_group(wmOperatorType *ot) PropertyRNA *prop= NULL; /* identifiers */ - ot->name= "Weight Paint Sample Group"; + ot->name= _("Weight Paint Sample Group"); ot->idname= "PAINT_OT_weight_sample_group"; /* api callbacks */ @@ -1056,7 +1058,7 @@ void PAINT_OT_weight_sample_group(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* keyingset to use (dynamic enum) */ - prop= RNA_def_enum(ot->srna, "group", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use"); + prop= RNA_def_enum(ot->srna, "group", DummyRNA_DEFAULT_items, 0, _("Keying Set"), _("The Keying Set to use")); RNA_def_enum_funcs(prop, weight_paint_sample_enum_itemf); ot->prop= prop; } @@ -1203,7 +1205,7 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weight Paint Mode"; + ot->name= _("Weight Paint Mode"); ot->idname= "PAINT_OT_weight_paint_toggle"; /* api callbacks */ @@ -1611,7 +1613,7 @@ void PAINT_OT_weight_paint(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weight Paint"; + ot->name= _("Weight Paint"); ot->idname= "PAINT_OT_weight_paint"; /* api callbacks */ @@ -1624,7 +1626,7 @@ void PAINT_OT_weight_paint(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; - RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); + RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, _("Stroke"), ""); } static int weight_paint_set_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1640,7 +1642,7 @@ static int weight_paint_set_exec(bContext *C, wmOperator *UNUSED(op)) void PAINT_OT_weight_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Weight"; + ot->name= _("Set Weight"); ot->idname= "PAINT_OT_weight_set"; /* api callbacks */ @@ -1702,7 +1704,7 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Vertex Paint Mode"; + ot->name= _("Vertex Paint Mode"); ot->idname= "PAINT_OT_vertex_paint_toggle"; /* api callbacks */ @@ -1910,7 +1912,7 @@ static int vpaint_cancel(bContext *C, wmOperator *op) void PAINT_OT_vertex_paint(wmOperatorType *ot) { /* identifiers */ - ot->name= "Vertex Paint"; + ot->name= _("Vertex Paint"); ot->idname= "PAINT_OT_vertex_paint"; /* api callbacks */ @@ -1923,7 +1925,7 @@ void PAINT_OT_vertex_paint(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; - RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); + RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, _("Stroke"), ""); } /* ********************** weight from bones operator ******************* */ @@ -1954,12 +1956,12 @@ static int weight_from_bones_exec(bContext *C, wmOperator *op) void PAINT_OT_weight_from_bones(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { - {ARM_GROUPS_AUTO, "AUTOMATIC", 0, "Automatic", "Automatic weights froms bones"}, - {ARM_GROUPS_ENVELOPE, "ENVELOPES", 0, "From Envelopes", "Weights from envelopes with user defined radius"}, + {ARM_GROUPS_AUTO, "AUTOMATIC", 0, N_("Automatic"), N_("Automatic weights froms bones")}, + {ARM_GROUPS_ENVELOPE, "ENVELOPES", 0, N_("From Envelopes"), N_("Weights from envelopes with user defined radius")}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Weight from Bones"; + ot->name= _("Weight from Bones"); ot->idname= "PAINT_OT_weight_from_bones"; /* api callbacks */ @@ -1971,6 +1973,6 @@ void PAINT_OT_weight_from_bones(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights."); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(type_items), 0, _("Type"), _("Method to use for assigning weights.")); } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index be985342ea8..b05a67c9e06 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -47,6 +47,8 @@ #include "BLI_editVert.h" #include "BLI_rand.h" +#include "BLF_api.h" + #include "DNA_meshdata_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -3580,14 +3582,14 @@ static int sculpt_brush_stroke_cancel(bContext *C, wmOperator *op) static void SCULPT_OT_brush_stroke(wmOperatorType *ot) { static EnumPropertyItem stroke_mode_items[] = { - {BRUSH_STROKE_NORMAL, "NORMAL", 0, "Normal", "Apply brush normally"}, - {BRUSH_STROKE_INVERT, "INVERT", 0, "Invert", "Invert action of brush for duration of stroke"}, - {BRUSH_STROKE_SMOOTH, "SMOOTH", 0, "Smooth", "Switch brush to smooth mode for duration of stroke"}, + {BRUSH_STROKE_NORMAL, "NORMAL", 0, N_("Normal"), N_("Apply brush normally")}, + {BRUSH_STROKE_INVERT, "INVERT", 0, N_("Invert"), N_("Invert action of brush for duration of stroke")}, + {BRUSH_STROKE_SMOOTH, "SMOOTH", 0, N_("Smooth"), N_("Switch brush to smooth mode for duration of stroke")}, {0} }; /* identifiers */ - ot->name= "Sculpt Mode"; + ot->name= _("Sculpt Mode"); ot->idname= "SCULPT_OT_brush_stroke"; /* api callbacks */ @@ -3603,15 +3605,15 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot) /* properties */ RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, - "Stroke", ""); + _("Stroke"), ""); - RNA_def_enum(ot->srna, "mode", stroke_mode_items, BRUSH_STROKE_NORMAL, - "Sculpt Stroke Mode", - "Action taken when a sculpt stroke is made"); + RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(stroke_mode_items), BRUSH_STROKE_NORMAL, + _("Sculpt Stroke Mode"), + _("Action taken when a sculpt stroke is made")); RNA_def_boolean(ot->srna, "ignore_background_click", 0, - "Ignore Background Click", - "Clicks on the background do not start the stroke"); + _("Ignore Background Click"), + _("Clicks on the background do not start the stroke")); } /**** Reset the copy of the mesh that is being sculpted on (currently just for the layer brush) ****/ @@ -3632,7 +3634,7 @@ static int sculpt_set_persistent_base(bContext *C, wmOperator *UNUSED(op)) static void SCULPT_OT_set_persistent_base(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Persistent Base"; + ot->name= _("Set Persistent Base"); ot->idname= "SCULPT_OT_set_persistent_base"; /* api callbacks */ @@ -3710,7 +3712,7 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op)) static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sculpt Mode"; + ot->name= _("Sculpt Mode"); ot->idname= "SCULPT_OT_sculptmode_toggle"; /* api callbacks */ diff --git a/source/blender/editors/sound/CMakeLists.txt b/source/blender/editors/sound/CMakeLists.txt index f66288812ad..2b3209659fa 100644 --- a/source/blender/editors/sound/CMakeLists.txt +++ b/source/blender/editors/sound/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/sound/SConscript b/source/blender/editors/sound/SConscript index e17bccdadd9..e69b27763fd 100644 --- a/source/blender/editors/sound/SConscript +++ b/source/blender/editors/sound/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc' incs += ' ../../makesrna ../../blenloader' incs += ' #/intern/audaspace/intern' diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index b7e8fee922b..607746f7c4f 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -41,6 +41,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_packedFile_types.h" #include "DNA_scene_types.h" #include "DNA_space_types.h" @@ -161,8 +163,8 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) void SOUND_OT_open(wmOperatorType *ot) { /* identifiers */ - ot->name= "Open Sound"; - ot->description= "Load a sound file"; + ot->name= _("Open Sound"); + ot->description= _("Load a sound file"); ot->idname= "SOUND_OT_open"; /* api callbacks */ @@ -174,7 +176,7 @@ void SOUND_OT_open(wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH); - RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory."); + RNA_def_boolean(ot->srna, "cache", FALSE, _("Cache"), _("Cache the sound in memory.")); } /* ******************************************************* */ diff --git a/source/blender/editors/space_action/CMakeLists.txt b/source/blender/editors/space_action/CMakeLists.txt index edebaa8273a..c2e9deca9ac 100644 --- a/source/blender/editors/space_action/CMakeLists.txt +++ b/source/blender/editors/space_action/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/space_action/SConscript b/source/blender/editors/space_action/SConscript index 0fee8ff68ab..e4cec8e70ef 100644 --- a/source/blender/editors/space_action/SConscript +++ b/source/blender/editors/space_action/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader' env.BlenderLib ( 'bf_editors_space_action', sources, Split(incs), [], libtype=['core'], priority=[40] ) diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index b30db6680e5..1511fc26cdb 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -42,6 +42,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_gpencil_types.h" #include "DNA_object_types.h" @@ -126,9 +128,9 @@ static int act_new_exec(bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_new (wmOperatorType *ot) { /* identifiers */ - ot->name= "New Action"; + ot->name= _("New Action"); ot->idname= "ACTION_OT_new"; - ot->description= "Create new action"; + ot->description= _("Create new action"); /* api callbacks */ ot->exec= act_new_exec; @@ -209,9 +211,9 @@ static int act_markers_make_local_exec (bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_markers_make_local (wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Markers Local"; + ot->name= _("Make Markers Local"); ot->idname= "ACTION_OT_markers_make_local"; - ot->description= "Move selected scene markers to the active Action as local 'pose' markers"; + ot->description= _("Move selected scene markers to the active Action as local 'pose' markers"); /* callbacks */ ot->exec = act_markers_make_local_exec; @@ -310,9 +312,9 @@ static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_previewrange_set (wmOperatorType *ot) { /* identifiers */ - ot->name= "Auto-Set Preview Range"; + ot->name= _("Auto-Set Preview Range"); ot->idname= "ACTION_OT_previewrange_set"; - ot->description= "Set Preview Range based on extents of selected Keyframes"; + ot->description= _("Set Preview Range based on extents of selected Keyframes"); /* api callbacks */ ot->exec= actkeys_previewrange_exec; @@ -372,9 +374,9 @@ static int actkeys_viewsel_exec(bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_view_all (wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; + ot->name= _("View All"); ot->idname= "ACTION_OT_view_all"; - ot->description= "Reset viewable area to show full keyframe range"; + ot->description= _("Reset viewable area to show full keyframe range"); /* api callbacks */ ot->exec= actkeys_viewall_exec; @@ -387,9 +389,9 @@ void ACTION_OT_view_all (wmOperatorType *ot) void ACTION_OT_view_selected (wmOperatorType *ot) { /* identifiers */ - ot->name= "View Selected"; + ot->name= _("View Selected"); ot->idname= "ACTION_OT_view_selected"; - ot->description= "Reset viewable area to show selected keyframes range"; + ot->description= _("Reset viewable area to show selected keyframes range"); /* api callbacks */ ot->exec= actkeys_viewsel_exec; @@ -473,9 +475,9 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) void ACTION_OT_copy (wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Keyframes"; + ot->name= _("Copy Keyframes"); ot->idname= "ACTION_OT_copy"; - ot->description= "Copy selected keyframes to the copy/paste buffer"; + ot->description= _("Copy selected keyframes to the copy/paste buffer"); /* api callbacks */ // ot->invoke= WM_operator_props_popup; // better wait for graph redo panel @@ -524,9 +526,9 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) void ACTION_OT_paste (wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste Keyframes"; + ot->name= _("Paste Keyframes"); ot->idname= "ACTION_OT_paste"; - ot->description= "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame"; + ot->description= _("Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame"); /* api callbacks */ ot->exec= actkeys_paste_exec; @@ -535,17 +537,17 @@ void ACTION_OT_paste (wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys"); - RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merking pasted keys and existing"); + RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, _("Offset"), _("Paste time offset of keys")); + RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, _("Type"), _("Method of merking pasted keys and existing")); } /* ******************** Insert Keyframes Operator ************************* */ /* defines for insert keyframes tool */ static EnumPropertyItem prop_actkeys_insertkey_types[] = { - {1, "ALL", 0, "All Channels", ""}, - {2, "SEL", 0, "Only Selected Channels", ""}, - {3, "GROUP", 0, "In Active Group", ""}, // xxx not in all cases + {1, "ALL", 0, N_("All Channels"), ""}, + {2, "SEL", 0, N_("Only Selected Channels"), ""}, + {3, "GROUP", 0, N_("In Active Group"), ""}, // xxx not in all cases {0, NULL, 0, NULL, NULL} }; @@ -623,9 +625,9 @@ static int actkeys_insertkey_exec(bContext *C, wmOperator *op) void ACTION_OT_keyframe_insert (wmOperatorType *ot) { /* identifiers */ - ot->name= "Insert Keyframes"; + ot->name= _("Insert Keyframes"); ot->idname= "ACTION_OT_keyframe_insert"; - ot->description= "Insert keyframes for the specified channels"; + ot->description= _("Insert keyframes for the specified channels"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -636,7 +638,7 @@ void ACTION_OT_keyframe_insert (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_actkeys_insertkey_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_actkeys_insertkey_types), 0, _("Type"), ""); } /* ******************** Duplicate Keyframes Operator ************************* */ @@ -698,9 +700,9 @@ static int actkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED void ACTION_OT_duplicate (wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Keyframes"; + ot->name= _("Duplicate Keyframes"); ot->idname= "ACTION_OT_duplicate"; - ot->description= "Make a copy of all selected keyframes"; + ot->description= _("Make a copy of all selected keyframes"); /* api callbacks */ ot->invoke= actkeys_duplicate_invoke; @@ -711,7 +713,7 @@ void ACTION_OT_duplicate (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); } /* ******************** Delete Keyframes Operator ************************* */ @@ -775,9 +777,9 @@ static int actkeys_delete_exec(bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_delete (wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Keyframes"; + ot->name= _("Delete Keyframes"); ot->idname= "ACTION_OT_delete"; - ot->description= "Remove all selected keyframes"; + ot->description= _("Remove all selected keyframes"); /* api callbacks */ ot->invoke= WM_operator_confirm; @@ -839,9 +841,9 @@ static int actkeys_clean_exec(bContext *C, wmOperator *op) void ACTION_OT_clean (wmOperatorType *ot) { /* identifiers */ - ot->name= "Clean Keyframes"; + ot->name= _("Clean Keyframes"); ot->idname= "ACTION_OT_clean"; - ot->description= "Simplify F-Curves by removing closely spaced keyframes"; + ot->description= _("Simplify F-Curves by removing closely spaced keyframes"); /* api callbacks */ //ot->invoke= // XXX we need that number popup for this! @@ -852,7 +854,7 @@ void ACTION_OT_clean (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f); + ot->prop= RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, _("Threshold"), "", 0.0f, 1000.0f); } /* ******************** Sample Keyframes Operator *********************** */ @@ -903,9 +905,9 @@ static int actkeys_sample_exec(bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_sample (wmOperatorType *ot) { /* identifiers */ - ot->name= "Sample Keyframes"; + ot->name= _("Sample Keyframes"); ot->idname= "ACTION_OT_sample"; - ot->description= "Add keyframes on every frame between the selected keyframes"; + ot->description= _("Add keyframes on every frame between the selected keyframes"); /* api callbacks */ ot->exec= actkeys_sample_exec; @@ -922,8 +924,8 @@ void ACTION_OT_sample (wmOperatorType *ot) /* defines for set extrapolation-type for selected keyframes tool */ static EnumPropertyItem prop_actkeys_expo_types[] = { - {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""}, - {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""}, + {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, N_("Constant Extrapolation"), ""}, + {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, N_("Linear Extrapolation"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -979,9 +981,9 @@ static int actkeys_expo_exec(bContext *C, wmOperator *op) void ACTION_OT_extrapolation_type (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Keyframe Extrapolation"; + ot->name= _("Set Keyframe Extrapolation"); ot->idname= "ACTION_OT_extrapolation_type"; - ot->description= "Set extrapolation mode for selected F-Curves"; + ot->description= _("Set extrapolation mode for selected F-Curves"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -992,7 +994,7 @@ void ACTION_OT_extrapolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_actkeys_expo_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_actkeys_expo_types), 0, _("Type"), ""); } /* ******************** Set Interpolation-Type Operator *********************** */ @@ -1050,9 +1052,9 @@ static int actkeys_ipo_exec(bContext *C, wmOperator *op) void ACTION_OT_interpolation_type (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Keyframe Interpolation"; + ot->name= _("Set Keyframe Interpolation"); ot->idname= "ACTION_OT_interpolation_type"; - ot->description= "Set interpolation mode for the F-Curve segments starting from the selected keyframes"; + ot->description= _("Set interpolation mode for the F-Curve segments starting from the selected keyframes"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1063,18 +1065,18 @@ void ACTION_OT_interpolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(beztriple_interpolation_mode_items), 0, _("Type"), ""); } /* ******************** Set Handle-Type Operator *********************** */ static EnumPropertyItem actkeys_handle_type_items[] = { - {HD_FREE, "FREE", 0, "Free", ""}, - {HD_VECT, "VECTOR", 0, "Vector", ""}, - {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, + {HD_FREE, "FREE", 0, N_("Free"), ""}, + {HD_VECT, "VECTOR", 0, N_("Vector"), ""}, + {HD_ALIGN, "ALIGNED", 0, N_("Aligned"), ""}, {0, "", 0, "", ""}, - {HD_AUTO, "AUTO", 0, "Auto", "Handles that are automatically adjusted upon moving the keyframe"}, - {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot"}, + {HD_AUTO, "AUTO", 0, N_("Auto"), N_("Handles that are automatically adjusted upon moving the keyframe")}, + {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, N_("Auto Clamped"), N_("Auto handles clamped to not overshoot")}, {0, NULL, 0, NULL, NULL}}; /* ------------------- */ @@ -1147,9 +1149,9 @@ static int actkeys_handletype_exec(bContext *C, wmOperator *op) void ACTION_OT_handle_type (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Keyframe Handle Type"; + ot->name= _("Set Keyframe Handle Type"); ot->idname= "ACTION_OT_handle_type"; - ot->description= "Set type of handle for selected keyframes"; + ot->description= _("Set type of handle for selected keyframes"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1160,7 +1162,7 @@ void ACTION_OT_handle_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", actkeys_handle_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(actkeys_handle_type_items), 0, _("Type"), ""); } /* ******************** Set Keyframe-Type Operator *********************** */ @@ -1218,9 +1220,9 @@ static int actkeys_keytype_exec(bContext *C, wmOperator *op) void ACTION_OT_keyframe_type (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Keyframe Type"; + ot->name= _("Set Keyframe Type"); ot->idname= "ACTION_OT_keyframe_type"; - ot->description= "Set type of keyframe for the selected keyframes"; + ot->description= _("Set type of keyframe for the selected keyframes"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1231,7 +1233,7 @@ void ACTION_OT_keyframe_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", beztriple_keyframe_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(beztriple_keyframe_type_items), 0, _("Type"), ""); } /* ************************************************************************** */ @@ -1286,9 +1288,9 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_frame_jump (wmOperatorType *ot) { /* identifiers */ - ot->name= "Jump to Frame"; + ot->name= _("Jump to Frame"); ot->idname= "ACTION_OT_frame_jump"; - ot->description= "Set the current frame to the average frame of the selected keyframes"; + ot->description= _("Set the current frame to the average frame of the selected keyframes"); /* api callbacks */ ot->exec= actkeys_framejump_exec; @@ -1302,10 +1304,10 @@ void ACTION_OT_frame_jump (wmOperatorType *ot) /* defines for snap keyframes tool */ static EnumPropertyItem prop_actkeys_snap_types[] = { - {ACTKEYS_SNAP_CFRA, "CFRA", 0, "Current frame", ""}, - {ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry? - {ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry? - {ACTKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""}, + {ACTKEYS_SNAP_CFRA, "CFRA", 0, N_("Current frame"), ""}, + {ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, N_("Nearest Frame"), ""}, // XXX as single entry? + {ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, N_("Nearest Second"), ""}, // XXX as single entry? + {ACTKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, N_("Nearest Marker"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1382,9 +1384,9 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op) void ACTION_OT_snap (wmOperatorType *ot) { /* identifiers */ - ot->name= "Snap Keys"; + ot->name= _("Snap Keys"); ot->idname= "ACTION_OT_snap"; - ot->description= "Snap selected keyframes to the times specified"; + ot->description= _("Snap selected keyframes to the times specified"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1395,16 +1397,16 @@ void ACTION_OT_snap (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_actkeys_snap_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_actkeys_snap_types), 0, _("Type"), ""); } /* ******************** Mirror Keyframes Operator *********************** */ /* defines for mirror keyframes tool */ static EnumPropertyItem prop_actkeys_mirror_types[] = { - {ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", ""}, - {ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", ""}, - {ACTKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", ""}, + {ACTKEYS_MIRROR_CFRA, "CFRA", 0, N_("By Times over Current frame"), ""}, + {ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, N_("By Values over Value=0"), ""}, + {ACTKEYS_MIRROR_MARKER, "MARKER", 0, N_("By Times over First Selected Marker"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1492,9 +1494,9 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op) void ACTION_OT_mirror (wmOperatorType *ot) { /* identifiers */ - ot->name= "Mirror Keys"; + ot->name= _("Mirror Keys"); ot->idname= "ACTION_OT_mirror"; - ot->description= "Flip selected keyframes over the selected mirror line"; + ot->description= _("Flip selected keyframes over the selected mirror line"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1505,7 +1507,7 @@ void ACTION_OT_mirror (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_actkeys_mirror_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_actkeys_mirror_types), 0, _("Type"), ""); } /* ************************************************************************** */ diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index 6c3f80cda41..bb1e5c1012a 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -39,6 +39,8 @@ #include "BLI_blenlib.h" +#include "BLF_api.h" + #include "ED_anim_api.h" #include "ED_transform.h" @@ -93,7 +95,7 @@ void ED_operatormacros_action(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot= WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("ACTION_OT_duplicate_move", _("Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER); if (ot) { WM_operatortype_macro_define(ot, "ACTION_OT_duplicate"); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform"); diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 4d0043913ab..2a8af567be0 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -41,6 +41,8 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_gpencil_types.h" #include "DNA_object_types.h" @@ -163,9 +165,9 @@ static int actkeys_deselectall_exec(bContext *C, wmOperator *op) void ACTION_OT_select_all_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select All"; + ot->name= _("Select All"); ot->idname= "ACTION_OT_select_all_toggle"; - ot->description= "Toggle selection of all keyframes"; + ot->description= _("Toggle selection of all keyframes"); /* api callbacks */ ot->exec= actkeys_deselectall_exec; @@ -175,7 +177,7 @@ void ACTION_OT_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + ot->prop= RNA_def_boolean(ot->srna, "invert", 0, _("Invert"), ""); } /* ******************** Border Select Operator **************************** */ @@ -324,9 +326,9 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op) void ACTION_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; + ot->name= _("Border Select"); ot->idname= "ACTION_OT_select_border"; - ot->description= "Select all keyframes within the specified region"; + ot->description= _("Select all keyframes within the specified region"); /* api callbacks */ ot->invoke= WM_border_select_invoke; @@ -342,7 +344,7 @@ void ACTION_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, FALSE); - ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); + ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, _("Axis Range"), ""); } /* ******************** Column Select Operator **************************** */ @@ -355,10 +357,10 @@ void ACTION_OT_select_border(wmOperatorType *ot) /* defines for column-select mode */ static EnumPropertyItem prop_column_select_types[] = { - {ACTKEYS_COLUMNSEL_KEYS, "KEYS", 0, "On Selected Keyframes", ""}, - {ACTKEYS_COLUMNSEL_CFRA, "CFRA", 0, "On Current Frame", ""}, - {ACTKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, "On Selected Markers", ""}, - {ACTKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", 0, "Between Min/Max Selected Markers", ""}, + {ACTKEYS_COLUMNSEL_KEYS, "KEYS", 0, N_("On Selected Keyframes"), ""}, + {ACTKEYS_COLUMNSEL_CFRA, "CFRA", 0, N_("On Current Frame"), ""}, + {ACTKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, N_("On Selected Markers"), ""}, + {ACTKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", 0, N_("Between Min/Max Selected Markers"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -530,9 +532,9 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op) void ACTION_OT_select_column (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select All"; + ot->name= _("Select All"); ot->idname= "ACTION_OT_select_column"; - ot->description= "Select all keyframes on the specified frame(s)"; + ot->description= _("Select all keyframes on the specified frame(s)"); /* api callbacks */ ot->exec= actkeys_columnselect_exec; @@ -542,7 +544,7 @@ void ACTION_OT_select_column (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", ""); + ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_column_select_types), 0, _("Mode"), ""); } /* ******************** Select Linked Operator *********************** */ @@ -588,9 +590,9 @@ static int actkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_select_linked (wmOperatorType *ot) { /* identifiers */ - ot->name = "Select Linked"; + ot->name = _("Select Linked"); ot->idname= "ACTION_OT_select_linked"; - ot->description = "Select keyframes occurring the same F-Curves as selected ones"; + ot->description = _("Select keyframes occurring the same F-Curves as selected ones"); /* api callbacks */ ot->exec= actkeys_select_linked_exec; @@ -665,9 +667,9 @@ static int actkeys_select_more_exec (bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_select_more (wmOperatorType *ot) { /* identifiers */ - ot->name = "Select More"; + ot->name = _("Select More"); ot->idname= "ACTION_OT_select_more"; - ot->description = "Select keyframes beside already selected ones"; + ot->description = _("Select keyframes beside already selected ones"); /* api callbacks */ ot->exec= actkeys_select_more_exec; @@ -699,9 +701,9 @@ static int actkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op)) void ACTION_OT_select_less (wmOperatorType *ot) { /* identifiers */ - ot->name = "Select Less"; + ot->name = _("Select Less"); ot->idname= "ACTION_OT_select_less"; - ot->description = "Deselect keyframes on ends of selection islands"; + ot->description = _("Deselect keyframes on ends of selection islands"); /* api callbacks */ ot->exec= actkeys_select_less_exec; @@ -716,9 +718,9 @@ void ACTION_OT_select_less (wmOperatorType *ot) /* defines for left-right select tool */ static EnumPropertyItem prop_actkeys_leftright_select_types[] = { - {ACTKEYS_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""}, - {ACTKEYS_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""}, - {ACTKEYS_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""}, + {ACTKEYS_LRSEL_TEST, "CHECK", 0, N_("Check if Select Left or Right"), ""}, + {ACTKEYS_LRSEL_LEFT, "LEFT", 0, N_("Before current frame"), ""}, + {ACTKEYS_LRSEL_RIGHT, "RIGHT", 0, N_("After current frame"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -865,9 +867,9 @@ static int actkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent void ACTION_OT_select_leftright (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Left/Right"; + ot->name= _("Select Left/Right"); ot->idname= "ACTION_OT_select_leftright"; - ot->description= "Select keyframes to the left or the right of the current frame"; + ot->description= _("Select keyframes to the left or the right of the current frame"); /* api callbacks */ ot->invoke= actkeys_select_leftright_invoke; @@ -878,8 +880,8 @@ void ACTION_OT_select_leftright (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "mode", prop_actkeys_leftright_select_types, ACTKEYS_LRSEL_TEST, "Mode", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); + ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_actkeys_leftright_select_types), ACTKEYS_LRSEL_TEST, _("Mode"), ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); } /* ******************** Mouse-Click Select Operator *********************** */ @@ -1184,9 +1186,9 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even void ACTION_OT_clickselect (wmOperatorType *ot) { /* identifiers */ - ot->name= "Mouse Select Keys"; + ot->name= _("Mouse Select Keys"); ot->idname= "ACTION_OT_clickselect"; - ot->description= "Select keyframes by clicking on them"; + ot->description= _("Select keyframes by clicking on them"); /* api callbacks - absolutely no exec() this yet... */ ot->invoke= actkeys_clickselect_invoke; @@ -1196,8 +1198,8 @@ void ACTION_OT_clickselect (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY - RNA_def_boolean(ot->srna, "column", 0, "Column Select", ""); // ALTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "column", 0, _("Column Select"), ""); // ALTKEY } /* ************************************************************************** */ diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt index 631e2adea34..a9aaf6a6d58 100644 --- a/source/blender/editors/space_buttons/CMakeLists.txt +++ b/source/blender/editors/space_buttons/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/space_buttons/SConscript b/source/blender/editors/space_buttons/SConscript index a4270f1f59a..740353bc1f0 100644 --- a/source/blender/editors/space_buttons/SConscript +++ b/source/blender/editors/space_buttons/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../../render/extern/include ../../blenloader' diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 99e5c6d693e..346531b2b11 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -43,6 +43,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_main.h" @@ -83,8 +85,8 @@ static int toolbox_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(e void BUTTONS_OT_toolbox(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toolbox"; - ot->description="Display button panel toolbox"; + ot->name= _("Toolbox"); + ot->description=_("Display button panel toolbox"); ot->idname= "BUTTONS_OT_toolbox"; /* api callbacks */ @@ -216,8 +218,8 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event) void BUTTONS_OT_file_browse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Accept"; - ot->description="Open a file browser, Hold Shift to open the file, Alt to browse containing directory"; + ot->name= _("Accept"); + ot->description=_("Open a file browser, Hold Shift to open the file, Alt to browse containing directory"); ot->idname= "BUTTONS_OT_file_browse"; /* api callbacks */ @@ -233,8 +235,8 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot) void BUTTONS_OT_directory_browse(wmOperatorType *ot) { /* identifiers */ - ot->name= "Accept"; - ot->description="Open a directory browser, Hold Shift to open the file, Alt to browse containing directory"; + ot->name= _("Accept"); + ot->description=_("Open a directory browser, Hold Shift to open the file, Alt to browse containing directory"); ot->idname= "BUTTONS_OT_directory_browse"; /* api callbacks */ diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 3effea296d7..b837b58e83e 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -40,6 +40,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_text.h" /* only for character utility funcs */ @@ -348,8 +350,8 @@ static int move_exec(bContext *C, wmOperator *op) void CONSOLE_OT_move(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Cursor"; - ot->description= "Move cursor position"; + ot->name= _("Move Cursor"); + ot->description= _("Move cursor position"); ot->idname= "CONSOLE_OT_move"; /* api callbacks */ @@ -357,7 +359,7 @@ void CONSOLE_OT_move(wmOperatorType *ot) ot->poll= ED_operator_console_active; /* properties */ - RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to."); + RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, _("Type"), _("Where to move cursor to.")); } #define TAB_LENGTH 4 @@ -417,8 +419,8 @@ static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event) void CONSOLE_OT_insert(wmOperatorType *ot) { /* identifiers */ - ot->name= "Insert"; - ot->description= "Insert text at cursor position"; + ot->name= _("Insert"); + ot->description= _("Insert text at cursor position"); ot->idname= "CONSOLE_OT_insert"; /* api callbacks */ @@ -427,7 +429,7 @@ void CONSOLE_OT_insert(wmOperatorType *ot) ot->poll= ED_operator_console_active; /* properties */ - RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); + RNA_def_string(ot->srna, "text", "", 0, _("Text"), _("Text to insert at the cursor position.")); } @@ -486,8 +488,8 @@ static int delete_exec(bContext *C, wmOperator *op) void CONSOLE_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete"; - ot->description= "Delete text by cursor position"; + ot->name= _("Delete"); + ot->description= _("Delete text by cursor position"); ot->idname= "CONSOLE_OT_delete"; /* api callbacks */ @@ -495,7 +497,7 @@ void CONSOLE_OT_delete(wmOperatorType *ot) ot->poll= ED_operator_console_active; /* properties */ - RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete."); + RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, _("Type"), _("Which part of the text to delete.")); } @@ -529,8 +531,8 @@ static int clear_exec(bContext *C, wmOperator *op) void CONSOLE_OT_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear"; - ot->description= "Clear text by type"; + ot->name= _("Clear"); + ot->description= _("Clear text by type"); ot->idname= "CONSOLE_OT_clear"; /* api callbacks */ @@ -538,8 +540,8 @@ void CONSOLE_OT_clear(wmOperatorType *ot) ot->poll= ED_operator_console_active; /* properties */ - RNA_def_boolean(ot->srna, "scrollback", 1, "Scrollback", "Clear the scrollback history"); - RNA_def_boolean(ot->srna, "history", 0, "History", "Clear the command history"); + RNA_def_boolean(ot->srna, "scrollback", 1, _("Scrollback"), _("Clear the scrollback history")); + RNA_def_boolean(ot->srna, "history", 0, _("History"), _("Clear the command history")); } @@ -595,8 +597,8 @@ static int history_cycle_exec(bContext *C, wmOperator *op) void CONSOLE_OT_history_cycle(wmOperatorType *ot) { /* identifiers */ - ot->name= "History Cycle"; - ot->description= "Cycle through history"; + ot->name= _("History Cycle"); + ot->description= _("Cycle through history"); ot->idname= "CONSOLE_OT_history_cycle"; /* api callbacks */ @@ -604,7 +606,7 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot) ot->poll= ED_operator_console_active; /* properties */ - RNA_def_boolean(ot->srna, "reverse", 0, "Reverse", "reverse cycle history"); + RNA_def_boolean(ot->srna, "reverse", 0, _("Reverse"), _("reverse cycle history")); } @@ -643,8 +645,8 @@ static int history_append_exec(bContext *C, wmOperator *op) void CONSOLE_OT_history_append(wmOperatorType *ot) { /* identifiers */ - ot->name= "History Append"; - ot->description= "Append history at cursor position"; + ot->name= _("History Append"); + ot->description= _("Append history at cursor position"); ot->idname= "CONSOLE_OT_history_append"; /* api callbacks */ @@ -652,9 +654,9 @@ void CONSOLE_OT_history_append(wmOperatorType *ot) ot->poll= ED_operator_console_active; /* properties */ - RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); - RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, "Cursor", "The index of the cursor.", 0, 10000); - RNA_def_boolean(ot->srna, "remove_duplicates", 0, "Remove Duplicates", "Remove duplicate items in the history"); + RNA_def_string(ot->srna, "text", "", 0, _("Text"), _("Text to insert at the cursor position.")); + RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, _("Cursor"), _("The index of the cursor."), 0, 10000); + RNA_def_boolean(ot->srna, "remove_duplicates", 0, _("Remove Duplicates"), _("Remove duplicate items in the history")); } @@ -692,8 +694,8 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Scrollback Append"; - ot->description= "Append scrollback text by type"; + ot->name= _("Scrollback Append"); + ot->description= _("Append scrollback text by type"); ot->idname= "CONSOLE_OT_scrollback_append"; /* api callbacks */ @@ -701,8 +703,8 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot) ot->poll= ED_operator_console_active; /* properties */ - RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); - RNA_def_enum(ot->srna, "type", console_line_type_items, CONSOLE_LINE_OUTPUT, "Type", "Console output type."); + RNA_def_string(ot->srna, "text", "", 0, _("Text"), _("Text to insert at the cursor position.")); + RNA_def_enum(ot->srna, "type", console_line_type_items, CONSOLE_LINE_OUTPUT, _("Type"), _("Console output type.")); } @@ -775,8 +777,8 @@ static int copy_exec(bContext *C, wmOperator *UNUSED(op)) void CONSOLE_OT_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy to Clipboard"; - ot->description= "Copy selected text to clipboard"; + ot->name= _("Copy to Clipboard"); + ot->description= _("Copy selected text to clipboard"); ot->idname= "CONSOLE_OT_copy"; /* api callbacks */ @@ -826,8 +828,8 @@ static int paste_exec(bContext *C, wmOperator *UNUSED(op)) void CONSOLE_OT_paste(wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste from Clipboard"; - ot->description= "Paste text from clipboard"; + ot->name= _("Paste from Clipboard"); + ot->description= _("Paste text from clipboard"); ot->idname= "CONSOLE_OT_paste"; /* api callbacks */ @@ -950,9 +952,9 @@ static int console_modal_select_cancel(bContext *C, wmOperator *op) void CONSOLE_OT_select_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Selection"; + ot->name= _("Set Selection"); ot->idname= "CONSOLE_OT_select_set"; - ot->description= "Set the console selection"; + ot->description= _("Set the console selection"); /* api callbacks */ ot->invoke= console_modal_select_invoke; diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 9fecfda7764..2f4d6de0f9f 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -181,7 +181,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) but = uiDefButTextO(block, TEX, "FILE_OT_directory", 0, "", min_x, line1_y, line1_w-chan_offs, btn_h, params->dir, 0.0, (float)FILE_MAX-1, 0, 0, - "File path."); + _("File path.")); uiButSetCompleteFunc(but, autocomplete_directory, NULL); uiButSetFlag(but, UI_BUT_NO_UTF8); @@ -189,7 +189,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) but = uiDefBut(block, TEX, B_FS_FILENAME, "", min_x, line2_y, line2_w-chan_offs, btn_h, params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0, - overwrite_alert ?"File name, overwrite existing." : "File name."); + overwrite_alert ?_("File name, overwrite existing.") : _("File name.")); uiButSetCompleteFunc(but, autocomplete_file, NULL); uiButSetFlag(but, UI_BUT_NO_UTF8); @@ -209,13 +209,13 @@ void file_draw_buttons(const bContext *C, ARegion *ar) but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMOUT, min_x + line2_w + separator - chan_offs, line2_y, btn_fn_w, btn_h, - "Decrement the filename number"); + _("Decrement the filename number")); RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", -1); but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMIN, min_x + line2_w + separator + btn_fn_w - chan_offs, line2_y, btn_fn_w, btn_h, - "Increment the filename number"); + _("Increment the filename number")); RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", 1); uiBlockEndAlign(block); } @@ -226,9 +226,9 @@ void file_draw_buttons(const bContext *C, ARegion *ar) uiDefButO(block, BUT, "FILE_OT_execute", WM_OP_EXEC_REGION_WIN, params->title, max_x - loadbutton, line1_y, loadbutton, btn_h, params->title); - uiDefButO(block, BUT, "FILE_OT_cancel", WM_OP_EXEC_REGION_WIN, "Cancel", + uiDefButO(block, BUT, "FILE_OT_cancel", WM_OP_EXEC_REGION_WIN, _("Cancel"), max_x - loadbutton, line2_y, loadbutton, btn_h, - "Cancel"); + _("Cancel")); } uiEndBlock(C, block); @@ -295,7 +295,7 @@ static void file_draw_icon(uiBlock *block, char *path, int sx, int sy, int icon, static void file_draw_string(int sx, int sy, const char* string, float width, int height, short align) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiFontStyle fs = style->widgetlabel; rcti rect; char fname[FILE_MAXFILE]; diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 77524c7e117..132be9dfbc5 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -44,6 +44,8 @@ #include "BLI_winstuff.h" #endif +#include "BLF_api.h" + #include "ED_screen.h" #include "ED_fileselect.h" @@ -293,8 +295,8 @@ static int file_border_select_exec(bContext *C, wmOperator *op) void FILE_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Activate/Select File"; - ot->description= "Activate/select the file(s) contained in the border"; + ot->name= _("Activate/Select File"); + ot->description= _("Activate/select the file(s) contained in the border"); ot->idname= "FILE_OT_select_border"; /* api callbacks */ @@ -344,8 +346,8 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event) void FILE_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Activate/Select File"; - ot->description= "Activate/select file"; + ot->name= _("Activate/Select File"); + ot->description= _("Activate/select file"); ot->idname= "FILE_OT_select"; /* api callbacks */ @@ -353,8 +355,8 @@ void FILE_OT_select(wmOperatorType *ot) ot->poll= ED_operator_file_active; /* rna */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); - RNA_def_boolean(ot->srna, "fill", 0, "Fill", "Select everything beginning with the last selection."); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend selection instead of deselecting everything first.")); + RNA_def_boolean(ot->srna, "fill", 0, _("Fill"), _("Select everything beginning with the last selection.")); } static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op)) @@ -391,8 +393,8 @@ static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op)) void FILE_OT_select_all_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select/Deselect All Files"; - ot->description= "Select/deselect all files"; + ot->name= _("Select/Deselect All Files"); + ot->description= _("Select/deselect all files"); ot->idname= "FILE_OT_select_all_toggle"; /* api callbacks */ @@ -428,8 +430,8 @@ static int bookmark_select_exec(bContext *C, wmOperator *op) void FILE_OT_select_bookmark(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Directory"; - ot->description= "Select a bookmarked directory"; + ot->name= _("Select Directory"); + ot->description= _("Select a bookmarked directory"); ot->idname= "FILE_OT_select_bookmark"; /* api callbacks */ @@ -461,8 +463,8 @@ static int bookmark_add_exec(bContext *C, wmOperator *UNUSED(op)) void FILE_OT_bookmark_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Bookmark"; - ot->description= "Add a bookmark for the selected/active directory"; + ot->name= _("Add Bookmark"); + ot->description= _("Add a bookmark for the selected/active directory"); ot->idname= "FILE_OT_bookmark_add"; /* api callbacks */ @@ -494,15 +496,15 @@ static int bookmark_delete_exec(bContext *C, wmOperator *op) void FILE_OT_delete_bookmark(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Bookmark"; - ot->description= "Delete selected bookmark"; + ot->name= _("Delete Bookmark"); + ot->description= _("Delete selected bookmark"); ot->idname= "FILE_OT_delete_bookmark"; /* api callbacks */ ot->exec= bookmark_delete_exec; ot->poll= ED_operator_file_active; - RNA_def_int(ot->srna, "index", -1, -1, 20000, "Index", "", -1, 20000); + RNA_def_int(ot->srna, "index", -1, -1, 20000, _("Index"), "", -1, 20000); } int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my) @@ -556,8 +558,8 @@ static int file_highlight_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *e void FILE_OT_highlight(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Highlight File"; - ot->description= "Highlight selected file(s)"; + ot->name= _("Highlight File"); + ot->description= _("Highlight selected file(s)"); ot->idname= "FILE_OT_highlight"; /* api callbacks */ @@ -590,8 +592,8 @@ static int file_operator_poll(bContext *C) void FILE_OT_cancel(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Cancel File Load"; - ot->description= "Cancel loading of selected file"; + ot->name= _("Cancel File Load"); + ot->description= _("Cancel loading of selected file"); ot->idname= "FILE_OT_cancel"; /* api callbacks */ @@ -750,15 +752,15 @@ int file_exec(bContext *C, wmOperator *exec_op) void FILE_OT_execute(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Execute File Window"; - ot->description= "Execute selected file"; + ot->name= _("Execute File Window"); + ot->description= _("Execute selected file"); ot->idname= "FILE_OT_execute"; /* api callbacks */ ot->exec= file_exec; ot->poll= file_operator_poll; - RNA_def_boolean(ot->srna, "need_active", 0, "Need Active", "Only execute if there's an active selected file in the file list."); + RNA_def_boolean(ot->srna, "need_active", 0, _("Need Active"), _("Only execute if there's an active selected file in the file list.")); } @@ -783,8 +785,8 @@ int file_parent_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_parent(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Parent File"; - ot->description= "Move to parent directory"; + ot->name= _("Parent File"); + ot->description= _("Move to parent directory"); ot->idname= "FILE_OT_parent"; /* api callbacks */ @@ -808,8 +810,8 @@ static int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_previous(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Previous Folder"; - ot->description= "Move to previous folder"; + ot->name= _("Previous Folder"); + ot->description= _("Move to previous folder"); ot->idname= "FILE_OT_previous"; /* api callbacks */ @@ -839,8 +841,8 @@ int file_previous_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_next(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Next Folder"; - ot->description= "Move to next folder"; + ot->name= _("Next Folder"); + ot->description= _("Move to next folder"); ot->idname= "FILE_OT_next"; /* api callbacks */ @@ -966,9 +968,9 @@ void FILE_OT_smoothscroll(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth Scroll"; + ot->name= _("Smooth Scroll"); ot->idname= "FILE_OT_smoothscroll"; - ot->description="Smooth scroll to make editable file visible."; + ot->description=_("Smooth scroll to make editable file visible."); /* api callbacks */ ot->invoke= file_smoothscroll_invoke; @@ -1053,8 +1055,8 @@ int file_directory_new_exec(bContext *C, wmOperator *op) void FILE_OT_directory_new(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Create New Directory"; - ot->description= "Create a new directory"; + ot->name= _("Create New Directory"); + ot->description= _("Create a new directory"); ot->idname= "FILE_OT_directory_new"; /* api callbacks */ @@ -1062,7 +1064,7 @@ void FILE_OT_directory_new(struct wmOperatorType *ot) ot->exec= file_directory_new_exec; ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ - RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Name of new directory"); + RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, _("Directory"), _("Name of new directory")); } @@ -1151,8 +1153,8 @@ int file_filename_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_directory(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Enter Directory Name"; - ot->description= "Enter a directory name"; + ot->name= _("Enter Directory Name"); + ot->description= _("Enter a directory name"); ot->idname= "FILE_OT_directory"; /* api callbacks */ @@ -1164,8 +1166,8 @@ void FILE_OT_directory(struct wmOperatorType *ot) void FILE_OT_refresh(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Refresh Filelist"; - ot->description= "Refresh the file list"; + ot->name= _("Refresh Filelist"); + ot->description= _("Refresh the file list"); ot->idname= "FILE_OT_refresh"; /* api callbacks */ @@ -1190,8 +1192,8 @@ static int file_hidedot_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_hidedot(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Hide Dot Files"; - ot->description= "Toggle hide hidden dot files"; + ot->name= _("Toggle Hide Dot Files"); + ot->description= _("Toggle hide hidden dot files"); ot->idname= "FILE_OT_hidedot"; /* api callbacks */ @@ -1240,8 +1242,8 @@ static int file_bookmark_toggle_exec(bContext *C, wmOperator *UNUSED(unused)) void FILE_OT_bookmark_toggle(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Bookmarks"; - ot->description= "Toggle bookmarks display"; + ot->name= _("Toggle Bookmarks"); + ot->description= _("Toggle bookmarks display"); ot->idname= "FILE_OT_bookmark_toggle"; /* api callbacks */ @@ -1270,8 +1272,8 @@ static int file_filenum_exec(bContext *C, wmOperator *op) void FILE_OT_filenum(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Increment Number in Filename"; - ot->description= "Increment number in filename"; + ot->name= _("Increment Number in Filename"); + ot->description= _("Increment number in filename"); ot->idname= "FILE_OT_filenum"; /* api callbacks */ @@ -1279,7 +1281,7 @@ void FILE_OT_filenum(struct wmOperatorType *ot) ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ /* props */ - RNA_def_int(ot->srna, "increment", 1, -100, 100, "Increment", "", -100,100); + RNA_def_int(ot->srna, "increment", 1, -100, 100, _("Increment"), "", -100,100); } static int file_rename_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1324,8 +1326,8 @@ static int file_rename_poll(bContext *C) void FILE_OT_rename(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Rename File or Directory"; - ot->description= "Rename file or file directory"; + ot->name= _("Rename File or Directory"); + ot->description= _("Rename file or file directory"); ot->idname= "FILE_OT_rename"; /* api callbacks */ @@ -1376,8 +1378,8 @@ int file_delete_exec(bContext *C, wmOperator *UNUSED(op)) void FILE_OT_delete(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete File"; - ot->description= "Delete selected file"; + ot->name= _("Delete File"); + ot->description= _("Delete selected file"); ot->idname= "FILE_OT_delete"; /* api callbacks */ diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index 959b1ddf1b5..f3c38836058 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -37,6 +37,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_screen_types.h" #include "DNA_space_types.h" #include "DNA_userdef_types.h" @@ -144,7 +146,7 @@ static void file_panel_bookmarks(const bContext *C, Panel *pa) if(sfile) { row= uiLayoutRow(pa->layout, 0); - uiItemO(row, "Add", ICON_ZOOMIN, "file.bookmark_add"); + uiItemO(row, _("Add"), ICON_ZOOMIN, "file.bookmark_add"); uiItemL(row, NULL, ICON_NONE); file_panel_category(C, pa, FS_CATEGORY_BOOKMARKS, &sfile->bookmarknr, ICON_BOOKMARKS, 1, 0); @@ -205,25 +207,25 @@ void file_panels_register(ARegionType *art) pt= MEM_callocN(sizeof(PanelType), "spacetype file system directories"); strcpy(pt->idname, "FILE_PT_system"); - strcpy(pt->label, "System"); + strcpy(pt->label, _("System")); pt->draw= file_panel_system; BLI_addtail(&art->paneltypes, pt); pt= MEM_callocN(sizeof(PanelType), "spacetype file bookmarks"); strcpy(pt->idname, "FILE_PT_bookmarks"); - strcpy(pt->label, "Bookmarks"); + strcpy(pt->label, _("Bookmarks")); pt->draw= file_panel_bookmarks; BLI_addtail(&art->paneltypes, pt); pt= MEM_callocN(sizeof(PanelType), "spacetype file recent directories"); strcpy(pt->idname, "FILE_PT_recent"); - strcpy(pt->label, "Recent"); + strcpy(pt->label, _("Recent")); pt->draw= file_panel_recent; BLI_addtail(&art->paneltypes, pt); pt= MEM_callocN(sizeof(PanelType), "spacetype file operator properties"); strcpy(pt->idname, "FILE_PT_operator"); - strcpy(pt->label, "Operator"); + strcpy(pt->label, _("Operator")); pt->poll= file_panel_operator_poll; pt->draw_header= file_panel_operator_header; pt->draw= file_panel_operator; diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 6773dfb6b2d..e3cf795140e 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -403,7 +403,7 @@ float file_shorten_string(char* string, float w, int front) float file_string_width(const char* str) { - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiStyleFontSet(&style->widget); return BLF_width(style->widget.uifont_id, str); } @@ -413,12 +413,12 @@ float file_font_pointsize(void) #if 0 float s; char tmp[2] = "X"; - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiStyleFontSet(&style->widget); s = BLF_height(style->widget.uifont_id, tmp); return style->widget.points; #else - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); uiStyleFontSet(&style->widget); return style->widget.points * UI_DPI_FAC; #endif diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt index 80205ad5564..28383b29b36 100644 --- a/source/blender/editors/space_graph/CMakeLists.txt +++ b/source/blender/editors/space_graph/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/space_graph/SConscript b/source/blender/editors/space_graph/SConscript index 75d0927192b..fe8846d2c30 100644 --- a/source/blender/editors/space_graph/SConscript +++ b/source/blender/editors/space_graph/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' #/intern/audaspace/intern ../../blenloader' diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index fb1144b4fa8..f11f530be9e 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -48,6 +48,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_fcurve.h" @@ -760,9 +762,9 @@ static int graph_properties(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_properties(wmOperatorType *ot) { - ot->name= "Properties"; + ot->name= _("Properties"); ot->idname= "GRAPH_OT_properties"; - ot->description= "Toggle display properties panel"; + ot->description= _("Toggle display properties panel"); ot->exec= graph_properties; ot->poll= ED_operator_graphedit_active; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index fe9b3187a65..56e96cf5c07 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -47,6 +47,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -184,9 +186,9 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_previewrange_set (wmOperatorType *ot) { /* identifiers */ - ot->name= "Auto-Set Preview Range"; + ot->name= _("Auto-Set Preview Range"); ot->idname= "GRAPH_OT_previewrange_set"; - ot->description= "Automatically set Preview Range based on range of keyframes"; + ot->description= _("Automatically set Preview Range based on range of keyframes"); /* api callbacks */ ot->exec= graphkeys_previewrange_exec; @@ -246,9 +248,9 @@ static int graphkeys_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_view_all (wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; + ot->name= _("View All"); ot->idname= "GRAPH_OT_view_all"; - ot->description= "Reset viewable area to show full keyframe range"; + ot->description= _("Reset viewable area to show full keyframe range"); /* api callbacks */ ot->exec= graphkeys_viewall_exec; @@ -261,9 +263,9 @@ void GRAPH_OT_view_all (wmOperatorType *ot) void GRAPH_OT_view_selected (wmOperatorType *ot) { /* identifiers */ - ot->name= "View Selected"; + ot->name= _("View Selected"); ot->idname= "GRAPH_OT_view_selected"; - ot->description= "Reset viewable area to show selected keyframe range"; + ot->description= _("Reset viewable area to show selected keyframe range"); /* api callbacks */ ot->exec= graphkeys_view_selected_exec; @@ -376,9 +378,9 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op) void GRAPH_OT_ghost_curves_create (wmOperatorType *ot) { /* identifiers */ - ot->name= "Create Ghost Curves"; + ot->name= _("Create Ghost Curves"); ot->idname= "GRAPH_OT_ghost_curves_create"; - ot->description= "Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor"; + ot->description= _("Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor"); /* api callbacks */ ot->exec= graphkeys_create_ghostcurves_exec; @@ -419,9 +421,9 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Ghost Curves"; + ot->name= _("Clear Ghost Curves"); ot->idname= "GRAPH_OT_ghost_curves_clear"; - ot->description= "Clear F-Curve snapshots (Ghosts) for active Graph Editor"; + ot->description= _("Clear F-Curve snapshots (Ghosts) for active Graph Editor"); /* api callbacks */ ot->exec= graphkeys_clear_ghostcurves_exec; @@ -438,8 +440,8 @@ void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot) /* defines for insert keyframes tool */ static EnumPropertyItem prop_graphkeys_insertkey_types[] = { - {1, "ALL", 0, "All Channels", ""}, - {2, "SEL", 0, "Only Selected Channels", ""}, + {1, "ALL", 0, N_("All Channels"), ""}, + {2, "SEL", 0, N_("Only Selected Channels"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -514,9 +516,9 @@ static int graphkeys_insertkey_exec(bContext *C, wmOperator *op) void GRAPH_OT_keyframe_insert (wmOperatorType *ot) { /* identifiers */ - ot->name= "Insert Keyframes"; + ot->name= _("Insert Keyframes"); ot->idname= "GRAPH_OT_keyframe_insert"; - ot->description= "Insert keyframes for the specified channels"; + ot->description= _("Insert keyframes for the specified channels"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -527,7 +529,7 @@ void GRAPH_OT_keyframe_insert (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_insertkey_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_insertkey_types), 0, "Type", ""); } /* ******************** Click-Insert Keyframes Operator ************************* */ @@ -621,9 +623,9 @@ static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent * void GRAPH_OT_click_insert (wmOperatorType *ot) { /* identifiers */ - ot->name= "Click-Insert Keyframes"; + ot->name= _("Click-Insert Keyframes"); ot->idname= "GRAPH_OT_click_insert"; - ot->description= "Insert new keyframe at the cursor position for the active F-Curve"; + ot->description= _("Insert new keyframe at the cursor position for the active F-Curve"); /* api callbacks */ ot->invoke= graphkeys_click_insert_invoke; @@ -634,8 +636,8 @@ void GRAPH_OT_click_insert (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float(ot->srna, "frame", 1.0f, -FLT_MAX, FLT_MAX, "Frame Number", "Frame to insert keyframe on", 0, 100); - RNA_def_float(ot->srna, "value", 1.0f, -FLT_MAX, FLT_MAX, "Value", "Value for keyframe on", 0, 100); + RNA_def_float(ot->srna, "frame", 1.0f, -FLT_MAX, FLT_MAX, _("Frame Number"), _("Frame to insert keyframe on"), 0, 100); + RNA_def_float(ot->srna, "value", 1.0f, -FLT_MAX, FLT_MAX, _("Value"), _("Value for keyframe on"), 0, 100); } /* ******************** Copy/Paste Keyframes Operator ************************* */ @@ -704,9 +706,9 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op) void GRAPH_OT_copy (wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy Keyframes"; + ot->name= _("Copy Keyframes"); ot->idname= "GRAPH_OT_copy"; - ot->description= "Copy selected keyframes to the copy/paste buffer"; + ot->description= _("Copy selected keyframes to the copy/paste buffer"); /* api callbacks */ ot->exec= graphkeys_copy_exec; @@ -750,9 +752,9 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op) void GRAPH_OT_paste (wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste Keyframes"; + ot->name= _("Paste Keyframes"); ot->idname= "GRAPH_OT_paste"; - ot->description= "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame"; + ot->description= _("Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame"); /* api callbacks */ // ot->invoke= WM_operator_props_popup; // better wait for graph redo panel @@ -762,8 +764,8 @@ void GRAPH_OT_paste (wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys"); - RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merking pasted keys and existing"); + RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, _("Offset"), _("Paste time offset of keys")); + RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, _("Type"), _("Method of merking pasted keys and existing")); } /* ******************** Duplicate Keyframes Operator ************************* */ @@ -819,9 +821,9 @@ static int graphkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUS void GRAPH_OT_duplicate (wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Keyframes"; + ot->name= _("Duplicate Keyframes"); ot->idname= "GRAPH_OT_duplicate"; - ot->description= "Make a copy of all selected keyframes"; + ot->description= _("Make a copy of all selected keyframes"); /* api callbacks */ ot->invoke= graphkeys_duplicate_invoke; @@ -832,7 +834,7 @@ void GRAPH_OT_duplicate (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); } /* ******************** Delete Keyframes Operator ************************* */ @@ -889,9 +891,9 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_delete (wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Keyframes"; + ot->name= _("Delete Keyframes"); ot->idname= "GRAPH_OT_delete"; - ot->description= "Remove all selected keyframes"; + ot->description= _("Remove all selected keyframes"); /* api callbacks */ ot->invoke= WM_operator_confirm; @@ -951,9 +953,9 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op) void GRAPH_OT_clean (wmOperatorType *ot) { /* identifiers */ - ot->name= "Clean Keyframes"; + ot->name= _("Clean Keyframes"); ot->idname= "GRAPH_OT_clean"; - ot->description= "Simplify F-Curves by removing closely spaced keyframes"; + ot->description= _("Simplify F-Curves by removing closely spaced keyframes"); /* api callbacks */ //ot->invoke= // XXX we need that number popup for this! @@ -964,7 +966,7 @@ void GRAPH_OT_clean (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f); + ot->prop= RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, _("Threshold"), "", 0.0f, 1000.0f); } /* ******************** Bake F-Curve Operator *********************** */ @@ -1034,9 +1036,9 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_bake (wmOperatorType *ot) { /* identifiers */ - ot->name= "Bake Curve"; + ot->name= _("Bake Curve"); ot->idname= "GRAPH_OT_bake"; - ot->description= "Bake selected F-Curves to a set of sampled points defining a similar curve"; + ot->description= _("Bake selected F-Curves to a set of sampled points defining a similar curve"); /* api callbacks */ ot->invoke= WM_operator_confirm; // FIXME... @@ -1177,9 +1179,9 @@ static int graphkeys_sound_bake_invoke (bContext *C, wmOperator *op, wmEvent *ev void GRAPH_OT_sound_bake (wmOperatorType *ot) { /* identifiers */ - ot->name= "Bake Sound to F-Curves"; + ot->name= _("Bake Sound to F-Curves"); ot->idname= "GRAPH_OT_sound_bake"; - ot->description= "Bakes a sound wave to selected F-Curves"; + ot->description= _("Bakes a sound wave to selected F-Curves"); /* api callbacks */ ot->invoke= graphkeys_sound_bake_invoke; @@ -1191,15 +1193,15 @@ void GRAPH_OT_sound_bake (wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH); - RNA_def_float(ot->srna, "low", 0.0f, 0.0, 100000.0, "Lowest frequency", "", 0.1, 1000.00); - RNA_def_float(ot->srna, "high", 100000.0, 0.0, 100000.0, "Highest frequency", "", 0.1, 1000.00); - RNA_def_float(ot->srna, "attack", 0.005, 0.0, 2.0, "Attack time", "", 0.01, 0.1); - RNA_def_float(ot->srna, "release", 0.2, 0.0, 5.0, "Release time", "", 0.01, 0.2); - RNA_def_float(ot->srna, "threshold", 0.0, 0.0, 1.0, "Threshold", "", 0.01, 0.1); - RNA_def_boolean(ot->srna, "accumulate", 0, "Accumulate", ""); - RNA_def_boolean(ot->srna, "use_additive", 0, "Additive", ""); - RNA_def_boolean(ot->srna, "square", 0, "Square", ""); - RNA_def_float(ot->srna, "sthreshold", 0.1, 0.0, 1.0, "Square Threshold", "", 0.01, 0.1); + RNA_def_float(ot->srna, "low", 0.0f, 0.0, 100000.0, _("Lowest frequency"), "", 0.1, 1000.00); + RNA_def_float(ot->srna, "high", 100000.0, 0.0, 100000.0, _("Highest frequency"), "", 0.1, 1000.00); + RNA_def_float(ot->srna, "attack", 0.005, 0.0, 2.0, _("Attack time"), "", 0.01, 0.1); + RNA_def_float(ot->srna, "release", 0.2, 0.0, 5.0, _("Release time"), "", 0.01, 0.2); + RNA_def_float(ot->srna, "threshold", 0.0, 0.0, 1.0, _("Threshold"), "", 0.01, 0.1); + RNA_def_boolean(ot->srna, "accumulate", 0, _("Accumulate"), ""); + RNA_def_boolean(ot->srna, "use_additive", 0, _("Additive"), ""); + RNA_def_boolean(ot->srna, "square", 0, _("Square"), ""); + RNA_def_float(ot->srna, "sthreshold", 0.1, 0.0, 1.0, _("Square Threshold"), "", 0.01, 0.1); } /* ******************** Sample Keyframes Operator *********************** */ @@ -1251,9 +1253,9 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_sample (wmOperatorType *ot) { /* identifiers */ - ot->name= "Sample Keyframes"; + ot->name= _("Sample Keyframes"); ot->idname= "GRAPH_OT_sample"; - ot->description= "Add keyframes on every frame between the selected keyframes"; + ot->description= _("Add keyframes on every frame between the selected keyframes"); /* api callbacks */ ot->exec= graphkeys_sample_exec; @@ -1271,8 +1273,8 @@ void GRAPH_OT_sample (wmOperatorType *ot) /* defines for set extrapolation-type for selected keyframes tool */ static EnumPropertyItem prop_graphkeys_expo_types[] = { - {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""}, - {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""}, + {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, N_("Constant Extrapolation"), ""}, + {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, N_("Linear Extrapolation"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1326,9 +1328,9 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op) void GRAPH_OT_extrapolation_type (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Keyframe Extrapolation"; + ot->name= _("Set Keyframe Extrapolation"); ot->idname= "GRAPH_OT_extrapolation_type"; - ot->description= "Set extrapolation mode for selected F-Curves"; + ot->description= _("Set extrapolation mode for selected F-Curves"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1339,7 +1341,7 @@ void GRAPH_OT_extrapolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_expo_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_expo_types), 0, _("Type"), ""); } /* ******************** Set Interpolation-Type Operator *********************** */ @@ -1395,9 +1397,9 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op) void GRAPH_OT_interpolation_type (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Keyframe Interpolation"; + ot->name= _("Set Keyframe Interpolation"); ot->idname= "GRAPH_OT_interpolation_type"; - ot->description= "Set interpolation mode for the F-Curve segments starting from the selected keyframes"; + ot->description= _("Set interpolation mode for the F-Curve segments starting from the selected keyframes"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1408,7 +1410,7 @@ void GRAPH_OT_interpolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, _("Type"), ""); } /* ******************** Set Handle-Type Operator *********************** */ @@ -1481,17 +1483,17 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) { /* sync with editcurve_handle_type_items */ static EnumPropertyItem graphkeys_handle_type_items[] = { - {HD_AUTO, "AUTO", 0, "Automatic", "Handles that are automatically adjusted upon moving the keyframe. Whole curve"}, - {HD_VECT, "VECTOR", 0, "Vector", ""}, - {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, - {HD_FREE, "FREE_ALIGN", 0, "Free", ""}, - {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot. Whole curve"}, + {HD_AUTO, "AUTO", 0, N_("Automatic"), N_("Handles that are automatically adjusted upon moving the keyframe. Whole curve")}, + {HD_VECT, "VECTOR", 0, N_("Vector"), ""}, + {HD_ALIGN, "ALIGNED", 0, N_("Aligned"), ""}, + {HD_FREE, "FREE_ALIGN", 0, N_("Free"), ""}, + {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, N_("Auto Clamped"), N_("Auto handles clamped to not overshoot. Whole curve")}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Set Keyframe Handle Type"; + ot->name= _("Set Keyframe Handle Type"); ot->idname= "GRAPH_OT_handle_type"; - ot->description= "Set type of handle for selected keyframes"; + ot->description= _("Set type of handle for selected keyframes"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1502,7 +1504,7 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", graphkeys_handle_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(graphkeys_handle_type_items), 0, _("Type"), ""); } /* ************************************************************************** */ @@ -1683,9 +1685,9 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op) void GRAPH_OT_euler_filter (wmOperatorType *ot) { /* identifiers */ - ot->name= "Euler Discontinuity Filter"; + ot->name= _("Euler Discontinuity Filter"); ot->idname= "GRAPH_OT_euler_filter"; - ot->description= "Fixes the most common causes of gimbal lock in the selected Euler Rotation F-Curves"; + ot->description= _("Fixes the most common causes of gimbal lock in the selected Euler Rotation F-Curves"); /* api callbacks */ ot->exec= graphkeys_euler_filter_exec; @@ -1757,9 +1759,9 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_frame_jump (wmOperatorType *ot) { /* identifiers */ - ot->name= "Jump to Frame"; + ot->name= _("Jump to Frame"); ot->idname= "GRAPH_OT_frame_jump"; - ot->description= "Set the current frame to the average frame of the selected keyframes"; + ot->description= _("Set the current frame to the average frame of the selected keyframes"); /* api callbacks */ ot->exec= graphkeys_framejump_exec; @@ -1773,12 +1775,12 @@ void GRAPH_OT_frame_jump (wmOperatorType *ot) /* defines for snap keyframes tool */ static EnumPropertyItem prop_graphkeys_snap_types[] = { - {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", ""}, - {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", ""}, - {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry? - {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry? - {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""}, - {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", ""}, + {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, N_("Current Frame"), ""}, + {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, N_("Cursor Value"), ""}, + {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, N_("Nearest Frame"), ""}, // XXX as single entry? + {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, N_("Nearest Second"), ""}, // XXX as single entry? + {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, N_("Nearest Marker"), ""}, + {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, N_("Flatten Handles"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1861,9 +1863,9 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op) void GRAPH_OT_snap (wmOperatorType *ot) { /* identifiers */ - ot->name= "Snap Keys"; + ot->name= _("Snap Keys"); ot->idname= "GRAPH_OT_snap"; - ot->description= "Snap selected keyframes to the chosen times/values"; + ot->description= _("Snap selected keyframes to the chosen times/values"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1874,18 +1876,18 @@ void GRAPH_OT_snap (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_snap_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_snap_types), 0, _("Type"), ""); } /* ******************** Mirror Keyframes Operator *********************** */ /* defines for mirror keyframes tool */ static EnumPropertyItem prop_graphkeys_mirror_types[] = { - {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", ""}, - {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", ""}, - {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", ""}, - {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", ""}, - {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", ""}, + {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, N_("By Times over Current Frame"), ""}, + {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, N_("By Values over Cursor Value"), ""}, + {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, N_("By Times over Time=0"), ""}, + {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, N_("By Values over Value=0"), ""}, + {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, N_("By Times over First Selected Marker"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1979,9 +1981,9 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op) void GRAPH_OT_mirror (wmOperatorType *ot) { /* identifiers */ - ot->name= "Mirror Keys"; + ot->name= _("Mirror Keys"); ot->idname= "GRAPH_OT_mirror"; - ot->description= "Flip selected keyframes over the selected mirror line"; + ot->description= _("Flip selected keyframes over the selected mirror line"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1992,7 +1994,7 @@ void GRAPH_OT_mirror (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_mirror_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_graphkeys_mirror_types), 0, _("Type"), ""); } /* ******************** Smooth Keyframes Operator *********************** */ @@ -2034,9 +2036,9 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_smooth (wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth Keys"; + ot->name= _("Smooth Keys"); ot->idname= "GRAPH_OT_smooth"; - ot->description= "Apply weighted moving means to make selected F-Curves less bumpy"; + ot->description= _("Apply weighted moving means to make selected F-Curves less bumpy"); /* api callbacks */ ot->exec= graphkeys_smooth_exec; @@ -2136,9 +2138,9 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op) void GRAPH_OT_fmodifier_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add F-Curve Modifier"; + ot->name= _("Add F-Curve Modifier"); ot->idname= "GRAPH_OT_fmodifier_add"; - ot->description= "Add F-Modifiers to the selected F-Curves"; + ot->description= _("Add F-Modifiers to the selected F-Curves"); /* api callbacks */ ot->invoke= graph_fmodifier_add_invoke; @@ -2149,8 +2151,8 @@ void GRAPH_OT_fmodifier_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", ""); - RNA_def_boolean(ot->srna, "only_active", 1, "Only Active", "Only add F-Modifier to active F-Curve."); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(fmodifier_type_items), 0, _("Type"), ""); + RNA_def_boolean(ot->srna, "only_active", 1, _("Only Active"), _("Only add F-Modifier to active F-Curve.")); } /* ******************** Copy F-Modifiers Operator *********************** */ @@ -2194,9 +2196,9 @@ static int graph_fmodifier_copy_exec(bContext *C, wmOperator *op) void GRAPH_OT_fmodifier_copy (wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy F-Modifiers"; + ot->name= _("Copy F-Modifiers"); ot->idname= "GRAPH_OT_fmodifier_copy"; - ot->description= "Copy the F-Modifier(s) of the active F-Curve."; + ot->description= _("Copy the F-Modifier(s) of the active F-Curve."); /* api callbacks */ ot->exec= graph_fmodifier_copy_exec; @@ -2256,9 +2258,9 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op) void GRAPH_OT_fmodifier_paste (wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste F-Modifiers"; + ot->name= _("Paste F-Modifiers"); ot->idname= "GRAPH_OT_fmodifier_paste"; - ot->description= "Add copied F-Modifiers to the selected F-Curves"; + ot->description= _("Add copied F-Modifiers to the selected F-Curves"); /* api callbacks */ ot->exec= graph_fmodifier_paste_exec; diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 03cc8bb9e80..4a5bebb6b91 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -40,6 +40,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_sound.h" @@ -163,9 +165,9 @@ static int graphview_cursor_modal(bContext *C, wmOperator *op, wmEvent *event) static void GRAPH_OT_cursor_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Cursor"; + ot->name= _("Set Cursor"); ot->idname= "GRAPH_OT_cursor_set"; - ot->description= "Interactively set the current frame number and value cursor"; + ot->description= _("Interactively set the current frame number and value cursor"); /* api callbacks */ ot->exec= graphview_cursor_exec; @@ -177,8 +179,8 @@ static void GRAPH_OT_cursor_set(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO; /* rna */ - RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME); - RNA_def_float(ot->srna, "value", 0, FLT_MIN, FLT_MAX, "Value", "", -100.0f, 100.0f); + RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, _("Frame"), "", MINAFRAME, MAXFRAME); + RNA_def_float(ot->srna, "value", 0, FLT_MIN, FLT_MAX, _("Value"), "", -100.0f, 100.0f); } /* Toggle Handles ----------------------------------------------------------------- */ @@ -203,9 +205,9 @@ static int view_toggle_handles_exec (bContext *C, wmOperator *UNUSED(op)) static void GRAPH_OT_view_togglehandles (wmOperatorType *ot) { /* identification */ - ot->name= "Show/Hide All Handles"; + ot->name= _("Show/Hide All Handles"); ot->idname= "GRAPH_OT_handles_view_toggle"; - ot->description= "Toggle whether handles are drawn on all keyframes that need them"; + ot->description= _("Toggle whether handles are drawn on all keyframes that need them"); /* callbacks */ ot->exec= view_toggle_handles_exec; @@ -272,7 +274,7 @@ void ED_operatormacros_graph(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot= WM_operatortype_append_macro("GRAPH_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("GRAPH_OT_duplicate_move", _("Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER); if (ot) { WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate"); otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform"); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index cb799b85d3a..df1932ecf69 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -40,6 +40,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_object_types.h" #include "DNA_screen_types.h" @@ -167,9 +169,9 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op) void GRAPH_OT_select_all_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select All"; + ot->name= _("Select All"); ot->idname= "GRAPH_OT_select_all_toggle"; - ot->description= "Toggle selection of all keyframes"; + ot->description= _("Toggle selection of all keyframes"); /* api callbacks */ ot->exec= graphkeys_deselectall_exec; @@ -179,7 +181,7 @@ void GRAPH_OT_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/; /* props */ - ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + ot->prop= RNA_def_boolean(ot->srna, "invert", 0, _("Invert"), ""); } /* ******************** Border Select Operator **************************** */ @@ -336,9 +338,9 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) void GRAPH_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; + ot->name= _("Border Select"); ot->idname= "GRAPH_OT_select_border"; - ot->description= "Select all keyframes within the specified region"; + ot->description= _("Select all keyframes within the specified region"); /* api callbacks */ ot->invoke= WM_border_select_invoke; @@ -354,8 +356,8 @@ void GRAPH_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, FALSE); - ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); - RNA_def_boolean(ot->srna, "include_handles", 0, "Include Handles", "Are handles tested individually against the selection criteria"); + ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, _("Axis Range"), ""); + RNA_def_boolean(ot->srna, "include_handles", 0, _("Include Handles"), _("Are handles tested individually against the selection criteria")); } /* ******************** Column Select Operator **************************** */ @@ -368,10 +370,10 @@ void GRAPH_OT_select_border(wmOperatorType *ot) /* defines for column-select mode */ static EnumPropertyItem prop_column_select_types[] = { - {GRAPHKEYS_COLUMNSEL_KEYS, "KEYS", 0, "On Selected Keyframes", ""}, - {GRAPHKEYS_COLUMNSEL_CFRA, "CFRA", 0, "On Current Frame", ""}, - {GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, "On Selected Markers", ""}, - {GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", 0, "Between Min/Max Selected Markers", ""}, + {GRAPHKEYS_COLUMNSEL_KEYS, "KEYS", 0, N_("On Selected Keyframes"), ""}, + {GRAPHKEYS_COLUMNSEL_CFRA, "CFRA", 0, N_("On Current Frame"), ""}, + {GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, N_("On Selected Markers"), ""}, + {GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", 0, N_("Between Min/Max Selected Markers"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -525,9 +527,9 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op) void GRAPH_OT_select_column (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select All"; + ot->name= _("Select All"); ot->idname= "GRAPH_OT_select_column"; - ot->description= "Select all keyframes on the specified frame(s)"; + ot->description= _("Select all keyframes on the specified frame(s)"); /* api callbacks */ ot->exec= graphkeys_columnselect_exec; @@ -537,7 +539,7 @@ void GRAPH_OT_select_column (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/; /* props */ - ot->prop= RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", ""); + ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_column_select_types), 0, _("Mode"), ""); } /* ******************** Select Linked Operator *********************** */ @@ -583,9 +585,9 @@ static int graphkeys_select_linked_exec (bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_select_linked (wmOperatorType *ot) { /* identifiers */ - ot->name = "Select Linked"; + ot->name = _("Select Linked"); ot->idname= "GRAPH_OT_select_linked"; - ot->description = "Select keyframes occurring the same F-Curves as selected ones"; + ot->description = _("Select keyframes occurring the same F-Curves as selected ones"); /* api callbacks */ ot->exec= graphkeys_select_linked_exec; @@ -661,9 +663,9 @@ static int graphkeys_select_more_exec (bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_select_more (wmOperatorType *ot) { /* identifiers */ - ot->name = "Select More"; + ot->name = _("Select More"); ot->idname= "GRAPH_OT_select_more"; - ot->description = "Select keyframes beside already selected ones"; + ot->description = _("Select keyframes beside already selected ones"); /* api callbacks */ ot->exec= graphkeys_select_more_exec; @@ -695,9 +697,9 @@ static int graphkeys_select_less_exec (bContext *C, wmOperator *UNUSED(op)) void GRAPH_OT_select_less (wmOperatorType *ot) { /* identifiers */ - ot->name = "Select Less"; + ot->name = _("Select Less"); ot->idname= "GRAPH_OT_select_less"; - ot->description = "Deselect keyframes on ends of selection islands"; + ot->description = _("Deselect keyframes on ends of selection islands"); /* api callbacks */ ot->exec= graphkeys_select_less_exec; @@ -712,9 +714,9 @@ void GRAPH_OT_select_less (wmOperatorType *ot) /* defines for left-right select tool */ static EnumPropertyItem prop_graphkeys_leftright_select_types[] = { - {GRAPHKEYS_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""}, - {GRAPHKEYS_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""}, - {GRAPHKEYS_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""}, + {GRAPHKEYS_LRSEL_TEST, "CHECK", 0, N_("Check if Select Left or Right"), ""}, + {GRAPHKEYS_LRSEL_LEFT, "LEFT", 0, N_("Before current frame"), ""}, + {GRAPHKEYS_LRSEL_RIGHT, "RIGHT", 0, N_("After current frame"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -835,9 +837,9 @@ static int graphkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEve void GRAPH_OT_select_leftright (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Left/Right"; + ot->name= _("Select Left/Right"); ot->idname= "GRAPH_OT_select_leftright"; - ot->description= "Select keyframes to the left or the right of the current frame"; + ot->description= _("Select keyframes to the left or the right of the current frame"); /* api callbacks */ ot->invoke= graphkeys_select_leftright_invoke; @@ -848,8 +850,8 @@ void GRAPH_OT_select_leftright (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "mode", prop_graphkeys_leftright_select_types, GRAPHKEYS_LRSEL_TEST, "Mode", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); + ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_graphkeys_leftright_select_types), GRAPHKEYS_LRSEL_TEST, _("Mode"), ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); } /* ******************** Mouse-Click Select Operator *********************** */ @@ -1328,18 +1330,18 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev void GRAPH_OT_clickselect (wmOperatorType *ot) { /* identifiers */ - ot->name= "Mouse Select Keys"; + ot->name= _("Mouse Select Keys"); ot->idname= "GRAPH_OT_clickselect"; - ot->description= "Select keyframes by clicking on them"; + ot->description= _("Select keyframes by clicking on them"); /* api callbacks */ ot->invoke= graphkeys_clickselect_invoke; ot->poll= graphop_visible_keyframes_poll; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY - RNA_def_boolean(ot->srna, "column", 0, "Column Select", "Select all keyframes that occur on the same frame as the one under the mouse"); // ALTKEY - RNA_def_boolean(ot->srna, "curves", 0, "Only Curves", "Select all the keyframes in the curve"); // CTRLKEY + ALTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "column", 0, _("Column Select"), _("Select all keyframes that occur on the same frame as the one under the mouse")); // ALTKEY + RNA_def_boolean(ot->srna, "curves", 0, _("Only Curves"), _("Select all the keyframes in the curve")); // CTRLKEY + ALTKEY } /* ************************************************************************** */ diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 66e844e67a8..ab008296092 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -47,6 +47,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_colortools.h" #include "BKE_context.h" #include "BKE_customdata.h" @@ -863,9 +865,9 @@ static int image_properties(bContext *C, wmOperator *UNUSED(op)) void IMAGE_OT_properties(wmOperatorType *ot) { - ot->name= "Properties"; + ot->name= _("Properties"); ot->idname= "IMAGE_OT_properties"; - ot->description= "Toggle display properties panel"; + ot->description= _("Toggle display properties panel"); ot->exec= image_properties; ot->poll= ED_operator_image_active; @@ -887,9 +889,9 @@ static int image_scopes(bContext *C, wmOperator *UNUSED(op)) void IMAGE_OT_scopes(wmOperatorType *ot) { - ot->name= "Scopes"; + ot->name= _("Scopes"); ot->idname= "IMAGE_OT_scopes"; - ot->description= "Toggle display scopes panel"; + ot->description= _("Toggle display scopes panel"); ot->exec= image_scopes; ot->poll= ED_operator_image_active; diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index d5515bd1cf8..34d62f35aa5 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -41,6 +41,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_object_types.h" #include "DNA_node_types.h" #include "DNA_packedFile_types.h" @@ -288,7 +290,7 @@ static int view_pan_cancel(bContext *C, wmOperator *op) void IMAGE_OT_view_pan(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Pan"; + ot->name= _("View Pan"); ot->idname= "IMAGE_OT_view_pan"; /* api callbacks */ @@ -303,7 +305,7 @@ void IMAGE_OT_view_pan(wmOperatorType *ot) /* properties */ RNA_def_float_vector(ot->srna, "offset", 2, NULL, -FLT_MAX, FLT_MAX, - "Offset", "Offset in floating point units, 1.0 is the width and height of the image.", -FLT_MAX, FLT_MAX); + _("Offset"), _("Offset in floating point units, 1.0 is the width and height of the image."), -FLT_MAX, FLT_MAX); } /********************** view zoom operator *********************/ @@ -419,7 +421,7 @@ static int view_zoom_cancel(bContext *C, wmOperator *op) void IMAGE_OT_view_zoom(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Zoom"; + ot->name= _("View Zoom"); ot->idname= "IMAGE_OT_view_zoom"; /* api callbacks */ @@ -434,7 +436,7 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot) /* properties */ RNA_def_float(ot->srna, "factor", 0.0f, 0.0f, FLT_MAX, - "Factor", "Zoom factor, values higher than 1.0 zoom in, lower values zoom out.", -FLT_MAX, FLT_MAX); + _("Factor"), _("Zoom factor, values higher than 1.0 zoom in, lower values zoom out."), -FLT_MAX, FLT_MAX); } /********************** view all operator *********************/ @@ -483,7 +485,7 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) void IMAGE_OT_view_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; + ot->name= _("View All"); ot->idname= "IMAGE_OT_view_all"; /* api callbacks */ @@ -544,7 +546,7 @@ static int view_selected_poll(bContext *C) void IMAGE_OT_view_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Center"; + ot->name= _("View Center"); ot->idname= "IMAGE_OT_view_selected"; /* api callbacks */ @@ -569,7 +571,7 @@ static int view_zoom_in_exec(bContext *C, wmOperator *UNUSED(op)) void IMAGE_OT_view_zoom_in(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Zoom In"; + ot->name= _("View Zoom In"); ot->idname= "IMAGE_OT_view_zoom_in"; /* api callbacks */ @@ -592,7 +594,7 @@ static int view_zoom_out_exec(bContext *C, wmOperator *UNUSED(op)) void IMAGE_OT_view_zoom_out(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Zoom Out"; + ot->name= _("View Zoom Out"); ot->idname= "IMAGE_OT_view_zoom_out"; /* api callbacks */ @@ -630,7 +632,7 @@ static int view_zoom_ratio_exec(bContext *C, wmOperator *op) void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Zoom Ratio"; + ot->name= _("View Zoom Ratio"); ot->idname= "IMAGE_OT_view_zoom_ratio"; /* api callbacks */ @@ -639,18 +641,18 @@ void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot) /* properties */ RNA_def_float(ot->srna, "ratio", 0.0f, 0.0f, FLT_MAX, - "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out.", -FLT_MAX, FLT_MAX); + _("Ratio"), _("Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out."), -FLT_MAX, FLT_MAX); } /**************** load/replace/save callbacks ******************/ /* XXX make dynamic */ static const EnumPropertyItem image_file_type_items[] = { - {R_TARGA, "TARGA", 0, "Targa", ""}, - {R_RAWTGA, "TARGA RAW", 0, "Targa Raw", ""}, + {R_TARGA, "TARGA", 0, N_("Targa"), ""}, + {R_RAWTGA, "TARGA RAW", 0, N_("Targa Raw"), ""}, {R_PNG, "PNG", 0, "PNG", ""}, #ifdef WITH_DDS - {R_DDS, "DDS", 0, "DirectDraw Surface", ""}, + {R_DDS, "DDS", 0, N_("DirectDraw Surface"), ""}, #endif {R_BMP, "BMP", 0, "BMP", ""}, {R_JPEG90, "JPEG", 0, "Jpeg", ""}, @@ -662,10 +664,10 @@ static const EnumPropertyItem image_file_type_items[] = { {R_TIFF, "TIFF", 0, "Tiff", ""}, #endif #ifdef WITH_DDS - {R_RADHDR, "RADIANCE_HDR", 0, "Radiance HDR", ""}, + {R_RADHDR, "RADIANCE_HDR", 0, N_("Radiance HDR"), ""}, #endif #ifdef WITH_CINEON - {R_CINEON, "CINEON", 0, "Cineon", ""}, + {R_CINEON, "CINEON", 0, N_("Cineon"), ""}, {R_DPX, "DPX", 0, "DPX", ""}, #endif #ifdef WITH_OPENEXR @@ -805,8 +807,8 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void IMAGE_OT_open(wmOperatorType *ot) { /* identifiers */ - ot->name= "Open Image"; - ot->description= "Open image"; + ot->name= _("Open Image"); + ot->description= _("Open image"); ot->idname= "IMAGE_OT_open"; /* api callbacks */ @@ -864,7 +866,7 @@ static int replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void IMAGE_OT_replace(wmOperatorType *ot) { /* identifiers */ - ot->name= "Replace Image"; + ot->name= _("Replace Image"); ot->idname= "IMAGE_OT_replace"; /* api callbacks */ @@ -1084,7 +1086,7 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void IMAGE_OT_save_as(wmOperatorType *ot) { /* identifiers */ - ot->name= "Save As Image"; + ot->name= _("Save As Image"); ot->idname= "IMAGE_OT_save_as"; /* api callbacks */ @@ -1097,10 +1099,10 @@ void IMAGE_OT_save_as(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as."); + RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, _("File Type"), _("File type to save image as.")); WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH); - RNA_def_boolean(ot->srna, "copy", 0, "Copy", "Create a new image file without modifying the current image in blender"); + RNA_def_boolean(ot->srna, "copy", 0, _("Copy"), _("Create a new image file without modifying the current image in blender")); } /******************** save image operator ********************/ @@ -1155,7 +1157,7 @@ static int save_exec(bContext *C, wmOperator *op) void IMAGE_OT_save(wmOperatorType *ot) { /* identifiers */ - ot->name= "Save Image"; + ot->name= _("Save Image"); ot->idname= "IMAGE_OT_save"; /* api callbacks */ @@ -1232,7 +1234,7 @@ static int save_sequence_exec(bContext *C, wmOperator *op) void IMAGE_OT_save_sequence(wmOperatorType *ot) { /* identifiers */ - ot->name= "Save Sequence"; + ot->name= _("Save Sequence"); ot->idname= "IMAGE_OT_save_sequence"; /* api callbacks */ @@ -1267,7 +1269,7 @@ static int reload_exec(bContext *C, wmOperator *UNUSED(op)) void IMAGE_OT_reload(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reload Image"; + ot->name= _("Reload Image"); ot->idname= "IMAGE_OT_reload"; /* api callbacks */ @@ -1349,8 +1351,8 @@ void IMAGE_OT_new(wmOperatorType *ot) static float default_color[4]= {0.0f, 0.0f, 0.0f, 1.0f}; /* identifiers */ - ot->name= "New Image"; - ot->description= "Create a new image"; + ot->name= _("New Image"); + ot->description= _("Create a new image"); ot->idname= "IMAGE_OT_new"; /* api callbacks */ @@ -1361,14 +1363,14 @@ void IMAGE_OT_new(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "name", "untitled", MAX_ID_NAME-2, "Name", "Image datablock name."); - RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, "Width", "Image width.", 1, 16384); - RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, "Height", "Image height.", 1, 16384); - prop= RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, "Color", "Default fill color.", 0.0f, 1.0f); + RNA_def_string(ot->srna, "name", "untitled", MAX_ID_NAME-2, _("Name"), _("Image datablock name.")); + RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, _("Width"), _("Image width."), 1, 16384); + RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, _("Height"), _("Image height."), 1, 16384); + prop= RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, _("Color"), _("Default fill color."), 0.0f, 1.0f); RNA_def_property_float_array_default(prop, default_color); - RNA_def_boolean(ot->srna, "alpha", 1, "Alpha", "Create an image with an alpha channel."); - RNA_def_boolean(ot->srna, "uv_test_grid", 0, "UV Test Grid", "Fill the image with a grid for UV map testing."); - RNA_def_boolean(ot->srna, "float", 0, "32 bit Float", "Create image with 32 bit floating point bit depth."); + RNA_def_boolean(ot->srna, "alpha", 1, _("Alpha"), _("Create an image with an alpha channel.")); + RNA_def_boolean(ot->srna, "uv_test_grid", 0, _("UV Test Grid"), _("Fill the image with a grid for UV map testing.")); + RNA_def_boolean(ot->srna, "float", 0, _("32 bit Float"), _("Create image with 32 bit floating point bit depth.")); } /********************* invert operators *********************/ @@ -1439,7 +1441,7 @@ static int image_invert_exec(bContext *C, wmOperator *op) void IMAGE_OT_invert(wmOperatorType *ot) { /* identifiers */ - ot->name= "Invert Channels"; + ot->name= _("Invert Channels"); ot->idname= "IMAGE_OT_invert"; /* api callbacks */ @@ -1447,10 +1449,10 @@ void IMAGE_OT_invert(wmOperatorType *ot) ot->poll= image_invert_poll; /* properties */ - RNA_def_boolean(ot->srna, "invert_r", 0, "Red", "Invert Red Channel"); - RNA_def_boolean(ot->srna, "invert_g", 0, "Green", "Invert Green Channel"); - RNA_def_boolean(ot->srna, "invert_b", 0, "Blue", "Invert Blue Channel"); - RNA_def_boolean(ot->srna, "invert_a", 0, "Alpha", "Invert Alpha Channel"); + RNA_def_boolean(ot->srna, "invert_r", 0, _("Red"), _("Invert Red Channel")); + RNA_def_boolean(ot->srna, "invert_g", 0, _("Green"), _("Invert Green Channel")); + RNA_def_boolean(ot->srna, "invert_b", 0, _("Blue"), _("Invert Blue Channel")); + RNA_def_boolean(ot->srna, "invert_a", 0, _("Alpha"), _("Invert Alpha Channel")); /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1526,8 +1528,8 @@ static int pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void IMAGE_OT_pack(wmOperatorType *ot) { /* identifiers */ - ot->name= "Pack Image"; - ot->description= "Pack an image as embedded data into the .blend file"; + ot->name= _("Pack Image"); + ot->description= _("Pack an image as embedded data into the .blend file"); ot->idname= "IMAGE_OT_pack"; /* api callbacks */ @@ -1538,7 +1540,7 @@ void IMAGE_OT_pack(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "as_png", 0, "Pack As PNG", "Pack image as lossless PNG."); + RNA_def_boolean(ot->srna, "as_png", 0, _("Pack As PNG"), _("Pack image as lossless PNG.")); } /********************* unpack operator *********************/ @@ -1603,8 +1605,8 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even void IMAGE_OT_unpack(wmOperatorType *ot) { /* identifiers */ - ot->name= "Unpack Image"; - ot->description= "Save an image packed in the .blend file to disk"; + ot->name= _("Unpack Image"); + ot->description= _("Save an image packed in the .blend file to disk"); ot->idname= "IMAGE_OT_unpack"; /* api callbacks */ @@ -1615,8 +1617,8 @@ void IMAGE_OT_unpack(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack."); - RNA_def_string(ot->srna, "id", "", MAX_ID_NAME-2, "Image Name", "Image datablock name to unpack."); /* XXX, weark!, will fail with library, name collisions */ + RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, _("Method"), _("How to unpack.")); + RNA_def_string(ot->srna, "id", "", MAX_ID_NAME-2, _("Image Name"), _("Image datablock name to unpack.")); /* XXX, weark!, will fail with library, name collisions */ } /******************** sample image operator ********************/ @@ -1813,7 +1815,7 @@ static int sample_cancel(bContext *C, wmOperator *op) void IMAGE_OT_sample(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sample Color"; + ot->name= _("Sample Color"); ot->idname= "IMAGE_OT_sample"; /* api callbacks */ @@ -1921,7 +1923,7 @@ static int sample_line_invoke(bContext *C, wmOperator *op, wmEvent *event) void IMAGE_OT_sample_line(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sample Line"; + ot->name= _("Sample Line"); ot->idname= "IMAGE_OT_sample_line"; /* api callbacks */ @@ -1942,12 +1944,12 @@ void IMAGE_OT_sample_line(wmOperatorType *ot) void IMAGE_OT_curves_point_set(wmOperatorType *ot) { static EnumPropertyItem point_items[]= { - {0, "BLACK_POINT", 0, "Black Point", ""}, - {1, "WHITE_POINT", 0, "White Point", ""}, + {0, "BLACK_POINT", 0, N_("Black Point"), ""}, + {1, "WHITE_POINT", 0, N_("White Point"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Set Curves Point"; + ot->name= _("Set Curves Point"); ot->idname= "IMAGE_OT_curves_point_set"; /* flags */ @@ -1960,7 +1962,7 @@ void IMAGE_OT_curves_point_set(wmOperatorType *ot) ot->poll= space_image_main_area_poll; /* properties */ - RNA_def_enum(ot->srna, "point", point_items, 0, "Point", "Set black point or white point for curves."); + RNA_def_enum(ot->srna, "point", RNA_enum_items_gettexted(point_items), 0, _("Point"), _("Set black point or white point for curves.")); } /******************** record composite operator *********************/ @@ -2101,7 +2103,7 @@ static int record_composite_cancel(bContext *C, wmOperator *op) void IMAGE_OT_record_composite(wmOperatorType *ot) { /* identifiers */ - ot->name= "Record Composite"; + ot->name= _("Record Composite"); ot->idname= "IMAGE_OT_record_composite"; /* api callbacks */ @@ -2156,7 +2158,7 @@ static int cycle_render_slot_exec(bContext *C, wmOperator *op) void IMAGE_OT_cycle_render_slot(wmOperatorType *ot) { /* identifiers */ - ot->name= "Cycle Render Slot"; + ot->name= _("Cycle Render Slot"); ot->idname= "IMAGE_OT_cycle_render_slot"; /* api callbacks */ @@ -2166,7 +2168,7 @@ void IMAGE_OT_cycle_render_slot(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "reverse", 0, "Cycle in Reverse", ""); + RNA_def_boolean(ot->srna, "reverse", 0, _("Cycle in Reverse"), ""); } /******************** TODO ********************/ diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index d58fb7b11f0..1fef6d3846e 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -45,6 +45,8 @@ #include "BLI_bpath.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_image.h" @@ -211,7 +213,7 @@ static int make_paths_relative_exec(bContext *C, wmOperator *op) void FILE_OT_make_paths_relative(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make All Paths Relative"; + ot->name= _("Make All Paths Relative"); ot->idname= "FILE_OT_make_paths_relative"; /* api callbacks */ @@ -243,7 +245,7 @@ static int make_paths_absolute_exec(bContext *C, wmOperator *op) void FILE_OT_make_paths_absolute(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make All Paths Absolute"; + ot->name= _("Make All Paths Absolute"); ot->idname= "FILE_OT_make_paths_absolute"; /* api callbacks */ @@ -266,7 +268,7 @@ static int report_missing_files_exec(bContext *UNUSED(C), wmOperator *op) void FILE_OT_report_missing_files(wmOperatorType *ot) { /* identifiers */ - ot->name= "Report Missing Files"; + ot->name= _("Report Missing Files"); ot->idname= "FILE_OT_report_missing_files"; /* api callbacks */ @@ -299,7 +301,7 @@ static int find_missing_files_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE void FILE_OT_find_missing_files(wmOperatorType *ot) { /* identifiers */ - ot->name= "Find Missing Files"; + ot->name= _("Find Missing Files"); ot->idname= "FILE_OT_find_missing_files"; /* api callbacks */ @@ -410,7 +412,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm void INFO_OT_reports_display_update(wmOperatorType *ot) { /* identifiers */ - ot->name= "Update Reports Display"; + ot->name= _("Update Reports Display"); ot->idname= "INFO_OT_reports_display_update"; /* api callbacks */ diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c index c8bda434227..ed8b66ad23a 100644 --- a/source/blender/editors/space_info/info_report.c +++ b/source/blender/editors/space_info/info_report.c @@ -37,6 +37,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "WM_api.h" @@ -160,7 +162,7 @@ void INFO_OT_select_pick(wmOperatorType *ot) /* ot->flag= OPTYPE_REGISTER; */ /* properties */ - RNA_def_int(ot->srna, "report_index", 0, 0, INT_MAX, "Report", "The index of the report.", 0, INT_MAX); + RNA_def_int(ot->srna, "report_index", 0, 0, INT_MAX, _("Report"), _("The index of the report."), 0, INT_MAX); } diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index bd2e8077eab..beb9f7dc589 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -41,6 +41,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_screen.h" @@ -278,7 +280,7 @@ static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu) uiItemStringO(layout, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath); } } else { - uiItemL(layout, "No Recent Files", ICON_NONE); + uiItemL(layout, _("No Recent Files"), ICON_NONE); } } @@ -288,7 +290,7 @@ static void recent_files_menu_register(void) mt= MEM_callocN(sizeof(MenuType), "spacetype info menu recent files"); strcpy(mt->idname, "INFO_MT_file_open_recent"); - strcpy(mt->label, "Open Recent..."); + strcpy(mt->label, _("Open Recent...")); mt->draw= recent_files_menu_draw; WM_menutype_add(mt); } diff --git a/source/blender/editors/space_logic/CMakeLists.txt b/source/blender/editors/space_logic/CMakeLists.txt index 44471902040..f4bb255e11f 100644 --- a/source/blender/editors/space_logic/CMakeLists.txt +++ b/source/blender/editors/space_logic/CMakeLists.txt @@ -21,10 +21,11 @@ set(INC ../include - ../interface + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader + ../../editors/interface ../../makesdna ../../makesrna ../../windowmanager diff --git a/source/blender/editors/space_logic/SConscript b/source/blender/editors/space_logic/SConscript index 6beb3ecb48f..fb2504ab974 100644 --- a/source/blender/editors/space_logic/SConscript +++ b/source/blender/editors/space_logic/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../interface ../../blenloader' diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c index 16e916928a9..dc2c5cb461a 100644 --- a/source/blender/editors/space_logic/logic_buttons.c +++ b/source/blender/editors/space_logic/logic_buttons.c @@ -35,6 +35,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_screen.h" @@ -118,8 +120,8 @@ static int logic_properties(bContext *C, wmOperator *UNUSED(op)) void LOGIC_OT_properties(wmOperatorType *ot) { - ot->name= "Properties"; - ot->description= "Toggle display properties panel"; + ot->name= _("Properties"); + ot->description= _("Toggle display properties panel"); ot->idname= "LOGIC_OT_properties"; ot->exec= logic_properties; @@ -199,9 +201,9 @@ void LOGIC_OT_links_cut(wmOperatorType *ot) { PropertyRNA *prop; - ot->name= "Cut links"; + ot->name= _("Cut links"); ot->idname= "LOGIC_OT_links_cut"; - ot->description= "Remove logic brick connections"; + ot->description= _("Remove logic brick connections"); ot->invoke= WM_gesture_lines_invoke; ot->modal= WM_gesture_lines_modal; @@ -216,6 +218,6 @@ void LOGIC_OT_links_cut(wmOperatorType *ot) prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); /* internal */ - RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX); + RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, _("Cursor"), "", 0, INT_MAX); } diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 019ce2a714a..8323760c725 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -4502,7 +4502,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar) /* ****************** Controllers ****************** */ xco= 420; yco= 170; width= 300; - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, U.uistyles.first); + layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, UI_GetStyle()); row = uiLayoutRow(layout, 1); uiDefBlockBut(block, controller_menu, NULL, "Controllers", xco-10, yco, 300, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */ @@ -4605,7 +4605,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar) /* ****************** Sensors ****************** */ xco= 10; yco= 170; width= 340; - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, U.uistyles.first); + layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, UI_GetStyle()); row = uiLayoutRow(layout, 1); uiDefBlockBut(block, sensor_menu, NULL, "Sensors", xco-10, yco, 300, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */ @@ -4671,7 +4671,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar) /* ****************** Actuators ****************** */ xco= 800; yco= 170; width= 340; - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, U.uistyles.first); + layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, UI_GetStyle()); row = uiLayoutRow(layout, 1); uiDefBlockBut(block, actuator_menu, NULL, "Actuators", xco-10, yco, 300, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */ diff --git a/source/blender/editors/space_nla/CMakeLists.txt b/source/blender/editors/space_nla/CMakeLists.txt index b05d157365d..819e80d7b2e 100644 --- a/source/blender/editors/space_nla/CMakeLists.txt +++ b/source/blender/editors/space_nla/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/space_nla/SConscript b/source/blender/editors/space_nla/SConscript index 51ce829ed8d..6738f3380b4 100644 --- a/source/blender/editors/space_nla/SConscript +++ b/source/blender/editors/space_nla/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader' env.BlenderLib ( 'bf_editors_space_nla', sources, Split(incs), [], libtype=['core'], priority=[85] ) diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 94232699c30..c431f5455ed 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -47,6 +47,8 @@ #include "BLI_editVert.h" #include "BLI_rand.h" +#include "BLF_api.h" + #include "BKE_nla.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -498,9 +500,9 @@ static int nla_properties(bContext *C, wmOperator *UNUSED(op)) void NLA_OT_properties(wmOperatorType *ot) { - ot->name= "Properties"; + ot->name= _("Properties"); ot->idname= "NLA_OT_properties"; - ot->description= "Toggle display properties panel"; + ot->description= _("Toggle display properties panel"); ot->exec= nla_properties; ot->poll= ED_operator_nla_active; diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 38f680fff07..f6aebd57149 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -45,6 +45,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_animsys.h" #include "BKE_nla.h" #include "BKE_context.h" @@ -342,9 +344,9 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *e void NLA_OT_channels_click (wmOperatorType *ot) { /* identifiers */ - ot->name= "Mouse Click on NLA Channels"; + ot->name= _("Mouse Click on NLA Channels"); ot->idname= "NLA_OT_channels_click"; - ot->description= "Handle clicks to select NLA channels"; + ot->description= _("Handle clicks to select NLA channels"); /* api callbacks */ ot->invoke= nlachannels_mouseclick_invoke; @@ -354,7 +356,7 @@ void NLA_OT_channels_click (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY } /* *********************************************** */ @@ -416,9 +418,9 @@ static int nlaedit_add_tracks_exec (bContext *C, wmOperator *op) void NLA_OT_tracks_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Track(s)"; + ot->name= _("Add Track(s)"); ot->idname= "NLA_OT_tracks_add"; - ot->description= "Add NLA-Tracks above/after the selected tracks"; + ot->description= _("Add NLA-Tracks above/after the selected tracks"); /* api callbacks */ ot->exec= nlaedit_add_tracks_exec; @@ -428,7 +430,7 @@ void NLA_OT_tracks_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "above_selected", 0, "Above Selected", "Add a new NLA Track above every existing selected one."); + RNA_def_boolean(ot->srna, "above_selected", 0, _("Above Selected"), _("Add a new NLA Track above every existing selected one.")); } /* ******************** Delete Tracks Operator ***************************** */ @@ -480,9 +482,9 @@ static int nlaedit_delete_tracks_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_delete_tracks (wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Tracks"; + ot->name= _("Delete Tracks"); ot->idname= "NLA_OT_delete_tracks"; - ot->description= "Delete selected NLA-Tracks and the strips they contain"; + ot->description= _("Delete selected NLA-Tracks and the strips they contain"); /* api callbacks */ ot->exec= nlaedit_delete_tracks_exec; diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 77c91b28a63..32cac62c4ce 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -45,6 +45,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_action.h" #include "BKE_fcurve.h" #include "BKE_nla.h" @@ -158,9 +160,9 @@ static int nlaedit_enable_tweakmode_exec (bContext *C, wmOperator *op) void NLA_OT_tweakmode_enter (wmOperatorType *ot) { /* identifiers */ - ot->name= "Enter Tweak Mode"; + ot->name= _("Enter Tweak Mode"); ot->idname= "NLA_OT_tweakmode_enter"; - ot->description= "Enter tweaking mode for the action referenced by the active strip"; + ot->description= _("Enter tweaking mode for the action referenced by the active strip"); /* api callbacks */ ot->exec= nlaedit_enable_tweakmode_exec; @@ -223,9 +225,9 @@ static int nlaedit_disable_tweakmode_exec (bContext *C, wmOperator *op) void NLA_OT_tweakmode_exit (wmOperatorType *ot) { /* identifiers */ - ot->name= "Exit Tweak Mode"; + ot->name= _("Exit Tweak Mode"); ot->idname= "NLA_OT_tweakmode_exit"; - ot->description= "Exit tweaking mode for the action referenced by the active strip"; + ot->description= _("Exit tweaking mode for the action referenced by the active strip"); /* api callbacks */ ot->exec= nlaedit_disable_tweakmode_exec; @@ -342,9 +344,9 @@ void NLA_OT_actionclip_add (wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Add Action Strip"; + ot->name= _("Add Action Strip"); ot->idname= "NLA_OT_actionclip_add"; - ot->description= "Add an Action-Clip strip (i.e. an NLA Strip referencing an Action) to the active track"; + ot->description= _("Add an Action-Clip strip (i.e. an NLA Strip referencing an Action) to the active track"); /* api callbacks */ ot->invoke= WM_enum_search_invoke; @@ -356,7 +358,7 @@ void NLA_OT_actionclip_add (wmOperatorType *ot) /* props */ // TODO: this would be nicer as an ID-pointer... - prop= RNA_def_enum(ot->srna, "action", DummyRNA_NULL_items, 0, "Action", ""); + prop= RNA_def_enum(ot->srna, "action", DummyRNA_NULL_items, 0, _("Action"), ""); RNA_def_enum_funcs(prop, RNA_action_itemf); ot->prop= prop; } @@ -464,9 +466,9 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op) void NLA_OT_transition_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Transition"; + ot->name= _("Add Transition"); ot->idname= "NLA_OT_transition_add"; - ot->description= "Add a transition strip between two adjacent selected strips"; + ot->description= _("Add a transition strip between two adjacent selected strips"); /* api callbacks */ ot->exec= nlaedit_add_transition_exec; @@ -526,9 +528,9 @@ static int nlaedit_add_meta_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_meta_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Meta-Strips"; + ot->name= _("Add Meta-Strips"); ot->idname= "NLA_OT_meta_add"; - ot->description= "Add new meta-strips incorporating the selected strips"; + ot->description= _("Add new meta-strips incorporating the selected strips"); /* api callbacks */ ot->exec= nlaedit_add_meta_exec; @@ -578,9 +580,9 @@ static int nlaedit_remove_meta_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_meta_remove (wmOperatorType *ot) { /* identifiers */ - ot->name= "Remove Meta-Strips"; + ot->name= _("Remove Meta-Strips"); ot->idname= "NLA_OT_meta_remove"; - ot->description= "Separate out the strips held by the selected meta-strips"; + ot->description= _("Separate out the strips held by the selected meta-strips"); /* api callbacks */ ot->exec= nlaedit_remove_meta_exec; @@ -681,9 +683,9 @@ static int nlaedit_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED void NLA_OT_duplicate (wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Strips"; + ot->name= _("Duplicate Strips"); ot->idname= "NLA_OT_duplicate"; - ot->description= "Duplicate selected NLA-Strips, adding the new strips in new tracks above the originals"; + ot->description= _("Duplicate selected NLA-Strips, adding the new strips in new tracks above the originals"); /* api callbacks */ ot->invoke= nlaedit_duplicate_invoke; @@ -694,7 +696,7 @@ void NLA_OT_duplicate (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); } /* ******************** Delete Strips Operator ***************************** */ @@ -756,9 +758,9 @@ static int nlaedit_delete_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_delete (wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete Strips"; + ot->name= _("Delete Strips"); ot->idname= "NLA_OT_delete"; - ot->description= "Delete selected strips"; + ot->description= _("Delete selected strips"); /* api callbacks */ ot->exec= nlaedit_delete_exec; @@ -901,9 +903,9 @@ static int nlaedit_split_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_split (wmOperatorType *ot) { /* identifiers */ - ot->name= "Split Strips"; + ot->name= _("Split Strips"); ot->idname= "NLA_OT_split"; - ot->description= "Split selected strips at their midpoints"; + ot->description= _("Split selected strips at their midpoints"); /* api callbacks */ ot->exec= nlaedit_split_exec; @@ -954,9 +956,9 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *UNUSED(op)) static void NLA_OT_bake (wmOperatorType *ot) { /* identifiers */ - ot->name= "Bake Strips"; + ot->name= _("Bake Strips"); ot->idname= "NLA_OT_bake"; - ot->description= "Bake all strips of selected AnimData blocks"; + ot->description= _("Bake all strips of selected AnimData blocks"); /* api callbacks */ ot->exec= nlaedit_bake_exec; @@ -1016,9 +1018,9 @@ static int nlaedit_toggle_mute_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_mute_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Muting"; + ot->name= _("Toggle Muting"); ot->idname= "NLA_OT_mute_toggle"; - ot->description= "Mute or un-mute selected strips"; + ot->description= _("Mute or un-mute selected strips"); /* api callbacks */ ot->exec= nlaedit_toggle_mute_exec; @@ -1174,9 +1176,9 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op) void NLA_OT_swap (wmOperatorType *ot) { /* identifiers */ - ot->name= "Swap Strips"; + ot->name= _("Swap Strips"); ot->idname= "NLA_OT_swap"; - ot->description= "Swap order of selected strips within tracks"; + ot->description= _("Swap order of selected strips within tracks"); /* api callbacks */ ot->exec= nlaedit_swap_exec; @@ -1248,9 +1250,9 @@ static int nlaedit_move_up_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_move_up (wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Strips Up"; + ot->name= _("Move Strips Up"); ot->idname= "NLA_OT_move_up"; - ot->description= "Move selected strips up a track if there's room"; + ot->description= _("Move selected strips up a track if there's room"); /* api callbacks */ ot->exec= nlaedit_move_up_exec; @@ -1322,9 +1324,9 @@ static int nlaedit_move_down_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_move_down (wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Strips Down"; + ot->name= _("Move Strips Down"); ot->idname= "NLA_OT_move_down"; - ot->description= "Move selected strips down a track if there's room"; + ot->description= _("Move selected strips down a track if there's room"); /* api callbacks */ ot->exec= nlaedit_move_down_exec; @@ -1398,9 +1400,9 @@ static int nlaedit_sync_actlen_exec (bContext *C, wmOperator *op) void NLA_OT_action_sync_length (wmOperatorType *ot) { /* identifiers */ - ot->name= "Sync Action Length"; + ot->name= _("Sync Action Length"); ot->idname= "NLA_OT_action_sync_length"; - ot->description= "Synchronise the length of the referenced Action with the lengths used in the strip"; + ot->description= _("Synchronise the length of the referenced Action with the lengths used in the strip"); /* api callbacks */ ot->exec= nlaedit_sync_actlen_exec; @@ -1410,7 +1412,7 @@ void NLA_OT_action_sync_length (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_boolean(ot->srna, "active", 1, "Active Strip Only", "Only sync the active length for the active strip."); + ot->prop= RNA_def_boolean(ot->srna, "active", 1, _("Active Strip Only"), _("Only sync the active length for the active strip.")); } /* ******************** Apply Scale Operator ***************************** */ @@ -1498,9 +1500,9 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_apply_scale (wmOperatorType *ot) { /* identifiers */ - ot->name= "Apply Scale"; + ot->name= _("Apply Scale"); ot->idname= "NLA_OT_apply_scale"; - ot->description= "Apply scaling of selected strips to their referenced Actions"; + ot->description= _("Apply scaling of selected strips to their referenced Actions"); /* api callbacks */ ot->exec= nlaedit_apply_scale_exec; @@ -1561,9 +1563,9 @@ static int nlaedit_clear_scale_exec (bContext *C, wmOperator *UNUSED(op)) void NLA_OT_clear_scale (wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear Scale"; + ot->name= _("Clear Scale"); ot->idname= "NLA_OT_clear_scale"; - ot->description= "Reset scaling of selected strips"; + ot->description= _("Reset scaling of selected strips"); /* api callbacks */ ot->exec= nlaedit_clear_scale_exec; @@ -1578,10 +1580,10 @@ void NLA_OT_clear_scale (wmOperatorType *ot) /* defines for snap keyframes tool */ static EnumPropertyItem prop_nlaedit_snap_types[] = { - {NLAEDIT_SNAP_CFRA, "CFRA", 0, "Current frame", ""}, - {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry? - {NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry? - {NLAEDIT_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""}, + {NLAEDIT_SNAP_CFRA, "CFRA", 0, N_("Current frame"), ""}, + {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, N_("Nearest Frame"), ""}, // XXX as single entry? + {NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, N_("Nearest Second"), ""}, // XXX as single entry? + {NLAEDIT_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, N_("Nearest Marker"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1702,9 +1704,9 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op) void NLA_OT_snap (wmOperatorType *ot) { /* identifiers */ - ot->name= "Snap Strips"; + ot->name= _("Snap Strips"); ot->idname= "NLA_OT_snap"; - ot->description= "Move start of strips to specified time"; + ot->description= _("Move start of strips to specified time"); /* api callbacks */ ot->invoke= WM_menu_invoke; @@ -1715,7 +1717,7 @@ void NLA_OT_snap (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", prop_nlaedit_snap_types, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_nlaedit_snap_types), 0, _("Type"), ""); } /* *********************************************** */ @@ -1817,9 +1819,9 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op) void NLA_OT_fmodifier_add (wmOperatorType *ot) { /* identifiers */ - ot->name= "Add F-Modifier"; + ot->name= _("Add F-Modifier"); ot->idname= "NLA_OT_fmodifier_add"; - ot->description= "Add F-Modifier of the specified type to the selected NLA-Strips"; + ot->description= _("Add F-Modifier of the specified type to the selected NLA-Strips"); /* api callbacks */ ot->invoke= nla_fmodifier_add_invoke; @@ -1830,8 +1832,8 @@ void NLA_OT_fmodifier_add (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", ""); - RNA_def_boolean(ot->srna, "only_active", 0, "Only Active", "Only add F-Modifier of the specified type to the active strip."); + ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, _("Type"), ""); + RNA_def_boolean(ot->srna, "only_active", 0, _("Only Active"), _("Only add F-Modifier of the specified type to the active strip.")); } /* ******************** Copy F-Modifiers Operator *********************** */ @@ -1881,9 +1883,9 @@ static int nla_fmodifier_copy_exec(bContext *C, wmOperator *op) void NLA_OT_fmodifier_copy (wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy F-Modifiers"; + ot->name= _("Copy F-Modifiers"); ot->idname= "NLA_OT_fmodifier_copy"; - ot->description= "Copy the F-Modifier(s) of the active NLA-Strip"; + ot->description= _("Copy the F-Modifier(s) of the active NLA-Strip"); /* api callbacks */ ot->exec= nla_fmodifier_copy_exec; @@ -1943,9 +1945,9 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op) void NLA_OT_fmodifier_paste (wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste F-Modifiers"; + ot->name= _("Paste F-Modifiers"); ot->idname= "NLA_OT_fmodifier_paste"; - ot->description= "Add copied F-Modifiers to the selected NLA-Strips"; + ot->description= _("Add copied F-Modifiers to the selected NLA-Strips"); /* api callbacks */ ot->exec= nla_fmodifier_paste_exec; diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 8ef63b9a83d..d8f27c9399b 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -43,6 +43,8 @@ #include "BLI_math.h" #include "BLI_rand.h" +#include "BLF_api.h" + #include "BKE_nla.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -187,9 +189,9 @@ static int nlaedit_deselectall_exec(bContext *C, wmOperator *op) void NLA_OT_select_all_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; + ot->name= _("Select or Deselect All"); ot->idname= "NLA_OT_select_all_toggle"; - ot->description= "(De)Select all NLA-Strips"; + ot->description= _("(De)Select all NLA-Strips"); /* api callbacks */ ot->exec= nlaedit_deselectall_exec; @@ -199,7 +201,7 @@ void NLA_OT_select_all_toggle (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/; /* props */ - RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + RNA_def_boolean(ot->srna, "invert", 0, _("Invert"), ""); } /* ******************** Border Select Operator **************************** */ @@ -325,9 +327,9 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op) void NLA_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; + ot->name= _("Border Select"); ot->idname= "NLA_OT_select_border"; - ot->description= "Use box selection to grab NLA-Strips"; + ot->description= _("Use box selection to grab NLA-Strips"); /* api callbacks */ ot->invoke= WM_border_select_invoke; @@ -343,7 +345,7 @@ void NLA_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, 0); - RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); + RNA_def_boolean(ot->srna, "axis_range", 0, _("Axis Range"), ""); } /* ******************** Select Left/Right Operator ************************* */ @@ -351,9 +353,9 @@ void NLA_OT_select_border(wmOperatorType *ot) /* defines for left-right select tool */ static EnumPropertyItem prop_nlaedit_leftright_select_types[] = { - {NLAEDIT_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""}, - {NLAEDIT_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""}, - {NLAEDIT_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""}, + {NLAEDIT_LRSEL_TEST, "CHECK", 0, N_("Check if Select Left or Right"), ""}, + {NLAEDIT_LRSEL_LEFT, "LEFT", 0, N_("Before current frame"), ""}, + {NLAEDIT_LRSEL_RIGHT, "RIGHT", 0, N_("After current frame"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -477,9 +479,9 @@ static int nlaedit_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent void NLA_OT_select_leftright (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Left/Right"; + ot->name= _("Select Left/Right"); ot->idname= "NLA_OT_select_leftright"; - ot->description= "Select strips to the left or the right of the current frame "; + ot->description= _("Select strips to the left or the right of the current frame "); /* api callbacks */ ot->invoke= nlaedit_select_leftright_invoke; @@ -490,8 +492,8 @@ void NLA_OT_select_leftright (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "mode", prop_nlaedit_leftright_select_types, NLAEDIT_LRSEL_TEST, "Mode", ""); - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); + ot->prop= RNA_def_enum(ot->srna, "mode", RNA_enum_items_gettexted(prop_nlaedit_leftright_select_types), NLAEDIT_LRSEL_TEST, _("Mode"), ""); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); } @@ -638,9 +640,9 @@ static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even void NLA_OT_click_select (wmOperatorType *ot) { /* identifiers */ - ot->name= "Mouse Select"; + ot->name= _("Mouse Select"); ot->idname= "NLA_OT_click_select"; - ot->description= "Handle clicks to select NLA Strips"; + ot->description= _("Handle clicks to select NLA Strips"); /* api callbacks - absolutely no exec() this yet... */ ot->invoke= nlaedit_clickselect_invoke; @@ -650,7 +652,7 @@ void NLA_OT_click_select (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY + RNA_def_boolean(ot->srna, "extend", 0, _("Extend Select"), ""); // SHIFTKEY } /* *********************************************** */ diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c index 4b989a78fab..8c4787f3526 100644 --- a/source/blender/editors/space_node/node_buttons.c +++ b/source/blender/editors/space_node/node_buttons.c @@ -46,6 +46,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_node.h" #include "BKE_screen.h" @@ -162,8 +164,8 @@ static int node_properties_poll(bContext *C) void NODE_OT_properties(wmOperatorType *ot) { - ot->name= "Properties"; - ot->description= "Toggles the properties panel display"; + ot->name= _("Properties"); + ot->description= _("Toggles the properties panel display"); ot->idname= "NODE_OT_properties"; ot->exec= node_properties; diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 950b3c72fe7..0cd7d19a658 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -288,7 +288,7 @@ static void node_update(const bContext *C, bNodeTree *ntree, bNode *node) RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); layout= uiBlockLayout(node->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, - node->locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, U.uistyles.first); + node->locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, UI_GetStyle()); node->typeinfo->uifunc(layout, (bContext *)C, &ptr); uiBlockEndAlign(node->block); @@ -656,7 +656,7 @@ static uiBlock *socket_vector_menu(bContext *C, ARegion *ar, void *args_v) block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS); uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN); - layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, U.uistyles.first), 0); + layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, UI_GetStyle()), 0); uiItemR(layout, &args->ptr, "default_value", UI_ITEM_R_EXPAND, "", ICON_NONE); @@ -1115,7 +1115,7 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN UI_ThemeColor(TH_TEXT_HI); layout = uiBlockLayout(gnode->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, (short)(rect.xmin+15), (short)(rect.ymax+group_header), - MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, U.uistyles.first); + MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, UI_GetStyle()); RNA_pointer_create(&ntree->id, &RNA_Node, gnode, &ptr); uiTemplateIDBrowse(layout, (bContext*)C, &ptr, "node_tree", NULL, NULL, NULL); uiBlockLayoutResolve(gnode->block, NULL, NULL); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 18d4d85e3ff..3100dc7da26 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -50,6 +50,8 @@ #include "BLI_storage_types.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_global.h" @@ -88,8 +90,8 @@ #include "node_intern.h" static EnumPropertyItem socket_in_out_items[] = { - { SOCK_IN, "IN", 0, "In", "" }, - { SOCK_OUT, "OUT", 0, "Out", "" }, + { SOCK_IN, "IN", 0, N_("In"), "" }, + { SOCK_OUT, "OUT", 0, N_("Out"), "" }, { 0, NULL, 0, NULL, NULL} }; @@ -636,8 +638,8 @@ static int node_group_edit_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e void NODE_OT_group_edit(wmOperatorType *ot) { /* identifiers */ - ot->name = "Edit Group"; - ot->description = "Edit node group"; + ot->name = _("Edit Group"); + ot->description = _("Edit node group"); ot->idname = "NODE_OT_group_edit"; /* api callbacks */ @@ -685,8 +687,8 @@ static int node_group_socket_add_exec(bContext *C, wmOperator *op) void NODE_OT_group_socket_add(wmOperatorType *ot) { /* identifiers */ - ot->name = "Add Group Socket"; - ot->description = "Add node group socket"; + ot->name = _("Add Group Socket"); + ot->description = _("Add node group socket"); ot->idname = "NODE_OT_group_socket_add"; /* api callbacks */ @@ -696,9 +698,9 @@ void NODE_OT_group_socket_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output"); - RNA_def_string(ot->srna, "name", "", 32, "Name", "Group socket name"); - RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_VALUE, "Type", "Type of the group socket"); + RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, _("Socket Type"), _("Input or Output")); + RNA_def_string(ot->srna, "name", "", 32, _("Name"), _("Group socket name")); + RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_VALUE, _("Type"), _("Type of the group socket")); } /* ***************** Remove Group Socket operator ************* */ @@ -737,8 +739,8 @@ static int node_group_socket_remove_exec(bContext *C, wmOperator *op) void NODE_OT_group_socket_remove(wmOperatorType *ot) { /* identifiers */ - ot->name = "Remove Group Socket"; - ot->description = "Removed node group socket"; + ot->name = _("Remove Group Socket"); + ot->description = _("Removed node group socket"); ot->idname = "NODE_OT_group_socket_remove"; /* api callbacks */ @@ -748,8 +750,8 @@ void NODE_OT_group_socket_remove(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, INT_MAX); - RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output"); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), "", 0, INT_MAX); + RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, _("Socket Type"), _("Input or Output")); } /* ***************** Move Group Socket Up operator ************* */ @@ -803,8 +805,8 @@ static int node_group_socket_move_up_exec(bContext *C, wmOperator *op) void NODE_OT_group_socket_move_up(wmOperatorType *ot) { /* identifiers */ - ot->name = "Move Group Socket Up"; - ot->description = "Move up node group socket"; + ot->name = _("Move Group Socket Up"); + ot->description = _("Move up node group socket"); ot->idname = "NODE_OT_group_socket_move_up"; /* api callbacks */ @@ -814,8 +816,8 @@ void NODE_OT_group_socket_move_up(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, INT_MAX); - RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output"); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), "", 0, INT_MAX); + RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, _("Socket Type"), _("Input or Output")); } /* ***************** Move Group Socket Up operator ************* */ @@ -869,8 +871,8 @@ static int node_group_socket_move_down_exec(bContext *C, wmOperator *op) void NODE_OT_group_socket_move_down(wmOperatorType *ot) { /* identifiers */ - ot->name = "Move Group Socket Down"; - ot->description = "Move down node group socket"; + ot->name = _("Move Group Socket Down"); + ot->description = _("Move down node group socket"); ot->idname = "NODE_OT_group_socket_move_down"; /* api callbacks */ @@ -880,8 +882,8 @@ void NODE_OT_group_socket_move_down(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, INT_MAX); - RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output"); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), "", 0, INT_MAX); + RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, _("Socket Type"), _("Input or Output")); } /* ******************** Ungroup operator ********************** */ @@ -920,8 +922,8 @@ static int node_group_ungroup_exec(bContext *C, wmOperator *op) void NODE_OT_group_ungroup(wmOperatorType *ot) { /* identifiers */ - ot->name = "Ungroup"; - ot->description = "Ungroup selected nodes"; + ot->name = _("Ungroup"); + ot->description = _("Ungroup selected nodes"); ot->idname = "NODE_OT_group_ungroup"; /* api callbacks */ @@ -1090,8 +1092,8 @@ static int snode_bg_viewmove_cancel(bContext *UNUSED(C), wmOperator *op) void NODE_OT_backimage_move(wmOperatorType *ot) { /* identifiers */ - ot->name= "Background Image Move"; - ot->description = "Move Node backdrop"; + ot->name= _("Background Image Move"); + ot->description = _("Move Node backdrop"); ot->idname= "NODE_OT_backimage_move"; /* api callbacks */ @@ -1121,7 +1123,7 @@ void NODE_OT_backimage_zoom(wmOperatorType *ot) { /* identifiers */ - ot->name= "Background Image Zoom"; + ot->name= _("Background Image Zoom"); ot->idname= "NODE_OT_backimage_zoom"; /* api callbacks */ @@ -1132,7 +1134,7 @@ void NODE_OT_backimage_zoom(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING; /* internal */ - RNA_def_float(ot->srna, "factor", 1.2f, 0.0f, 10.0f, "Factor", "", 0.0f, 10.0f); + RNA_def_float(ot->srna, "factor", 1.2f, 0.0f, 10.0f, _("Factor"), "", 0.0f, 10.0f); } /******************** sample backdrop operator ********************/ @@ -1284,7 +1286,7 @@ static int sample_cancel(bContext *C, wmOperator *op) void NODE_OT_backimage_sample(wmOperatorType *ot) { /* identifiers */ - ot->name= "Backimage Sample"; + ot->name= _("Backimage Sample"); ot->idname= "NODE_OT_backimage_sample"; /* api callbacks */ @@ -1403,7 +1405,7 @@ static int node_resize_cancel(bContext *UNUSED(C), wmOperator *op) void NODE_OT_resize(wmOperatorType *ot) { /* identifiers */ - ot->name= "Resize Node"; + ot->name= _("Resize Node"); ot->idname= "NODE_OT_resize"; /* api callbacks */ @@ -1610,8 +1612,8 @@ static int node_active_link_viewer(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_link_viewer(wmOperatorType *ot) { /* identifiers */ - ot->name= "Link to Viewer Node"; - ot->description = "Link to Viewer Node"; + ot->name= _("Link to Viewer Node"); + ot->description = _("Link to Viewer Node"); ot->idname= "NODE_OT_link_viewer"; /* api callbacks */ @@ -2088,8 +2090,8 @@ static int node_duplicate_exec(bContext *C, wmOperator *op) void NODE_OT_duplicate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Nodes"; - ot->description = "Duplicate the nodes"; + ot->name= _("Duplicate Nodes"); + ot->description = _("Duplicate the nodes"); ot->idname= "NODE_OT_duplicate"; /* api callbacks */ @@ -2099,7 +2101,7 @@ void NODE_OT_duplicate(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "keep_inputs", 0, "Keep Inputs", "Keep the input links to duplicated nodes"); + RNA_def_boolean(ot->srna, "keep_inputs", 0, _("Keep Inputs"), _("Keep the input links to duplicated nodes")); } /* *************************** add link op ******************** */ @@ -2358,7 +2360,7 @@ static int node_link_cancel(bContext *C, wmOperator *op) void NODE_OT_link(wmOperatorType *ot) { /* identifiers */ - ot->name= "Link Nodes"; + ot->name= _("Link Nodes"); ot->idname= "NODE_OT_link"; /* api callbacks */ @@ -2394,8 +2396,8 @@ static int node_make_link_exec(bContext *C, wmOperator *op) void NODE_OT_link_make(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Links"; - ot->description= "Makes a link between selected output in input sockets"; + ot->name= _("Make Links"); + ot->description= _("Makes a link between selected output in input sockets"); ot->idname= "NODE_OT_link_make"; /* callbacks */ @@ -2405,7 +2407,7 @@ void NODE_OT_link_make(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "replace", 0, "Replace", "Replace socket connections with the new links"); + RNA_def_boolean(ot->srna, "replace", 0, _("Replace"), _("Replace socket connections with the new links")); } /* ********************** Cut Link operator ***************** */ @@ -2473,7 +2475,7 @@ void NODE_OT_links_cut(wmOperatorType *ot) { PropertyRNA *prop; - ot->name= "Cut links"; + ot->name= _("Cut links"); ot->idname= "NODE_OT_links_cut"; ot->invoke= WM_gesture_lines_invoke; @@ -2489,7 +2491,7 @@ void NODE_OT_links_cut(wmOperatorType *ot) prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); /* internal */ - RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX); + RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, _("Cursor"), "", 0, INT_MAX); } /* ********************* automatic node insert on dragging ******************* */ @@ -2675,7 +2677,7 @@ static int node_read_renderlayers_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_read_renderlayers(wmOperatorType *ot) { - ot->name= "Read Render Layers"; + ot->name= _("Read Render Layers"); ot->idname= "NODE_OT_read_renderlayers"; ot->exec= node_read_renderlayers_exec; @@ -2707,7 +2709,7 @@ static int node_read_fullsamplelayers_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_read_fullsamplelayers(wmOperatorType *ot) { - ot->name= "Read Full Sample Layers"; + ot->name= _("Read Full Sample Layers"); ot->idname= "NODE_OT_read_fullsamplelayers"; ot->exec= node_read_fullsamplelayers_exec; @@ -2755,7 +2757,7 @@ int node_render_changed_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_render_changed(wmOperatorType *ot) { - ot->name= "Render Changed Layer"; + ot->name= _("Render Changed Layer"); ot->idname= "NODE_OT_render_changed"; ot->exec= node_render_changed_exec; @@ -2814,8 +2816,8 @@ static int node_group_make_exec(bContext *C, wmOperator *op) void NODE_OT_group_make(wmOperatorType *ot) { /* identifiers */ - ot->name = "Group"; - ot->description = "Make group from selected nodes"; + ot->name = _("Group"); + ot->description = _("Make group from selected nodes"); ot->idname = "NODE_OT_group_make"; /* api callbacks */ @@ -2877,8 +2879,8 @@ static int node_hide_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_hide_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide"; - ot->description= "Toggle hiding of selected nodes"; + ot->name= _("Hide"); + ot->description= _("Toggle hiding of selected nodes"); ot->idname= "NODE_OT_hide_toggle"; /* callbacks */ @@ -2909,8 +2911,8 @@ static int node_preview_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_preview_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Node Preview"; - ot->description= "Toggle preview display for selected nodes"; + ot->name= _("Toggle Node Preview"); + ot->description= _("Toggle preview display for selected nodes"); ot->idname= "NODE_OT_preview_toggle"; /* callbacks */ @@ -2958,8 +2960,8 @@ static int node_socket_toggle_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_hide_socket_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Hidden Node Sockets"; - ot->description= "Toggle unused node socket display"; + ot->name= _("Toggle Hidden Node Sockets"); + ot->description= _("Toggle unused node socket display"); ot->idname= "NODE_OT_hide_socket_toggle"; /* callbacks */ @@ -3001,8 +3003,8 @@ static int node_mute_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_mute_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Node Mute"; - ot->description= "Toggle muting of the nodes"; + ot->name= _("Toggle Node Mute"); + ot->description= _("Toggle muting of the nodes"); ot->idname= "NODE_OT_mute_toggle"; /* callbacks */ @@ -3043,8 +3045,8 @@ static int node_delete_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete"; - ot->description = "Delete selected nodes"; + ot->name= _("Delete"); + ot->description = _("Delete selected nodes"); ot->idname= "NODE_OT_delete"; /* api callbacks */ @@ -3183,8 +3185,8 @@ static int node_show_cycles_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_show_cyclic_dependencies(wmOperatorType *ot) { /* identifiers */ - ot->name= "Show Cyclic Dependencies"; - ot->description= "Sort the nodes and show the cyclic dependencies between the nodes"; + ot->name= _("Show Cyclic Dependencies"); + ot->description= _("Sort the nodes and show the cyclic dependencies between the nodes"); ot->idname= "NODE_OT_show_cyclic_dependencies"; /* callbacks */ @@ -3272,8 +3274,8 @@ static int node_add_file_invoke(bContext *C, wmOperator *op, wmEvent *event) void NODE_OT_add_file(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add File Node"; - ot->description= "Add a file node to the current node editor"; + ot->name= _("Add File Node"); + ot->description= _("Add a file node to the current node editor"); ot->idname= "NODE_OT_add_file"; /* callbacks */ @@ -3285,7 +3287,7 @@ void NODE_OT_add_file(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH); //XXX TODO, relative_path - RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Datablock name to assign."); + RNA_def_string(ot->srna, "name", "Image", 24, _("Name"), _("Datablock name to assign.")); } diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c index 4f3991e8ff8..a5646a51347 100644 --- a/source/blender/editors/space_node/node_header.c +++ b/source/blender/editors/space_node/node_header.c @@ -44,6 +44,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_screen.h" #include "BKE_node.h" @@ -179,34 +181,34 @@ static void node_menu_add(const bContext *C, Menu *menu) uiLayoutSetActive(layout, 0); if(snode->treetype==NTREE_SHADER) { - uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); - uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); - uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); - uiItemMenuF(layout, "Vector", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR)); - uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); - uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); - uiItemMenuF(layout, "Dynamic", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC)); + uiItemMenuF(layout, _("Input"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); + uiItemMenuF(layout, _("Output"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); + uiItemMenuF(layout, _("Color"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); + uiItemMenuF(layout, _("Vector"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR)); + uiItemMenuF(layout, _("Convertor"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); + uiItemMenuF(layout, _("Group"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); + uiItemMenuF(layout, _("Dynamic"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC)); } else if(snode->treetype==NTREE_COMPOSIT) { - uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); - uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); - uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); - uiItemMenuF(layout, "Vector", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR)); - uiItemMenuF(layout, "Filter", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER)); - uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); - uiItemMenuF(layout, "Matte", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE)); - uiItemMenuF(layout, "Distort", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); - uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); + uiItemMenuF(layout, _("Input"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); + uiItemMenuF(layout, _("Output"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); + uiItemMenuF(layout, _("Color"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); + uiItemMenuF(layout, _("Vector"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR)); + uiItemMenuF(layout, _("Filter"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER)); + uiItemMenuF(layout, _("Convertor"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); + uiItemMenuF(layout, _("Matte"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE)); + uiItemMenuF(layout, _("Distort"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); + uiItemMenuF(layout, _("Group"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); } else if(snode->treetype==NTREE_TEXTURE) { - uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); - uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); - uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); - uiItemMenuF(layout, "Patterns", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN)); - uiItemMenuF(layout, "Textures", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE)); - uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); - uiItemMenuF(layout, "Distort", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); - uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); + uiItemMenuF(layout, _("Input"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); + uiItemMenuF(layout, _("Output"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); + uiItemMenuF(layout, _("Color"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); + uiItemMenuF(layout, _("Patterns"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN)); + uiItemMenuF(layout, _("Textures"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE)); + uiItemMenuF(layout, _("Convertor"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); + uiItemMenuF(layout, _("Distort"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); + uiItemMenuF(layout, _("Group"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); } } @@ -216,7 +218,7 @@ void node_menus_register(void) mt= MEM_callocN(sizeof(MenuType), "spacetype node menu add"); strcpy(mt->idname, "NODE_MT_add"); - strcpy(mt->label, "Add"); + strcpy(mt->label, _("Add")); mt->draw= node_menu_add; WM_menutype_add(mt); } diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c index 4bb0283690b..3a4ca866d41 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -42,6 +42,8 @@ #include "RNA_access.h" +#include "BLF_api.h" + #include "WM_api.h" #include "WM_types.h" @@ -103,17 +105,17 @@ void ED_operatormacros_node(void) wmOperatorType *ot; wmOperatorTypeMacro *mot; - ot= WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("NODE_OT_duplicate_move", _("Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "NODE_OT_duplicate"); WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); /* modified operator call for duplicating with input links */ - ot= WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", _("Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER); mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate"); RNA_boolean_set(mot->ptr, "keep_inputs", 1); WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - ot= WM_operatortype_append_macro("NODE_OT_select_link_viewer", "Link Viewer", OPTYPE_UNDO); + ot= WM_operatortype_append_macro("NODE_OT_select_link_viewer", _("Link Viewer"), OPTYPE_UNDO); WM_operatortype_macro_define(ot, "NODE_OT_select"); WM_operatortype_macro_define(ot, "NODE_OT_link_viewer"); } diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 1abcaccc939..36525bc517c 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -41,6 +41,8 @@ #include "BLI_rect.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "ED_screen.h" #include "ED_types.h" @@ -134,9 +136,9 @@ static int node_select_invoke(bContext *C, wmOperator *op, wmEvent *event) void NODE_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select"; + ot->name= _("Select"); ot->idname= "NODE_OT_select"; - ot->description= "Select node under cursor"; + ot->description= _("Select node under cursor"); /* api callbacks */ ot->invoke= node_select_invoke; @@ -146,9 +148,9 @@ void NODE_OT_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX); - RNA_def_boolean(ot->srna, "extend", 0, "Extend", ""); + RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, _("Mouse X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, _("Mouse Y"), "", INT_MIN, INT_MAX); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), ""); } /* ****** Border Select ****** */ @@ -207,9 +209,9 @@ static int node_border_select_invoke(bContext *C, wmOperator *op, wmEvent *event void NODE_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; + ot->name= _("Border Select"); ot->idname= "NODE_OT_select_border"; - ot->description= "Use box selection to select nodes"; + ot->description= _("Use box selection to select nodes"); /* api callbacks */ ot->invoke= node_border_select_invoke; @@ -224,7 +226,7 @@ void NODE_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, FALSE); - RNA_def_boolean(ot->srna, "tweak", 0, "Tweak", "Only activate when mouse is not over a node - useful for tweak gesture"); + RNA_def_boolean(ot->srna, "tweak", 0, _("Tweak"), _("Only activate when mouse is not over a node - useful for tweak gesture")); } /* ****** Select/Deselect All ****** */ @@ -256,8 +258,8 @@ static int node_select_all_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name = "Select or Deselect All"; - ot->description = "(De)select all nodes"; + ot->name = _("Select or Deselect All"); + ot->description = _("(De)select all nodes"); ot->idname = "NODE_OT_select_all"; /* api callbacks */ @@ -296,8 +298,8 @@ static int node_select_linked_to_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_select_linked_to(wmOperatorType *ot) { /* identifiers */ - ot->name = "Select Linked To"; - ot->description = "Select nodes linked to the selected ones"; + ot->name = _("Select Linked To"); + ot->description = _("Select nodes linked to the selected ones"); ot->idname = "NODE_OT_select_linked_to"; /* api callbacks */ @@ -336,8 +338,8 @@ static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_select_linked_from(wmOperatorType *ot) { /* identifiers */ - ot->name = "Select Linked From"; - ot->description = "Select nodes linked from the selected ones"; + ot->name = _("Select Linked From"); + ot->description = _("Select nodes linked from the selected ones"); ot->idname = "NODE_OT_select_linked_from"; /* api callbacks */ @@ -362,8 +364,8 @@ static int node_select_same_type_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_select_same_type(wmOperatorType *ot) { /* identifiers */ - ot->name = "Select Same Type"; - ot->description = "Select all the same type"; + ot->name = _("Select Same Type"); + ot->description = _("Select all the same type"); ot->idname = "NODE_OT_select_same_type"; /* api callbacks */ @@ -388,8 +390,8 @@ static int node_select_same_type_next_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_select_same_type_next(wmOperatorType *ot) { /* identifiers */ - ot->name = "Select Same Type Next"; - ot->description = "Select the next node of the same type."; + ot->name = _("Select Same Type Next"); + ot->description = _("Select the next node of the same type."); ot->idname = "NODE_OT_select_same_type_next"; /* api callbacks */ @@ -412,8 +414,8 @@ static int node_select_same_type_prev_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_select_same_type_prev(wmOperatorType *ot) { /* identifiers */ - ot->name = "Select Same Type Prev"; - ot->description = "Select the prev node of the same type."; + ot->name = _("Select Same Type Prev"); + ot->description = _("Select the prev node of the same type."); ot->idname = "NODE_OT_select_same_type_prev"; /* api callbacks */ diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c index 601ffbd313d..a422222ae26 100644 --- a/source/blender/editors/space_node/node_state.c +++ b/source/blender/editors/space_node/node_state.c @@ -39,6 +39,8 @@ #include "BLI_rect.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_node.h" @@ -210,9 +212,9 @@ static int node_toggle_visibility_invoke(bContext *C, wmOperator *op, wmEvent *e void NODE_OT_visibility_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Visibility"; + ot->name= _("Toggle Visibility"); ot->idname= "NODE_OT_visibility_toggle"; - ot->description= "Handle clicks on node header buttons"; + ot->description= _("Handle clicks on node header buttons"); /* api callbacks */ ot->invoke= node_toggle_visibility_invoke; @@ -221,8 +223,8 @@ void NODE_OT_visibility_toggle(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, _("Mouse X"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, _("Mouse Y"), "", INT_MIN, INT_MAX); } /* **************** View All Operator ************** */ @@ -293,9 +295,9 @@ static int node_view_all_exec(bContext *C, wmOperator *UNUSED(op)) void NODE_OT_view_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; + ot->name= _("View All"); ot->idname= "NODE_OT_view_all"; - ot->description= "Resize view so you can see all nodes"; + ot->description= _("Resize view so you can see all nodes"); /* api callbacks */ ot->exec= node_view_all_exec; diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index 4194d463e10..f7f6ff96b31 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/space_outliner/SConscript b/source/blender/editors/space_outliner/SConscript index ab0b8582d33..5e57d9bab85 100644 --- a/source/blender/editors/space_outliner/SConscript +++ b/source/blender/editors/space_outliner/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc ../../makesrna ../../blenloader' incs += ' #/extern/glew/include' diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 93dc96cf9c0..b0cd5ae7993 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -59,6 +59,8 @@ #include "BLI_utildefines.h" #include "BLI_math_base.h" +#include "BLF_api.h" + #if defined WIN32 && !defined _LIBC # include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ #else @@ -448,7 +450,7 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc * in order to not overflow short tselem->nr */ te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_COMBINED)); - te->name= "Combined"; + te->name= _("Combined"); te->directdata= &srl->passflag; /* save cpu cycles, but we add the first to invoke an open/close triangle */ @@ -461,11 +463,11 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_VECTOR)); - te->name= "Vector"; + te->name= _("Vector"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_NORMAL)); - te->name= "Normal"; + te->name= _("Normal"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_UV)); @@ -473,31 +475,31 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_MIST)); - te->name= "Mist"; + te->name= _("Mist"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDEXOB)); - te->name= "Index Object"; + te->name= _("Index Object"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDEXMA)); - te->name= "Index Material"; + te->name= _("Index Material"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_RGBA)); - te->name= "Color"; + te->name= _("Color"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_DIFFUSE)); - te->name= "Diffuse"; + te->name= _("Diffuse"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_SPEC)); - te->name= "Specular"; + te->name= _("Specular"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_SHADOW)); - te->name= "Shadow"; + te->name= _("Shadow"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_AO)); @@ -505,23 +507,23 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_REFLECT)); - te->name= "Reflection"; + te->name= _("Reflection"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_REFRACT)); - te->name= "Refraction"; + te->name= _("Refraction"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDIRECT)); - te->name= "Indirect"; + te->name= _("Indirect"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_ENVIRONMENT)); - te->name= "Environment"; + te->name= _("Environment"); te->directdata= &srl->passflag; te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_EMIT)); - te->name= "Emit"; + te->name= _("Emit"); te->directdata= &srl->passflag; } @@ -548,7 +550,7 @@ static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *s TreeElement *tenla= outliner_add_element(soops, lb, sce, te, TSE_R_LAYER_BASE, 0); int a; - tenla->name= "RenderLayers"; + tenla->name= _("RenderLayers"); for(a=0, srl= sce->r.layers.first; srl; srl= srl->next, a++) { TreeElement *tenlay= outliner_add_element(soops, &tenla->subtree, sce, te, TSE_R_LAYER, a); tenlay->name= srl->name; @@ -1540,16 +1542,16 @@ static int outliner_scroll_page_exec(bContext *C, wmOperator *op) void OUTLINER_OT_scroll_page(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroll Page"; + ot->name= _("Scroll Page"); ot->idname= "OUTLINER_OT_scroll_page"; - ot->description= "Scroll page up or down"; + ot->description= _("Scroll page up or down"); /* callbacks */ ot->exec= outliner_scroll_page_exec; ot->poll= ED_operator_outliner_active; /* properties */ - RNA_def_boolean(ot->srna, "up", 0, "Up", "Scroll up one page."); + RNA_def_boolean(ot->srna, "up", 0, _("Up"), _("Scroll up one page.")); } @@ -1651,9 +1653,9 @@ static int outliner_toggle_visibility_exec(bContext *C, wmOperator *UNUSED(op)) void OUTLINER_OT_visibility_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Visibility"; + ot->name= _("Toggle Visibility"); ot->idname= "OUTLINER_OT_visibility_toggle"; - ot->description= "Toggle the visibility of selected items"; + ot->description= _("Toggle the visibility of selected items"); /* callbacks */ ot->exec= outliner_toggle_visibility_exec; @@ -1691,9 +1693,9 @@ static int outliner_toggle_selectability_exec(bContext *C, wmOperator *UNUSED(op void OUTLINER_OT_selectability_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Selectability"; + ot->name= _("Toggle Selectability"); ot->idname= "OUTLINER_OT_selectability_toggle"; - ot->description= "Toggle the selectability"; + ot->description= _("Toggle the selectability"); /* callbacks */ ot->exec= outliner_toggle_selectability_exec; @@ -1728,9 +1730,9 @@ static int outliner_toggle_renderability_exec(bContext *C, wmOperator *UNUSED(op void OUTLINER_OT_renderability_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Renderability"; + ot->name= _("Toggle Renderability"); ot->idname= "OUTLINER_OT_renderability_toggle"; - ot->description= "Toggle the renderability of selected items"; + ot->description= _("Toggle the renderability of selected items"); /* callbacks */ ot->exec= outliner_toggle_renderability_exec; @@ -1759,9 +1761,9 @@ static int outliner_toggle_expanded_exec(bContext *C, wmOperator *UNUSED(op)) void OUTLINER_OT_expanded_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Expand/Collapse All"; + ot->name= _("Expand/Collapse All"); ot->idname= "OUTLINER_OT_expanded_toggle"; - ot->description= "Expand/Collapse all items"; + ot->description= _("Expand/Collapse all items"); /* callbacks */ ot->exec= outliner_toggle_expanded_exec; @@ -1794,9 +1796,9 @@ static int outliner_toggle_selected_exec(bContext *C, wmOperator *UNUSED(op)) void OUTLINER_OT_selected_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Selected"; + ot->name= _("Toggle Selected"); ot->idname= "OUTLINER_OT_selected_toggle"; - ot->description= "Toggle the Outliner selection of items"; + ot->description= _("Toggle the Outliner selection of items"); /* callbacks */ ot->exec= outliner_toggle_selected_exec; @@ -1851,9 +1853,9 @@ static int outliner_one_level_exec(bContext *C, wmOperator *op) void OUTLINER_OT_show_one_level(wmOperatorType *ot) { /* identifiers */ - ot->name= "Show/Hide One Level"; + ot->name= _("Show/Hide One Level"); ot->idname= "OUTLINER_OT_show_one_level"; - ot->description= "Expand/collapse all entries by one level"; + ot->description= _("Expand/collapse all entries by one level"); /* callbacks */ ot->exec= outliner_one_level_exec; @@ -1862,7 +1864,7 @@ void OUTLINER_OT_show_one_level(wmOperatorType *ot) /* no undo or registry, UI option */ /* properties */ - RNA_def_boolean(ot->srna, "open", 1, "Open", "Expand all entries one level deep."); + RNA_def_boolean(ot->srna, "open", 1, _("Open"), _("Expand all entries one level deep.")); } /* This is not used anywhere at the moment */ @@ -2616,15 +2618,15 @@ static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event) void OUTLINER_OT_item_activate(wmOperatorType *ot) { - ot->name= "Activate Item"; + ot->name= _("Activate Item"); ot->idname= "OUTLINER_OT_item_activate"; - ot->description= "Handle mouse clicks to activate/select items"; + ot->description= _("Handle mouse clicks to activate/select items"); ot->invoke= outliner_item_activate; ot->poll= ED_operator_outliner_active; - RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection for activation."); + RNA_def_boolean(ot->srna, "extend", 1, _("Extend"), _("Extend selection for activation.")); } /* *********** */ @@ -2679,15 +2681,15 @@ static int outliner_item_openclose(bContext *C, wmOperator *op, wmEvent *event) void OUTLINER_OT_item_openclose(wmOperatorType *ot) { - ot->name= "Open/Close Item"; + ot->name= _("Open/Close Item"); ot->idname= "OUTLINER_OT_item_openclose"; - ot->description= "Toggle whether item under cursor is enabled or closed"; + ot->description= _("Toggle whether item under cursor is enabled or closed"); ot->invoke= outliner_item_openclose; ot->poll= ED_operator_outliner_active; - RNA_def_boolean(ot->srna, "all", 1, "All", "Close or open all items."); + RNA_def_boolean(ot->srna, "all", 1, _("All"), _("Close or open all items.")); } @@ -2749,9 +2751,9 @@ static int outliner_item_rename(bContext *C, wmOperator *UNUSED(op), wmEvent *ev void OUTLINER_OT_item_rename(wmOperatorType *ot) { - ot->name= "Rename Item"; + ot->name= _("Rename Item"); ot->idname= "OUTLINER_OT_item_rename"; - ot->description= "Rename item under cursor"; + ot->description= _("Rename item under cursor"); ot->invoke= outliner_item_rename; @@ -2816,9 +2818,9 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op)) void OUTLINER_OT_show_active(wmOperatorType *ot) { /* identifiers */ - ot->name= "Show Active"; + ot->name= _("Show Active"); ot->idname= "OUTLINER_OT_show_active"; - ot->description= "Adjust the view so that the active Object is shown centered"; + ot->description= _("Adjust the view so that the active Object is shown centered"); /* callbacks */ ot->exec= outliner_show_active_exec; @@ -3046,9 +3048,9 @@ static int outliner_show_hierarchy_exec(bContext *C, wmOperator *UNUSED(op)) void OUTLINER_OT_show_hierarchy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Show Hierarchy"; + ot->name= _("Show Hierarchy"); ot->idname= "OUTLINER_OT_show_hierarchy"; - ot->description= "Open all object entries and close all others"; + ot->description= _("Open all object entries and close all others"); /* callbacks */ ot->exec= outliner_show_hierarchy_exec; @@ -3440,12 +3442,12 @@ static void outliner_del(bContext *C, Scene *scene, ARegion *UNUSED(ar), SpaceOo /* **************************************** */ static EnumPropertyItem prop_object_op_types[] = { - {1, "SELECT", 0, "Select", ""}, - {2, "DESELECT", 0, "Deselect", ""}, - {4, "DELETE", 0, "Delete", ""}, - {6, "TOGVIS", 0, "Toggle Visible", ""}, - {7, "TOGSEL", 0, "Toggle Selectable", ""}, - {8, "TOGREN", 0, "Toggle Renderable", ""}, + {1, "SELECT", 0, N_("Select"), ""}, + {2, "DESELECT", 0, N_("Deselect"), ""}, + {4, "DELETE", 0, N_("Delete"), ""}, + {6, "TOGVIS", 0, N_("Toggle Visible"), ""}, + {7, "TOGSEL", 0, N_("Toggle Selectable"), ""}, + {8, "TOGREN", 0, N_("Toggle Renderable"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -3513,7 +3515,7 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op) void OUTLINER_OT_object_operation(wmOperatorType *ot) { /* identifiers */ - ot->name= "Outliner Object Operation"; + ot->name= _("Outliner Object Operation"); ot->idname= "OUTLINER_OT_object_operation"; ot->description= ""; @@ -3524,18 +3526,18 @@ void OUTLINER_OT_object_operation(wmOperatorType *ot) ot->flag= 0; - ot->prop= RNA_def_enum(ot->srna, "type", prop_object_op_types, 0, "Object Operation", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_object_op_types), 0, _("Object Operation"), ""); } /* **************************************** */ static EnumPropertyItem prop_group_op_types[] = { - {1, "UNLINK", 0, "Unlink", ""}, - {2, "LOCAL", 0, "Make Local", ""}, - {3, "LINK", 0, "Link Group Objects to Scene", ""}, - {4, "TOGVIS", 0, "Toggle Visible", ""}, - {5, "TOGSEL", 0, "Toggle Selectable", ""}, - {6, "TOGREN", 0, "Toggle Renderable", ""}, + {1, "UNLINK", 0, N_("Unlink"), ""}, + {2, "LOCAL", 0, N_("Make Local"), ""}, + {3, "LINK", 0, N_("Link Group Objects to Scene"), ""}, + {4, "TOGVIS", 0, N_("Toggle Visible"), ""}, + {5, "TOGSEL", 0, N_("Toggle Selectable"), ""}, + {6, "TOGREN", 0, N_("Toggle Renderable"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -3574,7 +3576,7 @@ static int outliner_group_operation_exec(bContext *C, wmOperator *op) void OUTLINER_OT_group_operation(wmOperatorType *ot) { /* identifiers */ - ot->name= "Outliner Group Operation"; + ot->name= _("Outliner Group Operation"); ot->idname= "OUTLINER_OT_group_operation"; ot->description= ""; @@ -3585,14 +3587,14 @@ void OUTLINER_OT_group_operation(wmOperatorType *ot) ot->flag= 0; - ot->prop= RNA_def_enum(ot->srna, "type", prop_group_op_types, 0, "Group Operation", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_group_op_types), 0, _("Group Operation"), ""); } /* **************************************** */ static EnumPropertyItem prop_id_op_types[] = { - {1, "UNLINK", 0, "Unlink", ""}, - {2, "LOCAL", 0, "Make Local", ""}, + {1, "UNLINK", 0, N_("Unlink"), ""}, + {2, "LOCAL", 0, N_("Make Local"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -3640,7 +3642,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) void OUTLINER_OT_id_operation(wmOperatorType *ot) { /* identifiers */ - ot->name= "Outliner ID data Operation"; + ot->name= _("Outliner ID data Operation"); ot->idname= "OUTLINER_OT_id_operation"; ot->description= ""; @@ -3651,16 +3653,16 @@ void OUTLINER_OT_id_operation(wmOperatorType *ot) ot->flag= 0; - ot->prop= RNA_def_enum(ot->srna, "type", prop_id_op_types, 0, "ID data Operation", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_id_op_types), 0, _("ID data Operation"), ""); } /* **************************************** */ static EnumPropertyItem prop_data_op_types[] = { - {1, "SELECT", 0, "Select", ""}, - {2, "DESELECT", 0, "Deselect", ""}, - {3, "HIDE", 0, "Hide", ""}, - {4, "UNHIDE", 0, "Unhide", ""}, + {1, "SELECT", 0, N_("Select"), ""}, + {2, "DESELECT", 0, N_("Deselect"), ""}, + {3, "HIDE", 0, N_("Hide"), ""}, + {4, "UNHIDE", 0, N_("Unhide"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -3711,7 +3713,7 @@ static int outliner_data_operation_exec(bContext *C, wmOperator *op) void OUTLINER_OT_data_operation(wmOperatorType *ot) { /* identifiers */ - ot->name= "Outliner Data Operation"; + ot->name= _("Outliner Data Operation"); ot->idname= "OUTLINER_OT_data_operation"; ot->description= ""; @@ -3722,7 +3724,7 @@ void OUTLINER_OT_data_operation(wmOperatorType *ot) ot->flag= 0; - ot->prop= RNA_def_enum(ot->srna, "type", prop_data_op_types, 0, "Data Operation", ""); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_data_op_types), 0, _("Data Operation"), ""); } @@ -3804,9 +3806,9 @@ static int outliner_operation(bContext *C, wmOperator *UNUSED(op), wmEvent *even /* Menu only! Calls other operators */ void OUTLINER_OT_operation(wmOperatorType *ot) { - ot->name= "Execute Operation"; + ot->name= _("Execute Operation"); ot->idname= "OUTLINER_OT_operation"; - ot->description= "Context menu for item operations"; + ot->description= _("Context menu for item operations"); ot->invoke= outliner_operation; @@ -4073,8 +4075,8 @@ void OUTLINER_OT_drivers_add_selected(wmOperatorType *ot) { /* api callbacks */ ot->idname= "OUTLINER_OT_drivers_add_selected"; - ot->name= "Add Drivers for Selected"; - ot->description= "Add drivers to selected items"; + ot->name= _("Add Drivers for Selected"); + ot->description= _("Add drivers to selected items"); /* api callbacks */ ot->exec= outliner_drivers_addsel_exec; @@ -4108,8 +4110,8 @@ void OUTLINER_OT_drivers_delete_selected(wmOperatorType *ot) { /* identifiers */ ot->idname= "OUTLINER_OT_drivers_delete_selected"; - ot->name= "Delete Drivers for Selected"; - ot->description= "Delete drivers assigned to selected items"; + ot->name= _("Delete Drivers for Selected"); + ot->description= _("Delete drivers assigned to selected items"); /* api callbacks */ ot->exec= outliner_drivers_deletesel_exec; @@ -4246,8 +4248,8 @@ void OUTLINER_OT_keyingset_add_selected(wmOperatorType *ot) { /* identifiers */ ot->idname= "OUTLINER_OT_keyingset_add_selected"; - ot->name= "Keying Set Add Selected"; - ot->description= "Add selected items (blue-grey rows) to active Keying Set"; + ot->name= _("Keying Set Add Selected"); + ot->description= _("Add selected items (blue-grey rows) to active Keying Set"); /* api callbacks */ ot->exec= outliner_keyingset_additems_exec; @@ -4283,8 +4285,8 @@ void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot) { /* identifiers */ ot->idname= "OUTLINER_OT_keyingset_remove_selected"; - ot->name= "Keying Set Remove Selected"; - ot->description = "Remove selected items (blue-grey rows) from active Keying Set"; + ot->name= _("Keying Set Remove Selected"); + ot->description = _("Remove selected items (blue-grey rows) from active Keying Set"); /* api callbacks */ ot->exec= outliner_keyingset_removeitems_exec; diff --git a/source/blender/editors/space_script/CMakeLists.txt b/source/blender/editors/space_script/CMakeLists.txt index 9d3bd4a67aa..c08beed3051 100644 --- a/source/blender/editors/space_script/CMakeLists.txt +++ b/source/blender/editors/space_script/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/space_script/SConscript b/source/blender/editors/space_script/SConscript index c30e204f6f4..b718ff59576 100644 --- a/source/blender/editors/space_script/SConscript +++ b/source/blender/editors/space_script/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../../blenloader' incs += ' ../../python' diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index 02cbc81aaa5..e4cddada224 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -37,6 +37,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "WM_api.h" @@ -73,8 +75,8 @@ static int run_pyfile_exec(bContext *C, wmOperator *op) void SCRIPT_OT_python_file_run(wmOperatorType *ot) { /* identifiers */ - ot->name= "Run python file"; - ot->description= "Run Python file"; + ot->name= _("Run python file"); + ot->description= _("Run Python file"); ot->idname= "SCRIPT_OT_python_file_run"; ot->flag = OPTYPE_UNDO; @@ -82,7 +84,7 @@ void SCRIPT_OT_python_file_run(wmOperatorType *ot) ot->exec= run_pyfile_exec; ot->poll= ED_operator_areaactive; - RNA_def_string_file_path(ot->srna, "filepath", "", 512, "Path", ""); + RNA_def_string_file_path(ot->srna, "filepath", "", 512, _("Path"), ""); } @@ -105,8 +107,8 @@ static int script_reload_exec(bContext *C, wmOperator *UNUSED(op)) void SCRIPT_OT_reload(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reload Scripts"; - ot->description= "Reload Scripts"; + ot->name= _("Reload Scripts"); + ot->description= _("Reload Scripts"); ot->idname= "SCRIPT_OT_reload"; /* api callbacks */ diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt index 9ce5f8e5279..9b978dffc39 100644 --- a/source/blender/editors/space_sequencer/CMakeLists.txt +++ b/source/blender/editors/space_sequencer/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/space_sequencer/SConscript b/source/blender/editors/space_sequencer/SConscript index 65bbf900556..53248fa001f 100644 --- a/source/blender/editors/space_sequencer/SConscript +++ b/source/blender/editors/space_sequencer/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../blenfont ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../blenfont ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../../blenloader' incs += ' #/intern/audaspace/intern' diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index b105b2507ab..4cde3632da2 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -47,6 +47,8 @@ #include "BLI_storage_types.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "DNA_userdef_types.h" @@ -92,19 +94,19 @@ static void sequencer_generic_props__internal(wmOperatorType *ot, int flag) { if(flag & SEQPROP_STARTFRAME) - RNA_def_int(ot->srna, "frame_start", 0, INT_MIN, INT_MAX, "Start Frame", "Start frame of the sequence strip", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "frame_start", 0, INT_MIN, INT_MAX, _("Start Frame"), _("Start frame of the sequence strip"), INT_MIN, INT_MAX); if(flag & SEQPROP_ENDFRAME) - RNA_def_int(ot->srna, "frame_end", 0, INT_MIN, INT_MAX, "End Frame", "End frame for the color strip", INT_MIN, INT_MAX); /* not useual since most strips have a fixed length */ + RNA_def_int(ot->srna, "frame_end", 0, INT_MIN, INT_MAX, _("End Frame"), _("End frame for the color strip"), INT_MIN, INT_MAX); /* not useual since most strips have a fixed length */ - RNA_def_int(ot->srna, "channel", 1, 1, MAXSEQ, "Channel", "Channel to place this strip into", 1, MAXSEQ); + RNA_def_int(ot->srna, "channel", 1, 1, MAXSEQ, _("Channel"), _("Channel to place this strip into"), 1, MAXSEQ); - RNA_def_boolean(ot->srna, "replace_sel", 1, "Replace Selection", "replace the current selection"); + RNA_def_boolean(ot->srna, "replace_sel", 1, _("Replace Selection"), _("replace the current selection")); - RNA_def_boolean(ot->srna, "overlap", 0, "Allow Overlap", "Don't correct overlap on new sequence strips"); + RNA_def_boolean(ot->srna, "overlap", 0, _("Allow Overlap"), _("Don't correct overlap on new sequence strips")); if(flag & SEQPROP_FILES) - RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, "Files", ""); + RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, _("Files"), ""); } static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op, const char *identifier) @@ -285,9 +287,9 @@ void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Add Scene Strip"; + ot->name= _("Add Scene Strip"); ot->idname= "SEQUENCER_OT_scene_strip_add"; - ot->description= "Add a strip to the sequencer using a blender scene as a source"; + ot->description= _("Add a strip to the sequencer using a blender scene as a source"); /* api callbacks */ ot->invoke= sequencer_add_scene_strip_invoke; @@ -299,7 +301,7 @@ void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); - prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", ""); + prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, _("Scene"), ""); RNA_def_enum_funcs(prop, RNA_scene_itemf); ot->prop= prop; } @@ -398,9 +400,9 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Movie Strip"; + ot->name= _("Add Movie Strip"); ot->idname= "SEQUENCER_OT_movie_strip_add"; - ot->description= "Add a movie strip to the sequencer"; + ot->description= _("Add a movie strip to the sequencer"); /* api callbacks */ ot->invoke= sequencer_add_movie_strip_invoke; @@ -413,7 +415,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_FILES); - RNA_def_boolean(ot->srna, "sound", TRUE, "Sound", "Load sound with the movie"); + RNA_def_boolean(ot->srna, "sound", TRUE, _("Sound"), _("Load sound with the movie")); } /* add sound operator */ @@ -453,9 +455,9 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Sound Strip"; + ot->name= _("Add Sound Strip"); ot->idname= "SEQUENCER_OT_sound_strip_add"; - ot->description= "Add a sound strip to the sequencer"; + ot->description= _("Add a sound strip to the sequencer"); /* api callbacks */ ot->invoke= sequencer_add_sound_strip_invoke; @@ -468,7 +470,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_FILES); - RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory."); + RNA_def_boolean(ot->srna, "cache", FALSE, _("Cache"), _("Cache the sound in memory.")); } /* add image operator */ @@ -560,9 +562,9 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Image Strip"; + ot->name= _("Add Image Strip"); ot->idname= "SEQUENCER_OT_image_strip_add"; - ot->description= "Add an image or image sequence to the sequencer"; + ot->description= _("Add an image or image sequence to the sequencer"); /* api callbacks */ ot->invoke= sequencer_add_image_strip_invoke; @@ -740,9 +742,9 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Effect Strip"; + ot->name= _("Add Effect Strip"); ot->idname= "SEQUENCER_OT_effect_strip_add"; - ot->description= "Add an effect to the sequencer, most are applied on top of existing strips"; + ot->description= _("Add an effect to the sequencer, most are applied on top of existing strips"); /* api callbacks */ ot->invoke= sequencer_add_effect_strip_invoke; @@ -755,6 +757,6 @@ void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot) WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_ENDFRAME); - RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, "Type", "Sequencer effect type"); - RNA_def_float_vector(ot->srna, "color", 3, NULL, 0.0f, 1.0f, "Color", "Initialize the strip with this color (only used when type='COLOR')", 0.0f, 1.0f); + RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, _("Type"), _("Sequencer effect type")); + RNA_def_float_vector(ot->srna, "color", 3, NULL, 0.0f, 1.0f, _("Color"), _("Initialize the strip with this color (only used when type='COLOR')"), 0.0f, 1.0f); } diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c index 01a43fd7fe1..a2f4e66fe67 100644 --- a/source/blender/editors/space_sequencer/sequencer_buttons.c +++ b/source/blender/editors/space_sequencer/sequencer_buttons.c @@ -38,6 +38,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_screen.h" @@ -109,9 +111,9 @@ static int sequencer_properties(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_properties(wmOperatorType *ot) { - ot->name= "Properties"; + ot->name= _("Properties"); ot->idname= "SEQUENCER_OT_properties"; - ot->description= "Open sequencer properties panel"; + ot->description= _("Open sequencer properties panel"); ot->exec= sequencer_properties; ot->poll= ED_operator_sequencer_active; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index b7a7b6b5412..6069caa1168 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -48,6 +48,8 @@ #include "BLI_storage_types.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "DNA_userdef_types.h" @@ -85,37 +87,37 @@ static int okee(const char *UNUSED(dummy)) {return 0;} /* XXX */ /* RNA Enums, used in multiple files */ EnumPropertyItem sequencer_prop_effect_types[] = { - {SEQ_CROSS, "CROSS", 0, "Crossfade", "Crossfade effect strip type"}, - {SEQ_ADD, "ADD", 0, "Add", "Add effect strip type"}, - {SEQ_SUB, "SUBTRACT", 0, "Subtract", "Subtract effect strip type"}, - {SEQ_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", "Alpha Over effect strip type"}, - {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", "Alpha Under effect strip type"}, - {SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", "Gamma Cross effect strip type"}, - {SEQ_MUL, "MULTIPLY", 0, "Multiply", "Multiply effect strip type"}, - {SEQ_OVERDROP, "OVER_DROP", 0, "Alpha Over Drop", "Alpha Over Drop effect strip type"}, - {SEQ_PLUGIN, "PLUGIN", 0, "Plugin", "Plugin effect strip type"}, - {SEQ_WIPE, "WIPE", 0, "Wipe", "Wipe effect strip type"}, - {SEQ_GLOW, "GLOW", 0, "Glow", "Glow effect strip type"}, - {SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", "Transform effect strip type"}, - {SEQ_COLOR, "COLOR", 0, "Color", "Color effect strip type"}, - {SEQ_SPEED, "SPEED", 0, "Speed", "Color effect strip type"}, - {SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""}, - {SEQ_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""}, + {SEQ_CROSS, "CROSS", 0, N_("Crossfade"), N_("Crossfade effect strip type")}, + {SEQ_ADD, "ADD", 0, N_("Add"), N_("Add effect strip type")}, + {SEQ_SUB, "SUBTRACT", 0, N_("Subtract"), N_("Subtract effect strip type")}, + {SEQ_ALPHAOVER, "ALPHA_OVER", 0, N_("Alpha Over"), N_("Alpha Over effect strip type")}, + {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, N_("Alpha Under"), N_("Alpha Under effect strip type")}, + {SEQ_GAMCROSS, "GAMMA_CROSS", 0, N_("Gamma Cross"), N_("Gamma Cross effect strip type")}, + {SEQ_MUL, "MULTIPLY", 0, N_("Multiply"), N_("Multiply effect strip type")}, + {SEQ_OVERDROP, "OVER_DROP", 0, N_("Alpha Over Drop"), N_("Alpha Over Drop effect strip type")}, + {SEQ_PLUGIN, "PLUGIN", 0, N_("Plugin"), N_("Plugin effect strip type")}, + {SEQ_WIPE, "WIPE", 0, N_("Wipe"), N_("Wipe effect strip type")}, + {SEQ_GLOW, "GLOW", 0, N_("Glow"), N_("Glow effect strip type")}, + {SEQ_TRANSFORM, "TRANSFORM", 0, N_("Transform"), N_("Transform effect strip type")}, + {SEQ_COLOR, "COLOR", 0, N_("Color"), N_("Color effect strip type")}, + {SEQ_SPEED, "SPEED", 0, N_("Speed"), N_("Color effect strip type")}, + {SEQ_MULTICAM, "MULTICAM", 0, N_("Multicam Selector"), ""}, + {SEQ_ADJUSTMENT, "ADJUSTMENT", 0, N_("Adjustment Layer"), ""}, {0, NULL, 0, NULL, NULL} }; /* mute operator */ EnumPropertyItem prop_side_types[] = { - {SEQ_SIDE_LEFT, "LEFT", 0, "Left", ""}, - {SEQ_SIDE_RIGHT, "RIGHT", 0, "Right", ""}, - {SEQ_SIDE_BOTH, "BOTH", 0, "Both", ""}, + {SEQ_SIDE_LEFT, "LEFT", 0, N_("Left"), ""}, + {SEQ_SIDE_RIGHT, "RIGHT", 0, N_("Right"), ""}, + {SEQ_SIDE_BOTH, "BOTH", 0, N_("Both"), ""}, {0, NULL, 0, NULL, NULL} }; static EnumPropertyItem prop_side_lr_types[] = { - {SEQ_SIDE_LEFT, "LEFT", 0, "Left", ""}, - {SEQ_SIDE_RIGHT, "RIGHT", 0, "Right", ""}, + {SEQ_SIDE_LEFT, "LEFT", 0, N_("Left"), ""}, + {SEQ_SIDE_RIGHT, "RIGHT", 0, N_("Right"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1187,9 +1189,9 @@ static int sequencer_snap_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev void SEQUENCER_OT_snap(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Snap strips"; + ot->name= _("Snap strips"); ot->idname= "SEQUENCER_OT_snap"; - ot->description="Frame where selected strips will be snapped"; + ot->description=_("Frame where selected strips will be snapped"); /* api callbacks */ ot->invoke= sequencer_snap_invoke; @@ -1199,7 +1201,7 @@ void SEQUENCER_OT_snap(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, "Frame", "Frame where selected strips will be snapped", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, _("Frame"), _("Frame where selected strips will be snapped"), INT_MIN, INT_MAX); } /* mute operator */ @@ -1234,9 +1236,9 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_mute(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Mute Strips"; + ot->name= _("Mute Strips"); ot->idname= "SEQUENCER_OT_mute"; - ot->description="Mute selected strips"; + ot->description=_("Mute selected strips"); /* api callbacks */ ot->exec= sequencer_mute_exec; @@ -1245,7 +1247,7 @@ void SEQUENCER_OT_mute(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Mute unselected rather than selected strips."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Mute unselected rather than selected strips.")); } @@ -1281,9 +1283,9 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_unmute(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Un-Mute Strips"; + ot->name= _("Un-Mute Strips"); ot->idname= "SEQUENCER_OT_unmute"; - ot->description="Un-Mute unselected rather than selected strips"; + ot->description=_("Un-Mute unselected rather than selected strips"); /* api callbacks */ ot->exec= sequencer_unmute_exec; @@ -1292,7 +1294,7 @@ void SEQUENCER_OT_unmute(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "UnMute unselected rather than selected strips."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("UnMute unselected rather than selected strips.")); } @@ -1317,9 +1319,9 @@ static int sequencer_lock_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_lock(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Lock Strips"; + ot->name= _("Lock Strips"); ot->idname= "SEQUENCER_OT_lock"; - ot->description="Lock the active strip so that it can't be transformed"; + ot->description=_("Lock the active strip so that it can't be transformed"); /* api callbacks */ ot->exec= sequencer_lock_exec; @@ -1350,9 +1352,9 @@ static int sequencer_unlock_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_unlock(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "UnLock Strips"; + ot->name= _("UnLock Strips"); ot->idname= "SEQUENCER_OT_unlock"; - ot->description="Unlock the active strip so that it can't be transformed"; + ot->description=_("Unlock the active strip so that it can't be transformed"); /* api callbacks */ ot->exec= sequencer_unlock_exec; @@ -1383,9 +1385,9 @@ static int sequencer_reload_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_reload(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Reload Strips"; + ot->name= _("Reload Strips"); ot->idname= "SEQUENCER_OT_reload"; - ot->description="Reload strips in the sequencer"; + ot->description=_("Reload strips in the sequencer"); /* api callbacks */ ot->exec= sequencer_reload_exec; @@ -1411,9 +1413,9 @@ static int sequencer_refresh_all_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Refresh Sequencer"; + ot->name= _("Refresh Sequencer"); ot->idname= "SEQUENCER_OT_refresh_all"; - ot->description="Refresh the sequencer editor"; + ot->description=_("Refresh the sequencer editor"); /* api callbacks */ ot->exec= sequencer_refresh_all_exec; @@ -1471,9 +1473,9 @@ static int sequencer_effect_poll(bContext *C) void SEQUENCER_OT_reassign_inputs(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Reassign Inputs"; + ot->name= _("Reassign Inputs"); ot->idname= "SEQUENCER_OT_reassign_inputs"; - ot->description="Reassign the inputs for the effects strip"; + ot->description=_("Reassign the inputs for the effects strip"); /* api callbacks */ ot->exec= sequencer_reassign_inputs_exec; @@ -1507,9 +1509,9 @@ static int sequencer_swap_inputs_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Swap Inputs"; + ot->name= _("Swap Inputs"); ot->idname= "SEQUENCER_OT_swap_inputs"; - ot->description="Swap the first two inputs for the effects strip"; + ot->description=_("Swap the first two inputs for the effects strip"); /* api callbacks */ ot->exec= sequencer_swap_inputs_exec; @@ -1522,8 +1524,8 @@ void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot) /* cut operator */ static EnumPropertyItem prop_cut_types[] = { - {SEQ_CUT_SOFT, "SOFT", 0, "Soft", ""}, - {SEQ_CUT_HARD, "HARD", 0, "Hard", ""}, + {SEQ_CUT_SOFT, "SOFT", 0, N_("Soft"), ""}, + {SEQ_CUT_HARD, "HARD", 0, N_("Hard"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -1598,9 +1600,9 @@ static int sequencer_cut_invoke(bContext *C, wmOperator *op, wmEvent *event) void SEQUENCER_OT_cut(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Cut Strips"; + ot->name= _("Cut Strips"); ot->idname= "SEQUENCER_OT_cut"; - ot->description="Cut the selected strips"; + ot->description=_("Cut the selected strips"); /* api callbacks */ ot->invoke= sequencer_cut_invoke; @@ -1610,9 +1612,9 @@ void SEQUENCER_OT_cut(struct wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, "Frame", "Frame where selected strips will be cut", INT_MIN, INT_MAX); - RNA_def_enum(ot->srna, "type", prop_cut_types, SEQ_CUT_SOFT, "Type", "The type of cut operation to perform on strips"); - RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side that remains selected after cutting"); + RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, _("Frame"), _("Frame where selected strips will be cut"), INT_MIN, INT_MAX); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_cut_types), SEQ_CUT_SOFT, _("Type"), _("The type of cut operation to perform on strips")); + RNA_def_enum(ot->srna, "side", RNA_enum_items_gettexted(prop_side_types), SEQ_SIDE_BOTH, _("Side"), _("The side that remains selected after cutting")); } /* duplicate operator */ @@ -1668,9 +1670,9 @@ static int sequencer_add_duplicate_invoke(bContext *C, wmOperator *op, wmEvent * void SEQUENCER_OT_duplicate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Duplicate Strips"; + ot->name= _("Duplicate Strips"); ot->idname= "SEQUENCER_OT_duplicate"; - ot->description="Duplicate the selected strips"; + ot->description=_("Duplicate the selected strips"); /* api callbacks */ ot->invoke= sequencer_add_duplicate_invoke; @@ -1681,7 +1683,7 @@ void SEQUENCER_OT_duplicate(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); } /* delete operator */ @@ -1741,9 +1743,9 @@ void SEQUENCER_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Erase Strips"; + ot->name= _("Erase Strips"); ot->idname= "SEQUENCER_OT_delete"; - ot->description="Erase selected strips from the sequencer"; + ot->description=_("Erase selected strips from the sequencer"); /* api callbacks */ ot->invoke= WM_operator_confirm; @@ -1834,9 +1836,9 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_images_separate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Separate Images"; + ot->name= _("Separate Images"); ot->idname= "SEQUENCER_OT_images_separate"; - ot->description="On image sequences strips, it return a strip for each image"; + ot->description=_("On image sequences strips, it return a strip for each image"); /* api callbacks */ ot->invoke= WM_operator_props_popup; @@ -1846,7 +1848,7 @@ void SEQUENCER_OT_images_separate(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "length", 1, 1, 1000, "Length", "Length of each frame", 1, INT_MAX); + RNA_def_int(ot->srna, "length", 1, 1, 1000, _("Length"), _("Length of each frame"), 1, INT_MAX); } @@ -1907,9 +1909,9 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_meta_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Meta Strip"; + ot->name= _("Toggle Meta Strip"); ot->idname= "SEQUENCER_OT_meta_toggle"; - ot->description="Toggle a metastrip (to edit enclosed strips)"; + ot->description=_("Toggle a metastrip (to edit enclosed strips)"); /* api callbacks */ ot->exec= sequencer_meta_toggle_exec; @@ -1974,9 +1976,9 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_meta_make(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Meta Strip"; + ot->name= _("Make Meta Strip"); ot->idname= "SEQUENCER_OT_meta_make"; - ot->description="Group selected strips into a metastrip"; + ot->description=_("Group selected strips into a metastrip"); /* api callbacks */ ot->invoke= WM_operator_confirm; @@ -2045,9 +2047,9 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_meta_separate(wmOperatorType *ot) { /* identifiers */ - ot->name= "UnMeta Strip"; + ot->name= _("UnMeta Strip"); ot->idname= "SEQUENCER_OT_meta_separate"; - ot->description="Put the contents of a metastrip back in the sequencer"; + ot->description=_("Put the contents of a metastrip back in the sequencer"); /* api callbacks */ ot->invoke= WM_operator_confirm; @@ -2078,9 +2080,9 @@ static int sequencer_view_all_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_view_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; + ot->name= _("View All"); ot->idname= "SEQUENCER_OT_view_all"; - ot->description="View all the strips in the sequencer"; + ot->description=_("View all the strips in the sequencer"); /* api callbacks */ ot->exec= sequencer_view_all_exec; @@ -2144,9 +2146,9 @@ static int sequencer_view_all_preview_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_view_all_preview(wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; + ot->name= _("View All"); ot->idname= "SEQUENCER_OT_view_all_preview"; - ot->description="Zoom preview to fit in the area"; + ot->description=_("Zoom preview to fit in the area"); /* api callbacks */ ot->exec= sequencer_view_all_preview_exec; @@ -2180,9 +2182,9 @@ static int sequencer_view_zoom_ratio_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sequencer View Zoom Ratio"; + ot->name= _("Sequencer View Zoom Ratio"); ot->idname= "SEQUENCER_OT_view_zoom_ratio"; - ot->description = "Change zoom ratio of sequencer preview"; + ot->description = _("Change zoom ratio of sequencer preview"); /* api callbacks */ ot->exec= sequencer_view_zoom_ratio_exec; @@ -2190,15 +2192,15 @@ void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot) /* properties */ RNA_def_float(ot->srna, "ratio", 1.0f, 0.0f, FLT_MAX, - "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out.", -FLT_MAX, FLT_MAX); + _("Ratio"), _("Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out."), -FLT_MAX, FLT_MAX); } #if 0 static EnumPropertyItem view_type_items[] = { - {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""}, - {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""}, - {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SEQUENCER, "Sequencer and Image Preview", ""}, + {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, N_("Sequencer"), ""}, + {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, N_("Image Preview"), ""}, + {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SEQUENCER, N_("Sequencer and Image Preview"), ""}, {0, NULL, 0, NULL, NULL}}; #endif @@ -2218,9 +2220,9 @@ static int sequencer_view_toggle_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_view_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Toggle"; + ot->name= _("View Toggle"); ot->idname= "SEQUENCER_OT_view_toggle"; - ot->description="Toggle between sequencer views (sequence, preview, both)"; + ot->description=_("Toggle between sequencer views (sequence, preview, both)"); /* api callbacks */ ot->exec= sequencer_view_toggle_exec; @@ -2298,9 +2300,9 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_view_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Selected"; + ot->name= _("View Selected"); ot->idname= "SEQUENCER_OT_view_selected"; - ot->description="Zoom the sequencer on the selected strips"; + ot->description=_("Zoom the sequencer on the selected strips"); /* api callbacks */ ot->exec= sequencer_view_selected_exec; @@ -2383,9 +2385,9 @@ static int sequencer_next_edit_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_next_edit(wmOperatorType *ot) { /* identifiers */ - ot->name= "Next Edit"; + ot->name= _("Next Edit"); ot->idname= "SEQUENCER_OT_next_edit"; - ot->description="Move frame to next edit point"; + ot->description=_("Move frame to next edit point"); /* api callbacks */ ot->exec= sequencer_next_edit_exec; @@ -2413,9 +2415,9 @@ static int sequencer_previous_edit_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_previous_edit(wmOperatorType *ot) { /* identifiers */ - ot->name= "Previous Edit"; + ot->name= _("Previous Edit"); ot->idname= "SEQUENCER_OT_previous_edit"; - ot->description="Move frame to previous edit point"; + ot->description=_("Move frame to previous edit point"); /* api callbacks */ ot->exec= sequencer_previous_edit_exec; @@ -2517,9 +2519,9 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_swap(wmOperatorType *ot) { /* identifiers */ - ot->name= "Swap Strip"; + ot->name= _("Swap Strip"); ot->idname= "SEQUENCER_OT_swap"; - ot->description="Swap active strip with strip to the left"; + ot->description=_("Swap active strip with strip to the left"); /* api callbacks */ ot->exec= sequencer_swap_exec; @@ -2529,7 +2531,7 @@ void SEQUENCER_OT_swap(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "side", prop_side_lr_types, SEQ_SIDE_RIGHT, "Side", "Side of the strip to swap"); + RNA_def_enum(ot->srna, "side", RNA_enum_items_gettexted(prop_side_lr_types), SEQ_SIDE_RIGHT, _("Side"), _("Side of the strip to swap")); } static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op)) @@ -2576,9 +2578,9 @@ static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_rendersize(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Render Size"; + ot->name= _("Set Render Size"); ot->idname= "SEQUENCER_OT_rendersize"; - ot->description="Set render size and aspect from active sequence"; + ot->description=_("Set render size and aspect from active sequence"); /* api callbacks */ ot->exec= sequencer_rendersize_exec; @@ -2655,7 +2657,7 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy"; + ot->name= _("Copy"); ot->idname= "SEQUENCER_OT_copy"; ot->description=""; @@ -2706,7 +2708,7 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_paste(wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste"; + ot->name= _("Paste"); ot->idname= "SEQUENCER_OT_paste"; ot->description=""; @@ -2757,9 +2759,9 @@ static int sequencer_swap_data_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_swap_data(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sequencer Swap Data"; + ot->name= _("Sequencer Swap Data"); ot->idname= "SEQUENCER_OT_swap_data"; - ot->description="Swap 2 sequencer strips"; + ot->description=_("Swap 2 sequencer strips"); /* api callbacks */ ot->exec= sequencer_swap_data_exec; @@ -2814,9 +2816,9 @@ static int view_ghost_border_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Offset View"; + ot->name= _("Border Offset View"); ot->idname= "SEQUENCER_OT_view_ghost_border"; - ot->description="Enable border select mode"; + ot->description=_("Enable border select mode"); /* api callbacks */ ot->invoke= WM_border_select_invoke; diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 8d5f372f55e..fa2d65443b0 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -44,6 +44,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "DNA_scene_types.h" #include "BKE_context.h" @@ -246,9 +248,9 @@ static int sequencer_deselect_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_select_all_toggle(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; + ot->name= _("Select or Deselect All"); ot->idname= "SEQUENCER_OT_select_all_toggle"; - ot->description="Select or deselect all strips"; + ot->description=_("Select or deselect all strips"); /* api callbacks */ ot->exec= sequencer_deselect_exec; @@ -284,9 +286,9 @@ static int sequencer_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Inverse"; + ot->name= _("Select Inverse"); ot->idname= "SEQUENCER_OT_select_inverse"; - ot->description="Select unselected strips"; + ot->description=_("Select unselected strips"); /* api callbacks */ ot->exec= sequencer_select_inverse_exec; @@ -507,9 +509,9 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) void SEQUENCER_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Activate/Select"; + ot->name= _("Activate/Select"); ot->idname= "SEQUENCER_OT_select"; - ot->description="Select a strip (last selected becomes the \"active strip\")"; + ot->description=_("Select a strip (last selected becomes the \"active strip\")"); /* api callbacks */ ot->invoke= sequencer_select_invoke; @@ -519,11 +521,11 @@ void SEQUENCER_OT_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection."); - RNA_def_boolean(ot->srna, "linked_handle", 0, "Linked Handle", "Select handles next to the active strip."); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend the selection.")); + RNA_def_boolean(ot->srna, "linked_handle", 0, _("Linked Handle"), _("Select handles next to the active strip.")); /* for animation this is an enum but atm having an enum isnt useful for us */ - RNA_def_boolean(ot->srna, "left_right", 0, "Left/Right", "select based on the frame side the cursor is on."); - RNA_def_boolean(ot->srna, "linked_time", 0, "Linked Time", "Select other strips at the same time."); + RNA_def_boolean(ot->srna, "left_right", 0, _("Left/Right"), _("select based on the frame side the cursor is on.")); + RNA_def_boolean(ot->srna, "linked_time", 0, _("Linked Time"), _("Select other strips at the same time.")); } @@ -596,9 +598,9 @@ static int sequencer_select_more_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_select_more(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select More"; + ot->name= _("Select More"); ot->idname= "SEQUENCER_OT_select_more"; - ot->description="Select more strips adjacent to the current selection"; + ot->description=_("Select more strips adjacent to the current selection"); /* api callbacks */ ot->exec= sequencer_select_more_exec; @@ -627,9 +629,9 @@ static int sequencer_select_less_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_select_less(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select less"; + ot->name= _("Select less"); ot->idname= "SEQUENCER_OT_select_less"; - ot->description="Shrink the current selection of adjacent selected strips"; + ot->description=_("Shrink the current selection of adjacent selected strips"); /* api callbacks */ ot->exec= sequencer_select_less_exec; @@ -677,9 +679,9 @@ static int sequencer_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEv void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select pick linked"; + ot->name= _("Select pick linked"); ot->idname= "SEQUENCER_OT_select_linked_pick"; - ot->description="Select a chain of linked strips nearest to the mouse pointer"; + ot->description=_("Select a chain of linked strips nearest to the mouse pointer"); /* api callbacks */ ot->invoke= sequencer_select_linked_pick_invoke; @@ -689,7 +691,7 @@ void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "extend the selection"); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("extend the selection")); } @@ -712,9 +714,9 @@ static int sequencer_select_linked_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select linked"; + ot->name= _("Select linked"); ot->idname= "SEQUENCER_OT_select_linked"; - ot->description="Select all strips adjacent to the current selection"; + ot->description=_("Select all strips adjacent to the current selection"); /* api callbacks */ ot->exec= sequencer_select_linked_exec; @@ -762,9 +764,9 @@ static int sequencer_select_handles_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_select_handles(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Handles"; + ot->name= _("Select Handles"); ot->idname= "SEQUENCER_OT_select_handles"; - ot->description="Select manipulator handles on the sides of the selected strip"; + ot->description=_("Select manipulator handles on the sides of the selected strip"); /* api callbacks */ ot->exec= sequencer_select_handles_exec; @@ -774,7 +776,7 @@ void SEQUENCER_OT_select_handles(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side of the handle that is selected"); + RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, _("Side"), _("The side of the handle that is selected")); } /* select side operator */ @@ -799,9 +801,9 @@ static int sequencer_select_active_side_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_select_active_side(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Active Side"; + ot->name= _("Select Active Side"); ot->idname= "SEQUENCER_OT_select_active_side"; - ot->description="Select strips on the nominated side of the active strip"; + ot->description=_("Select strips on the nominated side of the active strip"); /* api callbacks */ ot->exec= sequencer_select_active_side_exec; @@ -811,7 +813,7 @@ void SEQUENCER_OT_select_active_side(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side of the handle that is selected"); + RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, _("Side"), _("The side of the handle that is selected")); } @@ -863,9 +865,9 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op) void SEQUENCER_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; + ot->name= _("Border Select"); ot->idname= "SEQUENCER_OT_select_border"; - ot->description="Enable border select mode"; + ot->description=_("Enable border select mode"); /* api callbacks */ ot->invoke= WM_border_select_invoke; diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index 165cec238c0..e82448e1277 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -54,6 +54,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_screen.h" @@ -119,8 +121,8 @@ static int properties_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_properties(wmOperatorType *ot) { /* identifiers */ - ot->name= "Properties"; - ot->description= "Toggle text properties panel"; + ot->name= _("Properties"); + ot->description= _("Toggle text properties panel"); ot->idname= "TEXT_OT_properties"; /* api callbacks */ diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 13eb24ed1f2..b9f73ffdbf5 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -46,6 +46,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "PIL_time.h" #include "BKE_context.h" @@ -192,9 +194,9 @@ static int new_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_new(wmOperatorType *ot) { /* identifiers */ - ot->name= "New"; + ot->name= _("New"); ot->idname= "TEXT_OT_new"; - ot->description= "Create a new text data block"; + ot->description= _("Create a new text data block"); /* api callbacks */ ot->exec= new_exec; @@ -291,9 +293,9 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void TEXT_OT_open(wmOperatorType *ot) { /* identifiers */ - ot->name= "Open Text Block"; + ot->name= _("Open Text Block"); ot->idname= "TEXT_OT_open"; - ot->description= "Open a new text data block"; + ot->description= _("Open a new text data block"); /* api callbacks */ ot->exec= open_exec; @@ -306,7 +308,7 @@ void TEXT_OT_open(wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH); //XXX TODO, relative_path - RNA_def_boolean(ot->srna, "internal", 0, "Make internal", "Make text file internal after loading"); + RNA_def_boolean(ot->srna, "internal", 0, _("Make internal"), _("Make text file internal after loading")); } /******************* reload operator *********************/ @@ -336,9 +338,9 @@ static int reload_exec(bContext *C, wmOperator *op) void TEXT_OT_reload(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reload"; + ot->name= _("Reload"); ot->idname= "TEXT_OT_reload"; - ot->description= "Reload active text data block from its file"; + ot->description= _("Reload active text data block from its file"); /* api callbacks */ ot->exec= reload_exec; @@ -386,9 +388,9 @@ static int unlink_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_unlink(wmOperatorType *ot) { /* identifiers */ - ot->name= "Unlink"; + ot->name= _("Unlink"); ot->idname= "TEXT_OT_unlink"; - ot->description= "Unlink active text data block"; + ot->description= _("Unlink active text data block"); /* api callbacks */ ot->exec= unlink_exec; @@ -421,9 +423,9 @@ static int make_internal_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_make_internal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Make Internal"; + ot->name= _("Make Internal"); ot->idname= "TEXT_OT_make_internal"; - ot->description= "Make active text file internal"; + ot->description= _("Make active text file internal"); /* api callbacks */ ot->exec= make_internal_exec; @@ -498,9 +500,9 @@ static int save_exec(bContext *C, wmOperator *op) void TEXT_OT_save(wmOperatorType *ot) { /* identifiers */ - ot->name= "Save"; + ot->name= _("Save"); ot->idname= "TEXT_OT_save"; - ot->description= "Save active text data block"; + ot->description= _("Save active text data block"); /* api callbacks */ ot->exec= save_exec; @@ -555,9 +557,9 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void TEXT_OT_save_as(wmOperatorType *ot) { /* identifiers */ - ot->name= "Save As"; + ot->name= _("Save As"); ot->idname= "TEXT_OT_save_as"; - ot->description= "Save active text file with options"; + ot->description= _("Save active text file with options"); /* api callbacks */ ot->exec= save_as_exec; @@ -625,9 +627,9 @@ static int run_script_exec(bContext *C, wmOperator *op) void TEXT_OT_run_script(wmOperatorType *ot) { /* identifiers */ - ot->name= "Run Script"; + ot->name= _("Run Script"); ot->idname= "TEXT_OT_run_script"; - ot->description= "Run active script"; + ot->description= _("Run active script"); /* api callbacks */ ot->poll= run_script_poll; @@ -685,9 +687,9 @@ static int refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUSED(op void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot) { /* identifiers */ - ot->name= "Refresh PyConstraints"; + ot->name= _("Refresh PyConstraints"); ot->idname= "TEXT_OT_refresh_pyconstraints"; - ot->description= "Refresh all pyconstraints"; + ot->description= _("Refresh all pyconstraints"); /* api callbacks */ ot->exec= refresh_pyconstraints_exec; @@ -809,16 +811,16 @@ static int paste_exec(bContext *C, wmOperator *op) void TEXT_OT_paste(wmOperatorType *ot) { /* identifiers */ - ot->name= "Paste"; + ot->name= _("Paste"); ot->idname= "TEXT_OT_paste"; - ot->description= "Paste text from clipboard"; + ot->description= _("Paste text from clipboard"); /* api callbacks */ ot->exec= paste_exec; ot->poll= text_edit_poll; /* properties */ - RNA_def_boolean(ot->srna, "selection", 0, "Selection", "Paste text selected elsewhere rather than copied, X11 only."); + RNA_def_boolean(ot->srna, "selection", 0, _("Selection"), _("Paste text selected elsewhere rather than copied, X11 only.")); } /******************* copy operator *********************/ @@ -847,9 +849,9 @@ static int copy_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_copy(wmOperatorType *ot) { /* identifiers */ - ot->name= "Copy"; + ot->name= _("Copy"); ot->idname= "TEXT_OT_copy"; - ot->description= "Copy selected text to clipboard"; + ot->description= _("Copy selected text to clipboard"); /* api callbacks */ ot->exec= copy_exec; @@ -880,9 +882,9 @@ static int cut_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_cut(wmOperatorType *ot) { /* identifiers */ - ot->name= "Cut"; + ot->name= _("Cut"); ot->idname= "TEXT_OT_cut"; - ot->description= "Cut selected text to clipboard"; + ot->description= _("Cut selected text to clipboard"); /* api callbacks */ ot->exec= cut_exec; @@ -915,9 +917,9 @@ static int indent_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_indent(wmOperatorType *ot) { /* identifiers */ - ot->name= "Indent"; + ot->name= _("Indent"); ot->idname= "TEXT_OT_indent"; - ot->description= "Indent selected text"; + ot->description= _("Indent selected text"); /* api callbacks */ ot->exec= indent_exec; @@ -950,9 +952,9 @@ static int unindent_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_unindent(wmOperatorType *ot) { /* identifiers */ - ot->name= "Unindent"; + ot->name= _("Unindent"); ot->idname= "TEXT_OT_unindent"; - ot->description= "Unindent selected text"; + ot->description= _("Unindent selected text"); /* api callbacks */ ot->exec= unindent_exec; @@ -997,9 +999,9 @@ static int line_break_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_line_break(wmOperatorType *ot) { /* identifiers */ - ot->name= "Line Break"; + ot->name= _("Line Break"); ot->idname= "TEXT_OT_line_break"; - ot->description= "Insert line break at cursor position"; + ot->description= _("Insert line break at cursor position"); /* api callbacks */ ot->exec= line_break_exec; @@ -1030,9 +1032,9 @@ static int comment_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_comment(wmOperatorType *ot) { /* identifiers */ - ot->name= "Comment"; + ot->name= _("Comment"); ot->idname= "TEXT_OT_comment"; - ot->description= "Convert selected text to comment"; + ot->description= _("Convert selected text to comment"); /* api callbacks */ ot->exec= comment_exec; @@ -1064,9 +1066,9 @@ static int uncomment_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_uncomment(wmOperatorType *ot) { /* identifiers */ - ot->name= "Uncomment"; + ot->name= _("Uncomment"); ot->idname= "TEXT_OT_uncomment"; - ot->description= "Convert selected comment to text"; + ot->description= _("Convert selected comment to text"); /* api callbacks */ ot->exec= uncomment_exec; @@ -1204,16 +1206,16 @@ static int convert_whitespace_exec(bContext *C, wmOperator *op) void TEXT_OT_convert_whitespace(wmOperatorType *ot) { /* identifiers */ - ot->name= "Convert Whitespace"; + ot->name= _("Convert Whitespace"); ot->idname= "TEXT_OT_convert_whitespace"; - ot->description= "Convert whitespaces by type"; + ot->description= _("Convert whitespaces by type"); /* api callbacks */ ot->exec= convert_whitespace_exec; ot->poll= text_edit_poll; /* properties */ - RNA_def_enum(ot->srna, "type", whitespace_type_items, TO_SPACES, "type", "Type of whitespace to convert to."); + RNA_def_enum(ot->srna, "type", whitespace_type_items, TO_SPACES, _("type"), _("Type of whitespace to convert to.")); } /******************* select all operator *********************/ @@ -1233,9 +1235,9 @@ static int select_all_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select All"; + ot->name= _("Select All"); ot->idname= "TEXT_OT_select_all"; - ot->description= "Select all text"; + ot->description= _("Select all text"); /* api callbacks */ ot->exec= select_all_exec; @@ -1259,9 +1261,9 @@ static int select_line_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_select_line(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Line"; + ot->name= _("Select Line"); ot->idname= "TEXT_OT_select_line"; - ot->description= "Select text by line"; + ot->description= _("Select text by line"); /* api callbacks */ ot->exec= select_line_exec; @@ -1286,9 +1288,9 @@ static int select_word_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_select_word(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Word"; + ot->name= _("Select Word"); ot->idname= "TEXT_OT_select_word"; - ot->description= "Select word under cursor"; + ot->description= _("Select word under cursor"); /* api callbacks */ ot->exec= select_word_exec; @@ -1322,9 +1324,9 @@ static int previous_marker_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_previous_marker(wmOperatorType *ot) { /* identifiers */ - ot->name= "Previous Marker"; + ot->name= _("Previous Marker"); ot->idname= "TEXT_OT_previous_marker"; - ot->description= "Move to previous marker"; + ot->description= _("Move to previous marker"); /* api callbacks */ ot->exec= previous_marker_exec; @@ -1358,9 +1360,9 @@ static int next_marker_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_next_marker(wmOperatorType *ot) { /* identifiers */ - ot->name= "Next Marker"; + ot->name= _("Next Marker"); ot->idname= "TEXT_OT_next_marker"; - ot->description= "Move to next marker"; + ot->description= _("Move to next marker"); /* api callbacks */ ot->exec= next_marker_exec; @@ -1384,9 +1386,9 @@ static int clear_all_markers_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_markers_clear(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clear All Markers"; + ot->name= _("Clear All Markers"); ot->idname= "TEXT_OT_markers_clear"; - ot->description= "Clear all markers"; + ot->description= _("Clear all markers"); /* api callbacks */ ot->exec= clear_all_markers_exec; @@ -1897,16 +1899,16 @@ static int move_exec(bContext *C, wmOperator *op) void TEXT_OT_move(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Cursor"; + ot->name= _("Move Cursor"); ot->idname= "TEXT_OT_move"; - ot->description= "Move cursor to position type"; + ot->description= _("Move cursor to position type"); /* api callbacks */ ot->exec= move_exec; ot->poll= text_edit_poll; /* properties */ - RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to."); + RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, _("Type"), _("Where to move cursor to.")); } /******************* move select operator ********************/ @@ -1921,16 +1923,16 @@ static int move_select_exec(bContext *C, wmOperator *op) void TEXT_OT_move_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move Select"; + ot->name= _("Move Select"); ot->idname= "TEXT_OT_move_select"; - ot->description= "Make selection from current cursor position to new cursor position type"; + ot->description= _("Make selection from current cursor position to new cursor position type"); /* api callbacks */ ot->exec= move_select_exec; ot->poll= text_space_edit_poll; /* properties */ - RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection."); + RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, _("Type"), _("Where to move cursor to, to make a selection.")); } /******************* jump operator *********************/ @@ -1963,9 +1965,9 @@ static int jump_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void TEXT_OT_jump(wmOperatorType *ot) { /* identifiers */ - ot->name= "Jump"; + ot->name= _("Jump"); ot->idname= "TEXT_OT_jump"; - ot->description= "Jump cursor to line"; + ot->description= _("Jump cursor to line"); /* api callbacks */ ot->invoke= jump_invoke; @@ -1973,7 +1975,7 @@ void TEXT_OT_jump(wmOperatorType *ot) ot->poll= text_edit_poll; /* properties */ - RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to.", 1, 10000); + RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, _("Line"), _("Line number to jump to."), 1, 10000); } /******************* delete operator **********************/ @@ -2016,16 +2018,16 @@ static int delete_exec(bContext *C, wmOperator *op) void TEXT_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot->name= "Delete"; + ot->name= _("Delete"); ot->idname= "TEXT_OT_delete"; - ot->description= "Delete text by cursor position"; + ot->description= _("Delete text by cursor position"); /* api callbacks */ ot->exec= delete_exec; ot->poll= text_edit_poll; /* properties */ - RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete."); + RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, _("Type"), _("Which part of the text to delete.")); } /******************* toggle overwrite operator **********************/ @@ -2044,9 +2046,9 @@ static int toggle_overwrite_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_overwrite_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Toggle Overwrite"; + ot->name= _("Toggle Overwrite"); ot->idname= "TEXT_OT_overwrite_toggle"; - ot->description= "Toggle overwrite while typing"; + ot->description= _("Toggle overwrite while typing"); /* api callbacks */ ot->exec= toggle_overwrite_exec; @@ -2244,12 +2246,12 @@ static int scroll_invoke(bContext *C, wmOperator *op, wmEvent *event) void TEXT_OT_scroll(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scroll"; + ot->name= _("Scroll"); /*don't really see the difference between this and scroll_bar. Both do basically the same thing (aside from keymaps).*/ ot->idname= "TEXT_OT_scroll"; - ot->description= "Scroll text screen"; + ot->description= _("Scroll text screen"); /* api callbacks */ ot->exec= scroll_exec; @@ -2262,7 +2264,7 @@ void TEXT_OT_scroll(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; /* properties */ - RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll.", -100, 100); + RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, _("Lines"), _("Number of lines to scroll."), -100, 100); } /******************** scroll bar operator *******************/ @@ -2327,12 +2329,12 @@ static int scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event) void TEXT_OT_scroll_bar(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scrollbar"; + ot->name= _("Scrollbar"); /*don't really see the difference between this and scroll. Both do basically the same thing (aside from keymaps).*/ ot->idname= "TEXT_OT_scroll_bar"; - ot->description= "Scroll text screen"; + ot->description= _("Scroll text screen"); /* api callbacks */ ot->invoke= scroll_bar_invoke; @@ -2344,7 +2346,7 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot) ot->flag= OPTYPE_BLOCKING; /* properties */ - RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll.", -100, 100); + RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, _("Lines"), _("Number of lines to scroll."), -100, 100); } /******************* set selection operator **********************/ @@ -2624,9 +2626,9 @@ static int set_selection_cancel(bContext *C, wmOperator *op) void TEXT_OT_selection_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Selection"; + ot->name= _("Set Selection"); ot->idname= "TEXT_OT_selection_set"; - ot->description= "Set cursor selection"; + ot->description= _("Set cursor selection"); /* api callbacks */ ot->invoke= set_selection_invoke; @@ -2635,7 +2637,7 @@ void TEXT_OT_selection_set(wmOperatorType *ot) ot->poll= text_region_edit_poll; /* properties */ - RNA_def_boolean(ot->srna, "select", 0, "Select", "Set selection end rather than cursor."); + RNA_def_boolean(ot->srna, "select", 0, _("Select"), _("Set selection end rather than cursor.")); } /******************* set cursor operator **********************/ @@ -2678,9 +2680,9 @@ static int set_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) void TEXT_OT_cursor_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Cursor"; + ot->name= _("Set Cursor"); ot->idname= "TEXT_OT_cursor_set"; - ot->description= "Set cursor position"; + ot->description= _("Set cursor position"); /* api callbacks */ ot->invoke= set_cursor_invoke; @@ -2734,9 +2736,9 @@ static int line_number_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *even void TEXT_OT_line_number(wmOperatorType *ot) { /* identifiers */ - ot->name= "Line Number"; + ot->name= _("Line Number"); ot->idname= "TEXT_OT_line_number"; - ot->description= "The current line number"; + ot->description= _("The current line number"); /* api callbacks */ ot->invoke= line_number_invoke; @@ -2809,9 +2811,9 @@ static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event) void TEXT_OT_insert(wmOperatorType *ot) { /* identifiers */ - ot->name= "Insert"; + ot->name= _("Insert"); ot->idname= "TEXT_OT_insert"; - ot->description= "Insert text at cursor position"; + ot->description= _("Insert text at cursor position"); /* api callbacks */ ot->exec= insert_exec; @@ -2819,7 +2821,7 @@ void TEXT_OT_insert(wmOperatorType *ot) ot->poll= text_edit_poll; /* properties */ - RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); + RNA_def_string(ot->srna, "text", "", 0, _("Text"), _("Text to insert at the cursor position.")); } /******************* find operator *********************/ @@ -2928,9 +2930,9 @@ static int find_exec(bContext *C, wmOperator *op) void TEXT_OT_find(wmOperatorType *ot) { /* identifiers */ - ot->name= "Find"; + ot->name= _("Find"); ot->idname= "TEXT_OT_find"; - ot->description= "Find specified text"; + ot->description= _("Find specified text"); /* api callbacks */ ot->exec= find_exec; @@ -2947,9 +2949,9 @@ static int replace_exec(bContext *C, wmOperator *op) void TEXT_OT_replace(wmOperatorType *ot) { /* identifiers */ - ot->name= "Replace"; + ot->name= _("Replace"); ot->idname= "TEXT_OT_replace"; - ot->description= "Replace text with the specified text"; + ot->description= _("Replace text with the specified text"); /* api callbacks */ ot->exec= replace_exec; @@ -2966,9 +2968,9 @@ static int mark_all_exec(bContext *C, wmOperator *op) void TEXT_OT_mark_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mark All"; + ot->name= _("Mark All"); ot->idname= "TEXT_OT_mark_all"; - ot->description= "Mark all specified text"; + ot->description= _("Mark all specified text"); /* api callbacks */ ot->exec= mark_all_exec; @@ -2996,9 +2998,9 @@ static int find_set_selected_exec(bContext *C, wmOperator *op) void TEXT_OT_find_set_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "Find Set Selected"; + ot->name= _("Find Set Selected"); ot->idname= "TEXT_OT_find_set_selected"; - ot->description= "Find specified text and set as selected"; + ot->description= _("Find specified text and set as selected"); /* api callbacks */ ot->exec= find_set_selected_exec; @@ -3023,9 +3025,9 @@ static int replace_set_selected_exec(bContext *C, wmOperator *UNUSED(op)) void TEXT_OT_replace_set_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "Replace Set Selected"; + ot->name= _("Replace Set Selected"); ot->idname= "TEXT_OT_replace_set_selected"; - ot->description= "Replace text with specified text and set as selected"; + ot->description= _("Replace text with specified text and set as selected"); /* api callbacks */ ot->exec= replace_set_selected_exec; @@ -3158,9 +3160,9 @@ static int resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED( void TEXT_OT_resolve_conflict(wmOperatorType *ot) { /* identifiers */ - ot->name= "Resolve Conflict"; + ot->name= _("Resolve Conflict"); ot->idname= "TEXT_OT_resolve_conflict"; - ot->description= "When external text is out of sync, resolve the conflict"; + ot->description= _("When external text is out of sync, resolve the conflict"); /* api callbacks */ ot->exec= resolve_conflict_exec; @@ -3168,7 +3170,7 @@ void TEXT_OT_resolve_conflict(wmOperatorType *ot) ot->poll= save_poll; /* properties */ - RNA_def_enum(ot->srna, "resolution", resolution_items, RESOLVE_IGNORE, "Resolution", "How to solve conflict due to different in internal and external text."); + RNA_def_enum(ot->srna, "resolution", resolution_items, RESOLVE_IGNORE, _("Resolution"), _("How to solve conflict due to different in internal and external text.")); } /********************** to 3d object operator *****************/ @@ -3186,9 +3188,9 @@ static int to_3d_object_exec(bContext *C, wmOperator *op) void TEXT_OT_to_3d_object(wmOperatorType *ot) { /* identifiers */ - ot->name= "To 3D Object"; + ot->name= _("To 3D Object"); ot->idname= "TEXT_OT_to_3d_object"; - ot->description= "Create 3d text object from active text data block"; + ot->description= _("Create 3d text object from active text data block"); /* api callbacks */ ot->exec= to_3d_object_exec; @@ -3198,7 +3200,7 @@ void TEXT_OT_to_3d_object(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "split_lines", 0, "Split Lines", "Create one object per line in the text."); + RNA_def_boolean(ot->srna, "split_lines", 0, _("Split Lines"), _("Create one object per line in the text.")); } diff --git a/source/blender/editors/space_time/CMakeLists.txt b/source/blender/editors/space_time/CMakeLists.txt index 758d1e629f9..d6bf4a551ce 100644 --- a/source/blender/editors/space_time/CMakeLists.txt +++ b/source/blender/editors/space_time/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/space_time/SConscript b/source/blender/editors/space_time/SConscript index c08339ba692..ec59d774f65 100644 --- a/source/blender/editors/space_time/SConscript +++ b/source/blender/editors/space_time/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../../blenloader' diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c index e9559426b81..e86ae1849dd 100644 --- a/source/blender/editors/space_time/time_ops.c +++ b/source/blender/editors/space_time/time_ops.c @@ -39,6 +39,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "ED_screen.h" @@ -77,9 +79,9 @@ static int time_set_sfra_exec (bContext *C, wmOperator *UNUSED(op)) static void TIME_OT_start_frame_set (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Start Frame"; + ot->name= _("Set Start Frame"); ot->idname= "TIME_OT_start_frame_set"; - ot->description="Set the start frame"; + ot->description=_("Set the start frame"); /* api callbacks */ ot->exec= time_set_sfra_exec; @@ -119,9 +121,9 @@ static int time_set_efra_exec (bContext *C, wmOperator *UNUSED(op)) static void TIME_OT_end_frame_set (wmOperatorType *ot) { /* identifiers */ - ot->name= "Set End Frame"; + ot->name= _("Set End Frame"); ot->idname= "TIME_OT_end_frame_set"; - ot->description="Set the end frame"; + ot->description=_("Set the end frame"); /* api callbacks */ ot->exec= time_set_efra_exec; @@ -161,9 +163,9 @@ static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op)) static void TIME_OT_view_all (wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; + ot->name= _("View All"); ot->idname= "TIME_OT_view_all"; - ot->description= "Show the entire playable frame range"; + ot->description= _("Show the entire playable frame range"); /* api callbacks */ ot->exec= time_view_all_exec; diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 6e03866153f..cf696a6d063 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -52,6 +52,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_action.h" #include "BKE_context.h" #include "BKE_curve.h" @@ -1469,8 +1471,8 @@ static int view3d_properties(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_properties(wmOperatorType *ot) { - ot->name= "Properties"; - ot->description= "Toggles the properties panel display"; + ot->name= _("Properties"); + ot->description= _("Toggles the properties panel display"); ot->idname= "VIEW3D_OT_properties"; ot->exec= view3d_properties; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index d563c07baf3..3b760605444 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -49,6 +49,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_image.h" #include "BKE_library.h" @@ -571,13 +573,13 @@ enum { void viewrotate_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""}, - {VIEWROT_MODAL_AXIS_SNAP_ENABLE, "AXIS_SNAP_ENABLE", 0, "Enable Axis Snap", ""}, - {VIEWROT_MODAL_AXIS_SNAP_DISABLE, "AXIS_SNAP_DISABLE", 0, "Disable Axis Snap", ""}, + {VIEWROT_MODAL_AXIS_SNAP_ENABLE, "AXIS_SNAP_ENABLE", 0, N_("Enable Axis Snap"), ""}, + {VIEWROT_MODAL_AXIS_SNAP_DISABLE, "AXIS_SNAP_DISABLE", 0, N_("Disable Axis Snap"), ""}, - {VIEWROT_MODAL_SWITCH_ZOOM, "SWITCH_TO_ZOOM", 0, "Switch to Zoom"}, - {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, "Switch to Move"}, + {VIEWROT_MODAL_SWITCH_ZOOM, "SWITCH_TO_ZOOM", 0, N_("Switch to Zoom")}, + {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, N_("Switch to Move")}, {0, NULL, 0, NULL, NULL}}; @@ -586,7 +588,7 @@ void viewrotate_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Rotate Modal", modal_items); + keymap= WM_modalkeymap_add(keyconf, _("View3D Rotate Modal"), RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); @@ -914,8 +916,8 @@ void VIEW3D_OT_rotate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Rotate view"; - ot->description = "Rotate the view"; + ot->name= _("Rotate view"); + ot->description = _("Rotate the view"); ot->idname= "VIEW3D_OT_rotate"; /* api callbacks */ @@ -937,10 +939,10 @@ void VIEW3D_OT_rotate(wmOperatorType *ot) void viewmove_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""}, - {VIEWROT_MODAL_SWITCH_ZOOM, "SWITCH_TO_ZOOM", 0, "Switch to Zoom"}, - {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"}, + {VIEWROT_MODAL_SWITCH_ZOOM, "SWITCH_TO_ZOOM", 0, N_("Switch to Zoom")}, + {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, N_("Switch to Rotate")}, {0, NULL, 0, NULL, NULL}}; @@ -949,7 +951,7 @@ void viewmove_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Move Modal", modal_items); + keymap= WM_modalkeymap_add(keyconf, _("View3D Move Modal"), RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); @@ -1076,8 +1078,8 @@ void VIEW3D_OT_move(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move view"; - ot->description = "Move the view"; + ot->name= _("Move view"); + ot->description = _("Move the view"); ot->idname= "VIEW3D_OT_move"; /* api callbacks */ @@ -1097,10 +1099,10 @@ void VIEW3D_OT_move(wmOperatorType *ot) void viewzoom_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""}, - {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"}, - {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, "Switch to Move"}, + {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, N_("Switch to Rotate")}, + {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, N_("Switch to Move")}, {0, NULL, 0, NULL, NULL}}; @@ -1109,7 +1111,7 @@ void viewzoom_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Zoom Modal", modal_items); + keymap= WM_modalkeymap_add(keyconf, _("View3D Zoom Modal"), RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); @@ -1348,10 +1350,10 @@ static int viewzoom_exec(bContext *C, wmOperator *op) void viewdolly_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""}, - {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"}, - {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, "Switch to Move"}, + {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, N_("Switch to Rotate")}, + {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, N_("Switch to Move")}, {0, NULL, 0, NULL, NULL}}; @@ -1360,7 +1362,7 @@ void viewdolly_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Dolly Modal", modal_items); + keymap= WM_modalkeymap_add(keyconf, _("View3D Dolly Modal"), RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); @@ -1439,8 +1441,8 @@ static int viewzoom_cancel(bContext *C, wmOperator *op) void VIEW3D_OT_zoom(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom View"; - ot->description = "Zoom in/out in the view"; + ot->name= _("Zoom View"); + ot->description = _("Zoom in/out in the view"); ot->idname= "VIEW3D_OT_zoom"; /* api callbacks */ @@ -1453,9 +1455,9 @@ void VIEW3D_OT_zoom(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX); - RNA_def_int(ot->srna, "my", 0, 0, INT_MAX, "Zoom Position Y", "", 0, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, _("Zoom Position X"), "", 0, INT_MAX); + RNA_def_int(ot->srna, "my", 0, 0, INT_MAX, _("Zoom Position Y"), "", 0, INT_MAX); } @@ -1673,8 +1675,8 @@ static int viewdolly_cancel(bContext *C, wmOperator *op) void VIEW3D_OT_dolly(wmOperatorType *ot) { /* identifiers */ - ot->name= "Dolly view"; - ot->description = "Dolly in/out in the view"; + ot->name= _("Dolly view"); + ot->description = _("Dolly in/out in the view"); ot->idname= "VIEW3D_OT_dolly"; /* api callbacks */ @@ -1687,9 +1689,9 @@ void VIEW3D_OT_dolly(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; - RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX); - RNA_def_int(ot->srna, "my", 0, 0, INT_MAX, "Zoom Position Y", "", 0, INT_MAX); + RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, _("Delta"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, _("Zoom Position X"), "", 0, INT_MAX); + RNA_def_int(ot->srna, "my", 0, 0, INT_MAX, _("Zoom Position Y"), "", 0, INT_MAX); } @@ -1782,8 +1784,8 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in void VIEW3D_OT_view_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; - ot->description = "View all objects in scene"; + ot->name= _("View All"); + ot->description = _("View all objects in scene"); ot->idname= "VIEW3D_OT_view_all"; /* api callbacks */ @@ -1793,7 +1795,7 @@ void VIEW3D_OT_view_all(wmOperatorType *ot) /* flags */ ot->flag= 0; - RNA_def_boolean(ot->srna, "center", 0, "Center", ""); + RNA_def_boolean(ot->srna, "center", 0, _("Center"), ""); } @@ -1929,8 +1931,8 @@ void VIEW3D_OT_view_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Selected"; - ot->description = "Move the view to the selection center"; + ot->name= _("View Selected"); + ot->description = _("Move the view to the selection center"); ot->idname= "VIEW3D_OT_view_selected"; /* api callbacks */ @@ -1964,8 +1966,8 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_view_center_cursor(wmOperatorType *ot) { /* identifiers */ - ot->name= "Center View to Cursor"; - ot->description= "Centers the view so that the cursor is in the middle of the view"; + ot->name= _("Center View to Cursor"); + ot->description= _("Centers the view so that the cursor is in the middle of the view"); ot->idname= "VIEW3D_OT_view_center_cursor"; /* api callbacks */ @@ -2003,8 +2005,8 @@ static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op)) /* was void VIEW3D_OT_view_center_camera(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Camera Center"; - ot->description = "Center the camera view"; + ot->name= _("View Camera Center"); + ot->description = _("Center the camera view"); ot->idname= "VIEW3D_OT_view_center_camera"; /* api callbacks */ @@ -2068,8 +2070,8 @@ static int render_border_exec(bContext *C, wmOperator *op) void VIEW3D_OT_render_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Render Border"; - ot->description = "Set the boundaries of the border render and enables border render "; + ot->name= _("Set Render Border"); + ot->description = _("Set the boundaries of the border render and enables border render "); ot->idname= "VIEW3D_OT_render_border"; /* api callbacks */ @@ -2084,10 +2086,10 @@ void VIEW3D_OT_render_border(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* rna */ - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } /* ********************* Border Zoom operator ****************** */ @@ -2224,8 +2226,8 @@ static int view3d_zoom_border_invoke(bContext *C, wmOperator *op, wmEvent *event void VIEW3D_OT_zoom_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Zoom"; - ot->description = "Zoom in the view to the nearest object contained in the border"; + ot->name= _("Border Zoom"); + ot->description = _("Zoom in the view to the nearest object contained in the border"); ot->idname= "VIEW3D_OT_zoom_border"; /* api callbacks */ @@ -2240,10 +2242,10 @@ void VIEW3D_OT_zoom_border(wmOperatorType *ot) ot->flag= 0; /* rna */ - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } @@ -2275,8 +2277,8 @@ static int view3d_zoom_1_to_1_camera_exec(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_zoom_camera_1_to_1(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom Camera 1:1"; - ot->description = "Match the camera to 1:1 to the render output"; + ot->name= _("Zoom Camera 1:1"); + ot->description = _("Match the camera to 1:1 to the render output"); ot->idname= "VIEW3D_OT_zoom_camera_1_to_1"; /* api callbacks */ @@ -2290,13 +2292,13 @@ void VIEW3D_OT_zoom_camera_1_to_1(wmOperatorType *ot) /* ********************* Changing view operator ****************** */ static EnumPropertyItem prop_view_items[] = { - {RV3D_VIEW_FRONT, "FRONT", 0, "Front", "View From the Front"}, - {RV3D_VIEW_BACK, "BACK", 0, "Back", "View From the Back"}, - {RV3D_VIEW_LEFT, "LEFT", 0, "Left", "View From the Left"}, - {RV3D_VIEW_RIGHT, "RIGHT", 0, "Right", "View From the Right"}, - {RV3D_VIEW_TOP, "TOP", 0, "Top", "View From the Top"}, - {RV3D_VIEW_BOTTOM, "BOTTOM", 0, "Bottom", "View From the Bottom"}, - {RV3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the active amera"}, + {RV3D_VIEW_FRONT, "FRONT", 0, N_("Front"), N_("View From the Front")}, + {RV3D_VIEW_BACK, "BACK", 0, N_("Back"), N_("View From the Back")}, + {RV3D_VIEW_LEFT, "LEFT", 0, N_("Left"), N_("View From the Left")}, + {RV3D_VIEW_RIGHT, "RIGHT", 0, N_("Right"), N_("View From the Right")}, + {RV3D_VIEW_TOP, "TOP", 0, N_("Top"), N_("View From the Top")}, + {RV3D_VIEW_BOTTOM, "BOTTOM", 0, N_("Bottom"), N_("View From the Bottom")}, + {RV3D_VIEW_CAMERA, "CAMERA", 0, N_("Camera"), N_("View From the active amera")}, {0, NULL, 0, NULL, NULL}}; @@ -2497,8 +2499,8 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) void VIEW3D_OT_viewnumpad(wmOperatorType *ot) { /* identifiers */ - ot->name= "View numpad"; - ot->description = "Set the view"; + ot->name= _("View numpad"); + ot->description = _("Set the view"); ot->idname= "VIEW3D_OT_viewnumpad"; /* api callbacks */ @@ -2508,15 +2510,15 @@ void VIEW3D_OT_viewnumpad(wmOperatorType *ot) /* flags */ ot->flag= 0; - RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "The Type of view"); - RNA_def_boolean(ot->srna, "align_active", 0, "Align Active", "Align to the active objects axis"); + RNA_def_enum(ot->srna, "type", prop_view_items, 0, _("View"), _("The Type of view")); + RNA_def_boolean(ot->srna, "align_active", 0, _("Align Active"), _("Align to the active objects axis")); } static EnumPropertyItem prop_view_orbit_items[] = { - {V3D_VIEW_STEPLEFT, "ORBITLEFT", 0, "Orbit Left", "Orbit the view around to the Left"}, - {V3D_VIEW_STEPRIGHT, "ORBITRIGHT", 0, "Orbit Right", "Orbit the view around to the Right"}, - {V3D_VIEW_STEPUP, "ORBITUP", 0, "Orbit Up", "Orbit the view Up"}, - {V3D_VIEW_STEPDOWN, "ORBITDOWN", 0, "Orbit Down", "Orbit the view Down"}, + {V3D_VIEW_STEPLEFT, "ORBITLEFT", 0, N_("Orbit Left"), N_("Orbit the view around to the Left")}, + {V3D_VIEW_STEPRIGHT, "ORBITRIGHT", 0, N_("Orbit Right"), N_("Orbit the view around to the Right")}, + {V3D_VIEW_STEPUP, "ORBITUP", 0, N_("Orbit Up"), N_("Orbit the view Up")}, + {V3D_VIEW_STEPDOWN, "ORBITDOWN", 0, N_("Orbit Down"), N_("Orbit the view Down")}, {0, NULL, 0, NULL, NULL}}; static int vieworbit_exec(bContext *C, wmOperator *op) @@ -2566,8 +2568,8 @@ static int vieworbit_exec(bContext *C, wmOperator *op) void VIEW3D_OT_view_orbit(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Orbit"; - ot->description = "Orbit the view"; + ot->name= _("View Orbit"); + ot->description = _("Orbit the view"); ot->idname= "VIEW3D_OT_view_orbit"; /* api callbacks */ @@ -2576,14 +2578,14 @@ void VIEW3D_OT_view_orbit(wmOperatorType *ot) /* flags */ ot->flag= 0; - RNA_def_enum(ot->srna, "type", prop_view_orbit_items, 0, "Orbit", "Direction of View Orbit"); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_view_orbit_items), 0, _("Orbit"), _("Direction of View Orbit")); } static EnumPropertyItem prop_view_pan_items[] = { - {V3D_VIEW_PANLEFT, "PANLEFT", 0, "Pan Left", "Pan the view to the Left"}, - {V3D_VIEW_PANRIGHT, "PANRIGHT", 0, "Pan Right", "Pan the view to the Right"}, - {V3D_VIEW_PANUP, "PANUP", 0, "Pan Up", "Pan the view Up"}, - {V3D_VIEW_PANDOWN, "PANDOWN", 0, "Pan Down", "Pan the view Down"}, + {V3D_VIEW_PANLEFT, "PANLEFT", 0, N_("Pan Left"), N_("Pan the view to the Left")}, + {V3D_VIEW_PANRIGHT, "PANRIGHT", 0, N_("Pan Right"), N_("Pan the view to the Right")}, + {V3D_VIEW_PANUP, "PANUP", 0, N_("Pan Up"), N_("Pan the view Up")}, + {V3D_VIEW_PANDOWN, "PANDOWN", 0, N_("Pan Down"), N_("Pan the view Down")}, {0, NULL, 0, NULL, NULL}}; static int viewpan_exec(bContext *C, wmOperator *op) @@ -2614,8 +2616,8 @@ static int viewpan_exec(bContext *C, wmOperator *op) void VIEW3D_OT_view_pan(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Pan"; - ot->description = "Pan the view"; + ot->name= _("View Pan"); + ot->description = _("Pan the view"); ot->idname= "VIEW3D_OT_view_pan"; /* api callbacks */ @@ -2624,7 +2626,7 @@ void VIEW3D_OT_view_pan(wmOperatorType *ot) /* flags */ ot->flag= 0; - RNA_def_enum(ot->srna, "type", prop_view_pan_items, 0, "Pan", "Direction of View Pan"); + RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_view_pan_items), 0, _("Pan"), _("Direction of View Pan")); } static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op)) @@ -2646,8 +2648,8 @@ static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_view_persportho(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Persp/Ortho"; - ot->description = "Switch the current view from perspective/orthographic"; + ot->name= _("View Persp/Ortho"); + ot->description = _("Switch the current view from perspective/orthographic"); ot->idname= "VIEW3D_OT_view_persportho"; /* api callbacks */ @@ -2723,8 +2725,8 @@ static int background_image_add_invoke(bContext *C, wmOperator *op, wmEvent *UNU void VIEW3D_OT_background_image_add(wmOperatorType *ot) { /* identifiers */ - ot->name = "Add Background Image"; - ot->description= "Add a new background image"; + ot->name = _("Add Background Image"); + ot->description= _("Add a new background image"); ot->idname = "VIEW3D_OT_background_image_add"; /* api callbacks */ @@ -2736,8 +2738,8 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot) ot->flag = 0; /* properties */ - RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Image name to assign."); - RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file"); + RNA_def_string(ot->srna, "name", "Image", 24, _("Name"), _("Image name to assign.")); + RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, _("Filepath"), _("Path to image file")); } @@ -2764,8 +2766,8 @@ static int background_image_remove_exec(bContext *C, wmOperator *op) void VIEW3D_OT_background_image_remove(wmOperatorType *ot) { /* identifiers */ - ot->name = "Remove Background Image"; - ot->description= "Remove a background image from the 3D view"; + ot->name = _("Remove Background Image"); + ot->description= _("Remove a background image from the 3D view"); ot->idname = "VIEW3D_OT_background_image_remove"; /* api callbacks */ @@ -2775,7 +2777,7 @@ void VIEW3D_OT_background_image_remove(wmOperatorType *ot) /* flags */ ot->flag = 0; - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Background image index to remove ", 0, INT_MAX); + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, _("Index"), _("Background image index to remove "), 0, INT_MAX); } /* ********************* set clipping operator ****************** */ @@ -2863,8 +2865,8 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clipping Border"; - ot->description = "Set the view clipping border"; + ot->name= _("Clipping Border"); + ot->description = _("Set the view clipping border"); ot->idname= "VIEW3D_OT_clip_border"; /* api callbacks */ @@ -2879,10 +2881,10 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot) ot->flag= 0; /* rna */ - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); } /* ***************** 3d cursor cursor op ******************* */ @@ -2956,8 +2958,8 @@ void VIEW3D_OT_cursor3d(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set 3D Cursor"; - ot->description = "Set the location of the 3D cursor"; + ot->name= _("Set 3D Cursor"); + ot->description = _("Set the location of the 3D cursor"); ot->idname= "VIEW3D_OT_cursor3d"; /* api callbacks */ @@ -2998,8 +3000,8 @@ void VIEW3D_OT_manipulator(wmOperatorType *ot) { /* identifiers */ - ot->name= "3D Manipulator"; - ot->description = "Manipulate selected item by axis"; + ot->name= _("3D Manipulator"); + ot->description = _("Manipulate selected item by axis"); ot->idname= "VIEW3D_OT_manipulator"; /* api callbacks */ @@ -3032,8 +3034,8 @@ static int enable_manipulator_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE void VIEW3D_OT_enable_manipulator(wmOperatorType *ot) { /* identifiers */ - ot->name= "Enable 3D Manipulator"; - ot->description = "Enable the transform manipulator for use"; + ot->name= _("Enable 3D Manipulator"); + ot->description = _("Enable the transform manipulator for use"); ot->idname= "VIEW3D_OT_enable_manipulator"; /* api callbacks */ @@ -3041,9 +3043,9 @@ void VIEW3D_OT_enable_manipulator(wmOperatorType *ot) ot->poll= ED_operator_view3d_active; /* rna later */ - RNA_def_boolean(ot->srna, "translate", 0, "Translate", "Enable the translate manipulator"); - RNA_def_boolean(ot->srna, "rotate", 0, "Rotate", "Enable the rotate manipulator"); - RNA_def_boolean(ot->srna, "scale", 0, "Scale", "Enable the scale manipulator"); + RNA_def_boolean(ot->srna, "translate", 0, _("Translate"), _("Enable the translate manipulator")); + RNA_def_boolean(ot->srna, "rotate", 0, _("Rotate"), _("Enable the rotate manipulator")); + RNA_def_boolean(ot->srna, "scale", 0, _("Scale"), _("Enable the scale manipulator")); } /* ************************* below the line! *********************** */ diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index ed1ed5b3881..79f2d98cabd 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -39,6 +39,9 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" +#include "RNA_define.h" + #include "BKE_context.h" #include "BKE_object.h" #include "BKE_report.h" @@ -80,26 +83,26 @@ void fly_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {FLY_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {FLY_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, - {FLY_MODAL_ACCELERATE, "ACCELERATE", 0, "Accelerate", ""}, - {FLY_MODAL_DECELERATE, "DECELERATE", 0, "Decelerate", ""}, + {FLY_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""}, + {FLY_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""}, + {FLY_MODAL_ACCELERATE, "ACCELERATE", 0, N_("Accelerate"), ""}, + {FLY_MODAL_DECELERATE, "DECELERATE", 0, N_("Decelerate"), ""}, - {FLY_MODAL_PAN_ENABLE, "PAN_ENABLE", 0, "Pan Enable", ""}, - {FLY_MODAL_PAN_DISABLE, "PAN_DISABLE", 0, "Pan Disable", ""}, + {FLY_MODAL_PAN_ENABLE, "PAN_ENABLE", 0, N_("Pan Enable"), ""}, + {FLY_MODAL_PAN_DISABLE, "PAN_DISABLE", 0, N_("Pan Disable"), ""}, - {FLY_MODAL_DIR_FORWARD, "FORWARD", 0, "Fly Forward", ""}, - {FLY_MODAL_DIR_BACKWARD,"BACKWARD", 0, "Fly Backward", ""}, - {FLY_MODAL_DIR_LEFT, "LEFT", 0, "Fly Left", ""}, - {FLY_MODAL_DIR_RIGHT, "RIGHT", 0, "Fly Right", ""}, - {FLY_MODAL_DIR_UP, "UP", 0, "Fly Up", ""}, - {FLY_MODAL_DIR_DOWN, "DOWN", 0, "Fly Down", ""}, + {FLY_MODAL_DIR_FORWARD, "FORWARD", 0, N_("Fly Forward"), ""}, + {FLY_MODAL_DIR_BACKWARD,"BACKWARD", 0, N_("Fly Backward"), ""}, + {FLY_MODAL_DIR_LEFT, "LEFT", 0, N_("Fly Left"), ""}, + {FLY_MODAL_DIR_RIGHT, "RIGHT", 0, N_("Fly Right"), ""}, + {FLY_MODAL_DIR_UP, "UP", 0, N_("Fly Up"), ""}, + {FLY_MODAL_DIR_DOWN, "DOWN", 0, N_("Fly Down"), ""}, - {FLY_MODAL_AXIS_LOCK_X, "AXIS_LOCK_X", 0, "X Axis Correction", "X axis correction (toggle)"}, - {FLY_MODAL_AXIS_LOCK_Z, "AXIS_LOCK_Z", 0, "X Axis Correction", "Z axis correction (toggle)"}, + {FLY_MODAL_AXIS_LOCK_X, "AXIS_LOCK_X", 0, N_("X Axis Correction"), N_("X axis correction (toggle)")}, + {FLY_MODAL_AXIS_LOCK_Z, "AXIS_LOCK_Z", 0, N_("X Axis Correction"), N_("Z axis correction (toggle)")}, - {FLY_MODAL_PRECISION_ENABLE, "PRECISION_ENABLE", 0, "Precision Enable", ""}, - {FLY_MODAL_PRECISION_DISABLE, "PRECISION_DISABLE", 0, "Precision Disable", ""}, + {FLY_MODAL_PRECISION_ENABLE, "PRECISION_ENABLE", 0, N_("Precision Enable"), ""}, + {FLY_MODAL_PRECISION_DISABLE, "PRECISION_DISABLE", 0, N_("Precision Disable"), ""}, {0, NULL, 0, NULL, NULL}}; @@ -108,7 +111,7 @@ void fly_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Fly Modal", modal_items); + keymap= WM_modalkeymap_add(keyconf, "View3D Fly Modal", RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, FLY_MODAL_CANCEL); @@ -932,8 +935,8 @@ static int fly_modal(bContext *C, wmOperator *op, wmEvent *event) void VIEW3D_OT_fly(wmOperatorType *ot) { /* identifiers */ - ot->name= "Fly Navigation"; - ot->description= "Interactively fly around the scene"; + ot->name= _("Fly Navigation"); + ot->description= _("Interactively fly around the scene"); ot->idname= "VIEW3D_OT_fly"; /* api callbacks */ diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index ae80a554e08..a4e1081d6cd 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -47,6 +47,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_effect.h" @@ -252,8 +254,8 @@ static int view3d_layers_poll(bContext *C) void VIEW3D_OT_layers(wmOperatorType *ot) { /* identifiers */ - ot->name= "Layers"; - ot->description= "Toggle layer(s) visibility"; + ot->name= _("Layers"); + ot->description= _("Toggle layer(s) visibility"); ot->idname= "VIEW3D_OT_layers"; /* api callbacks */ @@ -264,9 +266,9 @@ void VIEW3D_OT_layers(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "The layer number to set, zero for all layers", 0, 20); - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Add this layer to the current view layers"); - RNA_def_boolean(ot->srna, "toggle", 1, "Toggle", "Toggle the layer"); + RNA_def_int(ot->srna, "nr", 1, 0, 20, _("Number"), _("The layer number to set, zero for all layers"), 0, 20); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Add this layer to the current view layers")); + RNA_def_boolean(ot->srna, "toggle", 1, _("Toggle"), _("Toggle the layer")); } static char *view3d_modeselect_pup(Scene *scene) @@ -276,9 +278,9 @@ static char *view3d_modeselect_pup(Scene *scene) static char formatstr[] = "|%s %%x%d %%i%d"; char *str = string; - str += sprintf(str, "Mode: %%t"); + str += sprintf(str, _("Mode: %%t")); - str += sprintf(str, formatstr, "Object Mode", OB_MODE_OBJECT, ICON_OBJECT_DATA); + str += sprintf(str, formatstr, _("Object Mode"), OB_MODE_OBJECT, ICON_OBJECT_DATA); if(ob==NULL) return string; @@ -287,31 +289,31 @@ static char *view3d_modeselect_pup(Scene *scene) || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) { - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); + str += sprintf(str, formatstr, _("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT); } else if (ob->type == OB_ARMATURE) { if (ob->mode & OB_MODE_POSE) - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT); + str += sprintf(str, formatstr, _("Edit Mode"), OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT); else - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); + str += sprintf(str, formatstr, _("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT); } if (ob->type == OB_MESH) { - str += sprintf(str, formatstr, "Sculpt Mode", OB_MODE_SCULPT, ICON_SCULPTMODE_HLT); - str += sprintf(str, formatstr, "Vertex Paint", OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT); - str += sprintf(str, formatstr, "Texture Paint", OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT); - str += sprintf(str, formatstr, "Weight Paint", OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT); + str += sprintf(str, formatstr, _("Sculpt Mode"), OB_MODE_SCULPT, ICON_SCULPTMODE_HLT); + str += sprintf(str, formatstr, _("Vertex Paint"), OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT); + str += sprintf(str, formatstr, _("Texture Paint"), OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT); + str += sprintf(str, formatstr, _("Weight Paint"), OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT); } /* if active object is an armature */ if (ob->type==OB_ARMATURE) { - str += sprintf(str, formatstr, "Pose Mode", OB_MODE_POSE, ICON_POSE_HLT); + str += sprintf(str, formatstr, _("Pose Mode"), OB_MODE_POSE, ICON_POSE_HLT); } if (ob->particlesystem.first || modifiers_findByType(ob, eModifierType_Cloth) || modifiers_findByType(ob, eModifierType_Softbody)) { - str += sprintf(str, formatstr, "Particle Mode", OB_MODE_PARTICLE_EDIT, ICON_PARTICLEMODE); + str += sprintf(str, formatstr, _("Particle Mode"), OB_MODE_PARTICLE_EDIT, ICON_PARTICLEMODE); } (void)str; return (string); @@ -485,7 +487,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) uiBlockBeginAlign(block); uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene) , - 0,0,126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, "Mode"); + 0,0,126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, _("Mode")); uiBlockEndAlign(block); /* Draw type */ @@ -511,17 +513,17 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) block= uiLayoutGetBlock(row); if(v3d->twflag & V3D_USE_MANIPULATOR) { - uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Translate manipulator mode"); - uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Rotate manipulator mode"); - uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Scale manipulator mode"); + uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, _("Translate manipulator mode")); + uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, _("Rotate manipulator mode")); + uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, _("Scale manipulator mode")); } if (v3d->twmode > (BIF_countTransformOrientation(C) - 1) + V3D_MANIP_CUSTOM) { v3d->twmode = 0; } - str_menu = BIF_menustringTransformOrientation(C, "Orientation"); - uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, "Transform Orientation"); + str_menu = BIF_menustringTransformOrientation(C, _("Orientation")); + uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, _("Transform Orientation")); MEM_freeN((void *)str_menu); } diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 9290e1fc631..13a7dc968cb 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -54,6 +54,8 @@ #include "BLI_linklist.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_paint.h" #include "BKE_armature.h" @@ -862,8 +864,8 @@ static int view3d_lasso_select_exec(bContext *C, wmOperator *op) void VIEW3D_OT_select_lasso(wmOperatorType *ot) { - ot->name= "Lasso Select"; - ot->description= "Select items using lasso selection"; + ot->name= _("Lasso Select"); + ot->description= _("Select items using lasso selection"); ot->idname= "VIEW3D_OT_select_lasso"; ot->invoke= WM_gesture_lasso_invoke; @@ -876,8 +878,8 @@ void VIEW3D_OT_select_lasso(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect rather than select items."); - RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection instead of deselecting everything first."); + RNA_def_boolean(ot->srna, "deselect", 0, _("Deselect"), _("Deselect rather than select items.")); + RNA_def_boolean(ot->srna, "extend", 1, _("Extend"), _("Extend selection instead of deselecting everything first.")); } @@ -1810,8 +1812,8 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op) void VIEW3D_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; - ot->description= "Select items using border selection"; + ot->name= _("Border Select"); + ot->description= _("Select items using border selection"); ot->idname= "VIEW3D_OT_select_border"; /* api callbacks */ @@ -1876,8 +1878,8 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) void VIEW3D_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Activate/Select"; - ot->description= "Activate/select item(s)"; + ot->name= _("Activate/Select"); + ot->description= _("Activate/select item(s)"); ot->idname= "VIEW3D_OT_select"; /* api callbacks */ @@ -1888,9 +1890,9 @@ void VIEW3D_OT_select(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); - RNA_def_boolean(ot->srna, "center", 0, "Center", "Use the object center when selecting (object mode only)."); - RNA_def_boolean(ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only)."); + RNA_def_boolean(ot->srna, "extend", 0, _("Extend"), _("Extend selection instead of deselecting everything first.")); + RNA_def_boolean(ot->srna, "center", 0, _("Center"), _("Use the object center when selecting (object mode only).")); + RNA_def_boolean(ot->srna, "enumerate", 0, _("Enumerate"), _("List objects under the mouse (object mode only).")); } @@ -2291,8 +2293,8 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) void VIEW3D_OT_select_circle(wmOperatorType *ot) { - ot->name= "Circle Select"; - ot->description= "Select items using circle selection"; + ot->name= _("Circle Select"); + ot->description= _("Select items using circle selection"); ot->idname= "VIEW3D_OT_select_circle"; ot->invoke= WM_gesture_circle_invoke; @@ -2306,6 +2308,6 @@ void VIEW3D_OT_select_circle(wmOperatorType *ot) RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "radius", 0, INT_MIN, INT_MAX, "Radius", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "radius", 0, INT_MIN, INT_MAX, _("Radius"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, _("Event Type"), "", INT_MIN, INT_MAX); } diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 2e96800bf3b..7285a9d6d09 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -47,6 +47,8 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_idprop.h" #include "BKE_global.h" @@ -79,7 +81,7 @@ static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa) wmOperator *op= WM_operator_last_redo(C); if(op) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname)); - else BLI_strncpy(pa->drawname, "Operator", sizeof(pa->drawname)); + else BLI_strncpy(pa->drawname, _("Operator"), sizeof(pa->drawname)); } static void view3d_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOperator *op) @@ -254,8 +256,8 @@ static int view3d_toolshelf(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_toolshelf(wmOperatorType *ot) { - ot->name= "Tool Shelf"; - ot->description= "Toggles tool shelf display"; + ot->name= _("Tool Shelf"); + ot->description= _("Toggles tool shelf display"); ot->idname= "VIEW3D_OT_toolshelf"; ot->exec= view3d_toolshelf; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index eeaf87757ce..d9ae1aa594d 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -43,6 +43,8 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_anim.h" #include "BKE_action.h" #include "BKE_context.h" @@ -356,9 +358,9 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth View"; + ot->name= _("Smooth View"); ot->idname= "VIEW3D_OT_smoothview"; - ot->description="The time to animate the change of view (in milliseconds)"; + ot->description=_("The time to animate the change of view (in milliseconds)"); /* api callbacks */ ot->invoke= view3d_smoothview_invoke; @@ -406,8 +408,8 @@ void VIEW3D_OT_setcameratoview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Align Camera To View"; - ot->description= "Set camera view to active view"; + ot->name= _("Align Camera To View"); + ot->description= _("Set camera view to active view"); ot->idname= "VIEW3D_OT_camera_to_view"; /* api callbacks */ @@ -452,8 +454,8 @@ void VIEW3D_OT_object_as_camera(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Active Object as Camera"; - ot->description= "Set the active object as the active camera for this view or scene"; + ot->name= _("Set Active Object as Camera"); + ot->description= _("Set the active object as the active camera for this view or scene"); ot->idname= "VIEW3D_OT_object_as_camera"; /* api callbacks */ @@ -1620,8 +1622,8 @@ void VIEW3D_OT_localview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Local View"; - ot->description= "Toggle display of selected object(s) separately and centered in view"; + ot->name= _("Local View"); + ot->description= _("Toggle display of selected object(s) separately and centered in view"); ot->idname= "VIEW3D_OT_localview"; /* api callbacks */ @@ -1846,8 +1848,8 @@ void VIEW3D_OT_game_start(wmOperatorType *ot) { /* identifiers */ - ot->name= "Start Game Engine"; - ot->description= "Start game engine"; + ot->name= _("Start Game Engine"); + ot->description= _("Start game engine"); ot->idname= "VIEW3D_OT_game_start"; /* api callbacks */ diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt index 283b09f42e4..0917fb362ab 100644 --- a/source/blender/editors/transform/CMakeLists.txt +++ b/source/blender/editors/transform/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/transform/SConscript b/source/blender/editors/transform/SConscript index edc2156a07b..f2d5baecfb3 100644 --- a/source/blender/editors/transform/SConscript +++ b/source/blender/editors/transform/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../render/extern/include' incs += ' ../../gpu ../../makesrna ../../blenloader' diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index eea77e36f7c..ec002597922 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -53,6 +53,7 @@ #include "DNA_scene_types.h" /* PET modes */ #include "RNA_access.h" +#include "RNA_define.h" #include "BIF_gl.h" #include "BIF_glutil.h" @@ -85,6 +86,8 @@ #include "BLI_ghash.h" #include "BLI_linklist.h" +#include "BLF_api.h" + #include "UI_resources.h" //#include "blendef.h" @@ -489,29 +492,29 @@ static void view_editmove(unsigned short UNUSED(event)) wmKeyMap* transform_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {TFM_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {TFM_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, - {TFM_MODAL_TRANSLATE, "TRANSLATE", 0, "Translate", ""}, - {TFM_MODAL_ROTATE, "ROTATE", 0, "Rotate", ""}, - {TFM_MODAL_RESIZE, "RESIZE", 0, "Resize", ""}, - {TFM_MODAL_SNAP_INV_ON, "SNAP_INV_ON", 0, "Invert Snap On", ""}, - {TFM_MODAL_SNAP_INV_OFF, "SNAP_INV_OFF", 0, "Invert Snap Off", ""}, - {TFM_MODAL_SNAP_TOGGLE, "SNAP_TOGGLE", 0, "Snap Toggle", ""}, - {TFM_MODAL_AXIS_X, "AXIS_X", 0, "Orientation X axis", ""}, - {TFM_MODAL_AXIS_Y, "AXIS_Y", 0, "Orientation Y axis", ""}, - {TFM_MODAL_AXIS_Z, "AXIS_Z", 0, "Orientation Z axis", ""}, - {TFM_MODAL_PLANE_X, "PLANE_X", 0, "Orientation X plane", ""}, - {TFM_MODAL_PLANE_Y, "PLANE_Y", 0, "Orientation Y plane", ""}, - {TFM_MODAL_PLANE_Z, "PLANE_Z", 0, "Orientation Z plane", ""}, - {TFM_MODAL_CONS_OFF, "CONS_OFF", 0, "Remove Constraints", ""}, - {TFM_MODAL_ADD_SNAP, "ADD_SNAP", 0, "Add Snap Point", ""}, - {TFM_MODAL_REMOVE_SNAP, "REMOVE_SNAP", 0, "Remove Last Snap Point", ""}, - {NUM_MODAL_INCREMENT_UP, "INCREMENT_UP", 0, "Numinput Increment Up", ""}, - {NUM_MODAL_INCREMENT_DOWN, "INCREMENT_DOWN", 0, "Numinput Increment Down", ""}, - {TFM_MODAL_PROPSIZE_UP, "PROPORTIONAL_SIZE_UP", 0, "Increase Proportional Influence", ""}, - {TFM_MODAL_PROPSIZE_DOWN, "PROPORTIONAL_SIZE_DOWN", 0, "Decrease Poportional Influence", ""}, - {TFM_MODAL_AUTOIK_LEN_INC, "AUTOIK_CHAIN_LEN_UP", 0, "Increase Max AutoIK Chain Length", ""}, - {TFM_MODAL_AUTOIK_LEN_DEC, "AUTOIK_CHAIN_LEN_DOWN", 0, "Decrease Max AutoIK Chain Length", ""}, + {TFM_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""}, + {TFM_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""}, + {TFM_MODAL_TRANSLATE, "TRANSLATE", 0, N_("Translate"), ""}, + {TFM_MODAL_ROTATE, "ROTATE", 0, N_("Rotate"), ""}, + {TFM_MODAL_RESIZE, "RESIZE", 0, N_("Resize"), ""}, + {TFM_MODAL_SNAP_INV_ON, "SNAP_INV_ON", 0, N_("Invert Snap On"), ""}, + {TFM_MODAL_SNAP_INV_OFF, "SNAP_INV_OFF", 0, N_("Invert Snap Off"), ""}, + {TFM_MODAL_SNAP_TOGGLE, "SNAP_TOGGLE", 0, N_("Snap Toggle"), ""}, + {TFM_MODAL_AXIS_X, "AXIS_X", 0, N_("Orientation X axis"), ""}, + {TFM_MODAL_AXIS_Y, "AXIS_Y", 0, N_("Orientation Y axis"), ""}, + {TFM_MODAL_AXIS_Z, "AXIS_Z", 0, N_("Orientation Z axis"), ""}, + {TFM_MODAL_PLANE_X, "PLANE_X", 0, N_("Orientation X plane"), ""}, + {TFM_MODAL_PLANE_Y, "PLANE_Y", 0, N_("Orientation Y plane"), ""}, + {TFM_MODAL_PLANE_Z, "PLANE_Z", 0, N_("Orientation Z plane"), ""}, + {TFM_MODAL_CONS_OFF, "CONS_OFF", 0, N_("Remove Constraints"), ""}, + {TFM_MODAL_ADD_SNAP, "ADD_SNAP", 0, N_("Add Snap Point"), ""}, + {TFM_MODAL_REMOVE_SNAP, "REMOVE_SNAP", 0, N_("Remove Last Snap Point"), ""}, + {NUM_MODAL_INCREMENT_UP, "INCREMENT_UP", 0, N_("Numinput Increment Up"), ""}, + {NUM_MODAL_INCREMENT_DOWN, "INCREMENT_DOWN", 0, N_("Numinput Increment Down"), ""}, + {TFM_MODAL_PROPSIZE_UP, "PROPORTIONAL_SIZE_UP", 0, N_("Increase Proportional Influence"), ""}, + {TFM_MODAL_PROPSIZE_DOWN, "PROPORTIONAL_SIZE_DOWN", 0, N_("Decrease Poportional Influence"), ""}, + {TFM_MODAL_AUTOIK_LEN_INC, "AUTOIK_CHAIN_LEN_UP", 0, N_("Increase Max AutoIK Chain Length"), ""}, + {TFM_MODAL_AUTOIK_LEN_DEC, "AUTOIK_CHAIN_LEN_DOWN", 0, N_("Decrease Max AutoIK Chain Length"), ""}, {0, NULL, 0, NULL, NULL}}; wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Transform Modal Map"); @@ -519,7 +522,7 @@ wmKeyMap* transform_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return NULL; - keymap= WM_modalkeymap_add(keyconf, "Transform Modal Map", modal_items); + keymap= WM_modalkeymap_add(keyconf, "Transform Modal Map", RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, TFM_MODAL_CANCEL); diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 2d0c1ac2818..f61cc51de98 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -38,6 +38,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_global.h" #include "BKE_armature.h" @@ -112,34 +114,34 @@ static TransformModeItem transform_modes[] = EnumPropertyItem transform_mode_types[] = { - {TFM_INIT, "INIT", 0, "Init", ""}, - {TFM_DUMMY, "DUMMY", 0, "Dummy", ""}, - {TFM_TRANSLATION, "TRANSLATION", 0, "Translation", ""}, - {TFM_ROTATION, "ROTATION", 0, "Rotation", ""}, - {TFM_RESIZE, "RESIZE", 0, "Resize", ""}, - {TFM_TOSPHERE, "TOSPHERE", 0, "Tosphere", ""}, - {TFM_SHEAR, "SHEAR", 0, "Shear", ""}, - {TFM_WARP, "WARP", 0, "Warp", ""}, - {TFM_SHRINKFATTEN, "SHRINKFATTEN", 0, "Shrinkfatten", ""}, - {TFM_TILT, "TILT", 0, "Tilt", ""}, - {TFM_TRACKBALL, "TRACKBALL", 0, "Trackball", ""}, - {TFM_PUSHPULL, "PUSHPULL", 0, "Pushpull", ""}, - {TFM_CREASE, "CREASE", 0, "Crease", ""}, - {TFM_MIRROR, "MIRROR", 0, "Mirror", ""}, - {TFM_BONESIZE, "BONE_SIZE", 0, "Bonesize", ""}, - {TFM_BONE_ENVELOPE, "BONE_ENVELOPE", 0, "Bone_Envelope", ""}, - {TFM_CURVE_SHRINKFATTEN, "CURVE_SHRINKFATTEN", 0, "Curve_Shrinkfatten", ""}, - {TFM_BONE_ROLL, "BONE_ROLL", 0, "Bone_Roll", ""}, - {TFM_TIME_TRANSLATE, "TIME_TRANSLATE", 0, "Time_Translate", ""}, - {TFM_TIME_SLIDE, "TIME_SLIDE", 0, "Time_Slide", ""}, - {TFM_TIME_SCALE, "TIME_SCALE", 0, "Time_Scale", ""}, - {TFM_TIME_EXTEND, "TIME_EXTEND", 0, "Time_Extend", ""}, - {TFM_BAKE_TIME, "BAKE_TIME", 0, "Bake_Time", ""}, - {TFM_BEVEL, "BEVEL", 0, "Bevel", ""}, - {TFM_BWEIGHT, "BWEIGHT", 0, "Bweight", ""}, - {TFM_ALIGN, "ALIGN", 0, "Align", ""}, - {TFM_EDGE_SLIDE, "EDGESLIDE", 0, "Edge Slide", ""}, - {TFM_SEQ_SLIDE, "SEQSLIDE", 0, "Sequence Slide", ""}, + {TFM_INIT, "INIT", 0, N_("Init"), ""}, + {TFM_DUMMY, "DUMMY", 0, N_("Dummy"), ""}, + {TFM_TRANSLATION, "TRANSLATION", 0, N_("Translation"), ""}, + {TFM_ROTATION, "ROTATION", 0, N_("Rotation"), ""}, + {TFM_RESIZE, "RESIZE", 0, N_("Resize"), ""}, + {TFM_TOSPHERE, "TOSPHERE", 0, N_("Tosphere"), ""}, + {TFM_SHEAR, "SHEAR", 0, N_("Shear"), ""}, + {TFM_WARP, "WARP", 0, N_("Warp"), ""}, + {TFM_SHRINKFATTEN, "SHRINKFATTEN", 0, N_("Shrinkfatten"), ""}, + {TFM_TILT, "TILT", 0, N_("Tilt"), ""}, + {TFM_TRACKBALL, "TRACKBALL", 0, N_("Trackball"), ""}, + {TFM_PUSHPULL, "PUSHPULL", 0, N_("Pushpull"), ""}, + {TFM_CREASE, "CREASE", 0, N_("Crease"), ""}, + {TFM_MIRROR, "MIRROR", 0, N_("Mirror"), ""}, + {TFM_BONESIZE, "BONE_SIZE", 0, N_("Bonesize"), ""}, + {TFM_BONE_ENVELOPE, "BONE_ENVELOPE", 0, N_("Bone_Envelope"), ""}, + {TFM_CURVE_SHRINKFATTEN, "CURVE_SHRINKFATTEN", 0, N_("Curve_Shrinkfatten"), ""}, + {TFM_BONE_ROLL, "BONE_ROLL", 0, N_("Bone_Roll"), ""}, + {TFM_TIME_TRANSLATE, "TIME_TRANSLATE", 0, N_("Time_Translate"), ""}, + {TFM_TIME_SLIDE, "TIME_SLIDE", 0, N_("Time_Slide"), ""}, + {TFM_TIME_SCALE, "TIME_SCALE", 0, N_("Time_Scale"), ""}, + {TFM_TIME_EXTEND, "TIME_EXTEND", 0, N_("Time_Extend"), ""}, + {TFM_BAKE_TIME, "BAKE_TIME", 0, N_("Bake_Time"), ""}, + {TFM_BEVEL, "BEVEL", 0, N_("Bevel"), ""}, + {TFM_BWEIGHT, "BWEIGHT", 0, N_("Bweight"), ""}, + {TFM_ALIGN, "ALIGN", 0, N_("Align"), ""}, + {TFM_EDGE_SLIDE, "EDGESLIDE", 0, N_("Edge Slide"), ""}, + {TFM_SEQ_SLIDE, "SEQSLIDE", 0, N_("Sequence Slide"), ""}, {0, NULL, 0, NULL, NULL} }; @@ -157,8 +159,8 @@ static int snap_type_exec(bContext *C, wmOperator *op) static void TRANSFORM_OT_snap_type(wmOperatorType *ot) { /* identifiers */ - ot->name= "Snap Type"; - ot->description= "Set the snap element type"; + ot->name= _("Snap Type"); + ot->description= _("Set the snap element type"); ot->idname= "TRANSFORM_OT_snap_type"; /* api callbacks */ @@ -171,7 +173,7 @@ static void TRANSFORM_OT_snap_type(wmOperatorType *ot) ot->flag= OPTYPE_UNDO; /* props */ - ot->prop= RNA_def_enum(ot->srna, "type", snap_element_items, 0, "Type", "Set the snap element type"); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(snap_element_items), 0, _("Type"), _("Set the snap element type")); } @@ -204,8 +206,8 @@ static void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name = "Select Orientation"; - ot->description= "Select transformation orientation"; + ot->name = _("Select Orientation"); + ot->description= _("Select transformation orientation"); ot->idname = "TRANSFORM_OT_select_orientation"; ot->flag = OPTYPE_UNDO; @@ -215,7 +217,7 @@ static void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) ot->poll = ED_operator_view3d_active; prop= RNA_def_property(ot->srna, "orientation", PROP_ENUM, PROP_NONE); - RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation"); + RNA_def_property_ui_text(prop, _("Orientation"), _("Transformation orientation")); RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf); } @@ -257,8 +259,8 @@ static int delete_orientation_poll(bContext *C) static void TRANSFORM_OT_delete_orientation(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Delete Orientation"; - ot->description= "Delete transformation orientation"; + ot->name = _("Delete Orientation"); + ot->description= _("Delete transformation orientation"); ot->idname = "TRANSFORM_OT_delete_orientation"; ot->flag = OPTYPE_UNDO; @@ -292,8 +294,8 @@ static int create_orientation_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Create Orientation"; - ot->description= "Create transformation orientation from selection"; + ot->name = _("Create Orientation"); + ot->description= _("Create transformation orientation from selection"); ot->idname = "TRANSFORM_OT_create_orientation"; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; @@ -303,9 +305,9 @@ static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) ot->poll = ED_operator_areaactive; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_string(ot->srna, "name", "", 35, "Name", "Text to insert at the cursor position."); - RNA_def_boolean(ot->srna, "use", 0, "Use after creation", "Select orientation after its creation"); - RNA_def_boolean(ot->srna, "overwrite", 0, "Overwrite previous", "Overwrite previously created orientation with same name"); + RNA_def_string(ot->srna, "name", "", 35, _("Name"), _("Text to insert at the cursor position.")); + RNA_def_boolean(ot->srna, "use", 0, _("Use after creation"), _("Select orientation after its creation")); + RNA_def_boolean(ot->srna, "overwrite", 0, _("Overwrite previous"), _("Overwrite previously created orientation with same name")); } static void transformops_exit(bContext *C, wmOperator *op) @@ -444,15 +446,15 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) RNA_def_property_array(prop, 3); /* Make this not hidden when there's a nice axis selection widget */ RNA_def_property_flag(prop, PROP_HIDDEN); - RNA_def_property_ui_text(prop, "Axis", "The axis around which the transformation occurs"); + RNA_def_property_ui_text(prop, _("Axis"), _("The axis around which the transformation occurs")); } if (flags & P_CONSTRAINT) { - RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", ""); + RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, _("Constraint Axis"), ""); prop= RNA_def_property(ot->srna, "constraint_orientation", PROP_ENUM, PROP_NONE); - RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation"); + RNA_def_property_ui_text(prop, _("Orientation"), _("Transformation orientation")); RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf); @@ -460,32 +462,32 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) if (flags & P_MIRROR) { - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); + RNA_def_boolean(ot->srna, "mirror", 0, _("Mirror Editing"), ""); } if (flags & P_PROPORTIONAL) { - RNA_def_enum(ot->srna, "proportional", proportional_editing_items, 0, "Proportional Editing", ""); - RNA_def_enum(ot->srna, "proportional_edit_falloff", proportional_falloff_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode."); - RNA_def_float(ot->srna, "proportional_size", 1, 0.00001f, FLT_MAX, "Proportional Size", "", 0.001, 100); + RNA_def_enum(ot->srna, "proportional", proportional_editing_items, 0, _("Proportional Editing"), ""); + RNA_def_enum(ot->srna, "proportional_edit_falloff", proportional_falloff_items, 0, _("Proportional Editing Falloff"), _("Falloff type for proportional editing mode.")); + RNA_def_float(ot->srna, "proportional_size", 1, 0.00001f, FLT_MAX, _("Proportional Size"), "", 0.001, 100); } if (flags & P_SNAP) { - prop= RNA_def_boolean(ot->srna, "snap", 0, "Use Snapping Options", ""); + prop= RNA_def_boolean(ot->srna, "snap", 0, _("Use Snapping Options"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); if (flags & P_GEO_SNAP) { - prop= RNA_def_enum(ot->srna, "snap_target", snap_target_items, 0, "Target", ""); + prop= RNA_def_enum(ot->srna, "snap_target", snap_target_items, 0, _("Target"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_float_vector(ot->srna, "snap_point", 3, NULL, -FLT_MAX, FLT_MAX, "Point", "", -FLT_MAX, FLT_MAX); + prop= RNA_def_float_vector(ot->srna, "snap_point", 3, NULL, -FLT_MAX, FLT_MAX, _("Point"), "", -FLT_MAX, FLT_MAX); RNA_def_property_flag(prop, PROP_HIDDEN); if (flags & P_ALIGN_SNAP) { - prop= RNA_def_boolean(ot->srna, "snap_align", 0, "Align with Point Normal", ""); + prop= RNA_def_boolean(ot->srna, "snap_align", 0, _("Align with Point Normal"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_float_vector(ot->srna, "snap_normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", "", -FLT_MAX, FLT_MAX); + prop= RNA_def_float_vector(ot->srna, "snap_normal", 3, NULL, -FLT_MAX, FLT_MAX, _("Normal"), "", -FLT_MAX, FLT_MAX); RNA_def_property_flag(prop, PROP_HIDDEN); } } @@ -493,19 +495,19 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) if (flags & P_OPTIONS) { - RNA_def_boolean(ot->srna, "texture_space", 0, "Edit Object data texture space", ""); + RNA_def_boolean(ot->srna, "texture_space", 0, _("Edit Object data texture space"), ""); } // Add confirm method all the time. At the end because it's not really that important and should be hidden only in log, not in keymap edit - /*prop =*/ RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "Always confirm operation when releasing button"); + /*prop =*/ RNA_def_boolean(ot->srna, "release_confirm", 0, _("Confirm on Release"), _("Always confirm operation when releasing button")); //RNA_def_property_flag(prop, PROP_HIDDEN); } void TRANSFORM_OT_translate(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Translate"; - ot->description= "Translate selected items"; + ot->name = _("Translate"); + ot->description= _("Translate selected items"); ot->idname = OP_TRANSLATION; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -516,7 +518,7 @@ void TRANSFORM_OT_translate(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - RNA_def_float_vector_xyz(ot->srna, "value", 3, NULL, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX); + RNA_def_float_vector_xyz(ot->srna, "value", 3, NULL, -FLT_MAX, FLT_MAX, _("Vector"), "", -FLT_MAX, FLT_MAX); Transform_Properties(ot, P_CONSTRAINT|P_PROPORTIONAL|P_MIRROR|P_ALIGN_SNAP|P_OPTIONS); } @@ -524,8 +526,8 @@ void TRANSFORM_OT_translate(struct wmOperatorType *ot) void TRANSFORM_OT_resize(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Resize"; - ot->description= "Resize selected items"; + ot->name = _("Resize"); + ot->description= _("Resize selected items"); ot->idname = OP_RESIZE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -536,7 +538,7 @@ void TRANSFORM_OT_resize(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - RNA_def_float_vector(ot->srna, "value", 3, VecOne, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX); + RNA_def_float_vector(ot->srna, "value", 3, VecOne, -FLT_MAX, FLT_MAX, _("Vector"), "", -FLT_MAX, FLT_MAX); Transform_Properties(ot, P_CONSTRAINT|P_PROPORTIONAL|P_MIRROR|P_GEO_SNAP|P_OPTIONS); } @@ -545,8 +547,8 @@ void TRANSFORM_OT_resize(struct wmOperatorType *ot) void TRANSFORM_OT_trackball(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Trackball"; - ot->description= "Trackball style rotation of selected items"; + ot->name = _("Trackball"); + ot->description= _("Trackball style rotation of selected items"); ot->idname = OP_TRACKBALL; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -557,7 +559,7 @@ void TRANSFORM_OT_trackball(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - RNA_def_float_vector(ot->srna, "value", 2, VecOne, -FLT_MAX, FLT_MAX, "angle", "", -FLT_MAX, FLT_MAX); + RNA_def_float_vector(ot->srna, "value", 2, VecOne, -FLT_MAX, FLT_MAX, _("angle"), "", -FLT_MAX, FLT_MAX); Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP); } @@ -565,8 +567,8 @@ void TRANSFORM_OT_trackball(struct wmOperatorType *ot) void TRANSFORM_OT_rotate(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Rotate"; - ot->description= "Rotate selected items"; + ot->name = _("Rotate"); + ot->description= _("Rotate selected items"); ot->idname = OP_ROTATION; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -577,7 +579,7 @@ void TRANSFORM_OT_rotate(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI*2, M_PI*2); + RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, _("Angle"), "", -M_PI*2, M_PI*2); Transform_Properties(ot, P_AXIS|P_CONSTRAINT|P_PROPORTIONAL|P_MIRROR|P_GEO_SNAP); } @@ -585,11 +587,11 @@ void TRANSFORM_OT_rotate(struct wmOperatorType *ot) void TRANSFORM_OT_tilt(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Tilt"; + ot->name = _("Tilt"); /*optionals - "Tilt selected vertices." "Specify an extra axis rotation for selected vertices of 3d curve." */ - ot->description= "Tilt selected control vertices of 3d curve"; + ot->description= _("Tilt selected control vertices of 3d curve"); ot->idname = OP_TILT; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -600,7 +602,7 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_editcurve; - RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI*2, M_PI*2); + RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, _("Angle"), "", -M_PI*2, M_PI*2); Transform_Properties(ot, P_CONSTRAINT|P_PROPORTIONAL|P_MIRROR|P_SNAP); } @@ -608,8 +610,8 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot) void TRANSFORM_OT_warp(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Warp"; - ot->description= "Warp selected items around the cursor"; + ot->name = _("Warp"); + ot->description= _("Warp selected items around the cursor"); ot->idname = OP_WARP; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -620,7 +622,7 @@ void TRANSFORM_OT_warp(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", 0, 1); + RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, _("Angle"), "", 0, 1); Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP); // XXX Warp axis? @@ -629,8 +631,8 @@ void TRANSFORM_OT_warp(struct wmOperatorType *ot) void TRANSFORM_OT_shear(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Shear"; - ot->description= "Shear selected items along the horizontal screen axis"; + ot->name = _("Shear"); + ot->description= _("Shear selected items along the horizontal screen axis"); ot->idname = OP_SHEAR; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -641,7 +643,7 @@ void TRANSFORM_OT_shear(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Offset", "", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, _("Offset"), "", -FLT_MAX, FLT_MAX); Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP); // XXX Shear axis? @@ -650,8 +652,8 @@ void TRANSFORM_OT_shear(struct wmOperatorType *ot) void TRANSFORM_OT_push_pull(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Push/Pull"; - ot->description= "Push/Pull selected items"; + ot->name = _("Push/Pull"); + ot->description= _("Push/Pull selected items"); ot->idname = OP_PUSH_PULL; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -662,7 +664,7 @@ void TRANSFORM_OT_push_pull(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Distance", "", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, _("Distance"), "", -FLT_MAX, FLT_MAX); Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP); } @@ -670,8 +672,8 @@ void TRANSFORM_OT_push_pull(struct wmOperatorType *ot) void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Shrink/Fatten"; - ot->description= "Shrink/fatten selected vertices along normals"; + ot->name = _("Shrink/Fatten"); + ot->description= _("Shrink/fatten selected vertices along normals"); ot->idname = OP_SHRINK_FATTEN; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -682,7 +684,7 @@ void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_editmesh; - RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Offset", "", -FLT_MAX, FLT_MAX); + RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, _("Offset"), "", -FLT_MAX, FLT_MAX); Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP); } @@ -690,9 +692,9 @@ void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot) void TRANSFORM_OT_tosphere(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "To Sphere"; + ot->name = _("To Sphere"); //added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()" - ot->description= "Move selected vertices outward in a spherical shape around mesh center"; + ot->description= _("Move selected vertices outward in a spherical shape around mesh center"); ot->idname = OP_TOSPHERE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -703,7 +705,7 @@ void TRANSFORM_OT_tosphere(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - RNA_def_float_factor(ot->srna, "value", 0, 0, 1, "Factor", "", 0, 1); + RNA_def_float_factor(ot->srna, "value", 0, 0, 1, _("Factor"), "", 0, 1); Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP); } @@ -711,8 +713,8 @@ void TRANSFORM_OT_tosphere(struct wmOperatorType *ot) void TRANSFORM_OT_mirror(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Mirror"; - ot->description= "Mirror selected vertices around one or more axes"; + ot->name = _("Mirror"); + ot->description= _("Mirror selected vertices around one or more axes"); ot->idname = OP_MIRROR; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -729,8 +731,8 @@ void TRANSFORM_OT_mirror(struct wmOperatorType *ot) void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Edge Slide"; - ot->description= "Slide an edge loop along a mesh"; + ot->name = _("Edge Slide"); + ot->description= _("Slide an edge loop along a mesh"); ot->idname = OP_EDGE_SLIDE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -741,7 +743,7 @@ void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_editmesh; - RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f); + RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, _("Factor"), "", -1.0f, 1.0f); Transform_Properties(ot, P_MIRROR|P_SNAP); } @@ -749,8 +751,8 @@ void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot) void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Edge Crease"; - ot->description= "Change the crease of edges"; + ot->name = _("Edge Crease"); + ot->description= _("Change the crease of edges"); ot->idname = OP_EDGE_CREASE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -761,7 +763,7 @@ void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_editmesh; - RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f); + RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, _("Factor"), "", -1.0f, 1.0f); Transform_Properties(ot, P_SNAP); } @@ -769,8 +771,8 @@ void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot) void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Sequence Slide"; - ot->description= "Slide a sequence strip in time"; + ot->name = _("Sequence Slide"); + ot->description= _("Slide a sequence strip in time"); ot->idname = OP_SEQ_SLIDE; ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -781,7 +783,7 @@ void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_sequencer_active; - RNA_def_float_vector(ot->srna, "value", 2, VecOne, -FLT_MAX, FLT_MAX, "angle", "", -FLT_MAX, FLT_MAX); + RNA_def_float_vector(ot->srna, "value", 2, VecOne, -FLT_MAX, FLT_MAX, _("angle"), "", -FLT_MAX, FLT_MAX); Transform_Properties(ot, P_SNAP); } @@ -791,8 +793,8 @@ void TRANSFORM_OT_transform(struct wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name = "Transform"; - ot->description= "Transform selected items by mode type"; + ot->name = _("Transform"); + ot->description= _("Transform selected items by mode type"); ot->idname = "TRANSFORM_OT_transform"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; @@ -803,10 +805,10 @@ void TRANSFORM_OT_transform(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - prop= RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + prop= RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, _("Mode"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - RNA_def_float_vector(ot->srna, "value", 4, NULL, -FLT_MAX, FLT_MAX, "Values", "", -FLT_MAX, FLT_MAX); + RNA_def_float_vector(ot->srna, "value", 4, NULL, -FLT_MAX, FLT_MAX, _("Values"), "", -FLT_MAX, FLT_MAX); Transform_Properties(ot, P_AXIS|P_CONSTRAINT|P_PROPORTIONAL|P_MIRROR|P_ALIGN_SNAP); } diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 2d539055db3..35053cf3b97 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -49,6 +49,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + //#include "BIF_editmesh.h" //#include "BIF_interface.h" //#include "BIF_space.h" @@ -407,14 +409,14 @@ EnumPropertyItem *BIF_enumTransformOrientation(bContext *C) } const char * BIF_menustringTransformOrientation(const bContext *C, const char *title) { - char menu[] = "%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3"; + char* menu = _("%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3"); ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; TransformOrientation *ts; int i = V3D_MANIP_CUSTOM; char *str_menu, *p; - str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + 40 * BIF_countTransformOrientation(C), "UserTransSpace from matrix"); + str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + 40 * BIF_countTransformOrientation(C), _("UserTransSpace from matrix")); p = str_menu; p += sprintf(str_menu, "%s", title); diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt index 72f13c14f5d..e284540c5a6 100644 --- a/source/blender/editors/util/CMakeLists.txt +++ b/source/blender/editors/util/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/util/SConscript b/source/blender/editors/util/SConscript index a694b211ca4..cfbf1c83079 100644 --- a/source/blender/editors/util/SConscript +++ b/source/blender/editors/util/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna' incs += ' ../../blenloader' diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index a2381a208ef..4fedf35acd1 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -46,6 +46,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_blender.h" #include "BKE_context.h" #include "BKE_global.h" @@ -288,8 +290,8 @@ static int ed_redo_exec(bContext *C, wmOperator *UNUSED(op)) void ED_OT_undo(wmOperatorType *ot) { /* identifiers */ - ot->name= "Undo"; - ot->description= "Undo previous action"; + ot->name= _("Undo"); + ot->description= _("Undo previous action"); ot->idname= "ED_OT_undo"; /* api callbacks */ @@ -315,8 +317,8 @@ void ED_OT_undo_push(wmOperatorType *ot) void ED_OT_redo(wmOperatorType *ot) { /* identifiers */ - ot->name= "Redo"; - ot->description= "Redo previous action"; + ot->name= _("Redo"); + ot->description= _("Redo previous action"); ot->idname= "ED_OT_redo"; /* api callbacks */ @@ -513,8 +515,8 @@ static int undo_history_exec(bContext *C, wmOperator *op) void ED_OT_undo_history(wmOperatorType *ot) { /* identifiers */ - ot->name= "Undo History"; - ot->description= "Redo specific action in history"; + ot->name= _("Undo History"); + ot->description= _("Redo specific action in history"); ot->idname= "ED_OT_undo_history"; /* api callbacks */ @@ -522,7 +524,7 @@ void ED_OT_undo_history(wmOperatorType *ot) ot->exec= undo_history_exec; ot->poll= ED_operator_screenactive; - RNA_def_int(ot->srna, "item", 0, 0, INT_MAX, "Item", "", 0, INT_MAX); + RNA_def_int(ot->srna, "item", 0, 0, INT_MAX, _("Item"), "", 0, INT_MAX); } diff --git a/source/blender/editors/uvedit/CMakeLists.txt b/source/blender/editors/uvedit/CMakeLists.txt index 552e1b60154..4055585af74 100644 --- a/source/blender/editors/uvedit/CMakeLists.txt +++ b/source/blender/editors/uvedit/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/uvedit/SConscript b/source/blender/editors/uvedit/SConscript index 2523de005d0..695aa217b5e 100644 --- a/source/blender/editors/uvedit/SConscript +++ b/source/blender/editors/uvedit/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna #/intern/opennl/extern ../../gpu ../../blenloader' diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 70659994c55..0b042f4c7eb 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -47,6 +47,8 @@ #include "BLI_editVert.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_customdata.h" #include "BKE_depsgraph.h" @@ -1202,17 +1204,17 @@ static int align_exec(bContext *C, wmOperator *op) static void UV_OT_align(wmOperatorType *ot) { static EnumPropertyItem axis_items[] = { - {'s', "ALIGN_S", 0, "Straighten", "Align UVs along the line defined by the endpoints"}, - {'t', "ALIGN_T", 0, "Straighten X", "Align UVs along the line defined by the endpoints along the X axis"}, - {'u', "ALIGN_U", 0, "Straighten Y", "Align UVs along the line defined by the endpoints along the Y axis"}, - {'a', "ALIGN_AUTO", 0, "Align Auto", "Automatically choose the axis on which there is most alignment already"}, - {'x', "ALIGN_X", 0, "Align X", "Align UVs on X axis"}, - {'y', "ALIGN_Y", 0, "Align Y", "Align UVs on Y axis"}, + {'s', "ALIGN_S", 0, N_("Straighten"), N_("Align UVs along the line defined by the endpoints")}, + {'t', "ALIGN_T", 0, N_("Straighten X"), N_("Align UVs along the line defined by the endpoints along the X axis")}, + {'u', "ALIGN_U", 0, N_("Straighten Y"), N_("Align UVs along the line defined by the endpoints along the Y axis")}, + {'a', "ALIGN_AUTO", 0, N_("Align Auto"), N_("Automatically choose the axis on which there is most alignment already")}, + {'x', "ALIGN_X", 0, N_("Align X"), N_("Align UVs on X axis")}, + {'y', "ALIGN_Y", 0, N_("Align Y"), N_("Align UVs on Y axis")}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Align"; - ot->description= "Align selected UV vertices to an axis"; + ot->name= _("Align"); + ot->description= _("Align selected UV vertices to an axis"); ot->idname= "UV_OT_align"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1221,7 +1223,7 @@ static void UV_OT_align(wmOperatorType *ot) ot->poll= ED_operator_image_active; /* requires space image */; /* properties */ - RNA_def_enum(ot->srna, "axis", axis_items, 'a', "Axis", "Axis to align UV locations on."); + RNA_def_enum(ot->srna, "axis", RNA_enum_items_gettexted(axis_items), 'a', _("Axis"), _("Axis to align UV locations on.")); } /* ******************** weld operator **************** */ @@ -1236,8 +1238,8 @@ static int weld_exec(bContext *C, wmOperator *UNUSED(op)) static void UV_OT_weld(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weld"; - ot->description= "Weld selected UV vertices together"; + ot->name= _("Weld"); + ot->description= _("Weld selected UV vertices together"); ot->idname= "UV_OT_weld"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1423,8 +1425,8 @@ static int stitch_exec(bContext *C, wmOperator *op) static void UV_OT_stitch(wmOperatorType *ot) { /* identifiers */ - ot->name= "Stitch"; - ot->description= "Stitch selected UV vertices by proximity"; + ot->name= _("Stitch"); + ot->description= _("Stitch selected UV vertices by proximity"); ot->idname= "UV_OT_stitch"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1433,8 +1435,8 @@ static void UV_OT_stitch(wmOperatorType *ot) ot->poll= ED_operator_uvedit; /* properties */ - RNA_def_boolean(ot->srna, "use_limit", 1, "Use Limit", "Stitch UVs within a specified limit distance."); - RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, FLT_MAX, "Limit", "Limit distance in normalized coordinates.", -FLT_MAX, FLT_MAX); + RNA_def_boolean(ot->srna, "use_limit", 1, _("Use Limit"), _("Stitch UVs within a specified limit distance.")); + RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, FLT_MAX, _("Limit"), _("Limit distance in normalized coordinates."), -FLT_MAX, FLT_MAX); } /* ******************** (de)select all operator **************** */ @@ -1519,8 +1521,8 @@ static int select_all_exec(bContext *C, wmOperator *op) static void UV_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select or Deselect All"; - ot->description= "Change selection of all UV vertices"; + ot->name= _("Select or Deselect All"); + ot->description= _("Change selection of all UV vertices"); ot->idname= "UV_OT_select_all"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1856,8 +1858,8 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select"; - ot->description= "Select UV vertices"; + ot->name= _("Select"); + ot->description= _("Select UV vertices"); ot->idname= "UV_OT_select"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1868,9 +1870,9 @@ static void UV_OT_select(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", 0, - "Extend", "Extend selection rather than clearing the existing selection."); + _("Extend"), _("Extend selection rather than clearing the existing selection.")); RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, - "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.", -100.0f, 100.0f); + _("Location"), _("Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds."), -100.0f, 100.0f); } /* ******************** loop select operator **************** */ @@ -1901,8 +1903,8 @@ static int select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_select_loop(wmOperatorType *ot) { /* identifiers */ - ot->name= "Loop Select"; - ot->description= "Select a loop of connected UV vertices"; + ot->name= _("Loop Select"); + ot->description= _("Select a loop of connected UV vertices"); ot->idname= "UV_OT_select_loop"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1913,9 +1915,9 @@ static void UV_OT_select_loop(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", 0, - "Extend", "Extend selection rather than clearing the existing selection."); + _("Extend"), _("Extend selection rather than clearing the existing selection.")); RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, - "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.", -100.0f, 100.0f); + _("Location"), _("Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds."), -100.0f, 100.0f); } /* ******************** linked select operator **************** */ @@ -1978,8 +1980,8 @@ static int select_linked_exec(bContext *C, wmOperator *op) static void UV_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; - ot->description= "Select all UV vertices linked to the active UV map"; + ot->name= _("Select Linked"); + ot->description= _("Select all UV vertices linked to the active UV map"); ot->idname= "UV_OT_select_linked"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1989,7 +1991,7 @@ static void UV_OT_select_linked(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", 0, - "Extend", "Extend selection rather than clearing the existing selection."); + _("Extend"), _("Extend selection rather than clearing the existing selection.")); } static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -2005,8 +2007,8 @@ static int select_linked_pick_exec(bContext *C, wmOperator *op) static void UV_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked Pick"; - ot->description= "Select all UV vertices linked under the mouse"; + ot->name= _("Select Linked Pick"); + ot->description= _("Select all UV vertices linked under the mouse"); ot->idname= "UV_OT_select_linked_pick"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2017,10 +2019,10 @@ static void UV_OT_select_linked_pick(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", 0, - "Extend", "Extend selection rather than clearing the existing selection."); + _("Extend"), _("Extend selection rather than clearing the existing selection.")); RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, - "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.", -100.0f, 100.0f); + _("Location"), _("Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds."), -100.0f, 100.0f); } /* ******************** unlink selection operator **************** */ @@ -2062,8 +2064,8 @@ static int unlink_selection_exec(bContext *C, wmOperator *op) static void UV_OT_unlink_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "Unlink Selection"; - ot->description= "Unlink selected UV vertices from active UV map"; + ot->name= _("Unlink Selection"); + ot->description= _("Unlink selected UV vertices from active UV map"); ot->idname= "UV_OT_unlink_selected"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2343,8 +2345,8 @@ static int border_select_exec(bContext *C, wmOperator *op) static void UV_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; - ot->description= "Select UV vertices using border selection"; + ot->name= _("Border Select"); + ot->description= _("Select UV vertices using border selection"); ot->idname= "UV_OT_select_border"; /* api callbacks */ @@ -2358,7 +2360,7 @@ static void UV_OT_select_border(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only."); + RNA_def_boolean(ot->srna, "pinned", 0, _("Pinned"), _("Border select pinned UVs only.")); WM_operator_properties_gesture_border(ot, FALSE); } @@ -2433,8 +2435,8 @@ static int circle_select_exec(bContext *C, wmOperator *op) static void UV_OT_circle_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Circle Select"; - ot->description= "Select UV vertices using circle selection"; + ot->name= _("Circle Select"); + ot->description= _("Select UV vertices using circle selection"); ot->idname= "UV_OT_circle_select"; /* api callbacks */ @@ -2450,8 +2452,8 @@ static void UV_OT_circle_select(wmOperatorType *ot) /* properties */ RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "radius", 0, INT_MIN, INT_MAX, "Radius", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Gesture Mode", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "radius", 0, INT_MIN, INT_MAX, _("Radius"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, _("Gesture Mode"), "", INT_MIN, INT_MAX); } /* ******************** snap cursor operator **************** */ @@ -2504,13 +2506,13 @@ static int snap_cursor_exec(bContext *C, wmOperator *op) static void UV_OT_snap_cursor(wmOperatorType *ot) { static EnumPropertyItem target_items[] = { - {0, "PIXELS", 0, "Pixels", ""}, - {1, "SELECTED", 0, "Selected", ""}, + {0, "PIXELS", 0, N_("Pixels"), ""}, + {1, "SELECTED", 0, N_("Selected"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Snap Cursor"; - ot->description= "Snap cursor to target type"; + ot->name= _("Snap Cursor"); + ot->description= _("Snap cursor to target type"); ot->idname= "UV_OT_snap_cursor"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2519,7 +2521,7 @@ static void UV_OT_snap_cursor(wmOperatorType *ot) ot->poll= ED_operator_image_active; /* requires space image */; /* properties */ - RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UV's to."); + RNA_def_enum(ot->srna, "target", target_items, 0, _("Target"), _("Target to snap the selected UV's to.")); } /* ******************** snap selection operator **************** */ @@ -2745,14 +2747,14 @@ static int snap_selection_exec(bContext *C, wmOperator *op) static void UV_OT_snap_selected(wmOperatorType *ot) { static EnumPropertyItem target_items[] = { - {0, "PIXELS", 0, "Pixels", ""}, - {1, "CURSOR", 0, "Cursor", ""}, - {2, "ADJACENT_UNSELECTED", 0, "Adjacent Unselected", ""}, + {0, "PIXELS", 0, N_("Pixels"), ""}, + {1, "CURSOR", 0, N_("Cursor"), ""}, + {2, "ADJACENT_UNSELECTED", 0, N_("Adjacent Unselected"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Snap Selection"; - ot->description= "Snap selected UV vertices to target type"; + ot->name= _("Snap Selection"); + ot->description= _("Snap selected UV vertices to target type"); ot->idname= "UV_OT_snap_selected"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2761,7 +2763,7 @@ static void UV_OT_snap_selected(wmOperatorType *ot) ot->poll= ED_operator_image_active; /* requires space image */; /* properties */ - RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UV's to."); + RNA_def_enum(ot->srna, "target", RNA_enum_items_gettexted(target_items), 0, _("Target"), _("Target to snap the selected UV's to.")); } /* ******************** pin operator **************** */ @@ -2806,8 +2808,8 @@ static int pin_exec(bContext *C, wmOperator *op) static void UV_OT_pin(wmOperatorType *ot) { /* identifiers */ - ot->name= "Pin"; - ot->description= "Set/clear selected UV vertices as anchored between multiple unwrap operations"; + ot->name= _("Pin"); + ot->description= _("Set/clear selected UV vertices as anchored between multiple unwrap operations"); ot->idname= "UV_OT_pin"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2816,7 +2818,7 @@ static void UV_OT_pin(wmOperatorType *ot) ot->poll= ED_operator_uvedit; /* properties */ - RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear pinning for the selection instead of setting it."); + RNA_def_boolean(ot->srna, "clear", 0, _("Clear"), _("Clear pinning for the selection instead of setting it.")); } /******************* select pinned operator ***************/ @@ -2852,8 +2854,8 @@ static int select_pinned_exec(bContext *C, wmOperator *UNUSED(op)) static void UV_OT_select_pinned(wmOperatorType *ot) { /* identifiers */ - ot->name= "Selected Pinned"; - ot->description= "Select all pinned UV vertices"; + ot->name= _("Selected Pinned"); + ot->description= _("Select all pinned UV vertices"); ot->idname= "UV_OT_select_pinned"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -2991,8 +2993,8 @@ static int hide_exec(bContext *C, wmOperator *op) static void UV_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected"; - ot->description= "Hide (un)selected UV vertices"; + ot->name= _("Hide Selected"); + ot->description= _("Hide (un)selected UV vertices"); ot->idname= "UV_OT_hide"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -3001,7 +3003,7 @@ static void UV_OT_hide(wmOperatorType *ot) ot->poll= ED_operator_uvedit; /* props */ - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, _("Unselected"), _("Hide unselected rather than selected.")); } /****************** reveal operator ******************/ @@ -3125,8 +3127,8 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) static void UV_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal Hidden"; - ot->description= "Reveal all hidden UV vertices"; + ot->name= _("Reveal Hidden"); + ot->description= _("Reveal all hidden UV vertices"); ot->idname= "UV_OT_reveal"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -3168,8 +3170,8 @@ static int set_2d_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_cursor_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set 2D Cursor"; - ot->description= "Set 2D cursor location"; + ot->name= _("Set 2D Cursor"); + ot->description= _("Set 2D cursor location"); ot->idname= "UV_OT_cursor_set"; /* api callbacks */ @@ -3181,7 +3183,7 @@ static void UV_OT_cursor_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in 0.0-1.0 coordinates.", -10.0f, 10.0f); + RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, _("Location"), _("Cursor location in 0.0-1.0 coordinates."), -10.0f, 10.0f); } /********************** set tile operator **********************/ @@ -3234,8 +3236,8 @@ static int set_tile_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_tile_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Tile"; - ot->description= "Set UV image tile coordinates"; + ot->name= _("Set Tile"); + ot->description= _("Set UV image tile coordinates"); ot->idname= "UV_OT_tile_set"; /* api callbacks */ @@ -3247,7 +3249,7 @@ static void UV_OT_tile_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int_vector(ot->srna, "tile", 2, NULL, 0, INT_MAX, "Tile", "Tile coordinate.", 0, 10); + RNA_def_int_vector(ot->srna, "tile", 2, NULL, 0, INT_MAX, _("Tile"), _("Tile coordinate."), 0, 10); } /* ************************** registration **********************************/ diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index ae6836446fa..efec9051d51 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -49,6 +49,8 @@ #include "BLI_uvproject.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_context.h" #include "BKE_customdata.h" #include "BKE_depsgraph.h" @@ -465,10 +467,10 @@ static int minimize_stretch_cancel(bContext *C, wmOperator *op) void UV_OT_minimize_stretch(wmOperatorType *ot) { /* identifiers */ - ot->name= "Minimize Stretch"; + ot->name= _("Minimize Stretch"); ot->idname= "UV_OT_minimize_stretch"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - ot->description="Reduce UV stretching by relaxing angles"; + ot->description=_("Reduce UV stretching by relaxing angles"); /* api callbacks */ ot->exec= minimize_stretch_exec; @@ -478,9 +480,9 @@ void UV_OT_minimize_stretch(wmOperatorType *ot) ot->poll= ED_operator_uvedit; /* properties */ - RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry."); - RNA_def_float_factor(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend", "Blend factor between stretch minimized and original.", 0.0f, 1.0f); - RNA_def_int(ot->srna, "iterations", 0, 0, INT_MAX, "Iterations", "Number of iterations to run, 0 is unlimited when run interactively.", 0, 100); + RNA_def_boolean(ot->srna, "fill_holes", 1, _("Fill Holes"), _("Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry.")); + RNA_def_float_factor(ot->srna, "blend", 0.0f, 0.0f, 1.0f, _("Blend"), _("Blend factor between stretch minimized and original."), 0.0f, 1.0f); + RNA_def_int(ot->srna, "iterations", 0, 0, INT_MAX, _("Iterations"), _("Number of iterations to run, 0 is unlimited when run interactively."), 0, 100); } /* ******************** Pack Islands operator **************** */ @@ -520,7 +522,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op) void UV_OT_pack_islands(wmOperatorType *ot) { /* identifiers */ - ot->name= "Pack Islands"; + ot->name= _("Pack Islands"); ot->idname= "UV_OT_pack_islands"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -529,7 +531,7 @@ void UV_OT_pack_islands(wmOperatorType *ot) ot->poll= ED_operator_uvedit; /* properties */ - RNA_def_float_factor(ot->srna, "margin", 0.0f, 0.0f, 1.0f, "Margin", "Space between islands", 0.0f, 1.0f); + RNA_def_float_factor(ot->srna, "margin", 0.0f, 0.0f, 1.0f, _("Margin"), _("Space between islands"), 0.0f, 1.0f); } /* ******************** Average Islands Scale operator **************** */ @@ -562,7 +564,7 @@ static int average_islands_scale_exec(bContext *C, wmOperator *UNUSED(op)) void UV_OT_average_islands_scale(wmOperatorType *ot) { /* identifiers */ - ot->name= "Average Islands Scale"; + ot->name= _("Average Islands Scale"); ot->idname= "UV_OT_average_islands_scale"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -745,21 +747,21 @@ static void uv_map_transform(bContext *C, wmOperator *op, float center[3], float static void uv_transform_properties(wmOperatorType *ot, int radius) { static EnumPropertyItem direction_items[]= { - {VIEW_ON_EQUATOR, "VIEW_ON_EQUATOR", 0, "View on Equator", "3D view is on the equator"}, - {VIEW_ON_POLES, "VIEW_ON_POLES", 0, "View on Poles", "3D view is on the poles"}, - {ALIGN_TO_OBJECT, "ALIGN_TO_OBJECT", 0, "Align to Object", "Align according to object transform"}, + {VIEW_ON_EQUATOR, "VIEW_ON_EQUATOR", 0, N_("View on Equator"), N_("3D view is on the equator")}, + {VIEW_ON_POLES, "VIEW_ON_POLES", 0, N_("View on Poles"), N_("3D view is on the poles")}, + {ALIGN_TO_OBJECT, "ALIGN_TO_OBJECT", 0, N_("Align to Object"), N_("Align according to object transform")}, {0, NULL, 0, NULL, NULL} }; static EnumPropertyItem align_items[]= { - {POLAR_ZX, "POLAR_ZX", 0, "Polar ZX", "Polar 0 is X"}, - {POLAR_ZY, "POLAR_ZY", 0, "Polar ZY", "Polar 0 is Y"}, + {POLAR_ZX, "POLAR_ZX", 0, N_("Polar ZX"), N_("Polar 0 is X")}, + {POLAR_ZY, "POLAR_ZY", 0, N_("Polar ZY"), N_("Polar 0 is Y")}, {0, NULL, 0, NULL, NULL} }; - RNA_def_enum(ot->srna, "direction", direction_items, VIEW_ON_EQUATOR, "Direction", "Direction of the sphere or cylinder."); - RNA_def_enum(ot->srna, "align", align_items, VIEW_ON_EQUATOR, "Align", "How to determine rotation around the pole."); + RNA_def_enum(ot->srna, "direction", RNA_enum_items_gettexted(direction_items), VIEW_ON_EQUATOR, _("Direction"), _("Direction of the sphere or cylinder.")); + RNA_def_enum(ot->srna, "align", RNA_enum_items_gettexted(align_items), VIEW_ON_EQUATOR, _("Align"), _("How to determine rotation around the pole.")); if(radius) - RNA_def_float(ot->srna, "radius", 1.0f, 0.0f, FLT_MAX, "Radius", "Radius of the sphere or cylinder.", 0.0001f, 100.0f); + RNA_def_float(ot->srna, "radius", 1.0f, 0.0f, FLT_MAX, _("Radius"), _("Radius of the sphere or cylinder."), 0.0001f, 100.0f); } static void correct_uv_aspect(EditMesh *em) @@ -812,9 +814,9 @@ static void correct_uv_aspect(EditMesh *em) static void uv_map_clip_correct_properties(wmOperatorType *ot) { - RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect", "Map UV's taking image aspect ratio into account."); - RNA_def_boolean(ot->srna, "clip_to_bounds", 0, "Clip to Bounds", "Clip UV coordinates to bounds after unwrapping."); - RNA_def_boolean(ot->srna, "scale_to_bounds", 0, "Scale to Bounds", "Scale UV coordinates to bounds after unwrapping."); + RNA_def_boolean(ot->srna, "correct_aspect", 1, _("Correct Aspect"), _("Map UV's taking image aspect ratio into account.")); + RNA_def_boolean(ot->srna, "clip_to_bounds", 0, _("Clip to Bounds"), _("Clip UV coordinates to bounds after unwrapping.")); + RNA_def_boolean(ot->srna, "scale_to_bounds", 0, _("Scale to Bounds"), _("Scale UV coordinates to bounds after unwrapping.")); } static void uv_map_clip_correct(EditMesh *em, wmOperator *op) @@ -956,13 +958,13 @@ static int unwrap_exec(bContext *C, wmOperator *op) void UV_OT_unwrap(wmOperatorType *ot) { static EnumPropertyItem method_items[] = { - {0, "ANGLE_BASED", 0, "Angle Based", ""}, - {1, "CONFORMAL", 0, "Conformal", ""}, + {0, "ANGLE_BASED", 0, N_("Angle Based"), ""}, + {1, "CONFORMAL", 0, N_("Conformal"), ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Unwrap"; - ot->description= "Unwrap the mesh of the object being edited"; + ot->name= _("Unwrap"); + ot->description= _("Unwrap the mesh of the object being edited"); ot->idname= "UV_OT_unwrap"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -971,9 +973,9 @@ void UV_OT_unwrap(wmOperatorType *ot) ot->poll= ED_operator_uvmap; /* properties */ - RNA_def_enum(ot->srna, "method", method_items, 0, "Method", "Unwrapping method. Angle Based usually gives better results than Conformal, while being somewhat slower."); - RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry."); - RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect", "Map UV's taking image aspect ratio into account."); + RNA_def_enum(ot->srna, "method", RNA_enum_items_gettexted(method_items), 0, _("Method"), _("Unwrapping method. Angle Based usually gives better results than Conformal, while being somewhat slower.")); + RNA_def_boolean(ot->srna, "fill_holes", 1, _("Fill Holes"), _("Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry.")); + RNA_def_boolean(ot->srna, "correct_aspect", 1, _("Correct Aspect"), _("Map UV's taking image aspect ratio into account.")); } /**************** Project From View operator **************/ @@ -1073,7 +1075,7 @@ static int uv_from_view_poll(bContext *C) void UV_OT_from_view(wmOperatorType *ot) { /* identifiers */ - ot->name= "Project From View"; + ot->name= _("Project From View"); ot->idname= "UV_OT_project_from_view"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1082,7 +1084,7 @@ void UV_OT_from_view(wmOperatorType *ot) ot->poll= uv_from_view_poll; /* properties */ - RNA_def_boolean(ot->srna, "orthographic", 0, "Orthographic", "Use orthographic projection."); + RNA_def_boolean(ot->srna, "orthographic", 0, _("Orthographic"), _("Use orthographic projection.")); uv_map_clip_correct_properties(ot); } @@ -1130,7 +1132,7 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op)) void UV_OT_reset(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset"; + ot->name= _("Reset"); ot->idname= "UV_OT_reset"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1218,7 +1220,7 @@ static int sphere_project_exec(bContext *C, wmOperator *op) void UV_OT_sphere_project(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sphere Projection"; + ot->name= _("Sphere Projection"); ot->idname= "UV_OT_sphere_project"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1290,7 +1292,7 @@ static int cylinder_project_exec(bContext *C, wmOperator *op) void UV_OT_cylinder_project(wmOperatorType *ot) { /* identifiers */ - ot->name= "Cylinder Projection"; + ot->name= _("Cylinder Projection"); ot->idname= "UV_OT_cylinder_project"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1377,7 +1379,7 @@ static int cube_project_exec(bContext *C, wmOperator *op) void UV_OT_cube_project(wmOperatorType *ot) { /* identifiers */ - ot->name= "Cube Projection"; + ot->name= _("Cube Projection"); ot->idname= "UV_OT_cube_project"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1386,6 +1388,6 @@ void UV_OT_cube_project(wmOperatorType *ot) ot->poll= ED_operator_uvmap; /* properties */ - RNA_def_float(ot->srna, "cube_size", 1.0f, 0.0f, FLT_MAX, "Cube Size", "Size of the cube to project on.", 0.001f, 100.0f); + RNA_def_float(ot->srna, "cube_size", 1.0f, 0.0f, FLT_MAX, _("Cube Size"), _("Size of the cube to project on."), 0.001f, 100.0f); uv_map_clip_correct_properties(ot); } diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 882fbce9271..e5d5a7c5ea8 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -49,7 +49,10 @@ struct Scene; extern BlenderRNA BLENDER_RNA; extern StructRNA RNA_Action; extern StructRNA RNA_ActionConstraint; +extern StructRNA RNA_ActionFCurves; extern StructRNA RNA_ActionGroup; +extern StructRNA RNA_ActionGroups; +extern StructRNA RNA_ActionPoseMarkers; extern StructRNA RNA_Actuator; extern StructRNA RNA_ActuatorSensor; extern StructRNA RNA_Addon; @@ -190,6 +193,7 @@ extern StructRNA RNA_DelaySensor; extern StructRNA RNA_DisplaceModifier; extern StructRNA RNA_DistortedNoiseTexture; extern StructRNA RNA_DomainFluidSettings; +extern StructRNA RNA_DopeSheet; extern StructRNA RNA_Driver; extern StructRNA RNA_DriverTarget; extern StructRNA RNA_DriverVariable; @@ -260,11 +264,13 @@ extern StructRNA RNA_Key; extern StructRNA RNA_KeyConfig; extern StructRNA RNA_KeyMap; extern StructRNA RNA_KeyMapItem; +extern StructRNA RNA_KeyMapItems; extern StructRNA RNA_KeyboardSensor; extern StructRNA RNA_Keyframe; extern StructRNA RNA_KeyingSet; extern StructRNA RNA_KeyingSetInfo; extern StructRNA RNA_KeyingSetPath; +extern StructRNA RNA_KeyingSetsAll; extern StructRNA RNA_KinematicConstraint; extern StructRNA RNA_Lamp; extern StructRNA RNA_LampSkySettings; @@ -548,6 +554,7 @@ extern StructRNA RNA_UnknownType; extern StructRNA RNA_UserPreferences; extern StructRNA RNA_UserPreferencesEdit; extern StructRNA RNA_UserPreferencesFilePaths; +extern StructRNA RNA_UserPreferencesInput; extern StructRNA RNA_UserPreferencesSystem; extern StructRNA RNA_UserPreferencesView; extern StructRNA RNA_UserSolidLight; @@ -574,6 +581,8 @@ extern StructRNA RNA_WorldTextureSlot; extern StructRNA RNA_XnorController; extern StructRNA RNA_XorController; +/* make all types gettexted */ +void RNA_types_init_gettext(void); /* Pointer * diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index ac2a89161d9..e09115c3848 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -194,6 +194,9 @@ void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item, int value); void RNA_enum_item_end(EnumPropertyItem **items, int *totitem); +/* make every name and description field surrounded by gettext */ +EnumPropertyItem* RNA_enum_items_gettexted(EnumPropertyItem *item); + /* Memory management */ void RNA_def_struct_duplicate_pointers(StructRNA *srna); diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index cb593e7deab..be58daa1ac4 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -128,6 +128,7 @@ set(SRC ${APISRC} ../../../../intern/guardedalloc/intern/mallocn.c ../../../../intern/guardedalloc/intern/mmap_win.c + ../../blenfont/intern/blf_gettext.c ) set(INC diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 5e43ed9b2fb..160aeca4a51 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -12,6 +12,7 @@ root_build_dir=normpath(env['BF_BUILDDIR']) source_files = env.Glob('*.c') source_files.remove('rna_access.c') +source_files.append('../../blenfont/intern/blf_gettext.c') generated_files = source_files[:] generated_files.remove('rna_define.c') diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 3ce84e3a19f..7bda9d07ae1 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -33,6 +33,8 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "BLF_api.h" + #include "DNA_ID.h" #include "DNA_vfont_types.h" #include "DNA_object_types.h" @@ -45,32 +47,32 @@ * NOTE: need to keep this in line with the other defines for these */ EnumPropertyItem id_type_items[] = { - {ID_AC, "ACTION", ICON_ACTION, "Action", ""}, - {ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armature", ""}, - {ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brush", ""}, - {ID_CA, "CAMERA", ICON_CAMERA_DATA, "Camera", ""}, - {ID_CU, "CURVE", ICON_CURVE_DATA, "Curve", ""}, - {ID_VF, "FONT", ICON_FONT_DATA, "Font", ""}, - {ID_GD, "GREASEPENCIL", ICON_GREASEPENCIL, "Grease Pencil", ""}, - {ID_GR, "GROUP", ICON_GROUP, "Group", ""}, - {ID_IM, "IMAGE", ICON_IMAGE_DATA, "Image", ""}, - {ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""}, - {ID_LA, "LAMP", ICON_LAMP_DATA, "Lamp", ""}, - {ID_LI, "LIBRARY", ICON_LIBRARY_DATA_DIRECT, "Library", ""}, - {ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""}, - {ID_MA, "MATERIAL", ICON_MATERIAL_DATA, "Material", ""}, - {ID_MB, "META", ICON_META_DATA, "MetaBall", ""}, - {ID_ME, "MESH", ICON_MESH_DATA, "Mesh", ""}, - {ID_NT, "NODETREE", ICON_NODETREE, "NodeTree", ""}, - {ID_OB, "OBJECT", ICON_OBJECT_DATA, "Object", ""}, - {ID_PA, "PARTICLE", ICON_PARTICLE_DATA, "Particle", ""}, - {ID_SCE, "SCENE", ICON_SCENE_DATA, "Scene", ""}, - {ID_SCR, "SCREEN", ICON_SPLITSCREEN, "Screen", ""}, - {ID_SO, "SOUND", ICON_PLAY_AUDIO, "Sound", ""}, - {ID_TXT, "TEXT", ICON_TEXT, "Text", ""}, - {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Texture", ""}, - {ID_WO, "WORLD", ICON_WORLD_DATA, "World", ""}, - {ID_WM, "WINDOWMANAGER", ICON_FULLSCREEN, "Window Manager", ""}, + {ID_AC, "ACTION", ICON_ACTION, N_("Action"), ""}, + {ID_AR, "ARMATURE", ICON_ARMATURE_DATA, N_("Armature"), ""}, + {ID_BR, "BRUSH", ICON_BRUSH_DATA, N_("Brush"), ""}, + {ID_CA, "CAMERA", ICON_CAMERA_DATA, N_("Camera"), ""}, + {ID_CU, "CURVE", ICON_CURVE_DATA, N_("Curve"), ""}, + {ID_VF, "FONT", ICON_FONT_DATA, N_("Font"), ""}, + {ID_GD, "GREASEPENCIL", ICON_GREASEPENCIL, N_("Grease Pencil"), ""}, + {ID_GR, "GROUP", ICON_GROUP, N_("Group"), ""}, + {ID_IM, "IMAGE", ICON_IMAGE_DATA, N_("Image"), ""}, + {ID_KE, "KEY", ICON_SHAPEKEY_DATA, N_("Key"), ""}, + {ID_LA, "LAMP", ICON_LAMP_DATA, N_("Lamp"), ""}, + {ID_LI, "LIBRARY", ICON_LIBRARY_DATA_DIRECT, N_("Library"), ""}, + {ID_LT, "LATTICE", ICON_LATTICE_DATA, N_("Lattice"), ""}, + {ID_MA, "MATERIAL", ICON_MATERIAL_DATA, N_("Material"), ""}, + {ID_MB, "META", ICON_META_DATA, N_("MetaBall"), ""}, + {ID_ME, "MESH", ICON_MESH_DATA, N_("Mesh"), ""}, + {ID_NT, "NODETREE", ICON_NODETREE, N_("NodeTree"), ""}, + {ID_OB, "OBJECT", ICON_OBJECT_DATA, N_("Object"), ""}, + {ID_PA, "PARTICLE", ICON_PARTICLE_DATA, N_("Particle"), ""}, + {ID_SCE, "SCENE", ICON_SCENE_DATA, N_("Scene"), ""}, + {ID_SCR, "SCREEN", ICON_SPLITSCREEN, N_("Screen"), ""}, + {ID_SO, "SOUND", ICON_PLAY_AUDIO, N_("Sound"), ""}, + {ID_TXT, "TEXT", ICON_TEXT, N_("Text"), ""}, + {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, N_("Texture"), ""}, + {ID_WO, "WORLD", ICON_WORLD_DATA, N_("World"), ""}, + {ID_WM, "WINDOWMANAGER", ICON_FULLSCREEN, N_("Window Manager"), ""}, {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME @@ -429,19 +431,19 @@ static void rna_def_ID(BlenderRNA *brna) PropertyRNA *prop, *parm; static EnumPropertyItem update_flag_items[] = { - {OB_RECALC_OB, "OBJECT", 0, "Object", ""}, - {OB_RECALC_DATA, "DATA", 0, "Data", ""}, - {OB_RECALC_TIME, "TIME", 0, "Time", ""}, + {OB_RECALC_OB, "OBJECT", 0, N_("Object"), ""}, + {OB_RECALC_DATA, "DATA", 0, N_("Data"), ""}, + {OB_RECALC_TIME, "TIME", 0, N_("Time"), ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "ID", NULL); - RNA_def_struct_ui_text(srna, "ID", "Base type for datablocks, defining a unique name, linking from other libraries and garbage collection"); + RNA_def_struct_ui_text(srna, "ID", N_("Base type for datablocks, defining a unique name, linking from other libraries and garbage collection")); RNA_def_struct_flag(srna, STRUCT_ID|STRUCT_ID_REFCOUNT); RNA_def_struct_refine_func(srna, "rna_ID_refine"); RNA_def_struct_idprops_func(srna, "rna_ID_idprops"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name"); + RNA_def_property_ui_text(prop, N_("Name"), N_("Unique datablock ID name")); RNA_def_property_string_funcs(prop, "rna_ID_name_get", "rna_ID_name_length", "rna_ID_name_set"); RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2); RNA_def_property_editable_func(prop, "rna_ID_name_editable"); @@ -451,44 +453,44 @@ static void rna_def_ID(BlenderRNA *brna) prop= RNA_def_property(srna, "users", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "us"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Users", "Number of times this datablock is referenced"); + RNA_def_property_ui_text(prop, N_("Users"), N_("Number of times this datablock is referenced")); prop= RNA_def_property(srna, "use_fake_user", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_FAKEUSER); - RNA_def_property_ui_text(prop, "Fake User", "Saves this datablock even if it has no users"); + RNA_def_property_ui_text(prop, N_("Fake User"), N_("Saves this datablock even if it has no users")); RNA_def_property_boolean_funcs(prop, NULL, "rna_ID_fake_user_set"); prop= RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_DOIT); RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); - RNA_def_property_ui_text(prop, "Tag", "Tools can use this to tag data, (initial state is undefined)"); + RNA_def_property_ui_text(prop, N_("Tag"), N_("Tools can use this to tag data, (initial state is undefined)")); prop= RNA_def_property(srna, "library", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "lib"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Library", "Library file the datablock is linked from"); + RNA_def_property_ui_text(prop, N_("Library"), N_("Library file the datablock is linked from")); /* functions */ func= RNA_def_function(srna, "copy", "rna_ID_copy"); RNA_def_function_ui_description(func, "Create a copy of this datablock (not supported for all datablocks)."); - parm= RNA_def_pointer(func, "id", "ID", "", "New copy of the ID."); + parm= RNA_def_pointer(func, "id", "ID", "", N_("New copy of the ID.")); RNA_def_function_return(func, parm); func= RNA_def_function(srna, "user_clear", "rna_ID_user_clear"); - RNA_def_function_ui_description(func, "Clears the user count of a datablock so its not saved, on reload the data will be removed."); + RNA_def_function_ui_description(func, N_("Clears the user count of a datablock so its not saved, on reload the data will be removed.")); func= RNA_def_function(srna, "animation_data_create", "BKE_id_add_animdata"); - RNA_def_function_ui_description(func, "Create animation data to this ID, note that not all ID types support this."); - parm= RNA_def_pointer(func, "anim_data", "AnimData", "", "New animation data or NULL."); + RNA_def_function_ui_description(func, N_("Create animation data to this ID, note that not all ID types support this.")); + parm= RNA_def_pointer(func, "anim_data", "AnimData", "", N_("New animation data or NULL.")); RNA_def_function_return(func, parm); func= RNA_def_function(srna, "animation_data_clear", "BKE_free_animdata"); - RNA_def_function_ui_description(func, "Clear animation on this this ID."); + RNA_def_function_ui_description(func, N_("Clear animation on this this ID.")); func= RNA_def_function(srna, "update_tag", "rna_ID_update_tag"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - RNA_def_function_ui_description(func, "Tag the id to update its display data."); - RNA_def_enum_flag(func, "refresh", update_flag_items, 0, "", "Type of updates to perform."); + RNA_def_function_ui_description(func, N_("Tag the id to update its display data.")); + RNA_def_enum_flag(func, "refresh", update_flag_items, 0, "", N_("Type of updates to perform.")); } static void rna_def_library(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index dcf2400b9ba..b6f38332a3b 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -43,6 +43,8 @@ #include "BLI_dynstr.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "BKE_animsys.h" #include "BKE_context.h" #include "BKE_idprop.h" @@ -96,6 +98,85 @@ void RNA_exit(void) RNA_free(&BLENDER_RNA); } +void RNA_struct_gettexted( StructRNA* ptr ) +{ + PropertyRNA *temp_property, *end_property; + + ptr->name = _(ptr->name); + ptr->description = _(ptr->description); + + temp_property = (PropertyRNA*)ptr->cont.properties.first; + end_property = (PropertyRNA*)ptr->cont.properties.last; + while( temp_property!=end_property ) + { + temp_property->name = _(temp_property->name); + temp_property->description = _(temp_property->description); + if( temp_property->type == PROP_ENUM ) + RNA_enum_items_gettexted( ((EnumPropertyRNA*)temp_property)->item ); + temp_property = temp_property->next; + } + if( end_property!=NULL ) + { + end_property->name = _(end_property->name); + end_property->description = _(end_property->description); + if( end_property->type == PROP_ENUM ) + RNA_enum_items_gettexted( ((EnumPropertyRNA*)end_property)->item ); + } +} + +void RNA_types_init_gettext(void) +{ + StructRNA* target_struct[] = { + &RNA_Action, &RNA_ActionFCurves, &RNA_ActionGroup, &RNA_ActionGroups, &RNA_ActionPoseMarkers, + &RNA_BackgroundImage, + &RNA_ConsoleLine, + &RNA_DopeSheet, + &RNA_Event, + &RNA_FileSelectParams, + &RNA_ID, + &RNA_KeyMap, &RNA_KeyMapItem, &RNA_KeyMapItems, + &RNA_KeyboardSensor, + &RNA_KeyingSetsAll, + &RNA_Object, + &RNA_RenderLayer, &RNA_RenderSettings, + &RNA_Macro, + &RNA_Material, + &RNA_Scene, + &RNA_Scopes, + + &RNA_Space, + &RNA_SpaceConsole, + &RNA_SpaceDopeSheetEditor, + &RNA_SpaceFileBrowser, + &RNA_SpaceGraphEditor, + &RNA_SpaceImageEditor, + &RNA_SpaceInfo, + &RNA_SpaceLogicEditor, + &RNA_SpaceNLA, + &RNA_SpaceNodeEditor, + &RNA_SpaceOutliner, + &RNA_SpaceProperties, + &RNA_SpaceSequenceEditor, + &RNA_SpaceTextEditor, + &RNA_SpaceTimeline, + &RNA_SpaceView3D, + &RNA_SpaceUVEditor, + &RNA_SpaceUserPreferences, + + &RNA_Theme, &RNA_ThemeBoneColorSet, &RNA_ThemeWidgetColors, + &RNA_ToolSettings, + &RNA_UserPreferences, &RNA_UserPreferencesEdit, &RNA_UserPreferencesFilePaths, + &RNA_UserPreferencesInput, &RNA_UserPreferencesSystem, &RNA_UserPreferencesView, + /* for test */ + NULL + }; + int i=0; + for( i=0; target_struct[i]!=NULL; i++ ) + { + RNA_struct_gettexted( target_struct[i] ); + } +} + /* Pointer */ void RNA_main_pointer_create(struct Main *main, PointerRNA *r_ptr) diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 7fdb96fda6e..10774a028e2 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -32,6 +32,8 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "BLF_api.h" + #include "rna_internal.h" #include "DNA_anim_types.h" @@ -254,159 +256,159 @@ static void rna_def_dopesheet(BlenderRNA *brna) srna= RNA_def_struct(brna, "DopeSheet", NULL); RNA_def_struct_sdna(srna, "bDopeSheet"); - RNA_def_struct_ui_text(srna, "DopeSheet", "Settings for filtering the channels shown in Animation Editors"); + RNA_def_struct_ui_text(srna, N_("DopeSheet"), N_("Settings for filtering the channels shown in Animation Editors")); /* Source of DopeSheet data */ prop= RNA_def_property(srna, "source", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "ID"); - RNA_def_property_ui_text(prop, "Source", "ID-Block representing source data, currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil)"); + RNA_def_property_ui_text(prop, N_("Source"), N_("ID-Block representing source data, currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil)")); /* General Filtering Settings */ prop= RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYSEL); - RNA_def_property_ui_text(prop, "Only Selected", "Only include channels relating to selected objects and data"); + RNA_def_property_ui_text(prop, N_("Only Selected"), N_("Only include channels relating to selected objects and data")); RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_INCL_HIDDEN); - RNA_def_property_ui_text(prop, "Display Hidden", "Include channels from objects/bone that aren't visible"); + RNA_def_property_ui_text(prop, N_("Display Hidden"), N_("Include channels from objects/bone that aren't visible")); RNA_def_property_ui_icon(prop, ICON_GHOST_ENABLED, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); /* Object Group Filtering Settings */ prop= RNA_def_property(srna, "show_only_group_objects", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYOBGROUP); - RNA_def_property_ui_text(prop, "Only Objects in Group", "Only include channels from Objects in the specified Group"); + RNA_def_property_ui_text(prop, N_("Only Objects in Group"), N_("Only include channels from Objects in the specified Group")); RNA_def_property_ui_icon(prop, ICON_GROUP, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "filter_group", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "filter_grp"); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Filtering Group", "Group that included Object should be a member of"); + RNA_def_property_ui_text(prop, N_("Filtering Group"), N_("Group that included Object should be a member of")); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); /* FCurve Display Name Search Settings */ prop= RNA_def_property(srna, "show_only_matching_fcurves", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_BY_FCU_NAME); - RNA_def_property_ui_text(prop, "Only Matching F-Curves", "Only include F-Curves with names containing search text"); + RNA_def_property_ui_text(prop, N_("Only Matching F-Curves"), N_("Only include F-Curves with names containing search text")); RNA_def_property_ui_icon(prop, ICON_VIEWZOOM, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "filter_fcurve_name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "searchstr"); - RNA_def_property_ui_text(prop, "F-Curve Name Filter", "F-Curve live filtering string"); + RNA_def_property_ui_text(prop, N_("F-Curve Name Filter"), N_("F-Curve live filtering string")); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); /* NLA Specific Settings */ prop= RNA_def_property(srna, "show_missing_nla", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NLA_NOACT); - RNA_def_property_ui_text(prop, "Include Missing NLA", "Include Animation Data blocks with no NLA data. (NLA Editor only)"); + RNA_def_property_ui_text(prop, N_("Include Missing NLA"), N_("Include Animation Data blocks with no NLA data. (NLA Editor only)")); RNA_def_property_ui_icon(prop, ICON_ACTION, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); /* Summary Settings (DopeSheet editors only) */ prop= RNA_def_property(srna, "show_summary", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_SUMMARY); - RNA_def_property_ui_text(prop, "Display Summary", "Display an additional 'summary' line. (DopeSheet Editors only)"); + RNA_def_property_ui_text(prop, N_("Display Summary"), N_("Display an additional 'summary' line. (DopeSheet Editors only)")); RNA_def_property_ui_icon(prop, ICON_BORDERMOVE, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_expanded_summary", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADS_FLAG_SUMMARY_COLLAPSED); - RNA_def_property_ui_text(prop, "Collapse Summary", "Collapse summary when shown, so all other channels get hidden. (DopeSheet Editors Only)"); + RNA_def_property_ui_text(prop, N_("Collapse Summary"), N_("Collapse summary when shown, so all other channels get hidden. (DopeSheet Editors Only)")); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); /* General DataType Filtering Settings */ prop= RNA_def_property(srna, "show_transforms", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOOBJ); - RNA_def_property_ui_text(prop, "Display Transforms", "Include visualization of Object-level Animation data (mostly Transforms)"); + RNA_def_property_ui_text(prop, N_("Display Transforms"), N_("Include visualization of Object-level Animation data (mostly Transforms)")); RNA_def_property_ui_icon(prop, ICON_MANIPUL, 0); // XXX? RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_shapekeys", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSHAPEKEYS); - RNA_def_property_ui_text(prop, "Display Shapekeys", "Include visualization of ShapeKey related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Shapekeys"), N_("Include visualization of ShapeKey related Animation data")); RNA_def_property_ui_icon(prop, ICON_SHAPEKEY_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_meshes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMESH); - RNA_def_property_ui_text(prop, "Display Meshes", "Include visualization of Mesh related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Meshes"), N_("Include visualization of Mesh related Animation data")); RNA_def_property_ui_icon(prop, ICON_MESH_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_lattices", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOLAT); - RNA_def_property_ui_text(prop, "Display Lattices", "Include visualization of Lattice related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Lattices"), N_("Include visualization of Lattice related Animation data")); RNA_def_property_ui_icon(prop, ICON_LATTICE_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_cameras", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOCAM); - RNA_def_property_ui_text(prop, "Display Camera", "Include visualization of Camera related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Camera"), N_("Include visualization of Camera related Animation data")); RNA_def_property_ui_icon(prop, ICON_CAMERA_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_materials", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMAT); - RNA_def_property_ui_text(prop, "Display Material", "Include visualization of Material related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Material"), N_("Include visualization of Material related Animation data")); RNA_def_property_ui_icon(prop, ICON_MATERIAL_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_lamps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOLAM); - RNA_def_property_ui_text(prop, "Display Lamp", "Include visualization of Lamp related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Lamp"), N_("Include visualization of Lamp related Animation data")); RNA_def_property_ui_icon(prop, ICON_LAMP_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_textures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOTEX); - RNA_def_property_ui_text(prop, "Display Texture", "Include visualization of Texture related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Texture"), N_("Include visualization of Texture related Animation data")); RNA_def_property_ui_icon(prop, ICON_TEXTURE_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_curves", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOCUR); - RNA_def_property_ui_text(prop, "Display Curve", "Include visualization of Curve related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Curve"), N_("Include visualization of Curve related Animation data")); RNA_def_property_ui_icon(prop, ICON_CURVE_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_worlds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOWOR); - RNA_def_property_ui_text(prop, "Display World", "Include visualization of World related Animation data"); + RNA_def_property_ui_text(prop, N_("Display World"), N_("Include visualization of World related Animation data")); RNA_def_property_ui_icon(prop, ICON_WORLD_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_scenes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSCE); - RNA_def_property_ui_text(prop, "Display Scene", "Include visualization of Scene related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Scene"), N_("Include visualization of Scene related Animation data")); RNA_def_property_ui_icon(prop, ICON_SCENE_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_particles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOPART); - RNA_def_property_ui_text(prop, "Display Particle", "Include visualization of Particle related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Particle"), N_("Include visualization of Particle related Animation data")); RNA_def_property_ui_icon(prop, ICON_PARTICLE_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_metaballs", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMBA); - RNA_def_property_ui_text(prop, "Display Metaball", "Include visualization of Metaball related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Metaball"), N_("Include visualization of Metaball related Animation data")); RNA_def_property_ui_icon(prop, ICON_META_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_armatures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOARM); - RNA_def_property_ui_text(prop, "Display Armature", "Include visualization of Armature related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Armature"), N_("Include visualization of Armature related Animation data")); RNA_def_property_ui_icon(prop, ICON_ARMATURE_DATA, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_nodes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NONTREE); - RNA_def_property_ui_text(prop, "Display Node", "Include visualization of Node related Animation data"); + RNA_def_property_ui_text(prop, N_("Display Node"), N_("Include visualization of Node related Animation data")); RNA_def_property_ui_icon(prop, ICON_NODETREE, 0); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); } @@ -418,10 +420,10 @@ static void rna_def_action_group(BlenderRNA *brna) srna= RNA_def_struct(brna, "ActionGroup", NULL); RNA_def_struct_sdna(srna, "bActionGroup"); - RNA_def_struct_ui_text(srna, "Action Group", "Groups of F-Curves"); + RNA_def_struct_ui_text(srna, N_("Action Group"), N_("Groups of F-Curves")); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text(prop, "Name", ""); + RNA_def_property_ui_text(prop, N_("Name"), ""); RNA_def_struct_name_property(srna, prop); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); @@ -439,26 +441,26 @@ static void rna_def_action_group(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "channels", NULL); RNA_def_property_struct_type(prop, "FCurve"); RNA_def_property_collection_funcs(prop, 0, "rna_ActionGroup_channels_next", 0, 0, 0, 0, 0); - RNA_def_property_ui_text(prop, "Channels", "F-Curves in this group"); + RNA_def_property_ui_text(prop, N_("Channels"), N_("F-Curves in this group")); prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_SELECTED); - RNA_def_property_ui_text(prop, "Select", "Action Group is selected"); + RNA_def_property_ui_text(prop, N_("Select"), N_("Action Group is selected")); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_SELECTED, NULL); prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_PROTECTED); - RNA_def_property_ui_text(prop, "Lock", "Action Group is locked"); + RNA_def_property_ui_text(prop, N_("Lock"), N_("Action Group is locked")); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_EXPANDED); - RNA_def_property_ui_text(prop, "Expanded", "Action Group is expanded"); + RNA_def_property_ui_text(prop, N_("Expanded"), N_("Action Group is expanded")); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "custom_color", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "customCol"); - RNA_def_property_ui_text(prop, "Custom Color", "Index of custom color set"); + RNA_def_property_ui_text(prop, N_("Custom Color"), N_("Index of custom color set")); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); } @@ -473,21 +475,21 @@ static void rna_def_action_groups(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "ActionGroups"); srna= RNA_def_struct(brna, "ActionGroups", NULL); RNA_def_struct_sdna(srna, "bAction"); - RNA_def_struct_ui_text(srna, "Action Groups", "Collection of action groups"); + RNA_def_struct_ui_text(srna, N_("Action Groups"), N_("Collection of action groups")); func= RNA_def_function(srna, "new", "rna_Action_groups_new"); RNA_def_function_ui_description(func, "Add a keyframe to the curve."); - parm= RNA_def_string(func, "name", "Group", 0, "", "New name for the action group."); + parm= RNA_def_string(func, "name", "Group", 0, "", N_("New name for the action group.")); RNA_def_property_flag(parm, PROP_REQUIRED); - parm= RNA_def_pointer(func, "action_group", "ActionGroup", "", "Newly created action group"); + parm= RNA_def_pointer(func, "action_group", "ActionGroup", "", N_("Newly created action group")); RNA_def_function_return(func, parm); func= RNA_def_function(srna, "remove", "rna_Action_groups_remove"); RNA_def_function_ui_description(func, "Remove action group."); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm= RNA_def_pointer(func, "action_group", "ActionGroup", "", "Action group to remove."); + parm= RNA_def_pointer(func, "action_group", "ActionGroup", "", N_("Action group to remove.")); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); } @@ -501,24 +503,24 @@ static void rna_def_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "ActionFCurves"); srna= RNA_def_struct(brna, "ActionFCurves", NULL); RNA_def_struct_sdna(srna, "bAction"); - RNA_def_struct_ui_text(srna, "Action FCurves", "Collection of action fcurves"); + RNA_def_struct_ui_text(srna, N_("Action FCurves"), N_("Collection of action fcurves")); func= RNA_def_function(srna, "new", "rna_Action_fcurve_new"); - RNA_def_function_ui_description(func, "Add a keyframe to the curve."); + RNA_def_function_ui_description(func, N_("Add a keyframe to the curve.")); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm= RNA_def_string(func, "data_path", "", 0, "Data Path", "FCurve data path to use."); + parm= RNA_def_string(func, "data_path", "", 0, N_("Data Path"), N_("FCurve data path to use.")); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index.", 0, INT_MAX); - RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this fcurve into."); + RNA_def_string(func, "action_group", "", 0, N_("Action Group"), N_("Acton group to add this fcurve into.")); - parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created fcurve"); + parm= RNA_def_pointer(func, "fcurve", "FCurve", "", N_("Newly created fcurve")); RNA_def_function_return(func, parm); func= RNA_def_function(srna, "remove", "rna_Action_fcurve_remove"); RNA_def_function_ui_description(func, "Remove action group."); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "FCurve to remove."); + parm= RNA_def_pointer(func, "fcurve", "FCurve", "", N_("FCurve to remove.")); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); } @@ -533,33 +535,33 @@ static void rna_def_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "ActionPoseMarkers"); srna= RNA_def_struct(brna, "ActionPoseMarkers", NULL); RNA_def_struct_sdna(srna, "bAction"); - RNA_def_struct_ui_text(srna, "Action Pose Markers", "Collection of timeline markers"); + RNA_def_struct_ui_text(srna, N_("Action Pose Markers"), N_("Collection of timeline markers")); func= RNA_def_function(srna, "new", "rna_Action_pose_markers_new"); - RNA_def_function_ui_description(func, "Add a pose marker to the action."); + RNA_def_function_ui_description(func, N_("Add a pose marker to the action.")); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm= RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)."); + parm= RNA_def_string(func, "name", "Marker", 0, "", N_("New name for the marker (not unique).")); RNA_def_property_flag(parm, PROP_REQUIRED); - parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created marker"); + parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", N_("Newly created marker")); RNA_def_function_return(func, parm); func= RNA_def_function(srna, "remove", "rna_Action_pose_markers_remove"); - RNA_def_function_ui_description(func, "Remove a timeline marker."); + RNA_def_function_ui_description(func, N_("Remove a timeline marker.")); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove."); + parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", N_("Timeline marker to remove.")); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "TimelineMarker"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, "rna_Action_active_pose_marker_get", "rna_Action_active_pose_marker_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Active Pose Marker", "Active pose marker for this Action"); + RNA_def_property_ui_text(prop, N_("Active Pose Marker"), N_("Active pose marker for this Action")); prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "active_marker"); RNA_def_property_int_funcs(prop, "rna_Action_active_pose_marker_index_get", "rna_Action_active_pose_marker_index_set", "rna_Action_active_pose_marker_index_range"); - RNA_def_property_ui_text(prop, "Active Pose Marker Index", "Index of active pose marker"); + RNA_def_property_ui_text(prop, N_("Active Pose Marker Index"), N_("Index of active pose marker")); } static void rna_def_action(BlenderRNA *brna) @@ -569,30 +571,30 @@ static void rna_def_action(BlenderRNA *brna) srna= RNA_def_struct(brna, "Action", "ID"); RNA_def_struct_sdna(srna, "bAction"); - RNA_def_struct_ui_text(srna, "Action", "A collection of F-Curves for animation"); + RNA_def_struct_ui_text(srna, N_("Action"), N_("A collection of F-Curves for animation")); RNA_def_struct_ui_icon(srna, ICON_ACTION); /* collections */ prop= RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "curves", NULL); RNA_def_property_struct_type(prop, "FCurve"); - RNA_def_property_ui_text(prop, "F-Curves", "The individual F-Curves that make up the Action"); + RNA_def_property_ui_text(prop, N_("F-Curves"), N_("The individual F-Curves that make up the Action")); rna_def_action_fcurves(brna, prop); prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "groups", NULL); RNA_def_property_struct_type(prop, "ActionGroup"); - RNA_def_property_ui_text(prop, "Groups", "Convenient groupings of F-Curves"); + RNA_def_property_ui_text(prop, N_("Groups"), N_("Convenient groupings of F-Curves")); rna_def_action_groups(brna, prop); prop= RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "markers", NULL); RNA_def_property_struct_type(prop, "TimelineMarker"); - RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this Action, for labeling poses"); + RNA_def_property_ui_text(prop, N_("Pose Markers"), N_("Markers specific to this Action, for labeling poses")); rna_def_action_pose_markers(brna, prop); /* properties */ - prop= RNA_def_float_vector(srna, "frame_range" , 2 , NULL , 0, 0, "Frame Range" , "The final frame range of all fcurves within this action" , 0 , 0); + prop= RNA_def_float_vector(srna, "frame_range" , 2 , NULL , 0, 0, N_("Frame Range") , N_("The final frame range of all fcurves within this action") , 0 , 0); RNA_def_property_float_funcs(prop, "rna_Action_frame_range_get" , NULL, NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); @@ -600,7 +602,7 @@ static void rna_def_action(BlenderRNA *brna) prop= RNA_def_property(srna, "id_root", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "idroot"); RNA_def_property_enum_items(prop, id_type_items); - RNA_def_property_ui_text(prop, "ID Root Type", "Type of ID-block that action can be used on. DO NOT CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING"); + RNA_def_property_ui_text(prop, N_("ID Root Type"), N_("Type of ID-block that action can be used on. DO NOT CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING")); /* API calls */ RNA_api_action(srna); diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index cea130a4b74..0dc72d6249d 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -33,6 +33,8 @@ #include "RNA_define.h" #include "rna_internal.h" +#include "BLF_api.h" + #include "DNA_color_types.h" #include "DNA_texture_types.h" @@ -563,40 +565,40 @@ static void rna_def_scopes(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "Scopes", NULL); - RNA_def_struct_ui_text(srna, "Scopes", "Scopes for statistical view of an image"); + RNA_def_struct_ui_text(srna, N_("Scopes"), N_("Scopes for statistical view of an image")); prop= RNA_def_property(srna, "use_full_resolution", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, "Scopes", "sample_full", 1); - RNA_def_property_ui_text(prop, "Full Sample", "Sample every pixel of the image"); + RNA_def_property_ui_text(prop, N_("Full Sample"), N_("Sample every pixel of the image")); RNA_def_property_update(prop, 0, "rna_Scopes_update"); prop= RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_PERCENTAGE); RNA_def_property_float_sdna(prop, "Scopes", "accuracy"); RNA_def_property_range(prop, 0.0, 100.0); RNA_def_property_ui_range(prop, 0.0, 100.0, 10, 1); - RNA_def_property_ui_text(prop, "Accuracy", "Proportion of original image source pixel lines to sample"); + RNA_def_property_ui_text(prop, N_("Accuracy"), N_("Proportion of original image source pixel lines to sample")); RNA_def_property_update(prop, 0, "rna_Scopes_update"); prop= RNA_def_property(srna, "histogram", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, "Scopes", "hist"); RNA_def_property_struct_type(prop, "Histogram"); - RNA_def_property_ui_text(prop, "Histogram", "Histogram for viewing image statistics"); + RNA_def_property_ui_text(prop, N_("Histogram"), N_("Histogram for viewing image statistics")); prop= RNA_def_property(srna, "waveform_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, "Scopes", "wavefrm_mode"); RNA_def_property_enum_items(prop, prop_wavefrm_mode_items); - RNA_def_property_ui_text(prop, "Waveform Mode", ""); + RNA_def_property_ui_text(prop, N_("Waveform Mode"), ""); RNA_def_property_update(prop, 0, "rna_Scopes_update"); prop= RNA_def_property(srna, "waveform_alpha", PROP_FLOAT, PROP_PERCENTAGE); RNA_def_property_float_sdna(prop, "Scopes", "wavefrm_alpha"); RNA_def_property_range(prop, 0, 1); - RNA_def_property_ui_text(prop, "Waveform Opacity", "Opacity of the points"); + RNA_def_property_ui_text(prop, N_("Waveform Opacity"), N_("Opacity of the points")); prop= RNA_def_property(srna, "vectorscope_alpha", PROP_FLOAT, PROP_PERCENTAGE); RNA_def_property_float_sdna(prop, "Scopes", "vecscope_alpha"); RNA_def_property_range(prop, 0, 1); - RNA_def_property_ui_text(prop, "Vectorscope Opacity", "Opacity of the points"); + RNA_def_property_ui_text(prop, N_("Vectorscope Opacity"), N_("Opacity of the points")); } diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 260d483b9d2..a797b9e4cea 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -33,6 +33,8 @@ #include "rna_internal.h" +#include "BLF_api.h" + #include "DNA_curve_types.h" #include "DNA_key_types.h" #include "DNA_material_types.h" @@ -46,15 +48,15 @@ #include "ED_curve.h" EnumPropertyItem beztriple_handle_type_items[] = { - {HD_FREE, "FREE", 0, "Free", ""}, - {HD_AUTO, "AUTO", 0, "Auto", ""}, - {HD_VECT, "VECTOR", 0, "Vector", ""}, - {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, + {HD_FREE, "FREE", 0, N_("Free"), ""}, + {HD_AUTO, "AUTO", 0, N_("Auto"), ""}, + {HD_VECT, "VECTOR", 0, N_("Vector"), ""}, + {HD_ALIGN, "ALIGNED", 0, N_("Aligned"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem beztriple_interpolation_mode_items[] = { - {BEZT_IPO_CONST, "CONSTANT", 0, "Constant", ""}, - {BEZT_IPO_LIN, "LINEAR", 0, "Linear", ""}, + {BEZT_IPO_CONST, "CONSTANT", 0, N_("Constant"), ""}, + {BEZT_IPO_LIN, "LINEAR", 0, N_("Linear"), ""}, {BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""}, {0, NULL, 0, NULL, NULL}}; diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 8e9c7e287d6..fbdd343d943 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -43,6 +43,8 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" +#include "BLF_api.h" + #include "RNA_define.h" #include "rna_internal.h" @@ -1268,6 +1270,23 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item } } +/* make every name and description field surrounded by gettext */ +EnumPropertyItem* RNA_enum_items_gettexted(EnumPropertyItem *item) +{ + if( item ) + { + int i; + for(i=0; item[i].identifier; i++) + { + if( item[i].name ) + item[i].name = _(item[i].name); + if( item[i].description ) + item[i].description = _(item[i].description); + } + } + return item; +} + void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength) { StructRNA *srna= DefRNA.laststruct; diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index a46f84a22d2..be7fe72e320 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -43,6 +43,8 @@ #include "BLI_math.h" +#include "BLF_api.h" + #include "BKE_action.h" #include "WM_types.h" diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index f407aba82fb..3303ad0dde8 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -40,39 +40,41 @@ #include "WM_api.h" #include "WM_types.h" +#include "BLF_api.h" + static EnumPropertyItem prop_texture_coordinates_items[] = { -{TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates"}, -{TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates"}, -{TEXCO_UV, "UV", 0, "UV", "Uses UV coordinates for texture coordinates"}, -{TEXCO_ORCO, "ORCO", 0, "Generated", "Uses the original undeformed coordinates of the object"}, -{TEXCO_STRAND, "STRAND", 0, "Strand / Particle", "Uses normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"}, -{TEXCO_STICKY, "STICKY", 0, "Sticky", "Uses mesh's sticky coordinates for the texture coordinates"}, -{TEXCO_WINDOW, "WINDOW", 0, "Window", "Uses screen coordinates as texture coordinates"}, -{TEXCO_NORM, "NORMAL", 0, "Normal", "Uses normal vector as texture coordinates"}, -{TEXCO_REFL, "REFLECTION", 0, "Reflection", "Uses reflection vector as texture coordinates"}, -{TEXCO_STRESS, "STRESS", 0, "Stress", "Uses the difference of edge lengths compared to original coordinates of the mesh"}, -{TEXCO_TANGENT, "TANGENT", 0, "Tangent", "Uses the optional tangent vector as texture coordinates"}, +{TEXCO_GLOB, "GLOBAL", 0, N_("Global"), N_("Uses global coordinates for the texture coordinates")}, +{TEXCO_OBJECT, "OBJECT", 0, N_("Object"), N_("Uses linked object's coordinates for texture coordinates")}, +{TEXCO_UV, "UV", 0, "UV", N_("Uses UV coordinates for texture coordinates")}, +{TEXCO_ORCO, "ORCO", 0, N_("Generated"), N_("Uses the original undeformed coordinates of the object")}, +{TEXCO_STRAND, "STRAND", 0, N_("Strand / Particle"), N_("Uses normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)")}, +{TEXCO_STICKY, "STICKY", 0, N_("Sticky"), N_("Uses mesh's sticky coordinates for the texture coordinates")}, +{TEXCO_WINDOW, "WINDOW", 0, N_("Window"), N_("Uses screen coordinates as texture coordinates")}, +{TEXCO_NORM, "NORMAL", 0, N_("Normal"), N_("Uses normal vector as texture coordinates")}, +{TEXCO_REFL, "REFLECTION", 0, N_("Reflection"), N_("Uses reflection vector as texture coordinates")}, +{TEXCO_STRESS, "STRESS", 0, N_("Stress"), N_("Uses the difference of edge lengths compared to original coordinates of the mesh")}, +{TEXCO_TANGENT, "TANGENT", 0, N_("Tangent"), N_("Uses the optional tangent vector as texture coordinates")}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem ramp_blend_items[] = { -{MA_RAMP_BLEND, "MIX", 0, "Mix", ""}, -{MA_RAMP_ADD, "ADD", 0, "Add", ""}, -{MA_RAMP_MULT, "MULTIPLY", 0, "Multiply", ""}, -{MA_RAMP_SUB, "SUBTRACT", 0, "Subtract", ""}, -{MA_RAMP_SCREEN, "SCREEN", 0, "Screen", ""}, -{MA_RAMP_DIV, "DIVIDE", 0, "Divide", ""}, -{MA_RAMP_DIFF, "DIFFERENCE", 0, "Difference", ""}, -{MA_RAMP_DARK, "DARKEN", 0, "Darken", ""}, -{MA_RAMP_LIGHT, "LIGHTEN", 0, "Lighten", ""}, -{MA_RAMP_OVERLAY, "OVERLAY", 0, "Overlay", ""}, -{MA_RAMP_DODGE, "DODGE", 0, "Dodge", ""}, -{MA_RAMP_BURN, "BURN", 0, "Burn", ""}, -{MA_RAMP_HUE, "HUE", 0, "Hue", ""}, -{MA_RAMP_SAT, "SATURATION", 0, "Saturation", ""}, -{MA_RAMP_VAL, "VALUE", 0, "Value", ""}, -{MA_RAMP_COLOR, "COLOR", 0, "Color", ""}, -{MA_RAMP_SOFT, "SOFT_LIGHT", 0, "Soft Light", ""}, -{MA_RAMP_LINEAR, "LINEAR_LIGHT", 0, "Linear Light", ""}, +{MA_RAMP_BLEND, "MIX", 0, N_("Mix"), ""}, +{MA_RAMP_ADD, "ADD", 0, N_("Add"), ""}, +{MA_RAMP_MULT, "MULTIPLY", 0, N_("Multiply"), ""}, +{MA_RAMP_SUB, "SUBTRACT", 0, N_("Subtract"), ""}, +{MA_RAMP_SCREEN, "SCREEN", 0, N_("Screen"), ""}, +{MA_RAMP_DIV, "DIVIDE", 0, N_("Divide"), ""}, +{MA_RAMP_DIFF, "DIFFERENCE", 0, N_("Difference"), ""}, +{MA_RAMP_DARK, "DARKEN", 0, N_("Darken"), ""}, +{MA_RAMP_LIGHT, "LIGHTEN", 0, N_("Lighten"), ""}, +{MA_RAMP_OVERLAY, "OVERLAY", 0, N_("Overlay"), ""}, +{MA_RAMP_DODGE, "DODGE", 0, N_("Dodge"), ""}, +{MA_RAMP_BURN, "BURN", 0, N_("Burn"), ""}, +{MA_RAMP_HUE, "HUE", 0, N_("Hue"), ""}, +{MA_RAMP_SAT, "SATURATION", 0, N_("Saturation"), ""}, +{MA_RAMP_VAL, "VALUE", 0, N_("Value"), ""}, +{MA_RAMP_COLOR, "COLOR", 0, N_("Color"), ""}, +{MA_RAMP_SOFT, "SOFT_LIGHT", 0, N_("Soft Light"), ""}, +{MA_RAMP_LINEAR, "LINEAR_LIGHT", 0, N_("Linear Light"), ""}, {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME @@ -375,364 +377,364 @@ static void rna_def_material_mtex(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem prop_mapping_items[] = { - {MTEX_FLAT, "FLAT", 0, "Flat", "Maps X and Y coordinates directly"}, - {MTEX_CUBE, "CUBE", 0, "Cube", "Maps using the normal vector"}, - {MTEX_TUBE, "TUBE", 0, "Tube", "Maps with Z as central axis"}, - {MTEX_SPHERE, "SPHERE", 0, "Sphere", "Maps with Z as central axis"}, + {MTEX_FLAT, "FLAT", 0, N_("Flat"), N_("Maps X and Y coordinates directly")}, + {MTEX_CUBE, "CUBE", 0, N_("Cube"), N_("Maps using the normal vector")}, + {MTEX_TUBE, "TUBE", 0, N_("Tube"), N_("Maps with Z as central axis")}, + {MTEX_SPHERE, "SPHERE", 0, N_("Sphere"), N_("Maps with Z as central axis")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_x_mapping_items[] = { - {0, "NONE", 0, "None", ""}, + {0, "NONE", 0, N_("None"), ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, {3, "Z", 0, "Z", ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_y_mapping_items[] = { - {0, "NONE", 0, "None", ""}, + {0, "NONE", 0, N_("None"), ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, {3, "Z", 0, "Z", ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_z_mapping_items[] = { - {0, "NONE", 0, "None", ""}, + {0, "NONE", 0, N_("None"), ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, {3, "Z", 0, "Z", ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_normal_map_space_items[] = { - {MTEX_NSPACE_CAMERA, "CAMERA", 0, "Camera", ""}, - {MTEX_NSPACE_WORLD, "WORLD", 0, "World", ""}, - {MTEX_NSPACE_OBJECT, "OBJECT", 0, "Object", ""}, - {MTEX_NSPACE_TANGENT, "TANGENT", 0, "Tangent", ""}, + {MTEX_NSPACE_CAMERA, "CAMERA", 0, N_("Camera"), ""}, + {MTEX_NSPACE_WORLD, "WORLD", 0, N_("World"), ""}, + {MTEX_NSPACE_OBJECT, "OBJECT", 0, N_("Object"), ""}, + {MTEX_NSPACE_TANGENT, "TANGENT", 0, N_("Tangent"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_bump_method_items[] = { - {0, "BUMP_ORIGINAL", 0, "Original", ""}, - {MTEX_COMPAT_BUMP, "BUMP_COMPATIBLE", 0, "Compatible", ""}, - {MTEX_3TAP_BUMP, "BUMP_DEFAULT", 0, "Default", ""}, - {MTEX_5TAP_BUMP, "BUMP_BEST_QUALITY", 0, "Best Quality", ""}, + {0, "BUMP_ORIGINAL", 0, N_("Original"), ""}, + {MTEX_COMPAT_BUMP, "BUMP_COMPATIBLE", 0, N_("Compatible"), ""}, + {MTEX_3TAP_BUMP, "BUMP_DEFAULT", 0, N_("Default"), ""}, + {MTEX_5TAP_BUMP, "BUMP_BEST_QUALITY", 0, N_("Best Quality"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_bump_space_items[] = { - {0, "BUMP_VIEWSPACE", 0, "ViewSpace", ""}, - {MTEX_BUMP_OBJECTSPACE, "BUMP_OBJECTSPACE", 0, "ObjectSpace", ""}, - {MTEX_BUMP_TEXTURESPACE, "BUMP_TEXTURESPACE", 0, "TextureSpace", ""}, + {0, "BUMP_VIEWSPACE", 0, N_("ViewSpace"), ""}, + {MTEX_BUMP_OBJECTSPACE, "BUMP_OBJECTSPACE", 0, N_("ObjectSpace"), ""}, + {MTEX_BUMP_TEXTURESPACE, "BUMP_TEXTURESPACE", 0, N_("TextureSpace"), ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "MaterialTextureSlot", "TextureSlot"); RNA_def_struct_sdna(srna, "MTex"); - RNA_def_struct_ui_text(srna, "Material Texture Slot", "Texture slot for textures in a Material datablock"); + RNA_def_struct_ui_text(srna, N_("Material Texture Slot"), N_("Texture slot for textures in a Material datablock")); prop= RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "texco"); RNA_def_property_enum_items(prop, prop_texture_coordinates_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Material_texture_coordinates_itemf"); - RNA_def_property_ui_text(prop, "Texture Coordinates", ""); + RNA_def_property_ui_text(prop, N_("Texture Coordinates"), ""); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "object"); RNA_def_property_struct_type(prop, "Object"); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates"); + RNA_def_property_ui_text(prop, N_("Object"), N_("Object to use for mapping with Object texture coordinates")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "uvname"); - RNA_def_property_ui_text(prop, "UV Layer", "UV layer to use for mapping with UV texture coordinates"); + RNA_def_property_ui_text(prop, N_("UV Layer"), N_("UV layer to use for mapping with UV texture coordinates")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_from_dupli", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_DUPLI_MAPTO); - RNA_def_property_ui_text(prop, "From Dupli", "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent"); + RNA_def_property_ui_text(prop, N_("From Dupli"), N_("Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_from_original", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_OB_DUPLI_ORIG); - RNA_def_property_ui_text(prop, "From Original", "Dupli's derive their object coordinates from the original objects transformation"); + RNA_def_property_ui_text(prop, N_("From Original"), N_("Dupli's derive their object coordinates from the original objects transformation")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_color_diffuse", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COL); - RNA_def_property_ui_text(prop, "Diffuse Color", "Causes the texture to affect basic color of the material"); + RNA_def_property_ui_text(prop, N_("Diffuse Color"), N_("Causes the texture to affect basic color of the material")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_normal", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_NORM); - RNA_def_property_ui_text(prop, "Normal", "Causes the texture to affect the rendered normal"); + RNA_def_property_ui_text(prop, N_("Normal"), N_("Causes the texture to affect the rendered normal")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_color_spec", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COLSPEC); - RNA_def_property_ui_text(prop, "Specular Color", "Causes the texture to affect the specularity color"); + RNA_def_property_ui_text(prop, N_("Specular Color"), N_("Causes the texture to affect the specularity color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_mirror", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COLMIR); - RNA_def_property_ui_text(prop, "Mirror", "Causes the texture to affect the mirror color"); + RNA_def_property_ui_text(prop, N_("Mirror"), N_("Causes the texture to affect the mirror color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_diffuse", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REF); - RNA_def_property_ui_text(prop, "Diffuse", "Causes the texture to affect the value of the materials diffuse reflectivity"); + RNA_def_property_ui_text(prop, N_("Diffuse"), N_("Causes the texture to affect the value of the materials diffuse reflectivity")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_specular", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SPEC); - RNA_def_property_ui_text(prop, "Specular", "Causes the texture to affect the value of specular reflectivity"); + RNA_def_property_ui_text(prop, N_("Specular"), N_("Causes the texture to affect the value of specular reflectivity")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_ambient", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_AMB); - RNA_def_property_ui_text(prop, "Ambient", "Causes the texture to affect the value of ambient"); + RNA_def_property_ui_text(prop, N_("Ambient"), N_("Causes the texture to affect the value of ambient")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_hardness", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_HAR); - RNA_def_property_ui_text(prop, "Hardness", "Causes the texture to affect the hardness value"); + RNA_def_property_ui_text(prop, N_("Hardness"), N_("Causes the texture to affect the hardness value")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_raymir", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_RAYMIRR); - RNA_def_property_ui_text(prop, "Ray-Mirror", "Causes the texture to affect the ray-mirror value"); + RNA_def_property_ui_text(prop, N_("Ray-Mirror"), N_("Causes the texture to affect the ray-mirror value")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_alpha", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ALPHA); - RNA_def_property_ui_text(prop, "Alpha", "Causes the texture to affect the alpha value"); + RNA_def_property_ui_text(prop, N_("Alpha"), N_("Causes the texture to affect the alpha value")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_emit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMIT); - RNA_def_property_ui_text(prop, "Emit", "Causes the texture to affect the emit value"); + RNA_def_property_ui_text(prop, N_("Emit"), N_("Causes the texture to affect the emit value")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_translucency", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_TRANSLU); - RNA_def_property_ui_text(prop, "Translucency", "Causes the texture to affect the translucency value"); + RNA_def_property_ui_text(prop, N_("Translucency"), N_("Causes the texture to affect the translucency value")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_displacement", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DISPLACE); - RNA_def_property_ui_text(prop, "Displacement", "Let the texture displace the surface"); + RNA_def_property_ui_text(prop, N_("Displacement"), N_("Let the texture displace the surface")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_warp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_WARP); - RNA_def_property_ui_text(prop, "Warp", "Let the texture warp texture coordinates of next channels"); + RNA_def_property_ui_text(prop, N_("Warp"), N_("Let the texture warp texture coordinates of next channels")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "projx"); RNA_def_property_enum_items(prop, prop_x_mapping_items); - RNA_def_property_ui_text(prop, "X Mapping", ""); + RNA_def_property_ui_text(prop, N_("X Mapping"), ""); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "projy"); RNA_def_property_enum_items(prop, prop_y_mapping_items); - RNA_def_property_ui_text(prop, "Y Mapping", ""); + RNA_def_property_ui_text(prop, N_("Y Mapping"), ""); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "projz"); RNA_def_property_enum_items(prop, prop_z_mapping_items); - RNA_def_property_ui_text(prop, "Z Mapping", ""); + RNA_def_property_ui_text(prop, N_("Z Mapping"), ""); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, prop_mapping_items); - RNA_def_property_ui_text(prop, "Mapping", ""); + RNA_def_property_ui_text(prop, N_("Mapping"), ""); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "normal_map_space", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "normapspace"); RNA_def_property_enum_items(prop, prop_normal_map_space_items); - RNA_def_property_ui_text(prop, "Normal Map Space", "Sets space of normal map image"); + RNA_def_property_ui_text(prop, N_("Normal Map Space"), N_("Sets space of normal map image")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "norfac"); RNA_def_property_ui_range(prop, -5, 5, 10, 3); - RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values"); + RNA_def_property_ui_text(prop, N_("Normal Factor"), N_("Amount texture affects normal values")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "displacement_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dispfac"); RNA_def_property_ui_range(prop, -1, 1, 10, 3); - RNA_def_property_ui_text(prop, "Displacement Factor", "Amount texture displaces the surface"); + RNA_def_property_ui_text(prop, N_("Displacement Factor"), N_("Amount texture displaces the surface")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "warp_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "warpfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects texture coordinates of next channels"); + RNA_def_property_ui_text(prop, N_("Warp Factor"), N_("Amount texture affects texture coordinates of next channels")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_color_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "colspecfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Specular Color Factor", "Amount texture affects specular color"); + RNA_def_property_ui_text(prop, N_("Specular Color Factor"), N_("Amount texture affects specular color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_color_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "colfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Diffuse Color Factor", "Amount texture affects diffuse color"); + RNA_def_property_ui_text(prop, N_("Diffuse Color Factor"), N_("Amount texture affects diffuse color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "mirror_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "mirrfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Mirror Factor", "Amount texture affects mirror color"); + RNA_def_property_ui_text(prop, N_("Mirror Factor"), N_("Amount texture affects mirror color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "alpha_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "alphafac"); RNA_def_property_ui_range(prop, -1, 1, 10, 3); - RNA_def_property_ui_text(prop, "Alpha Factor", "Amount texture affects alpha"); + RNA_def_property_ui_text(prop, N_("Alpha Factor"), N_("Amount texture affects alpha")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "difffac"); RNA_def_property_ui_range(prop, -1, 1, 10, 3); - RNA_def_property_ui_text(prop, "Diffuse Factor", "Amount texture affects diffuse reflectivity"); + RNA_def_property_ui_text(prop, N_("Diffuse Factor"), N_("Amount texture affects diffuse reflectivity")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "specfac"); RNA_def_property_ui_range(prop, -1, 1, 10, 3); - RNA_def_property_ui_text(prop, "Specular Factor", "Amount texture affects specular reflectivity"); + RNA_def_property_ui_text(prop, N_("Specular Factor"), N_("Amount texture affects specular reflectivity")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "emit_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "emitfac"); RNA_def_property_ui_range(prop, -1, 1, 10, 3); - RNA_def_property_ui_text(prop, "Emit Factor", "Amount texture affects emission"); + RNA_def_property_ui_text(prop, N_("Emit Factor"), N_("Amount texture affects emission")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "hardness_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "hardfac"); RNA_def_property_ui_range(prop, -1, 1, 10, 3); - RNA_def_property_ui_text(prop, "Hardness Factor", "Amount texture affects hardness"); + RNA_def_property_ui_text(prop, N_("Hardness Factor"), N_("Amount texture affects hardness")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "raymir_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "raymirrfac"); RNA_def_property_ui_range(prop, -1, 1, 10, 3); - RNA_def_property_ui_text(prop, "Ray Mirror Factor", "Amount texture affects ray mirror"); + RNA_def_property_ui_text(prop, N_("Ray Mirror Factor"), N_("Amount texture affects ray mirror")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "translucency_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "translfac"); RNA_def_property_ui_range(prop, -1, 1, 10, 3); - RNA_def_property_ui_text(prop, "Translucency Factor", "Amount texture affects translucency"); + RNA_def_property_ui_text(prop, N_("Translucency Factor"), N_("Amount texture affects translucency")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "ambient_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ambfac"); RNA_def_property_ui_range(prop, -1, 1, 10, 3); - RNA_def_property_ui_text(prop, "Ambient Factor", "Amount texture affects ambient"); + RNA_def_property_ui_text(prop, N_("Ambient Factor"), N_("Amount texture affects ambient")); RNA_def_property_update(prop, 0, "rna_Material_update"); /* volume material */ prop= RNA_def_property(srna, "use_map_color_emission", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION_COL); - RNA_def_property_ui_text(prop, "Emission Color", "Causes the texture to affect the color of emission"); + RNA_def_property_ui_text(prop, N_("Emission Color"), N_("Causes the texture to affect the color of emission")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_color_reflection", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REFLECTION_COL); - RNA_def_property_ui_text(prop, "Reflection Color", "Causes the texture to affect the color of scattered light"); + RNA_def_property_ui_text(prop, N_("Reflection Color"), N_("Causes the texture to affect the color of scattered light")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_color_transmission", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_TRANSMISSION_COL); - RNA_def_property_ui_text(prop, "Transmission Color", "Causes the texture to affect the result color after other light has been scattered/absorbed"); + RNA_def_property_ui_text(prop, N_("Transmission Color"), N_("Causes the texture to affect the result color after other light has been scattered/absorbed")); RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "use_map_density", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DENSITY); - RNA_def_property_ui_text(prop, "Density", "Causes the texture to affect the volume's density"); + RNA_def_property_ui_text(prop, N_("Density"), N_("Causes the texture to affect the volume's density")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_emission", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION); - RNA_def_property_ui_text(prop, "Emission", "Causes the texture to affect the volume's emission"); + RNA_def_property_ui_text(prop, N_("Emission"), N_("Causes the texture to affect the volume's emission")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_scatter", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SCATTERING); - RNA_def_property_ui_text(prop, "Scattering", "Causes the texture to affect the volume's scattering"); + RNA_def_property_ui_text(prop, N_("Scattering"), N_("Causes the texture to affect the volume's scattering")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_map_reflect", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REFLECTION); - RNA_def_property_ui_text(prop, "Reflection", "Causes the texture to affect the reflected light's brightness"); + RNA_def_property_ui_text(prop, N_("Reflection"), N_("Causes the texture to affect the reflected light's brightness")); RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "emission_color_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "colemitfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Emission Color Factor", "Amount texture affects emission color"); + RNA_def_property_ui_text(prop, N_("Emission Color Factor"), N_("Amount texture affects emission color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "reflection_color_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "colreflfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Reflection Color Factor", "Amount texture affects color of out-scattered light"); + RNA_def_property_ui_text(prop, N_("Reflection Color Factor"), N_("Amount texture affects color of out-scattered light")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "transmission_color_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "coltransfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Transmission Color Factor", "Amount texture affects result color after light has been scattered/absorbed"); + RNA_def_property_ui_text(prop, N_("Transmission Color Factor"), N_("Amount texture affects result color after light has been scattered/absorbed")); RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "densfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Density Factor", "Amount texture affects density"); + RNA_def_property_ui_text(prop, N_("Density Factor"), N_("Amount texture affects density")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "emission_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "emitfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Emission Factor", "Amount texture affects emission"); + RNA_def_property_ui_text(prop, N_("Emission Factor"), N_("Amount texture affects emission")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "scattering_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "scatterfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Scattering Factor", "Amount texture affects scattering"); + RNA_def_property_ui_text(prop, N_("Scattering Factor"), N_("Amount texture affects scattering")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "reflection_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "reflfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Reflection Factor", "Amount texture affects brightness of out-scattered light"); + RNA_def_property_ui_text(prop, N_("Reflection Factor"), N_("Amount texture affects brightness of out-scattered light")); RNA_def_property_update(prop, 0, "rna_Material_update"); /* end volume material */ prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_MaterialTextureSlot_use_get", "rna_MaterialTextureSlot_use_set"); - RNA_def_property_ui_text(prop, "Enabled", "Enable this material texture slot"); + RNA_def_property_ui_text(prop, N_("Enabled"), N_("Enable this material texture slot")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "bump_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "texflag"); RNA_def_property_enum_items(prop, prop_bump_method_items); - RNA_def_property_ui_text(prop, "Bump Method", "Method to use for bump mapping"); + RNA_def_property_ui_text(prop, N_("Bump Method"), N_("Method to use for bump mapping")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "bump_objectspace", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "texflag"); RNA_def_property_enum_items(prop, prop_bump_space_items); - RNA_def_property_ui_text(prop, "Bump Space", "Space to apply bump mapping in"); + RNA_def_property_ui_text(prop, N_("Bump Space"), N_("Space to apply bump mapping in")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -741,100 +743,100 @@ static void rna_def_material_colors(StructRNA *srna) PropertyRNA *prop; static EnumPropertyItem prop_ramp_input_items[] = { - {MA_RAMP_IN_SHADER, "SHADER", 0, "Shader", ""}, - {MA_RAMP_IN_ENERGY, "ENERGY", 0, "Energy", ""}, - {MA_RAMP_IN_NOR, "NORMAL", 0, "Normal", ""}, - {MA_RAMP_IN_RESULT, "RESULT", 0, "Result", ""}, + {MA_RAMP_IN_SHADER, "SHADER", 0, N_("Shader"), ""}, + {MA_RAMP_IN_ENERGY, "ENERGY", 0, N_("Energy"), ""}, + {MA_RAMP_IN_NOR, "NORMAL", 0, N_("Normal"), ""}, + {MA_RAMP_IN_RESULT, "RESULT", 0, N_("Result"), ""}, {0, NULL, 0, NULL, NULL}}; prop= RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "r"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Diffuse Color", "Diffuse color of the material"); + RNA_def_property_ui_text(prop, N_("Diffuse Color"), N_("Diffuse color of the material")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "specr"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Specular Color", "Specular color of the material"); + RNA_def_property_ui_text(prop, N_("Specular Color"), N_("Specular color of the material")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "mirror_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "mirr"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Mirror Color", "Mirror color of the material"); + RNA_def_property_ui_text(prop, N_("Mirror Color"), N_("Mirror color of the material")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Alpha", "Alpha transparency of the material"); + RNA_def_property_ui_text(prop, N_("Alpha"), N_("Alpha transparency of the material")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "specular_alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "spectra"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Specular Alpha", "Alpha transparency for specular areas"); + RNA_def_property_ui_text(prop, N_("Specular Alpha"), N_("Alpha transparency for specular areas")); RNA_def_property_update(prop, 0, "rna_Material_update"); /* Color bands */ prop= RNA_def_property(srna, "use_diffuse_ramp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_COL); RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_diffuse_ramp_set"); - RNA_def_property_ui_text(prop, "Use Diffuse Ramp", "Toggle diffuse ramp operations"); + RNA_def_property_ui_text(prop, N_("Use Diffuse Ramp"), N_("Toggle diffuse ramp operations")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_ramp", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "ramp_col"); RNA_def_property_struct_type(prop, "ColorRamp"); - RNA_def_property_ui_text(prop, "Diffuse Ramp", "Color ramp used to affect diffuse shading"); + RNA_def_property_ui_text(prop, N_("Diffuse Ramp"), N_("Color ramp used to affect diffuse shading")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_specular_ramp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_SPEC); RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_specular_ramp_set"); - RNA_def_property_ui_text(prop, "Use Specular Ramp", "Toggle specular ramp operations"); + RNA_def_property_ui_text(prop, N_("Use Specular Ramp"), N_("Toggle specular ramp operations")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_ramp", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "ramp_spec"); RNA_def_property_struct_type(prop, "ColorRamp"); - RNA_def_property_ui_text(prop, "Specular Ramp", "Color ramp used to affect specular shading"); + RNA_def_property_ui_text(prop, N_("Specular Ramp"), N_("Color ramp used to affect specular shading")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_ramp_blend", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rampblend_col"); RNA_def_property_enum_items(prop, ramp_blend_items); - RNA_def_property_ui_text(prop, "Diffuse Ramp Blend", "Blending method of the ramp and the diffuse color"); + RNA_def_property_ui_text(prop, N_("Diffuse Ramp Blend"), N_("Blending method of the ramp and the diffuse color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_ramp_blend", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rampblend_spec"); RNA_def_property_enum_items(prop, ramp_blend_items); - RNA_def_property_ui_text(prop, "Diffuse Ramp Blend", "Blending method of the ramp and the specular color"); + RNA_def_property_ui_text(prop, N_("Diffuse Ramp Blend"), N_("Blending method of the ramp and the specular color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_ramp_input", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rampin_col"); RNA_def_property_enum_items(prop, prop_ramp_input_items); - RNA_def_property_ui_text(prop, "Diffuse Ramp Input", "Determines how the ramp maps on the surface"); + RNA_def_property_ui_text(prop, N_("Diffuse Ramp Input"), N_("Determines how the ramp maps on the surface")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_ramp_input", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rampin_spec"); RNA_def_property_enum_items(prop, prop_ramp_input_items); - RNA_def_property_ui_text(prop, "Specular Ramp Input", "Determines how the ramp maps on the surface"); + RNA_def_property_ui_text(prop, N_("Specular Ramp Input"), N_("Determines how the ramp maps on the surface")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_ramp_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "rampfac_col"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Diffuse Ramp Factor", "Blending factor (also uses alpha in Colorband)"); + RNA_def_property_ui_text(prop, N_("Diffuse Ramp Factor"), N_("Blending factor (also uses alpha in Colorband)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_ramp_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "rampfac_spec"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Specular Ramp Factor", "Blending factor (also uses alpha in Colorband)"); + RNA_def_property_ui_text(prop, N_("Specular Ramp Factor"), N_("Blending factor (also uses alpha in Colorband)")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -843,57 +845,57 @@ static void rna_def_material_diffuse(StructRNA *srna) PropertyRNA *prop; static EnumPropertyItem prop_diff_shader_items[] = { - {MA_DIFF_LAMBERT, "LAMBERT", 0, "Lambert", "Use a Lambertian shader"}, - {MA_DIFF_ORENNAYAR, "OREN_NAYAR", 0, "Oren-Nayar", "Use an Oren-Nayar shader"}, - {MA_DIFF_TOON, "TOON", 0, "Toon", "Use a toon shader"}, - {MA_DIFF_MINNAERT, "MINNAERT", 0, "Minnaert", "Use a Minnaert shader"}, - {MA_DIFF_FRESNEL, "FRESNEL", 0, "Fresnel", "Use a Fresnel shader"}, + {MA_DIFF_LAMBERT, "LAMBERT", 0, N_("Lambert"), N_("Use a Lambertian shader")}, + {MA_DIFF_ORENNAYAR, "OREN_NAYAR", 0, N_("Oren-Nayar"), N_("Use an Oren-Nayar shader")}, + {MA_DIFF_TOON, "TOON", 0, N_("Toon"), N_("Use a toon shader")}, + {MA_DIFF_MINNAERT, "MINNAERT", 0, N_("Minnaert"), N_("Use a Minnaert shader")}, + {MA_DIFF_FRESNEL, "FRESNEL", 0, N_("Fresnel"), N_("Use a Fresnel shader")}, {0, NULL, 0, NULL, NULL}}; prop= RNA_def_property(srna, "diffuse_shader", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "diff_shader"); RNA_def_property_enum_items(prop, prop_diff_shader_items); - RNA_def_property_ui_text(prop, "Diffuse Shader Model", ""); + RNA_def_property_ui_text(prop, N_("Diffuse Shader Model"), ""); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_intensity", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "ref"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Diffuse Intensity", "Amount of diffuse reflection"); + RNA_def_property_ui_text(prop, N_("Diffuse Intensity"), N_("Amount of diffuse reflection")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "roughness", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 3.14f); - RNA_def_property_ui_text(prop, "Roughness", "Oren-Nayar Roughness"); + RNA_def_property_ui_text(prop, N_("Roughness"), N_("Oren-Nayar Roughness")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_toon_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "param[0]"); RNA_def_property_range(prop, 0.0f, 3.14f); - RNA_def_property_ui_text(prop, "Diffuse Toon Size", "Size of diffuse toon area"); + RNA_def_property_ui_text(prop, N_("Diffuse Toon Size"), N_("Size of diffuse toon area")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "param[1]"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Diffuse Toon Smooth", "Smoothness of diffuse toon area"); + RNA_def_property_ui_text(prop, N_("Diffuse Toon Smooth"), N_("Smoothness of diffuse toon area")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_fresnel", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "param[1]"); RNA_def_property_range(prop, 0.0f, 5.0f); - RNA_def_property_ui_text(prop, "Diffuse Fresnel", "Power of Fresnel"); + RNA_def_property_ui_text(prop, N_("Diffuse Fresnel"), N_("Power of Fresnel")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "diffuse_fresnel_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "param[0]"); RNA_def_property_range(prop, 0.0f, 5.0f); - RNA_def_property_ui_text(prop, "Diffuse Fresnel Factor", "Blending factor of Fresnel"); + RNA_def_property_ui_text(prop, N_("Diffuse Fresnel Factor"), N_("Blending factor of Fresnel")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "darkness", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 2.0f); - RNA_def_property_ui_text(prop, "Darkness", "Minnaert darkness"); + RNA_def_property_ui_text(prop, N_("Darkness"), N_("Minnaert darkness")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -903,78 +905,78 @@ static void rna_def_material_raymirror(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem prop_fadeto_mir_items[] = { - {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Sky", ""}, - {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Material", ""}, + {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, N_("Sky"), ""}, + {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, N_("Material"), ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "MaterialRaytraceMirror", NULL); RNA_def_struct_sdna(srna, "Material"); RNA_def_struct_nested(brna, srna, "Material"); - RNA_def_struct_ui_text(srna, "Material Raytrace Mirror", "Raytraced reflection settings for a Material datablock"); + RNA_def_struct_ui_text(srna, N_("Material Raytrace Mirror"), N_("Raytraced reflection settings for a Material datablock")); prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYMIRROR); /* use bitflags */ - RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections"); + RNA_def_property_ui_text(prop, N_("Enabled"), N_("Enable raytraced reflections")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "ray_mirror"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Reflectivity", "Sets the amount mirror reflection for raytrace"); + RNA_def_property_ui_text(prop, N_("Reflectivity"), N_("Sets the amount mirror reflection for raytrace")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fresnel_mir"); RNA_def_property_range(prop, 0.0f, 5.0f); - RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for mirror reflection"); + RNA_def_property_ui_text(prop, N_("Fresnel"), N_("Power of Fresnel for mirror reflection")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "fresnel_mir_i"); RNA_def_property_range(prop, 0.0f, 5.0f); - RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel"); + RNA_def_property_ui_text(prop, N_("Fresnel Factor"), N_("Blending factor for Fresnel")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "gloss_mir"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Gloss Amount", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections"); + RNA_def_property_ui_text(prop, N_("Gloss Amount"), N_("The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "aniso_gloss_mir"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Gloss Anisotropy", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent"); + RNA_def_property_ui_text(prop, N_("Gloss Anisotropy"), N_("The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "samp_gloss_mir"); RNA_def_property_range(prop, 0, 1024); - RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry reflections"); + RNA_def_property_ui_text(prop, N_("Gloss Samples"), N_("Number of cone samples averaged for blurry reflections")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_mir"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped"); + RNA_def_property_ui_text(prop, N_("Gloss Threshold"), N_("Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "ray_depth"); RNA_def_property_ui_range(prop, 0, 100, 1, 3); - RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-reflections"); + RNA_def_property_ui_text(prop, N_("Depth"), N_("Maximum allowed number of light inter-reflections")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "dist_mir"); RNA_def_property_range(prop, 0.0f, 10000.0f); - RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color"); + RNA_def_property_ui_text(prop, N_("Maximum Distance"), N_("Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "fade_to", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir"); RNA_def_property_enum_items(prop, prop_fadeto_mir_items); - RNA_def_property_ui_text(prop, "Fade-out Color", "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor"); + RNA_def_property_ui_text(prop, N_("Fade-out Color"), N_("The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -986,66 +988,66 @@ static void rna_def_material_raytra(BlenderRNA *brna) srna= RNA_def_struct(brna, "MaterialRaytraceTransparency", NULL); RNA_def_struct_sdna(srna, "Material"); RNA_def_struct_nested(brna, srna, "Material"); - RNA_def_struct_ui_text(srna, "Material Raytrace Transparency", "Raytraced refraction settings for a Material datablock"); + RNA_def_struct_ui_text(srna, N_("Material Raytrace Transparency"), N_("Raytraced refraction settings for a Material datablock")); prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ang"); RNA_def_property_range(prop, 0.25f, 4.0f); - RNA_def_property_ui_text(prop, "IOR", "Sets angular index of refraction for raytraced refraction"); + RNA_def_property_ui_text(prop, "IOR", N_("Sets angular index of refraction for raytraced refraction")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fresnel_tra"); RNA_def_property_range(prop, 0.0f, 5.0f); - RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for transparency (Ray or ZTransp)"); + RNA_def_property_ui_text(prop, N_("Fresnel"), N_("Power of Fresnel for transparency (Ray or ZTransp)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "fresnel_tra_i"); RNA_def_property_range(prop, 1.0f, 5.0f); - RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel"); + RNA_def_property_ui_text(prop, N_("Fresnel Factor"), N_("Blending factor for Fresnel")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "gloss_tra"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Gloss Amount", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions"); + RNA_def_property_ui_text(prop, N_("Gloss Amount"), N_("The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "samp_gloss_tra"); RNA_def_property_range(prop, 0, 1024); - RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry refractions"); + RNA_def_property_ui_text(prop, N_("Gloss Samples"), N_("Number of cone samples averaged for blurry refractions")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_tra"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped"); + RNA_def_property_ui_text(prop, N_("Gloss Threshold"), N_("Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "ray_depth_tra"); RNA_def_property_ui_range(prop, 0, 100, 1, 3); - RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-refractions"); + RNA_def_property_ui_text(prop, N_("Depth"), N_("Maximum allowed number of light inter-refractions")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "filter", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "filter"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Filter", "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption)"); + RNA_def_property_ui_text(prop, N_("Filter"), N_("Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "depth_max", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "tx_limit"); RNA_def_property_range(prop, 0.0f, 100.0f); - RNA_def_property_ui_text(prop, "Limit", "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled)"); + RNA_def_property_ui_text(prop, N_("Limit"), N_("Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "tx_falloff"); RNA_def_property_range(prop, 0.1f, 10.0f); - RNA_def_property_ui_text(prop, "Falloff", "Falloff power for transmissivity filter effect (1.0 is linear)"); + RNA_def_property_ui_text(prop, N_("Falloff"), N_("Falloff power for transmissivity filter effect (1.0 is linear)")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -1055,140 +1057,140 @@ static void rna_def_material_volume(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem prop_lighting_items[] = { - {MA_VOL_SHADE_SHADELESS, "SHADELESS", 0, "Shadeless", "Do not calculate lighting and shadows"}, - {MA_VOL_SHADE_SHADOWED, "SHADOWED", 0, "Shadowed", ""}, - {MA_VOL_SHADE_SHADED, "SHADED", 0, "Shaded", ""}, - {MA_VOL_SHADE_MULTIPLE, "MULTIPLE_SCATTERING", 0, "Multiple Scattering", ""}, - {MA_VOL_SHADE_SHADEDPLUSMULTIPLE, "SHADED_PLUS_MULTIPLE_SCATTERING", 0, "Shaded + Multiple Scattering", ""}, + {MA_VOL_SHADE_SHADELESS, "SHADELESS", 0, N_("Shadeless"), N_("Do not calculate lighting and shadows")}, + {MA_VOL_SHADE_SHADOWED, "SHADOWED", 0, N_("Shadowed"), ""}, + {MA_VOL_SHADE_SHADED, "SHADED", 0, N_("Shaded"), ""}, + {MA_VOL_SHADE_MULTIPLE, "MULTIPLE_SCATTERING", 0, N_("Multiple Scattering"), ""}, + {MA_VOL_SHADE_SHADEDPLUSMULTIPLE, "SHADED_PLUS_MULTIPLE_SCATTERING", 0, N_("Shaded + Multiple Scattering"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_stepsize_items[] = { - {MA_VOL_STEP_RANDOMIZED, "RANDOMIZED", 0, "Randomized", ""}, - {MA_VOL_STEP_CONSTANT, "CONSTANT", 0, "Constant", ""}, + {MA_VOL_STEP_RANDOMIZED, "RANDOMIZED", 0, N_("Randomized"), ""}, + {MA_VOL_STEP_CONSTANT, "CONSTANT", 0, N_("Constant"), ""}, //{MA_VOL_STEP_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "MaterialVolume", NULL); RNA_def_struct_sdna(srna, "VolumeSettings"); RNA_def_struct_nested(brna, srna, "Material"); - RNA_def_struct_ui_text(srna, "Material Volume", "Volume rendering settings for a Material datablock"); + RNA_def_struct_ui_text(srna, N_("Material Volume"), N_("Volume rendering settings for a Material datablock")); prop= RNA_def_property(srna, "step_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "stepsize_type"); RNA_def_property_enum_items(prop, prop_stepsize_items); - RNA_def_property_ui_text(prop, "Step Calculation", "Method of calculating the steps through the volume"); + RNA_def_property_ui_text(prop, N_("Step Calculation"), N_("Method of calculating the steps through the volume")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "step_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "stepsize"); RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_ui_range(prop, 0.001f, 1.0f, 1, 3); - RNA_def_property_ui_text(prop, "Step Size", "Distance between subsequent volume depth samples"); + RNA_def_property_ui_text(prop, N_("Step Size"), N_("Distance between subsequent volume depth samples")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "light_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "shade_type"); RNA_def_property_enum_items(prop, prop_lighting_items); - RNA_def_property_ui_text(prop, "Lighting Mode", "Method of shading, attenuating, and scattering light through the volume"); + RNA_def_property_ui_text(prop, N_("Lighting Mode"), N_("Method of shading, attenuating, and scattering light through the volume")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_external_shadows", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_RECV_EXT_SHADOW); /* use bitflags */ - RNA_def_property_ui_text(prop, "External Shadows", "Receive shadows from sources outside the volume (temporary)"); + RNA_def_property_ui_text(prop, N_("External Shadows"), N_("Receive shadows from sources outside the volume (temporary)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_light_cache", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_PRECACHESHADING); /* use bitflags */ - RNA_def_property_ui_text(prop, "Light Cache", "Pre-calculate the shading information into a voxel grid, speeds up shading at slightly less accuracy"); + RNA_def_property_ui_text(prop, N_("Light Cache"), N_("Pre-calculate the shading information into a voxel grid, speeds up shading at slightly less accuracy")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "cache_resolution", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "precache_resolution"); RNA_def_property_range(prop, 1, 1024); - RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory"); + RNA_def_property_ui_text(prop, N_("Resolution"), N_("Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "ms_diffusion", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ms_diff"); RNA_def_property_range(prop, 0.0f, FLT_MAX); - RNA_def_property_ui_text(prop, "Diffusion", "Diffusion factor, the strength of the blurring effect"); + RNA_def_property_ui_text(prop, N_("Diffusion"), N_("Diffusion factor, the strength of the blurring effect")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "ms_spread", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ms_spread"); RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3); - RNA_def_property_ui_text(prop, "Spread", "Proportional distance over which the light is diffused"); + RNA_def_property_ui_text(prop, N_("Spread"), N_("Proportional distance over which the light is diffused")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "ms_intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ms_intensity"); RNA_def_property_range(prop, 0.0f, FLT_MAX); - RNA_def_property_ui_text(prop, "Intensity", "Multiplier for multiple scattered light energy"); + RNA_def_property_ui_text(prop, N_("Intensity"), N_("Multiplier for multiple scattered light energy")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "depth_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "depth_cutoff"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Depth Cutoff", "Stop ray marching early if transmission drops below this luminance - higher values give speedups in dense volumes at the expense of accuracy"); + RNA_def_property_ui_text(prop, N_("Depth Cutoff"), N_("Stop ray marching early if transmission drops below this luminance - higher values give speedups in dense volumes at the expense of accuracy")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "density"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Density", "The base density of the volume"); + RNA_def_property_ui_text(prop, N_("Density"), N_("The base density of the volume")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "density_scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "density_scale"); RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3); - RNA_def_property_ui_text(prop, "Density Scale", "Multiplier for the material's density"); + RNA_def_property_ui_text(prop, N_("Density Scale"), N_("Multiplier for the material's density")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "scattering", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "scattering"); RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1 ,3); - RNA_def_property_ui_text(prop, "Scattering", "Amount of light that gets scattered out by the volume - the more out-scattering, the shallower the light will penetrate "); + RNA_def_property_ui_text(prop, N_("Scattering"), N_("Amount of light that gets scattered out by the volume - the more out-scattering, the shallower the light will penetrate ")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "transmission_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "transmission_col"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Transmission Color", "Result color of the volume, after other light has been scattered/absorbed"); + RNA_def_property_ui_text(prop, N_("Transmission Color"), N_("Result color of the volume, after other light has been scattered/absorbed")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "reflection_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "reflection_col"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Reflection Color", "Color of light scattered out of the volume (does not affect transmission)"); + RNA_def_property_ui_text(prop, N_("Reflection Color"), N_("Color of light scattered out of the volume (does not affect transmission)")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "reflection", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "reflection"); RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1 ,3); - RNA_def_property_ui_text(prop, "Reflection", "Multiplier to make out-scattered light brighter or darker (non-physically correct)"); + RNA_def_property_ui_text(prop, N_("Reflection"), N_("Multiplier to make out-scattered light brighter or darker (non-physically correct)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "emission_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "emission_col"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Emission Color", "Color of emitted light"); + RNA_def_property_ui_text(prop, N_("Emission Color"), N_("Color of emitted light")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "emission", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "emission"); RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3); - RNA_def_property_ui_text(prop, "Emission", "Amount of light that gets emitted by the volume"); + RNA_def_property_ui_text(prop, N_("Emission"), N_("Amount of light that gets emitted by the volume")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "asymmetry", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "asymmetry"); RNA_def_property_range(prop, -1.0f, 1.0f); - RNA_def_property_ui_text(prop, "Asymmetry", "Back scattering (-1.0) to Forward scattering (1.0) and the range in between"); + RNA_def_property_ui_text(prop, N_("Asymmetry"), N_("Back scattering (-1.0) to Forward scattering (1.0) and the range in between")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -1201,123 +1203,123 @@ static void rna_def_material_halo(BlenderRNA *brna) srna= RNA_def_struct(brna, "MaterialHalo", NULL); RNA_def_struct_sdna(srna, "Material"); RNA_def_struct_nested(brna, srna, "Material"); - RNA_def_struct_ui_text(srna, "Material Halo", "Halo particle effect settings for a Material datablock"); + RNA_def_struct_ui_text(srna, N_("Material Halo"), N_("Halo particle effect settings for a Material datablock")); prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "hasize"); RNA_def_property_range(prop, 0.0f, 100.0f); - RNA_def_property_ui_text(prop, "Size", "Sets the dimension of the halo"); + RNA_def_property_ui_text(prop, N_("Size"), N_("Sets the dimension of the halo")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "hardness", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "har"); RNA_def_property_range(prop, 0, 127); - RNA_def_property_ui_text(prop, "Hardness", "Sets the hardness of the halo"); + RNA_def_property_ui_text(prop, N_("Hardness"), N_("Sets the hardness of the halo")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "add", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "add"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Add", "Sets the strength of the add effect"); + RNA_def_property_ui_text(prop, N_("Add"), N_("Sets the strength of the add effect")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "ring_count", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ringc"); RNA_def_property_range(prop, 0, 24); - RNA_def_property_ui_text(prop, "Rings", "Sets the number of rings rendered over the halo"); + RNA_def_property_ui_text(prop, N_("Rings"), N_("Sets the number of rings rendered over the halo")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "line_count", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "linec"); RNA_def_property_range(prop, 0, 250); - RNA_def_property_ui_text(prop, "Line Number", "Sets the number of star shaped lines rendered over the halo"); + RNA_def_property_ui_text(prop, N_("Line Number"), N_("Sets the number of star shaped lines rendered over the halo")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "star_tip_count", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "starc"); RNA_def_property_range(prop, 3, 50); - RNA_def_property_ui_text(prop, "Star Tips", "Sets the number of points on the star shaped halo"); + RNA_def_property_ui_text(prop, N_("Star Tips"), N_("Sets the number of points on the star shaped halo")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "seed1"); RNA_def_property_range(prop, 0, 255); - RNA_def_property_ui_text(prop, "Seed", "Randomizes ring dimension and line location"); + RNA_def_property_ui_text(prop, N_("Seed"), N_("Randomizes ring dimension and line location")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_flare_mode", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_FLARE); /* use bitflags */ - RNA_def_property_ui_text(prop, "Flare", "Renders halo as a lens flare"); + RNA_def_property_ui_text(prop, N_("Flare"), N_("Renders halo as a lens flare")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "flare_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "flaresize"); RNA_def_property_range(prop, 0.1f, 25.0f); - RNA_def_property_ui_text(prop, "Flare Size", "Sets the factor by which the flare is larger than the halo"); + RNA_def_property_ui_text(prop, N_("Flare Size"), N_("Sets the factor by which the flare is larger than the halo")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "flare_subflare_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "subsize"); RNA_def_property_range(prop, 0.1f, 25.0f); - RNA_def_property_ui_text(prop, "Flare Subsize", "Sets the dimension of the sub-flares, dots and circles"); + RNA_def_property_ui_text(prop, N_("Flare Subsize"), N_("Sets the dimension of the sub-flares, dots and circles")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "flare_boost", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "flareboost"); RNA_def_property_range(prop, 0.1f, 10.0f); - RNA_def_property_ui_text(prop, "Flare Boost", "Gives the flare extra strength"); + RNA_def_property_ui_text(prop, N_("Flare Boost"), N_("Gives the flare extra strength")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "flare_seed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "seed2"); RNA_def_property_range(prop, 0, 255); - RNA_def_property_ui_text(prop, "Flare Seed", "Specifies an offset in the flare seed table"); + RNA_def_property_ui_text(prop, N_("Flare Seed"), N_("Specifies an offset in the flare seed table")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "flare_subflare_count", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "flarec"); RNA_def_property_range(prop, 1, 32); - RNA_def_property_ui_text(prop, "Flares Sub", "Sets the number of sub-flares"); + RNA_def_property_ui_text(prop, N_("Flares Sub"), N_("Sets the number of sub-flares")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_ring", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_RINGS); - RNA_def_property_ui_text(prop, "Rings", "Renders rings over halo"); + RNA_def_property_ui_text(prop, N_("Rings"), N_("Renders rings over halo")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_lines", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_LINES); - RNA_def_property_ui_text(prop, "Lines", "Renders star shaped lines over halo"); + RNA_def_property_ui_text(prop, N_("Lines"), N_("Renders star shaped lines over halo")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_star", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STAR); - RNA_def_property_ui_text(prop, "Star", "Renders halo as a star"); + RNA_def_property_ui_text(prop, N_("Star"), N_("Renders halo as a star")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOTEX); - RNA_def_property_ui_text(prop, "Texture", "Gives halo a texture"); + RNA_def_property_ui_text(prop, N_("Texture"), N_("Gives halo a texture")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_vertex_normal", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOPUNO); - RNA_def_property_ui_text(prop, "Vertex Normal", "Uses the vertex normal to specify the dimension of the halo"); + RNA_def_property_ui_text(prop, N_("Vertex Normal"), N_("Uses the vertex normal to specify the dimension of the halo")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_extreme_alpha", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_XALPHA); - RNA_def_property_ui_text(prop, "Extreme Alpha", "Uses extreme alpha"); + RNA_def_property_ui_text(prop, N_("Extreme Alpha"), N_("Uses extreme alpha")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_shaded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SHADE); - RNA_def_property_ui_text(prop, "Shaded", "Lets halo receive light and shadows from external objects"); + RNA_def_property_ui_text(prop, N_("Shaded"), N_("Lets halo receive light and shadows from external objects")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_soft", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SOFT); - RNA_def_property_ui_text(prop, "Soft", "Softens the edges of halos at intersections with other geometry"); + RNA_def_property_ui_text(prop, N_("Soft"), N_("Softens the edges of halos at intersections with other geometry")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -1329,65 +1331,65 @@ static void rna_def_material_sss(BlenderRNA *brna) srna= RNA_def_struct(brna, "MaterialSubsurfaceScattering", NULL); RNA_def_struct_sdna(srna, "Material"); RNA_def_struct_nested(brna, srna, "Material"); - RNA_def_struct_ui_text(srna, "Material Subsurface Scattering", "Diffuse subsurface scattering settings for a Material datablock"); + RNA_def_struct_ui_text(srna, N_("Material Subsurface Scattering"), N_("Diffuse subsurface scattering settings for a Material datablock")); prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_COLOR|PROP_UNIT_LENGTH); RNA_def_property_float_sdna(prop, NULL, "sss_radius"); RNA_def_property_range(prop, 0.001, FLT_MAX); RNA_def_property_ui_range(prop, 0.001, 10000, 1, 3); - RNA_def_property_ui_text(prop, "Radius", "Mean red/green/blue scattering path length"); + RNA_def_property_ui_text(prop, N_("Radius"), N_("Mean red/green/blue scattering path length")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "sss_col"); - RNA_def_property_ui_text(prop, "Color", "Scattering color"); + RNA_def_property_ui_text(prop, N_("Color"), N_("Scattering color")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sss_error"); RNA_def_property_ui_range(prop, 0.0001, 10, 1, 3); - RNA_def_property_ui_text(prop, "Error Tolerance", "Error tolerance (low values are slower and higher quality)"); + RNA_def_property_ui_text(prop, N_("Error Tolerance"), N_("Error tolerance (low values are slower and higher quality)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sss_scale"); RNA_def_property_ui_range(prop, 0.001, 1000, 1, 3); - RNA_def_property_ui_text(prop, "Scale", "Object scale factor"); + RNA_def_property_ui_text(prop, N_("Scale"), N_("Object scale factor")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sss_ior"); RNA_def_property_ui_range(prop, 0.1, 2, 1, 3); - RNA_def_property_ui_text(prop, "IOR", "Index of refraction (higher values are denser)"); + RNA_def_property_ui_text(prop, "IOR", N_("Index of refraction (higher values are denser)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "sss_colfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Color Factor", "Blend factor for SSS colors"); + RNA_def_property_ui_text(prop, N_("Color Factor"), N_("Blend factor for SSS colors")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "sss_texfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); - RNA_def_property_ui_text(prop, "Texture Factor", "Texture scatting blend factor"); + RNA_def_property_ui_text(prop, N_("Texture Factor"), N_("Texture scatting blend factor")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "front", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sss_front"); RNA_def_property_range(prop, 0, 2); - RNA_def_property_ui_text(prop, "Front", "Front scattering weight"); + RNA_def_property_ui_text(prop, N_("Front"), N_("Front scattering weight")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sss_back"); RNA_def_property_range(prop, 0, 10); - RNA_def_property_ui_text(prop, "Back", "Back scattering weight"); + RNA_def_property_ui_text(prop, N_("Back"), N_("Back scattering weight")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "sss_flag", MA_DIFF_SSS); - RNA_def_property_ui_text(prop, "Enabled", "Enable diffuse subsurface scatting effects in a material"); + RNA_def_property_ui_text(prop, N_("Enabled"), N_("Enable diffuse subsurface scatting effects in a material")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -1396,23 +1398,23 @@ static void rna_def_material_specularity(StructRNA *srna) PropertyRNA *prop; static EnumPropertyItem prop_specular_shader_items[] = { - {MA_SPEC_COOKTORR, "COOKTORR", 0, "CookTorr", "Use a Cook-Torrance shader"}, - {MA_SPEC_PHONG, "PHONG", 0, "Phong", "Use a Phong shader"}, - {MA_SPEC_BLINN, "BLINN", 0, "Blinn", "Use a Blinn shader"}, - {MA_SPEC_TOON, "TOON", 0, "Toon", "Use a toon shader"}, - {MA_SPEC_WARDISO, "WARDISO", 0, "WardIso", "Use a Ward anisotropic shader"}, + {MA_SPEC_COOKTORR, "COOKTORR", 0, N_("CookTorr"), N_("Use a Cook-Torrance shader")}, + {MA_SPEC_PHONG, "PHONG", 0, N_("Phong"), N_("Use a Phong shader")}, + {MA_SPEC_BLINN, "BLINN", 0, N_("Blinn"), N_("Use a Blinn shader")}, + {MA_SPEC_TOON, "TOON", 0, N_("Toon"), N_("Use a toon shader")}, + {MA_SPEC_WARDISO, "WARDISO", 0, N_("WardIso"), N_("Use a Ward anisotropic shader")}, {0, NULL, 0, NULL, NULL}}; prop= RNA_def_property(srna, "specular_shader", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "spec_shader"); RNA_def_property_enum_items(prop, prop_specular_shader_items); - RNA_def_property_ui_text(prop, "Specular Shader Model", ""); + RNA_def_property_ui_text(prop, N_("Specular Shader Model"), ""); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "spec"); RNA_def_property_range(prop, 0, 1); - RNA_def_property_ui_text(prop, "Specular Intensity", "How intense (bright) the specular reflection is"); + RNA_def_property_ui_text(prop, N_("Specular Intensity"), N_("How intense (bright) the specular reflection is")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); /* NOTE: "har", "param", etc are used for multiple purposes depending on @@ -1423,31 +1425,31 @@ static void rna_def_material_specularity(StructRNA *srna) prop= RNA_def_property(srna, "specular_hardness", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "har"); RNA_def_property_range(prop, 1, 511); - RNA_def_property_ui_text(prop, "Specular Hardness", "How hard (sharp) the specular reflection is"); + RNA_def_property_ui_text(prop, N_("Specular Hardness"), N_("How hard (sharp) the specular reflection is")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "specular_ior", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "refrac"); RNA_def_property_range(prop, 1, 10); - RNA_def_property_ui_text(prop, "Specular IOR", "Specular index of refraction"); + RNA_def_property_ui_text(prop, N_("Specular IOR"), N_("Specular index of refraction")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_toon_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "param[2]"); RNA_def_property_range(prop, 0.0f, 1.53f); - RNA_def_property_ui_text(prop, "Specular Toon Size", "Size of specular toon area"); + RNA_def_property_ui_text(prop, N_("Specular Toon Size"), N_("Size of specular toon area")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "param[3]"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Specular Toon Smooth", "Smoothness of specular toon area"); + RNA_def_property_ui_text(prop, N_("Specular Toon Smooth"), N_("Smoothness of specular toon area")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "specular_slope", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "rms"); RNA_def_property_range(prop, 0, 0.4); - RNA_def_property_ui_text(prop, "Specular Slope", "The standard deviation of surface slope"); + RNA_def_property_ui_text(prop, N_("Specular Slope"), N_("The standard deviation of surface slope")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -1459,66 +1461,66 @@ static void rna_def_material_strand(BlenderRNA *brna) srna= RNA_def_struct(brna, "MaterialStrand", NULL); RNA_def_struct_sdna(srna, "Material"); RNA_def_struct_nested(brna, srna, "Material"); - RNA_def_struct_ui_text(srna, "Material Strand", "Strand settings for a Material datablock"); + RNA_def_struct_ui_text(srna, N_("Material Strand"), N_("Strand settings for a Material datablock")); prop= RNA_def_property(srna, "use_tangent_shading", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_STR); - RNA_def_property_ui_text(prop, "Tangent Shading", "Uses direction of strands as normal for tangent-shading"); + RNA_def_property_ui_text(prop, N_("Tangent Shading"), N_("Uses direction of strands as normal for tangent-shading")); RNA_def_property_update(prop, 0, "rna_Material_update"); /* this flag is only set when rendering, not to be edited manually */ prop= RNA_def_property(srna, "use_surface_diffuse", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_SURFDIFF); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Surface Diffuse", "Make diffuse shading more similar to shading the surface"); + RNA_def_property_ui_text(prop, N_("Surface Diffuse"), N_("Make diffuse shading more similar to shading the surface")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "strand_surfnor"); RNA_def_property_range(prop, 0, 10); - RNA_def_property_ui_text(prop, "Blend Distance", "Worldspace distance over which to blend in the surface normal"); + RNA_def_property_ui_text(prop, N_("Blend Distance"), N_("Worldspace distance over which to blend in the surface normal")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_blender_units", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_B_UNITS); - RNA_def_property_ui_text(prop, "Blender Units", "Use Blender units for widths instead of pixels"); + RNA_def_property_ui_text(prop, N_("Blender Units"), N_("Use Blender units for widths instead of pixels")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "root_size", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "strand_sta"); RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_start_size_range"); RNA_def_property_ui_range(prop, 0, 10.0f, 10, 5); - RNA_def_property_ui_text(prop, "Root Size", "Start size of strands in pixels or Blender units"); + RNA_def_property_ui_text(prop, N_("Root Size"), N_("Start size of strands in pixels or Blender units")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "tip_size", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "strand_end"); RNA_def_property_ui_range(prop, 0, 10.0f, 10, 5); RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_end_size_range"); - RNA_def_property_ui_text(prop, "Tip Size", "End size of strands in pixels or Blender units"); + RNA_def_property_ui_text(prop, N_("Tip Size"), N_("End size of strands in pixels or Blender units")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "size_min", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "strand_min"); RNA_def_property_range(prop, 0.001, 10); - RNA_def_property_ui_text(prop, "Minimum Size", "Minimum size of strands in pixels"); + RNA_def_property_ui_text(prop, N_("Minimum Size"), N_("Minimum size of strands in pixels")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "shape", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "strand_ease"); RNA_def_property_range(prop, -0.9, 0.9); - RNA_def_property_ui_text(prop, "Shape", "Positive values make strands rounder, negative makes strands spiky"); + RNA_def_property_ui_text(prop, N_("Shape"), N_("Positive values make strands rounder, negative makes strands spiky")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "width_fade", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "strand_widthfade"); RNA_def_property_range(prop, 0, 2); - RNA_def_property_ui_text(prop, "Width Fade", "Transparency along the width of the strand"); + RNA_def_property_ui_text(prop, N_("Width Fade"), N_("Transparency along the width of the strand")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "strand_uvname"); - RNA_def_property_ui_text(prop, "UV Layer", "Name of UV layer to override"); + RNA_def_property_ui_text(prop, N_("UV Layer"), N_("Name of UV layer to override")); RNA_def_property_update(prop, 0, "rna_Material_update"); } @@ -1530,38 +1532,38 @@ static void rna_def_material_physics(BlenderRNA *brna) srna= RNA_def_struct(brna, "MaterialPhysics", NULL); RNA_def_struct_sdna(srna, "Material"); RNA_def_struct_nested(brna, srna, "Material"); - RNA_def_struct_ui_text(srna, "Material Physics", "Physics settings for a Material datablock"); + RNA_def_struct_ui_text(srna, N_("Material Physics"), N_("Physics settings for a Material datablock")); prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "friction"); RNA_def_property_range(prop, 0, 100); - RNA_def_property_ui_text(prop, "Friction", "Coulomb friction coefficient, when inside the physics distance area"); + RNA_def_property_ui_text(prop, N_("Friction"), N_("Coulomb friction coefficient, when inside the physics distance area")); prop= RNA_def_property(srna, "elasticity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "reflect"); RNA_def_property_range(prop, 0, 1); - RNA_def_property_ui_text(prop, "Elasticity", "Elasticity of collisions"); + RNA_def_property_ui_text(prop, N_("Elasticity"), N_("Elasticity of collisions")); /* FH/Force Field Settings */ prop= RNA_def_property(srna, "use_fh_normal", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dynamode", MA_FH_NOR); - RNA_def_property_ui_text(prop, "Align to Normal", "Align dynamic game objects along the surface normal, when inside the physics distance area"); + RNA_def_property_ui_text(prop, N_("Align to Normal"), N_("Align dynamic game objects along the surface normal, when inside the physics distance area")); prop= RNA_def_property(srna, "fh_force", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fh"); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2); - RNA_def_property_ui_text(prop, "Force", "Upward spring force, when inside the physics distance area"); + RNA_def_property_ui_text(prop, N_("Force"), N_("Upward spring force, when inside the physics distance area")); prop= RNA_def_property(srna, "fh_distance", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fhdist"); RNA_def_property_range(prop, 0, 20); - RNA_def_property_ui_text(prop, "Distance", "Distance of the physics area"); + RNA_def_property_ui_text(prop, N_("Distance"), N_("Distance of the physics area")); prop= RNA_def_property(srna, "fh_damping", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xyfrict"); RNA_def_property_range(prop, 0, 1); - RNA_def_property_ui_text(prop, "Damping", "Damping of the spring force, when inside the physics distance area"); + RNA_def_property_ui_text(prop, N_("Damping"), N_("Damping of the spring force, when inside the physics distance area")); } void RNA_def_material(BlenderRNA *brna) @@ -1570,223 +1572,223 @@ void RNA_def_material(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem prop_type_items[] = { - {MA_TYPE_SURFACE, "SURFACE", 0, "Surface", "Render object as a surface"}, - {MA_TYPE_WIRE, "WIRE", 0, "Wire", "Render the edges of faces as wires (not supported in ray tracing)"}, - {MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume"}, - {MA_TYPE_HALO, "HALO", 0, "Halo", "Render object as halo particles"}, + {MA_TYPE_SURFACE, "SURFACE", 0, N_("Surface"), N_("Render object as a surface")}, + {MA_TYPE_WIRE, "WIRE", 0, N_("Wire"), N_("Render the edges of faces as wires (not supported in ray tracing)")}, + {MA_TYPE_VOLUME, "VOLUME", 0, N_("Volume"), N_("Render object as a volume")}, + {MA_TYPE_HALO, "HALO", 0, N_("Halo"), N_("Render object as halo particles")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem transparency_items[] = { - {0, "MASK", 0, "Mask", "Mask the background"}, - {MA_ZTRANSP, "Z_TRANSPARENCY", 0, "Z Transparency", "Use alpha buffer for transparent faces"}, - {MA_RAYTRANSP, "RAYTRACE", 0, "Raytrace", "Use raytracing for transparent refraction rendering"}, + {0, "MASK", 0, N_("Mask"), N_("Mask the background")}, + {MA_ZTRANSP, "Z_TRANSPARENCY", 0, N_("Z Transparency"), N_("Use alpha buffer for transparent faces")}, + {MA_RAYTRANSP, "RAYTRACE", 0, N_("Raytrace"), N_("Use raytracing for transparent refraction rendering")}, {0, NULL, 0, NULL, NULL}}; /* Render Preview Types */ static EnumPropertyItem preview_type_items[] = { - {MA_FLAT, "FLAT", ICON_MATPLANE, "Flat", "Preview type: Flat XY plane"}, - {MA_SPHERE, "SPHERE", ICON_MATSPHERE, "Sphere", "Preview type: Sphere"}, - {MA_CUBE, "CUBE", ICON_MATCUBE, "Flat", "Preview type: Cube"}, - {MA_MONKEY, "MONKEY", ICON_MONKEY, "Flat", "Preview type: Monkey"}, - {MA_HAIR, "HAIR", ICON_HAIR, "Flat", "Preview type: Hair strands"}, - {MA_SPHERE_A, "SPHERE_A", ICON_MAT_SPHERE_SKY, "Flat", "Preview type: Large sphere with sky"}, + {MA_FLAT, "FLAT", ICON_MATPLANE, N_("Flat"), N_("Preview type: Flat XY plane")}, + {MA_SPHERE, "SPHERE", ICON_MATSPHERE, N_("Sphere"), N_("Preview type: Sphere")}, + {MA_CUBE, "CUBE", ICON_MATCUBE, N_("Flat"), N_("Preview type: Cube")}, + {MA_MONKEY, "MONKEY", ICON_MONKEY, N_("Flat"), N_("Preview type: Monkey")}, + {MA_HAIR, "HAIR", ICON_HAIR, N_("Flat"), N_("Preview type: Hair strands")}, + {MA_SPHERE_A, "SPHERE_A", ICON_MAT_SPHERE_SKY, N_("Flat"), N_("Preview type: Large sphere with sky")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_shadows_only_items[] = { - {MA_SO_OLD, "SHADOW_ONLY_OLD", 0, "Shadow and Distance", "Old shadow only method"}, - {MA_SO_SHADOW, "SHADOW_ONLY", 0, "Shadow Only", "Improved shadow only method"}, - {MA_SO_SHADED, "SHADOW_ONLY_SHADED", 0, "Shadow and Shading", "Improved shadow only method which also renders lightless areas as shadows"}, + {MA_SO_OLD, "SHADOW_ONLY_OLD", 0, N_("Shadow and Distance"), N_("Old shadow only method")}, + {MA_SO_SHADOW, "SHADOW_ONLY", 0, N_("Shadow Only"), N_("Improved shadow only method")}, + {MA_SO_SHADED, "SHADOW_ONLY_SHADED", 0, N_("Shadow and Shading"), N_("Improved shadow only method which also renders lightless areas as shadows")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "Material", "ID"); - RNA_def_struct_ui_text(srna, "Material", "Material datablock to defined the appearance of geometric objects for rendering"); + RNA_def_struct_ui_text(srna, N_("Material"), N_("Material datablock to defined the appearance of geometric objects for rendering")); RNA_def_struct_ui_icon(srna, ICON_MATERIAL_DATA); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "material_type"); RNA_def_property_enum_items(prop, prop_type_items); - RNA_def_property_ui_text(prop, "Type", "Material type defining how the object is rendered"); + RNA_def_property_ui_text(prop, N_("Type"), N_("Material type defining how the object is rendered")); RNA_def_property_enum_funcs(prop, NULL, "rna_Material_type_set", NULL); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "use_transparency", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRANSP); - RNA_def_property_ui_text(prop, "Transparency", "Render material as transparent"); + RNA_def_property_ui_text(prop, N_("Transparency"), N_("Render material as transparent")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "transparency_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, transparency_items); - RNA_def_property_ui_text(prop, "Transparency Method", "Method to use for rendering transparency"); + RNA_def_property_ui_text(prop, N_("Transparency Method"), N_("Method to use for rendering transparency")); RNA_def_property_update(prop, 0, "rna_Material_update"); /* For Preview Render */ prop= RNA_def_property(srna, "preview_render_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "pr_type"); RNA_def_property_enum_items(prop, preview_type_items); - RNA_def_property_ui_text(prop, "Preview render type", "Type of preview render"); + RNA_def_property_ui_text(prop, N_("Preview render type"), N_("Type of preview render")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "amb"); RNA_def_property_range(prop, 0, 1); - RNA_def_property_ui_text(prop, "Ambient", "Amount of global ambient color the material receives"); + RNA_def_property_ui_text(prop, N_("Ambient"), N_("Amount of global ambient color the material receives")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0, 2.0f, 1, 2); - RNA_def_property_ui_text(prop, "Emit", "Amount of light to emit"); + RNA_def_property_ui_text(prop, N_("Emit"), N_("Amount of light to emit")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_FACTOR); RNA_def_property_range(prop, 0, 1); - RNA_def_property_ui_text(prop, "Translucency", "Amount of diffuse shading on the back side"); + RNA_def_property_ui_text(prop, N_("Translucency"), N_("Amount of diffuse shading on the back side")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_cubic", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_CUBIC); - RNA_def_property_ui_text(prop, "Cubic Interpolation", "Use cubic interpolation for diffuse values, for smoother transitions"); + RNA_def_property_ui_text(prop, N_("Cubic Interpolation"), N_("Use cubic interpolation for diffuse values, for smoother transitions")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_object_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_OBCOLOR); - RNA_def_property_ui_text(prop, "Object Color", "Modulate the result with a per-object color"); + RNA_def_property_ui_text(prop, N_("Object Color"), N_("Modulate the result with a per-object color")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "shadow_ray_bias", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sbias"); RNA_def_property_range(prop, 0, 0.25); - RNA_def_property_ui_text(prop, "Shadow Ray Bias", "Shadow raytracing bias to prevent terminator problems on shadow boundary"); + RNA_def_property_ui_text(prop, N_("Shadow Ray Bias"), N_("Shadow raytracing bias to prevent terminator problems on shadow boundary")); prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "lbias"); RNA_def_property_range(prop, 0, 10); - RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Factor to multiply shadow buffer bias with (0 is ignore.)"); + RNA_def_property_ui_text(prop, N_("Shadow Buffer Bias"), N_("Factor to multiply shadow buffer bias with (0 is ignore.)")); prop= RNA_def_property(srna, "shadow_cast_alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "shad_alpha"); RNA_def_property_range(prop, 0.001, 1); - RNA_def_property_ui_text(prop, "Shadow Casting Alpha", "Shadow casting alpha, in use for Irregular and Deep shadow buffer"); + RNA_def_property_ui_text(prop, N_("Shadow Casting Alpha"), N_("Shadow casting alpha, in use for Irregular and Deep shadow buffer")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "light_group", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "group"); RNA_def_property_struct_type(prop, "Group"); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Light Group", "Limit lighting to lamps in this Group"); + RNA_def_property_ui_text(prop, N_("Light Group"), N_("Limit lighting to lamps in this Group")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "index"); - RNA_def_property_ui_text(prop, "Pass Index", "Index # for the IndexMA render pass"); + RNA_def_property_ui_text(prop, N_("Pass Index"), N_("Index # for the IndexMA render pass")); RNA_def_property_update(prop, NC_OBJECT, NULL); /* flags */ prop= RNA_def_property(srna, "use_light_group_exclusive", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_GROUP_NOLAY); - RNA_def_property_ui_text(prop, "Light Group Exclusive", "Material uses the light group exclusively - these lamps are excluded from other scene lighting"); + RNA_def_property_ui_text(prop, N_("Light Group Exclusive"), N_("Material uses the light group exclusively - these lamps are excluded from other scene lighting")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRACEBLE); - RNA_def_property_ui_text(prop, "Traceable", "Include this material and geometry that uses it in ray tracing calculations"); + RNA_def_property_ui_text(prop, N_("Traceable"), N_("Include this material and geometry that uses it in ray tracing calculations")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW); - RNA_def_property_ui_text(prop, "Shadows", "Allows this material to receive shadows"); + RNA_def_property_ui_text(prop, N_("Shadows"), N_("Allows this material to receive shadows")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_shadeless", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHLESS); - RNA_def_property_ui_text(prop, "Shadeless", "Makes this material insensitive to light or shadow"); + RNA_def_property_ui_text(prop, N_("Shadeless"), N_("Makes this material insensitive to light or shadow")); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop= RNA_def_property(srna, "use_vertex_color_light", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOL); - RNA_def_property_ui_text(prop, "Vertex Color Light", "Add vertex colors as additional lighting"); + RNA_def_property_ui_text(prop, N_("Vertex Color Light"), N_("Add vertex colors as additional lighting")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_vertex_color_paint", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOLP); - RNA_def_property_ui_text(prop, "Vertex Color Paint", "Replaces object base color with vertex colors (multiplies with 'texture face' face assigned textures)"); + RNA_def_property_ui_text(prop, N_("Vertex Color Paint"), N_("Replaces object base color with vertex colors (multiplies with 'texture face' face assigned textures)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ZINV); - RNA_def_property_ui_text(prop, "Invert Z Depth", "Renders material's faces with an inverted Z buffer (scanline only)"); + RNA_def_property_ui_text(prop, N_("Invert Z Depth"), N_("Renders material's faces with an inverted Z buffer (scanline only)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "offset_z", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "zoffs"); - RNA_def_property_ui_text(prop, "Z Offset", "Gives faces an artificial offset in the Z buffer for Z transparency"); + RNA_def_property_ui_text(prop, N_("Z Offset"), N_("Gives faces an artificial offset in the Z buffer for Z transparency")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ENV); - RNA_def_property_ui_text(prop, "Sky", "Renders this material with zero alpha, with sky background in place (scanline only)"); + RNA_def_property_ui_text(prop, N_("Sky"), N_("Renders this material with zero alpha, with sky background in place (scanline only)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYSHADOW); - RNA_def_property_ui_text(prop, "Only Shadow", "Renders shadows as the material's alpha value, making materials transparent except for shadowed areas"); + RNA_def_property_ui_text(prop, N_("Only Shadow"), N_("Renders shadows as the material's alpha value, making materials transparent except for shadowed areas")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "shadow_only_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "shadowonly_flag"); RNA_def_property_enum_items(prop, prop_shadows_only_items); - RNA_def_property_ui_text(prop, "Shadow Type", "How to draw shadows"); + RNA_def_property_ui_text(prop, N_("Shadow Type"), N_("How to draw shadows")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_face_texture", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE); - RNA_def_property_ui_text(prop, "Face Textures", "Replaces the object's base color with color from face assigned image textures"); + RNA_def_property_ui_text(prop, N_("Face Textures"), N_("Replaces the object's base color with color from face assigned image textures")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_face_texture_alpha", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE_ALPHA); - RNA_def_property_ui_text(prop, "Face Textures Alpha", "Replaces the object's base alpha value with alpha from face assigned image textures"); + RNA_def_property_ui_text(prop, N_("Face Textures Alpha"), N_("Replaces the object's base alpha value with alpha from face assigned image textures")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_cast_shadows_only", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYCAST); - RNA_def_property_ui_text(prop, "Cast Shadows Only", "Makes objects with this material appear invisible, only casting shadows (not rendered)"); + RNA_def_property_ui_text(prop, N_("Cast Shadows Only"), N_("Makes objects with this material appear invisible, only casting shadows (not rendered)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", MA_NOMIST); - RNA_def_property_ui_text(prop, "Use Mist", "Use mist with this material (in world settings)"); + RNA_def_property_ui_text(prop, N_("Use Mist"), N_("Use mist with this material (in world settings)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_transparent_shadows", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW_TRA); - RNA_def_property_ui_text(prop, "Receive Transparent Shadows", "Allow this object to receive transparent shadows cast through other objects"); + RNA_def_property_ui_text(prop, N_("Receive Transparent Shadows"), N_("Allow this object to receive transparent shadows cast through other objects")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_ray_shadow_bias", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYBIAS); - RNA_def_property_ui_text(prop, "Ray Shadow Bias", "Prevents raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)"); + RNA_def_property_ui_text(prop, N_("Ray Shadow Bias"), N_("Prevents raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_full_oversampling", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FULL_OSA); - RNA_def_property_ui_text(prop, "Full Oversampling", "Force this material to render full shading/textures for all anti-aliasing samples"); + RNA_def_property_ui_text(prop, N_("Full Oversampling"), N_("Force this material to render full shading/textures for all anti-aliasing samples")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_cast_buffer_shadows", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADBUF); - RNA_def_property_ui_text(prop, "Cast Buffer Shadows", "Allow this material to cast shadows from shadow buffer lamps"); + RNA_def_property_ui_text(prop, N_("Cast Buffer Shadows"), N_("Allow this material to cast shadows from shadow buffer lamps")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_cast_approximate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_APPROX_OCCLUSION); - RNA_def_property_ui_text(prop, "Cast Approximate", "Allow this material to cast shadows when using approximate ambient occlusion."); + RNA_def_property_ui_text(prop, N_("Cast Approximate"), N_("Allow this material to cast shadows when using approximate ambient occlusion.")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "use_tangent_shading", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_V); - RNA_def_property_ui_text(prop, "Tangent Shading", "Use the material's tangent vector instead of the normal for shading - for anisotropic shading effects"); + RNA_def_property_ui_text(prop, N_("Tangent Shading"), N_("Use the material's tangent vector instead of the normal for shading - for anisotropic shading effects")); RNA_def_property_update(prop, 0, "rna_Material_update"); /* nested structs */ @@ -1794,60 +1796,60 @@ void RNA_def_material(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "MaterialRaytraceMirror"); RNA_def_property_pointer_funcs(prop, "rna_Material_mirror_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Raytrace Mirror", "Raytraced reflection settings for the material"); + RNA_def_property_ui_text(prop, N_("Raytrace Mirror"), N_("Raytraced reflection settings for the material")); prop= RNA_def_property(srna, "raytrace_transparency", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "MaterialRaytraceTransparency"); RNA_def_property_pointer_funcs(prop, "rna_Material_transp_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Raytrace Transparency", "Raytraced transparency settings for the material"); + RNA_def_property_ui_text(prop, N_("Raytrace Transparency"), N_("Raytraced transparency settings for the material")); prop= RNA_def_property(srna, "volume", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "vol"); RNA_def_property_struct_type(prop, "MaterialVolume"); - RNA_def_property_ui_text(prop, "Volume", "Volume settings for the material"); + RNA_def_property_ui_text(prop, N_("Volume"), N_("Volume settings for the material")); prop= RNA_def_property(srna, "halo", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "MaterialHalo"); RNA_def_property_pointer_funcs(prop, "rna_Material_halo_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Halo", "Halo settings for the material"); + RNA_def_property_ui_text(prop, N_("Halo"), N_("Halo settings for the material")); prop= RNA_def_property(srna, "subsurface_scattering", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "MaterialSubsurfaceScattering"); RNA_def_property_pointer_funcs(prop, "rna_Material_sss_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Subsurface Scattering", "Subsurface scattering settings for the material"); + RNA_def_property_ui_text(prop, N_("Subsurface Scattering"), N_("Subsurface scattering settings for the material")); prop= RNA_def_property(srna, "strand", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "MaterialStrand"); RNA_def_property_pointer_funcs(prop, "rna_Material_strand_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Strand", "Strand settings for the material"); + RNA_def_property_ui_text(prop, N_("Strand"), N_("Strand settings for the material")); prop= RNA_def_property(srna, "physics", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "MaterialPhysics"); RNA_def_property_pointer_funcs(prop, "rna_Material_physics_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Physics", "Game physics settings"); + RNA_def_property_ui_text(prop, N_("Physics"), N_("Game physics settings")); /* nodetree */ prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); - RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based materials"); + RNA_def_property_ui_text(prop, N_("Node Tree"), N_("Node tree for node based materials")); prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1); RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_nodes_set"); - RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the material"); + RNA_def_property_ui_text(prop, N_("Use Nodes"), N_("Use shader nodes to render the material")); RNA_def_property_update(prop, 0, "rna_Material_update"); prop= RNA_def_property(srna, "active_node_material", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Material"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, "rna_Material_active_node_material_get", "rna_Material_active_node_material_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Material", "Active node material"); + RNA_def_property_ui_text(prop, N_("Material"), N_("Active node material")); RNA_def_property_update(prop, NC_MATERIAL, NULL); /* common */ @@ -1860,7 +1862,7 @@ void RNA_def_material(BlenderRNA *brna) prop= RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "septex", 1); RNA_def_property_array(prop, 18); - RNA_def_property_ui_text(prop, "Use Textures", "Enable/Disable each texture"); + RNA_def_property_ui_text(prop, N_("Use Textures"), N_("Enable/Disable each texture")); RNA_def_property_update(prop, 0, "rna_Material_update"); rna_def_material_colors(srna); @@ -1891,24 +1893,24 @@ static void rna_def_texture_slots(BlenderRNA *brna, PropertyRNA *cprop, const ch RNA_def_property_srna(cprop, structname_slots); srna= RNA_def_struct(brna, structname_slots, NULL); RNA_def_struct_sdna(srna, "ID"); - RNA_def_struct_ui_text(srna, "Texture Slots", "Collection of texture slots"); + RNA_def_struct_ui_text(srna, N_("Texture Slots"), N_("Collection of texture slots")); /* functions */ func= RNA_def_function(srna, "add", "rna_mtex_texture_slots_add"); RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS); - parm= RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex."); + parm= RNA_def_pointer(func, "mtex", structname, "", N_("The newly initialized mtex.")); RNA_def_function_return(func, parm); func= RNA_def_function(srna, "create", "rna_mtex_texture_slots_create"); RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS); - parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to initialize.", 0, INT_MAX); + parm= RNA_def_int(func, "index", 0, 0, INT_MAX, N_("Index"), N_("Slot index to initialize."), 0, INT_MAX); RNA_def_property_flag(parm, PROP_REQUIRED); - parm= RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex."); + parm= RNA_def_pointer(func, "mtex", structname, "", N_("The newly initialized mtex.")); RNA_def_function_return(func, parm); func= RNA_def_function(srna, "clear", "rna_mtex_texture_slots_clear"); RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS); - parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clear.", 0, INT_MAX); + parm= RNA_def_int(func, "index", 0, 0, INT_MAX, N_("Index"), N_("Slot index to clear."), 0, INT_MAX); RNA_def_property_flag(parm, PROP_REQUIRED); } @@ -1922,7 +1924,7 @@ void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin, prop= RNA_def_property(srna, "texture_slots", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, structname); RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0); - RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures"); + RNA_def_property_ui_text(prop, N_("Textures"), N_("Texture slots defining the mapping and influence of textures")); rna_def_texture_slots(brna, prop, structname, structname_slots); prop= RNA_def_property(srna, "active_texture", PROP_POINTER, PROP_NONE); @@ -1931,13 +1933,13 @@ void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin, if(activeeditable) RNA_def_property_editable_func(prop, activeeditable); RNA_def_property_pointer_funcs(prop, activeget, activeset, NULL, NULL); - RNA_def_property_ui_text(prop, "Active Texture", "Active texture slot being displayed"); + RNA_def_property_ui_text(prop, N_("Active Texture"), N_("Active texture slot being displayed")); RNA_def_property_update(prop, 0, update); prop= RNA_def_property(srna, "active_texture_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "texact"); RNA_def_property_range(prop, 0, MAX_MTEX-1); - RNA_def_property_ui_text(prop, "Active Texture Index", "Index of active texture slot"); + RNA_def_property_ui_text(prop, N_("Active Texture Index"), N_("Index of active texture slot")); RNA_def_property_update(prop, 0, update); } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 76bbfcbed41..e2794baad34 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -51,70 +51,71 @@ #include "BKE_group.h" /* needed for object_in_group() */ #include "BLO_sys_types.h" /* needed for intptr_t used in ED_mesh.h */ +#include "BLF_api.h" #include "ED_mesh.h" #include "WM_api.h" #include "WM_types.h" EnumPropertyItem object_mode_items[] = { - {OB_MODE_OBJECT, "OBJECT", ICON_OBJECT_DATAMODE, "Object", ""}, - {OB_MODE_EDIT, "EDIT", ICON_EDITMODE_HLT, "Edit", ""}, - {OB_MODE_SCULPT, "SCULPT", ICON_SCULPTMODE_HLT, "Sculpt", ""}, - {OB_MODE_VERTEX_PAINT, "VERTEX_PAINT", ICON_VPAINT_HLT, "Vertex Paint", ""}, - {OB_MODE_WEIGHT_PAINT, "WEIGHT_PAINT", ICON_WPAINT_HLT, "Weight Paint", ""}, - {OB_MODE_TEXTURE_PAINT, "TEXTURE_PAINT", ICON_TPAINT_HLT, "Texture Paint", ""}, - {OB_MODE_PARTICLE_EDIT, "PARTICLE_EDIT", ICON_PARTICLEMODE, "Particle Edit", ""}, - {OB_MODE_POSE, "POSE", ICON_POSE_HLT, "Pose", ""}, + {OB_MODE_OBJECT, "OBJECT", ICON_OBJECT_DATAMODE, N_("Object"), ""}, + {OB_MODE_EDIT, "EDIT", ICON_EDITMODE_HLT, N_("Edit"), ""}, + {OB_MODE_SCULPT, "SCULPT", ICON_SCULPTMODE_HLT, N_("Sculpt"), ""}, + {OB_MODE_VERTEX_PAINT, "VERTEX_PAINT", ICON_VPAINT_HLT, N_("Vertex Paint"), ""}, + {OB_MODE_WEIGHT_PAINT, "WEIGHT_PAINT", ICON_WPAINT_HLT, N_("Weight Paint"), ""}, + {OB_MODE_TEXTURE_PAINT, "TEXTURE_PAINT", ICON_TPAINT_HLT, N_("Texture Paint"), ""}, + {OB_MODE_PARTICLE_EDIT, "PARTICLE_EDIT", ICON_PARTICLEMODE, N_("Particle Edit"), ""}, + {OB_MODE_POSE, "POSE", ICON_POSE_HLT, N_("Pose"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem parent_type_items[] = { - {PAROBJECT, "OBJECT", 0, "Object", "The object is parented to an object"}, - {PARCURVE, "CURVE", 0, "Curve", "The object is parented to a curve"}, - {PARKEY, "KEY", 0, "Key", ""}, - {PARSKEL, "ARMATURE", 0, "Armature", ""}, - {PARSKEL, "LATTICE", 0, "Lattice", "The object is parented to a lattice"}, // PARSKEL reuse will give issues - {PARVERT1, "VERTEX", 0, "Vertex", "The object is parented to a vertex"}, - {PARVERT3, "VERTEX_3", 0, "3 Vertices", ""}, - {PARBONE, "BONE", 0, "Bone", "The object is parented to a bone"}, + {PAROBJECT, "OBJECT", 0, N_("Object"), N_("The object is parented to an object")}, + {PARCURVE, "CURVE", 0, N_("Curve"), N_("The object is parented to a curve")}, + {PARKEY, "KEY", 0, N_("Key"), ""}, + {PARSKEL, "ARMATURE", 0, N_("Armature"), ""}, + {PARSKEL, "LATTICE", 0, N_("Lattice"), N_("The object is parented to a lattice")}, // PARSKEL reuse will give issues + {PARVERT1, "VERTEX", 0, N_("Vertex"), N_("The object is parented to a vertex")}, + {PARVERT3, "VERTEX_3", 0, N_("3 Vertices"), ""}, + {PARBONE, "BONE", 0, N_("Bone"), N_("The object is parented to a bone")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem collision_bounds_items[] = { - {OB_BOUND_BOX, "BOX", 0, "Box", ""}, - {OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", ""}, - {OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", ""}, - {OB_BOUND_CONE, "CONE", 0, "Cone", ""}, - {OB_BOUND_POLYT, "CONVEX_HULL", 0, "Convex Hull", ""}, - {OB_BOUND_POLYH, "TRIANGLE_MESH", 0, "Triangle Mesh", ""}, - {OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", ""}, + {OB_BOUND_BOX, "BOX", 0, N_("Box"), ""}, + {OB_BOUND_SPHERE, "SPHERE", 0, N_("Sphere"), ""}, + {OB_BOUND_CYLINDER, "CYLINDER", 0, N_("Cylinder"), ""}, + {OB_BOUND_CONE, "CONE", 0, N_("Cone"), ""}, + {OB_BOUND_POLYT, "CONVEX_HULL", 0, N_("Convex Hull"), ""}, + {OB_BOUND_POLYH, "TRIANGLE_MESH", 0, N_("Triangle Mesh"), ""}, + {OB_BOUND_CAPSULE, "CAPSULE", 0, N_("Capsule"), ""}, //{OB_DYN_MESH, "DYNAMIC_MESH", 0, "Dynamic Mesh", ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem metaelem_type_items[] = { - {MB_BALL, "BALL", ICON_META_BALL, "Ball", ""}, - {MB_TUBE, "CAPSULE", ICON_META_CAPSULE, "Capsule", ""}, - {MB_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""}, - {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, "Ellipsoid", ""}, // NOTE: typo at original definition! - {MB_CUBE, "CUBE", ICON_META_CUBE, "Cube", ""}, + {MB_BALL, "BALL", ICON_META_BALL, N_("Ball"), ""}, + {MB_TUBE, "CAPSULE", ICON_META_CAPSULE, N_("Capsule"), ""}, + {MB_PLANE, "PLANE", ICON_META_PLANE, N_("Plane"), ""}, + {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, N_("Ellipsoid"), ""}, // NOTE: typo at original definition! + {MB_CUBE, "CUBE", ICON_META_CUBE, N_("Cube"), ""}, {0, NULL, 0, NULL, NULL}}; /* used for 2 enums */ -#define OBTYPE_CU_CURVE {OB_CURVE, "CURVE", 0, "Curve", ""} -#define OBTYPE_CU_SURF {OB_SURF, "SURFACE", 0, "Surface", ""} -#define OBTYPE_CU_FONT {OB_FONT, "FONT", 0, "Font", ""} +#define OBTYPE_CU_CURVE {OB_CURVE, "CURVE", 0, N_("Curve"), ""} +#define OBTYPE_CU_SURF {OB_SURF, "SURFACE", 0, N_("Surface"), ""} +#define OBTYPE_CU_FONT {OB_FONT, "FONT", 0, N_("Font"), ""} EnumPropertyItem object_type_items[] = { - {OB_MESH, "MESH", 0, "Mesh", ""}, + {OB_MESH, "MESH", 0, N_("Mesh"), ""}, OBTYPE_CU_CURVE, OBTYPE_CU_SURF, - {OB_MBALL, "META", 0, "Meta", ""}, + {OB_MBALL, "META", 0, N_("Meta"), ""}, OBTYPE_CU_FONT, {0, "", 0, NULL, NULL}, - {OB_ARMATURE, "ARMATURE", 0, "Armature", ""}, - {OB_LATTICE, "LATTICE", 0, "Lattice", ""}, - {OB_EMPTY, "EMPTY", 0, "Empty", ""}, + {OB_ARMATURE, "ARMATURE", 0, N_("Armature"), ""}, + {OB_LATTICE, "LATTICE", 0, N_("Lattice"), ""}, + {OB_EMPTY, "EMPTY", 0, N_("Empty"), ""}, {0, "", 0, NULL, NULL}, - {OB_CAMERA, "CAMERA", 0, "Camera", ""}, - {OB_LAMP, "LAMP", 0, "Lamp", ""}, + {OB_CAMERA, "CAMERA", 0, N_("Camera"), ""}, + {OB_LAMP, "LAMP", 0, N_("Lamp"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem object_type_curve_items[] = { @@ -1708,14 +1709,14 @@ static void rna_def_object(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem empty_drawtype_items[] = { - {OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""}, - {OB_ARROWS, "ARROWS", 0, "Arrows", ""}, - {OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""}, - {OB_CIRCLE, "CIRCLE", 0, "Circle", ""}, - {OB_CUBE, "CUBE", 0, "Cube", ""}, - {OB_EMPTY_SPHERE, "SPHERE", 0, "Sphere", ""}, - {OB_EMPTY_CONE, "CONE", 0, "Cone", ""}, - {OB_EMPTY_IMAGE, "IMAGE", 0, "Image", ""}, + {OB_PLAINAXES, "PLAIN_AXES", 0, N_("Plain Axes"), ""}, + {OB_ARROWS, "ARROWS", 0, N_("Arrows"), ""}, + {OB_SINGLE_ARROW, "SINGLE_ARROW", 0, N_("Single Arrow"), ""}, + {OB_CIRCLE, "CIRCLE", 0, N_("Circle"), ""}, + {OB_CUBE, "CUBE", 0, N_("Cube"), ""}, + {OB_EMPTY_SPHERE, "SPHERE", 0, N_("Sphere"), ""}, + {OB_EMPTY_CONE, "CONE", 0, N_("Cone"), ""}, + {OB_EMPTY_IMAGE, "IMAGE", 0, N_("Image"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem track_items[] = { @@ -1734,40 +1735,40 @@ static void rna_def_object(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem drawtype_items[] = { - {OB_BOUNDBOX, "BOUNDS", 0, "Bounds", "Draw the bounding box of the object"}, - {OB_WIRE, "WIRE", 0, "Wire", "Draw the object as a wireframe"}, - {OB_SOLID, "SOLID", 0, "Solid", "Draw the object as a solid (If solid drawing is enabled in the viewport)"}, + {OB_BOUNDBOX, "BOUNDS", 0, N_("Bounds"), N_("Draw the bounding box of the object")}, + {OB_WIRE, "WIRE", 0, N_("Wire"), N_("Draw the object as a wireframe")}, + {OB_SOLID, "SOLID", 0, N_("Solid"), N_("Draw the object as a solid (If solid drawing is enabled in the viewport)")}, // disabled {OB_SHADED, "SHADED", 0, "Shaded", ""}, - {OB_TEXTURE, "TEXTURED", 0, "Textured", "Draw the object with textures (If textures are enabled in the viewport)"}, + {OB_TEXTURE, "TEXTURED", 0, N_("Textured"), N_("Draw the object with textures (If textures are enabled in the viewport)")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem boundtype_items[] = { - {OB_BOUND_BOX, "BOX", 0, "Box", "Draw bounds as box"}, - {OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", "Draw bounds as sphere"}, - {OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", "Draw bounds as cylinder"}, - {OB_BOUND_CONE, "CONE", 0, "Cone", "Draw bounds as cone"}, - {OB_BOUND_POLYH, "POLYHEDRON", 0, "Polyhedron", "Draw bounds as polyhedron"}, - {OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", "Draw bounds as capsule"}, + {OB_BOUND_BOX, "BOX", 0, N_("Box"), N_("Draw bounds as box")}, + {OB_BOUND_SPHERE, "SPHERE", 0, N_("Sphere"), N_("Draw bounds as sphere")}, + {OB_BOUND_CYLINDER, "CYLINDER", 0, N_("Cylinder"), N_("Draw bounds as cylinder")}, + {OB_BOUND_CONE, "CONE", 0, N_("Cone"), N_("Draw bounds as cone")}, + {OB_BOUND_POLYH, "POLYHEDRON", 0, N_("Polyhedron"), N_("Draw bounds as polyhedron")}, + {OB_BOUND_CAPSULE, "CAPSULE", 0, N_("Capsule"), N_("Draw bounds as capsule")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem dupli_items[] = { {0, "NONE", 0, "None", ""}, - {OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make copy of object for every frame"}, - {OB_DUPLIVERTS, "VERTS", 0, "Verts", "Duplicate child objects on all vertices"}, - {OB_DUPLIFACES, "FACES", 0, "Faces", "Duplicate child objects on all faces"}, - {OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing"}, + {OB_DUPLIFRAMES, "FRAMES", 0, N_("Frames"), N_("Make copy of object for every frame")}, + {OB_DUPLIVERTS, "VERTS", 0, N_("Verts"), N_("Duplicate child objects on all vertices")}, + {OB_DUPLIFACES, "FACES", 0, N_("Faces"), N_("Duplicate child objects on all faces")}, + {OB_DUPLIGROUP, "GROUP", 0, N_("Group"), N_("Enable group instancing")}, {0, NULL, 0, NULL, NULL}}; // XXX: this RNA enum define is currently duplicated for objects, since there is some text here which is not applicable static EnumPropertyItem prop_rotmode_items[] = { - {ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock"}, - {ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order. Prone to Gimbal Lock. (Default)"}, - {ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order. Prone to Gimbal Lock"}, - {ROT_MODE_YXZ, "YXZ", 0, "YXZ Euler", "YXZ Rotation Order. Prone to Gimbal Lock"}, - {ROT_MODE_YZX, "YZX", 0, "YZX Euler", "YZX Rotation Order. Prone to Gimbal Lock"}, - {ROT_MODE_ZXY, "ZXY", 0, "ZXY Euler", "ZXY Rotation Order. Prone to Gimbal Lock"}, - {ROT_MODE_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order. Prone to Gimbal Lock"}, - {ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector"}, + {ROT_MODE_QUAT, "QUATERNION", 0, N_("Quaternion (WXYZ)"), N_("No Gimbal Lock")}, + {ROT_MODE_XYZ, "XYZ", 0, N_("XYZ Euler"), N_("XYZ Rotation Order. Prone to Gimbal Lock. (Default)")}, + {ROT_MODE_XZY, "XZY", 0, N_("XZY Euler"), N_("XZY Rotation Order. Prone to Gimbal Lock")}, + {ROT_MODE_YXZ, "YXZ", 0, N_("YXZ Euler"), N_("YXZ Rotation Order. Prone to Gimbal Lock")}, + {ROT_MODE_YZX, "YZX", 0, N_("YZX Euler"), N_("YZX Rotation Order. Prone to Gimbal Lock")}, + {ROT_MODE_ZXY, "ZXY", 0, N_("ZXY Euler"), N_("ZXY Rotation Order. Prone to Gimbal Lock")}, + {ROT_MODE_ZYX, "ZYX", 0, N_("ZYX Euler"), N_("ZYX Rotation Order. Prone to Gimbal Lock")}, + {ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, N_("Axis Angle"), N_("Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector")}, {0, NULL, 0, NULL, NULL}}; static float default_quat[4] = {1,0,0,0}; /* default quaternion values */ @@ -1776,7 +1777,7 @@ static void rna_def_object(BlenderRNA *brna) static int boundbox_dimsize[]= {8, 3}; srna= RNA_def_struct(brna, "Object", "ID"); - RNA_def_struct_ui_text(srna, "Object", "Object datablock defining an object in a scene"); + RNA_def_struct_ui_text(srna, N_("Object"), N_("Object datablock defining an object in a scene")); RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT); RNA_def_struct_ui_icon(srna, ICON_OBJECT_DATA); @@ -1784,32 +1785,32 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_struct_type(prop, "ID"); RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_data_set", "rna_Object_data_typef", NULL); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK); - RNA_def_property_ui_text(prop, "Data", "Object data"); + RNA_def_property_ui_text(prop, N_("Data"), N_("Object data")); RNA_def_property_update(prop, 0, "rna_Object_internal_update_data"); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, object_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Type", "Type of Object"); + RNA_def_property_ui_text(prop, N_("Type"), N_("Type of Object")); prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, object_mode_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Mode", "Object interaction mode"); + RNA_def_property_ui_text(prop, N_("Mode"), N_("Object interaction mode")); prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER); RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); RNA_def_property_array(prop, 20); - RNA_def_property_ui_text(prop, "Layers", "Layers the object is on"); + RNA_def_property_ui_text(prop, N_("Layers"), N_("Layers the object is on")); RNA_def_property_boolean_funcs(prop, NULL, "rna_Object_layer_set"); RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_layer_update"); prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); - RNA_def_property_ui_text(prop, "Select", "Object selection state"); + RNA_def_property_ui_text(prop, N_("Select"), N_("Object selection state")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_select_update"); /* for data access */ @@ -1817,32 +1818,32 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_multi_array(prop, 2, boundbox_dimsize); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_float_funcs(prop, "rna_Object_boundbox_get", NULL, NULL); - RNA_def_property_ui_text(prop, "Bound Box", "Objects bound box in object-space coordinates, all values are -1.0 when not available."); + RNA_def_property_ui_text(prop, N_("Bound Box"), N_("Objects bound box in object-space coordinates, all values are -1.0 when not available.")); /* parent */ prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_parent_set", NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); - RNA_def_property_ui_text(prop, "Parent", "Parent Object"); + RNA_def_property_ui_text(prop, N_("Parent"), N_("Parent Object")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update"); prop= RNA_def_property(srna, "parent_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "partype"); RNA_def_property_enum_items(prop, parent_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_Object_parent_type_set", "rna_Object_parent_type_itemf"); - RNA_def_property_ui_text(prop, "Parent Type", "Type of parent relation"); + RNA_def_property_ui_text(prop, N_("Parent Type"), N_("Type of parent relation")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update"); prop= RNA_def_property(srna, "parent_vertices", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "par1"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Parent Vertices", "Indices of vertices in cases of a vertex parenting relation"); + RNA_def_property_ui_text(prop, N_("Parent Vertices"), N_("Indices of vertices in cases of a vertex parenting relation")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "parent_bone", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "parsubstr"); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Object_parent_bone_set"); - RNA_def_property_ui_text(prop, "Parent Bone", "Name of parent bone in case of a bone parenting relation"); + RNA_def_property_ui_text(prop, N_("Parent Bone"), N_("Name of parent bone in case of a bone parenting relation")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update"); /* Track and Up flags */ @@ -1850,41 +1851,41 @@ static void rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "trackflag"); RNA_def_property_enum_items(prop, track_items); - RNA_def_property_ui_text(prop, "Track Axis", "Axis that points in 'forward' direction (applies to DupliFrame when parent 'Follow' is enabled)"); + RNA_def_property_ui_text(prop, N_("Track Axis"), N_("Axis that points in 'forward' direction (applies to DupliFrame when parent 'Follow' is enabled)")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "upflag"); RNA_def_property_enum_items(prop, up_items); - RNA_def_property_ui_text(prop, "Up Axis", "Axis that points in the upward direction (applies to DupliFrame when parent 'Follow' is enabled)"); + RNA_def_property_ui_text(prop, N_("Up Axis"), N_("Axis that points in the upward direction (applies to DupliFrame when parent 'Follow' is enabled)")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); /* proxy */ prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE); - RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls"); + RNA_def_property_ui_text(prop, N_("Proxy"), N_("Library object this proxy object controls")); prop= RNA_def_property(srna, "proxy_group", PROP_POINTER, PROP_NONE); - RNA_def_property_ui_text(prop, "Proxy Group", "Library group duplicator object this proxy object controls"); + RNA_def_property_ui_text(prop, N_("Proxy Group"), N_("Library group duplicator object this proxy object controls")); /* materials */ prop= RNA_def_property(srna, "material_slots", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol"); RNA_def_property_struct_type(prop, "MaterialSlot"); RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", NULL, NULL, NULL); /* don't dereference pointer! */ - RNA_def_property_ui_text(prop, "Material Slots", "Material slots in the object"); + RNA_def_property_ui_text(prop, N_("Material Slots"), N_("Material slots in the object")); prop= RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Material"); RNA_def_property_pointer_funcs(prop, "rna_Object_active_material_get", "rna_Object_active_material_set", NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Active Material", "Active material being displayed"); + RNA_def_property_ui_text(prop, N_("Active Material"), N_("Active material being displayed")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_MaterialSlot_update"); prop= RNA_def_property(srna, "active_material_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "actcol"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_funcs(prop, "rna_Object_active_material_index_get", "rna_Object_active_material_index_set", "rna_Object_active_material_index_range"); - RNA_def_property_ui_text(prop, "Active Material Index", "Index of active material slot"); + RNA_def_property_ui_text(prop, N_("Active Material Index"), N_("Index of active material slot")); RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL); /* transform */ @@ -1892,14 +1893,14 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "loc"); RNA_def_property_editable_array_func(prop, "rna_Object_location_editable"); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3); - RNA_def_property_ui_text(prop, "Location", "Location of the object"); + RNA_def_property_ui_text(prop, N_("Location"), N_("Location of the object")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION); RNA_def_property_float_sdna(prop, NULL, "quat"); RNA_def_property_editable_array_func(prop, "rna_Object_rotation_4d_editable"); RNA_def_property_float_array_default(prop, default_quat); - RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions"); + RNA_def_property_ui_text(prop, N_("Quaternion Rotation"), N_("Rotation in Quaternions")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); /* XXX: for axis-angle, it would have been nice to have 2 separate fields for UI purposes, but @@ -1910,20 +1911,20 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_float_funcs(prop, "rna_Object_rotation_axis_angle_get", "rna_Object_rotation_axis_angle_set", NULL); RNA_def_property_editable_array_func(prop, "rna_Object_rotation_4d_editable"); RNA_def_property_float_array_default(prop, default_axisAngle); - RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation"); + RNA_def_property_ui_text(prop, N_("Axis-Angle Rotation"), N_("Angle of Rotation for Axis-Angle rotation representation")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER); RNA_def_property_float_sdna(prop, NULL, "rot"); RNA_def_property_editable_array_func(prop, "rna_Object_rotation_euler_editable"); - RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers"); + RNA_def_property_ui_text(prop, N_("Euler Rotation"), N_("Rotation in Eulers")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rotmode"); RNA_def_property_enum_items(prop, prop_rotmode_items); // XXX move to using a single define of this someday RNA_def_property_enum_funcs(prop, NULL, "rna_Object_rotation_mode_set", NULL); - RNA_def_property_ui_text(prop, "Rotation Mode", ""); + RNA_def_property_ui_text(prop, N_("Rotation Mode"), ""); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ); @@ -1931,59 +1932,59 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_editable_array_func(prop, "rna_Object_scale_editable"); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3); RNA_def_property_float_array_default(prop, default_scale); - RNA_def_property_ui_text(prop, "Scale", "Scaling of the object"); + RNA_def_property_ui_text(prop, N_("Scale"), N_("Scaling of the object")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "dimensions", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_array(prop, 3); RNA_def_property_float_funcs(prop, "rna_Object_dimensions_get", "rna_Object_dimensions_set", NULL); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3); - RNA_def_property_ui_text(prop, "Dimensions", "Absolute bounding box dimensions of the object"); + RNA_def_property_ui_text(prop, N_("Dimensions"), N_("Absolute bounding box dimensions of the object")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); /* delta transforms */ prop= RNA_def_property(srna, "delta_location", PROP_FLOAT, PROP_TRANSLATION); RNA_def_property_float_sdna(prop, NULL, "dloc"); - RNA_def_property_ui_text(prop, "Delta Location", "Extra translation added to the location of the object"); + RNA_def_property_ui_text(prop, N_("Delta Location"), N_("Extra translation added to the location of the object")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "delta_rotation_euler", PROP_FLOAT, PROP_EULER); RNA_def_property_float_sdna(prop, NULL, "drot"); - RNA_def_property_ui_text(prop, "Delta Rotation (Euler)", "Extra rotation added to the rotation of the object (when using Euler rotations)"); + RNA_def_property_ui_text(prop, N_("Delta Rotation (Euler)"), N_("Extra rotation added to the rotation of the object (when using Euler rotations)")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "delta_rotation_quaternion", PROP_FLOAT, PROP_QUATERNION); RNA_def_property_float_sdna(prop, NULL, "dquat"); RNA_def_property_float_array_default(prop, default_quat); - RNA_def_property_ui_text(prop, "Delta Rotation (Quaternion)", "Extra rotation added to the rotation of the object (when using Quaternion rotations)"); + RNA_def_property_ui_text(prop, N_("Delta Rotation (Quaternion)"), N_("Extra rotation added to the rotation of the object (when using Quaternion rotations)")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); #if 0 // XXX not supported well yet... prop= RNA_def_property(srna, "delta_rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE); RNA_def_property_float_sdna(prop, NULL, "dquat"); // FIXME: this is not a single field any more! (drotAxis and drotAngle) RNA_def_property_float_array_default(prop, default_axisAngle); - RNA_def_property_ui_text(prop, "Delta Rotation (Axis Angle)", "Extra rotation added to the rotation of the object (when using Axis-Angle rotations)"); + RNA_def_property_ui_text(prop, N_("Delta Rotation (Axis Angle)"), N_("Extra rotation added to the rotation of the object (when using Axis-Angle rotations)")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); #endif prop= RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "dsize"); - RNA_def_property_ui_text(prop, "Delta Scale", "Extra scaling added to the scale of the object"); + RNA_def_property_ui_text(prop, N_("Delta Scale"), N_("Extra scaling added to the scale of the object")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); /* transform locks */ prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ); RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface"); + RNA_def_property_ui_text(prop, N_("Lock Location"), N_("Lock editing of location in the interface")); RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ); RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface"); + RNA_def_property_ui_text(prop, N_("Lock Rotation"), N_("Lock editing of rotation in the interface")); RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); @@ -1991,16 +1992,16 @@ static void rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTW); RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1); - RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)", "Lock editing of 'angle' component of four-component rotations in the interface"); + RNA_def_property_ui_text(prop, N_("Lock Rotation (4D Angle)"), N_("Lock editing of 'angle' component of four-component rotations in the interface")); // XXX this needs a better name prop= RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROT4D); - RNA_def_property_ui_text(prop, "Lock Rotations (4D)", "Lock editing of four component rotations by components (instead of as Eulers)"); + RNA_def_property_ui_text(prop, N_("Lock Rotations (4D)"), N_("Lock editing of four component rotations by components (instead of as Eulers)")); prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ); RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface"); + RNA_def_property_ui_text(prop, N_("Lock Scale"), N_("Lock editing of scale in the interface")); RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); @@ -2009,33 +2010,33 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "obmat"); RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_ui_text(prop, "Matrix World", "Worldspace transformation matrix"); + RNA_def_property_ui_text(prop, N_("Matrix World"), N_("Worldspace transformation matrix")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_matrix_world_update"); prop= RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX); RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_ui_text(prop, "Local Matrix", "Parent relative transformation matrix"); + RNA_def_property_ui_text(prop, N_("Local Matrix"), N_("Parent relative transformation matrix")); RNA_def_property_float_funcs(prop, "rna_Object_matrix_local_get", "rna_Object_matrix_local_set", NULL); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL); prop= RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX); RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_ui_text(prop, "Input Matrix", "Matrix access to location, rotation and scale (including deltas), before constraints and parenting are applied."); + RNA_def_property_ui_text(prop, N_("Input Matrix"), N_("Matrix access to location, rotation and scale (including deltas), before constraints and parenting are applied.")); RNA_def_property_float_funcs(prop, "rna_Object_matrix_basis_get", "rna_Object_matrix_basis_set", NULL); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); /* collections */ prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "Constraint"); - RNA_def_property_ui_text(prop, "Constraints", "Constraints affecting the transformation of the object"); + RNA_def_property_ui_text(prop, N_("Constraints"), N_("Constraints affecting the transformation of the object")); // RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, 0, "constraints__add", "constraints__remove"); rna_def_object_constraints(brna, prop); prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "Modifier"); - RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the object"); + RNA_def_property_ui_text(prop, N_("Modifiers"), N_("Modifiers affecting the geometric data of the object")); rna_def_object_modifiers(brna, prop); /* game engine */ @@ -2043,44 +2044,44 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "GameObjectSettings"); RNA_def_property_pointer_funcs(prop, "rna_Object_game_settings_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Game Settings", "Game engine related settings for the object"); + RNA_def_property_ui_text(prop, N_("Game Settings"), N_("Game engine related settings for the object")); /* vertex groups */ prop= RNA_def_property(srna, "vertex_groups", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "defbase", NULL); RNA_def_property_struct_type(prop, "VertexGroup"); - RNA_def_property_ui_text(prop, "Vertex Groups", "Vertex groups of the object"); + RNA_def_property_ui_text(prop, N_("Vertex Groups"), N_("Vertex groups of the object")); rna_def_object_vertex_groups(brna, prop); /* empty */ prop= RNA_def_property(srna, "empty_draw_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "empty_drawtype"); RNA_def_property_enum_items(prop, empty_drawtype_items); - RNA_def_property_ui_text(prop, "Empty Display Type", "Viewport display style for empties"); + RNA_def_property_ui_text(prop, N_("Empty Display Type"), N_("Viewport display style for empties")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "empty_draw_size", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "empty_drawsize"); RNA_def_property_range(prop, 0.0001f, 1000.0f); RNA_def_property_ui_range(prop, 0.01, 100, 1, 2); - RNA_def_property_ui_text(prop, "Empty Display Size", "Size of display for empties in the viewport"); + RNA_def_property_ui_text(prop, N_("Empty Display Size"), N_("Size of display for empties in the viewport")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "empty_image_offset", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "ima_ofs"); - RNA_def_property_ui_text(prop, "Origin Offset", "Origin offset distance"); + RNA_def_property_ui_text(prop, N_("Origin Offset"), N_("Origin offset distance")); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 0.1f, 2); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); /* render */ prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "index"); - RNA_def_property_ui_text(prop, "Pass Index", "Index # for the IndexOB render pass"); + RNA_def_property_ui_text(prop, N_("Pass Index"), N_("Index # for the IndexOB render pass")); RNA_def_property_update(prop, NC_OBJECT, NULL); prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "col"); - RNA_def_property_ui_text(prop, "Color", "Object color and alpha, used when faces have the ObColor mode enabled"); + RNA_def_property_ui_text(prop, N_("Color"), N_("Object color and alpha, used when faces have the ObColor mode enabled")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); /* physics */ @@ -2088,41 +2089,41 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "pd"); RNA_def_property_struct_type(prop, "FieldSettings"); RNA_def_property_pointer_funcs(prop, "rna_Object_field_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Field Settings", "Settings for using the objects as a field in physics simulation"); + RNA_def_property_ui_text(prop, N_("Field Settings"), N_("Settings for using the objects as a field in physics simulation")); prop= RNA_def_property(srna, "collision", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "pd"); RNA_def_property_struct_type(prop, "CollisionSettings"); RNA_def_property_pointer_funcs(prop, "rna_Object_collision_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Collision Settings", "Settings for using the objects as a collider in physics simulation"); + RNA_def_property_ui_text(prop, N_("Collision Settings"), N_("Settings for using the objects as a collider in physics simulation")); prop= RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "soft"); RNA_def_property_struct_type(prop, "SoftBodySettings"); - RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for soft body simulation"); + RNA_def_property_ui_text(prop, N_("Soft Body Settings"), N_("Settings for soft body simulation")); prop= RNA_def_property(srna, "particle_systems", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "particlesystem", NULL); RNA_def_property_struct_type(prop, "ParticleSystem"); - RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object"); + RNA_def_property_ui_text(prop, N_("Particle Systems"), N_("Particle systems emitted from the object")); rna_def_object_particle_systems(brna, prop); /* restrict */ prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW); - RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport"); + RNA_def_property_ui_text(prop, N_("Restrict View"), N_("Restrict visibility in the viewport")); RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_SELECT); - RNA_def_property_ui_text(prop, "Restrict Select", "Restrict selection in the viewport"); + RNA_def_property_ui_text(prop, N_("Restrict Select"), N_("Restrict selection in the viewport")); RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 1); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_RENDER); - RNA_def_property_ui_text(prop, "Restrict Render", "Restrict renderability"); + RNA_def_property_ui_text(prop, N_("Restrict Render"), N_("Restrict renderability")); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); @@ -2136,73 +2137,73 @@ static void rna_def_object(BlenderRNA *brna) // XXX: evil old crap prop= RNA_def_property(srna, "use_slow_parent", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "partype", PARSLOW); - RNA_def_property_ui_text(prop, "Slow Parent", "Create a delay in the parent relationship"); + RNA_def_property_ui_text(prop, N_("Slow Parent"), N_("Create a delay in the parent relationship")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "dupli_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "transflag"); RNA_def_property_enum_items(prop, dupli_items); - RNA_def_property_ui_text(prop, "Dupli Type", "If not None, object duplication method to use"); + RNA_def_property_ui_text(prop, N_("Dupli Type"), N_("If not None, object duplication method to use")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update"); prop= RNA_def_property(srna, "use_dupli_frames_speed", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "transflag", OB_DUPLINOSPEED); - RNA_def_property_ui_text(prop, "Dupli Frames Speed", "Set dupliframes to use the frame"); // TODO, better descriptio! + RNA_def_property_ui_text(prop, N_("Dupli Frames Speed"), N_("Set dupliframes to use the frame")); // TODO, better descriptio! RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "use_dupli_vertices_rotation", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT); - RNA_def_property_ui_text(prop, "Dupli Verts Rotation", "Rotate dupli according to vertex normal"); + RNA_def_property_ui_text(prop, N_("Dupli Verts Rotation"), N_("Rotate dupli according to vertex normal")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "use_dupli_faces_scale", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIFACES_SCALE); - RNA_def_property_ui_text(prop, "Dupli Faces Inherit Scale", "Scale dupli based on face size"); + RNA_def_property_ui_text(prop, N_("Dupli Faces Inherit Scale"), N_("Scale dupli based on face size")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "dupli_faces_scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dupfacesca"); RNA_def_property_range(prop, 0.001f, 10000.0f); - RNA_def_property_ui_text(prop, "Dupli Faces Scale", "Scale the DupliFace objects"); + RNA_def_property_ui_text(prop, N_("Dupli Faces Scale"), N_("Scale the DupliFace objects")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "dup_group"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_dup_group_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Dupli Group", "Instance an existing group"); + RNA_def_property_ui_text(prop, N_("Dupli Group"), N_("Instance an existing group")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update"); prop= RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE|PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupsta"); RNA_def_property_range(prop, MINAFRAME, MAXFRAME); - RNA_def_property_ui_text(prop, "Dupli Frames Start", "Start frame for DupliFrames"); + RNA_def_property_ui_text(prop, N_("Dupli Frames Start"), N_("Start frame for DupliFrames")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE|PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupend"); RNA_def_property_range(prop, MINAFRAME, MAXFRAME); - RNA_def_property_ui_text(prop, "Dupli Frames End", "End frame for DupliFrames"); + RNA_def_property_ui_text(prop, N_("Dupli Frames End"), N_("End frame for DupliFrames")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "dupli_frames_on", PROP_INT, PROP_NONE|PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupon"); RNA_def_property_range(prop, MINFRAME, MAXFRAME); RNA_def_property_ui_range(prop, 1, 1500, 1, 0); - RNA_def_property_ui_text(prop, "Dupli Frames On", "Number of frames to use between DupOff frames"); + RNA_def_property_ui_text(prop, N_("Dupli Frames On"), N_("Number of frames to use between DupOff frames")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "dupli_frames_off", PROP_INT, PROP_NONE|PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupoff"); RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_range(prop, 0, 1500, 1, 0); - RNA_def_property_ui_text(prop, "Dupli Frames Off", "Recurring frames to exclude from the Dupliframes"); + RNA_def_property_ui_text(prop, N_("Dupli Frames Off"), N_("Recurring frames to exclude from the Dupliframes")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "dupli_list", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "duplilist", NULL); RNA_def_property_struct_type(prop, "DupliObject"); - RNA_def_property_ui_text(prop, "Dupli list", "Object duplis"); + RNA_def_property_ui_text(prop, N_("Dupli list"), N_("Object duplis")); prop= RNA_def_property(srna, "is_duplicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLI); @@ -2212,74 +2213,74 @@ static void rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_TIME); RNA_def_property_float_sdna(prop, NULL, "sf"); RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF); - RNA_def_property_ui_text(prop, "Time Offset", "Animation offset in frames for F-Curve and dupligroup instances"); + RNA_def_property_ui_text(prop, N_("Time Offset"), N_("Animation offset in frames for F-Curve and dupligroup instances")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "use_time_offset_edit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_OB); - RNA_def_property_ui_text(prop, "Time Offset Edit", "Use time offset when inserting keys and display time offset for F-Curve and action views"); + RNA_def_property_ui_text(prop, N_("Time Offset Edit"), N_("Use time offset when inserting keys and display time offset for F-Curve and action views")); prop= RNA_def_property(srna, "use_time_offset_parent", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARENT); - RNA_def_property_ui_text(prop, "Time Offset Parent", "Apply the time offset to this objects parent relationship"); + RNA_def_property_ui_text(prop, N_("Time Offset Parent"), N_("Apply the time offset to this objects parent relationship")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "use_time_offset_particle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARTICLE); - RNA_def_property_ui_text(prop, "Time Offset Particle", "Let the time offset work on the particle effect"); + RNA_def_property_ui_text(prop, N_("Time Offset Particle"), N_("Let the time offset work on the particle effect")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); prop= RNA_def_property(srna, "use_time_offset_add_parent", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARENTADD); - RNA_def_property_ui_text(prop, "Time Offset Add Parent", "Add the parents time offset value"); + RNA_def_property_ui_text(prop, N_("Time Offset Add Parent"), N_("Add the parents time offset value")); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); /* drawing */ prop= RNA_def_property(srna, "draw_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "dt"); RNA_def_property_enum_items(prop, drawtype_items); - RNA_def_property_ui_text(prop, "Maximum Draw Type", "Maximum draw type to display object with in viewport"); + RNA_def_property_ui_text(prop, N_("Maximum Draw Type"), N_("Maximum draw type to display object with in viewport")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "show_bounds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_BOUNDBOX); - RNA_def_property_ui_text(prop, "Draw Bounds", "Displays the object's bounds"); + RNA_def_property_ui_text(prop, N_("Draw Bounds"), N_("Displays the object's bounds")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "draw_bounds_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "boundtype"); RNA_def_property_enum_items(prop, boundtype_items); - RNA_def_property_ui_text(prop, "Draw Bounds Type", "Object boundary display type"); + RNA_def_property_ui_text(prop, N_("Draw Bounds Type"), N_("Object boundary display type")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "show_name", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWNAME); - RNA_def_property_ui_text(prop, "Draw Name", "Displays the object's name"); + RNA_def_property_ui_text(prop, N_("Draw Name"), N_("Displays the object's name")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "show_axis", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_AXIS); - RNA_def_property_ui_text(prop, "Draw Axis", "Displays the object's origin and axis"); + RNA_def_property_ui_text(prop, N_("Draw Axis"), N_("Displays the object's origin and axis")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "show_texture_space", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_TEXSPACE); - RNA_def_property_ui_text(prop, "Draw Texture Space", "Displays the object's texture space"); + RNA_def_property_ui_text(prop, N_("Draw Texture Space"), N_("Displays the object's texture space")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "show_wire", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWWIRE); - RNA_def_property_ui_text(prop, "Draw Wire", "Adds the object's wireframe over solid drawing"); + RNA_def_property_ui_text(prop, N_("Draw Wire"), N_("Adds the object's wireframe over solid drawing")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "show_transparent", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWTRANSP); - RNA_def_property_ui_text(prop, "Draw Transparent", "Displays material transparency in the object (unsupported for duplicator drawing)"); + RNA_def_property_ui_text(prop, N_("Draw Transparent"), N_("Displays material transparency in the object")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "show_x_ray", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWXRAY); - RNA_def_property_ui_text(prop, "X-Ray", "Makes the object draw in front of others (unsupported for duplicator drawing)"); + RNA_def_property_ui_text(prop, N_("X-Ray"), N_("Makes the object draw in front of others")); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); /* Grease Pencil */ @@ -2287,43 +2288,43 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "gpd"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "GreasePencil"); - RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock"); + RNA_def_property_ui_text(prop, N_("Grease Pencil Data"), N_("Grease Pencil datablock")); /* pose */ prop= RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "poselib"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Action"); - RNA_def_property_ui_text(prop, "Pose Library", "Action used as a pose library for armatures"); + RNA_def_property_ui_text(prop, N_("Pose Library"), N_("Action used as a pose library for armatures")); prop= RNA_def_property(srna, "pose", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "pose"); RNA_def_property_struct_type(prop, "Pose"); - RNA_def_property_ui_text(prop, "Pose", "Current pose for armatures"); + RNA_def_property_ui_text(prop, N_("Pose"), N_("Current pose for armatures")); /* shape keys */ prop= RNA_def_property(srna, "show_only_shape_key", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shapeflag", OB_SHAPE_LOCK); - RNA_def_property_ui_text(prop, "Shape Key Lock", "Always show the current Shape for this Object"); + RNA_def_property_ui_text(prop, N_("Shape Key Lock"), N_("Always show the current Shape for this Object")); RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); RNA_def_property_update(prop, 0, "rna_Object_internal_update_data"); prop= RNA_def_property(srna, "use_shape_key_edit_mode", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shapeflag", OB_SHAPE_EDIT_MODE); - RNA_def_property_ui_text(prop, "Shape Key Edit Mode", "Apply shape keys in edit mode (for Meshes only)"); + RNA_def_property_ui_text(prop, N_("Shape Key Edit Mode"), N_("Apply shape keys in edit mode (for Meshes only)")); RNA_def_property_ui_icon(prop, ICON_EDITMODE_HLT, 0); RNA_def_property_update(prop, 0, "rna_Object_internal_update_data"); prop= RNA_def_property(srna, "active_shape_key", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "ShapeKey"); RNA_def_property_pointer_funcs(prop, "rna_Object_active_shape_key_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Active Shape Key", "Current shape key"); + RNA_def_property_ui_text(prop, N_("Active Shape Key"), N_("Current shape key")); prop= RNA_def_property(srna, "active_shape_key_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "shapenr"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); // XXX this is really unpredictable... RNA_def_property_int_funcs(prop, "rna_Object_active_shape_key_index_get", "rna_Object_active_shape_key_index_set", "rna_Object_active_shape_key_index_range"); - RNA_def_property_ui_text(prop, "Active Shape Key Index", "Current shape key index"); + RNA_def_property_ui_text(prop, N_("Active Shape Key Index"), N_("Current shape key index")); RNA_def_property_update(prop, 0, "rna_Object_active_shape_update"); RNA_api_object(srna); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index ca679239dd3..9714b51a986 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -33,6 +33,8 @@ #include "rna_internal.h" +#include "BLF_api.h" + #include "DNA_cloth_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" @@ -1047,19 +1049,19 @@ static void rna_def_field(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem field_type_items[] = { - {0, "NONE", 0, "None", ""}, - {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", "Gives a radial field toward the center of object"}, - {PFIELD_WIND, "WIND", ICON_FORCE_WIND, "Wind", "Gives a constant force along the force objects local Z axis"}, - {PFIELD_VORTEX, "VORTEX", ICON_FORCE_VORTEX, "Vortex", "Gives a spiraling force that twists the force objects local Z axis"}, - {PFIELD_MAGNET, "MAGNET", ICON_FORCE_MAGNETIC, "Magnetic", "Forcefield depends on the speed of the particles"}, - {PFIELD_HARMONIC, "HARMONIC", ICON_FORCE_HARMONIC, "Harmonic", "The source of this force field is the zero point of a harmonic oscillator"}, - {PFIELD_CHARGE, "CHARGE", ICON_FORCE_CHARGE, "Charge", "Spherical forcefield based on the charge of particles, only influences other charge force fields"}, - {PFIELD_LENNARDJ, "LENNARDJ", ICON_FORCE_LENNARDJONES, "Lennard-Jones", "Forcefield based on the Lennard-Jones potential"}, - {PFIELD_TEXTURE, "TEXTURE", ICON_FORCE_TEXTURE, "Texture", "Forcefield based on a texture"}, - {PFIELD_GUIDE, "GUIDE", ICON_FORCE_CURVE, "Curve Guide", "Creates a force along a curve object"}, - {PFIELD_BOID, "BOID", ICON_FORCE_BOID, "Boid", ""}, - {PFIELD_TURBULENCE, "TURBULENCE", ICON_FORCE_TURBULENCE, "Turbulence", "Creates turbulence with a noise field"}, - {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, "Drag", "Creates a force that dampens motion"}, + {0, "NONE", 0, N_("None"), ""}, + {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, N_("Force"), N_("Gives a radial field toward the center of object")}, + {PFIELD_WIND, "WIND", ICON_FORCE_WIND, N_("Wind"), N_("Gives a constant force along the force objects local Z axis")}, + {PFIELD_VORTEX, "VORTEX", ICON_FORCE_VORTEX, N_("Vortex"), N_("Gives a spiraling force that twists the force objects local Z axis")}, + {PFIELD_MAGNET, "MAGNET", ICON_FORCE_MAGNETIC, N_("Magnetic"), N_("Forcefield depends on the speed of the particles")}, + {PFIELD_HARMONIC, "HARMONIC", ICON_FORCE_HARMONIC, N_("Harmonic"), N_("The source of this force field is the zero point of a harmonic oscillator")}, + {PFIELD_CHARGE, "CHARGE", ICON_FORCE_CHARGE, N_("Charge"), N_("Spherical forcefield based on the charge of particles, only influences other charge force fields")}, + {PFIELD_LENNARDJ, "LENNARDJ", ICON_FORCE_LENNARDJONES, N_("Lennard-Jones"), N_("Forcefield based on the Lennard-Jones potential")}, + {PFIELD_TEXTURE, "TEXTURE", ICON_FORCE_TEXTURE, N_("Texture"), N_("Forcefield based on a texture")}, + {PFIELD_GUIDE, "GUIDE", ICON_FORCE_CURVE, N_("Curve Guide"), N_("Creates a force along a curve object")}, + {PFIELD_BOID, "BOID", ICON_FORCE_BOID, N_("Boid"), ""}, + {PFIELD_TURBULENCE, "TURBULENCE", ICON_FORCE_TURBULENCE, N_("Turbulence"), N_("Creates turbulence with a noise field")}, + {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, N_("Drag"), N_("Creates a force that dampens motion")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem falloff_items[] = { diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index e3e3296cb70..4c6b8d10aea 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -36,6 +36,8 @@ #include "rna_internal.h" +#include "BLF_api.h" + #include "RE_pipeline.h" #include "BKE_utildefines.h" @@ -52,10 +54,10 @@ /* RenderEngine */ static RenderEngineType internal_render_type = { - NULL, NULL, "BLENDER_RENDER", "Blender Render", RE_INTERNAL, NULL, {NULL, NULL, NULL, NULL}}; + NULL, NULL, "BLENDER_RENDER", N_("Blender Render"), RE_INTERNAL, NULL, {NULL, NULL, NULL, NULL}}; #ifdef WITH_GAMEENGINE static RenderEngineType internal_game_type = { - NULL, NULL, "BLENDER_GAME", "Blender Game", RE_INTERNAL|RE_GAME, NULL, {NULL, NULL, NULL, NULL}}; + NULL, NULL, "BLENDER_GAME", N_("Blender Game"), RE_INTERNAL|RE_GAME, NULL, {NULL, NULL, NULL, NULL}}; #endif ListBase R_engines = {NULL, NULL}; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index f4028e45e96..7508b84a0d0 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -60,6 +60,7 @@ #include "WM_types.h" #include "BLI_threads.h" +#include "BLF_api.h" EnumPropertyItem snap_target_items[] = { {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target"}, @@ -1187,7 +1188,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) /* Grease Pencil */ prop = RNA_def_property(srna, "use_grease_pencil_sessions", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINTSESSIONS_ON); - RNA_def_property_ui_text(prop, "Use Sketching Sessions", "Allow drawing multiple strokes at a time with Grease Pencil"); + RNA_def_property_ui_text(prop, N_("Use Sketching Sessions"), N_("Allow drawing multiple strokes at a time with Grease Pencil")); RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); // xxx: need toolbar to be redrawn... /* Auto Keying */ @@ -1985,61 +1986,61 @@ static void rna_def_scene_render_data(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem pixel_filter_items[] ={ - {R_FILTER_BOX, "BOX", 0, "Box", "Use a box filter for anti-aliasing"}, - {R_FILTER_TENT, "TENT", 0, "Tent", "Use a tent filter for anti-aliasing"}, - {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", "Use a quadratic filter for anti-aliasing"}, - {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", "Use a cubic filter for anti-aliasing"}, - {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", "Use a Catmull-Rom filter for anti-aliasing"}, - {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", "Use a Gaussian filter for anti-aliasing"}, - {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", "Use a Mitchell-Netravali filter for anti-aliasing"}, + {R_FILTER_BOX, "BOX", 0, N_("Box"), N_("Use a box filter for anti-aliasing")}, + {R_FILTER_TENT, "TENT", 0, N_("Tent"), N_("Use a tent filter for anti-aliasing")}, + {R_FILTER_QUAD, "QUADRATIC", 0, N_("Quadratic"), N_("Use a quadratic filter for anti-aliasing")}, + {R_FILTER_CUBIC, "CUBIC", 0, N_("Cubic"), N_("Use a cubic filter for anti-aliasing")}, + {R_FILTER_CATROM, "CATMULLROM", 0, N_("Catmull-Rom"), N_("Use a Catmull-Rom filter for anti-aliasing")}, + {R_FILTER_GAUSS, "GAUSSIAN", 0, N_("Gaussian"), N_("Use a Gaussian filter for anti-aliasing")}, + {R_FILTER_MITCH, "MITCHELL", 0, N_("Mitchell-Netravali"), N_("Use a Mitchell-Netravali filter for anti-aliasing")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem alpha_mode_items[] ={ - {R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"}, - {R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"}, - {R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"}, + {R_ADDSKY, "SKY", 0, N_("Sky"), N_("Transparent pixels are filled with sky color")}, + {R_ALPHAPREMUL, "PREMUL", 0, N_("Premultiplied"), N_("Transparent RGB pixels are multiplied by the alpha channel")}, + {R_ALPHAKEY, "STRAIGHT", 0, N_("Straight Alpha"), N_("Transparent RGB and alpha pixels are unmodified")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem color_mode_items[] ={ - {R_PLANESBW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"}, - {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"}, - {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"}, + {R_PLANESBW, "BW", 0, "BW", N_("Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)")}, + {R_PLANES24, "RGB", 0, "RGB", N_("Images are saved with RGB (color) data")}, + {R_PLANES32, "RGBA", 0, "RGBA", N_("Images are saved with RGB and Alpha data (if supported)")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem display_mode_items[] ={ - {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"}, - {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"}, - {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"}, - {R_OUTPUT_NONE, "NONE", 0, "Keep UI", "Images are rendered without forcing UI changes, optionally showing result"}, + {R_OUTPUT_SCREEN, "SCREEN", 0, N_("Full Screen"), N_("Images are rendered in full Screen")}, + {R_OUTPUT_AREA, "AREA", 0, N_("Image Editor"), N_("Images are rendered in Image Editor")}, + {R_OUTPUT_WINDOW, "WINDOW", 0, N_("New Window"), N_("Images are rendered in new Window")}, + {R_OUTPUT_NONE, "NONE", 0, N_("Keep UI"), N_("Images are rendered without forcing UI changes, optionally showing result")}, {0, NULL, 0, NULL, NULL}}; /* Bake */ static EnumPropertyItem bake_mode_items[] ={ - {RE_BAKE_ALL, "FULL", 0, "Full Render", "Bake everything"}, - {RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"}, - {RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", "Bake shadows"}, - {RE_BAKE_NORMALS, "NORMALS", 0, "Normals", "Bake normals"}, - {RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", "Bake textures"}, - {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Bake displacement"}, - {RE_BAKE_EMIT, "EMIT", 0, "Emission", "Bake Emit values (glow)"}, - {RE_BAKE_ALPHA, "ALPHA", 0, "Alpha", "Bake Alpha values (transparency)"}, - {RE_BAKE_MIRROR_INTENSITY, "MIRROR_INTENSITY", 0, "Mirror Intensity", "Bake Mirror values"}, - {RE_BAKE_MIRROR_COLOR, "MIRROR_COLOR", 0, "Mirror Colors", "Bake Mirror colors"}, - {RE_BAKE_SPEC_INTENSITY, "SPEC_INTENSITY", 0, "Specular Intensity", "Bake Specular values"}, - {RE_BAKE_SPEC_COLOR, "SPEC_COLOR", 0, "Specular Colors", "Bake Specular colors"}, + {RE_BAKE_ALL, "FULL", 0, N_("Full Render"), N_("Bake everything")}, + {RE_BAKE_AO, "AO", 0, N_("Ambient Occlusion"), N_("Bake ambient occlusion")}, + {RE_BAKE_SHADOW, "SHADOW", 0, N_("Shadow"), N_("Bake shadows")}, + {RE_BAKE_NORMALS, "NORMALS", 0, N_("Normals"), N_("Bake normals")}, + {RE_BAKE_TEXTURE, "TEXTURE", 0, N_("Textures"), N_("Bake textures")}, + {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, N_("Displacement"), N_("Bake displacement")}, + {RE_BAKE_EMIT, "EMIT", 0, N_("Emission"), N_("Bake Emit values (glow)")}, + {RE_BAKE_ALPHA, "ALPHA", 0, N_("Alpha"), N_("Bake Alpha values (transparency)")}, + {RE_BAKE_MIRROR_INTENSITY, "MIRROR_INTENSITY", 0, N_("Mirror Intensity"), N_("Bake Mirror values")}, + {RE_BAKE_MIRROR_COLOR, "MIRROR_COLOR", 0, N_("Mirror Colors"), N_("Bake Mirror colors")}, + {RE_BAKE_SPEC_INTENSITY, "SPEC_INTENSITY", 0, N_("Specular Intensity"), N_("Bake Specular values")}, + {RE_BAKE_SPEC_COLOR, "SPEC_COLOR", 0, N_("Specular Colors"), N_("Bake Specular colors")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem bake_normal_space_items[] ={ - {R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", "Bake the normals in camera space"}, - {R_BAKE_SPACE_WORLD, "WORLD", 0, "World", "Bake the normals in world space"}, - {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"}, - {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"}, + {R_BAKE_SPACE_CAMERA, "CAMERA", 0, N_("Camera"), N_("Bake the normals in camera space")}, + {R_BAKE_SPACE_WORLD, "WORLD", 0, N_("World"), N_("Bake the normals in world space")}, + {R_BAKE_SPACE_OBJECT, "OBJECT", 0, N_("Object"), N_("Bake the normals in object space")}, + {R_BAKE_SPACE_TANGENT, "TANGENT", 0, N_("Tangent"), N_("Bake the normals in tangent space")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem bake_qyad_split_items[] ={ - {0, "AUTO", 0, "Automatic", "Split quads to give the least distortion while baking"}, - {1, "FIXED", 0, "Fixed", "Split quads predictably (0,1,2) (0,2,3)"}, - {2, "FIXED_ALT", 0, "Fixed Alternate", "Split quads predictably (1,2,3) (1,3,0)"}, + {0, "AUTO", 0, N_("Automatic"), N_("Split quads to give the least distortion while baking")}, + {1, "FIXED", 0, N_("Fixed"), N_("Split quads predictably (0,1,2) (0,2,3)")}, + {2, "FIXED_ALT", 0, N_("Fixed Alternate"), N_("Split quads predictably (1,2,3) (1,3,0)")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem octree_resolution_items[] = { @@ -2050,12 +2051,12 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem raytrace_structure_items[] = { - {R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", "Automatically select acceleration structure"}, - {R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree structure"}, - {R_RAYSTRUCTURE_BLIBVH, "BLIBVH", 0, "BLI BVH", "Use BLI K-Dop BVH.c"}, - {R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", "Use vBVH"}, - {R_RAYSTRUCTURE_SIMD_SVBVH, "SIMD_SVBVH", 0, "SIMD SVBVH", "Use SIMD SVBVH"}, - {R_RAYSTRUCTURE_SIMD_QBVH, "SIMD_QBVH", 0, "SIMD QBVH", "Use SIMD QBVH"}, + {R_RAYSTRUCTURE_AUTO, "AUTO", 0, N_("Auto"), N_("Automatically select acceleration structure")}, + {R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, N_("Octree"), N_("Use old Octree structure")}, + {R_RAYSTRUCTURE_BLIBVH, "BLIBVH", 0, "BLI BVH", N_("Use BLI K-Dop BVH.c")}, + {R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", N_("Use vBVH")}, + {R_RAYSTRUCTURE_SIMD_SVBVH, "SIMD_SVBVH", 0, "SIMD SVBVH", N_("Use SIMD SVBVH")}, + {R_RAYSTRUCTURE_SIMD_QBVH, "SIMD_QBVH", 0, "SIMD QBVH", N_("Use SIMD QBVH")}, {0, NULL, 0, NULL, NULL} }; @@ -2067,18 +2068,18 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem field_order_items[] = { - {0, "EVEN_FIRST", 0, "Upper First", "Upper field first"}, - {R_ODDFIELD, "ODD_FIRST", 0, "Lower First", "Lower field first"}, + {0, "EVEN_FIRST", 0, N_("Upper First"), N_("Upper field first")}, + {R_ODDFIELD, "ODD_FIRST", 0, N_("Lower First"), N_("Lower field first")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem threads_mode_items[] = { - {0, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"}, - {R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"}, + {0, "AUTO", 0, N_("Auto-detect"), N_("Automatically determine the number of threads, based on CPUs")}, + {R_FIXED_THREADS, "FIXED", 0, N_("Fixed"), N_("Manually determine the number of threads")}, {0, NULL, 0, NULL, NULL}}; #ifdef WITH_OPENEXR static EnumPropertyItem exr_codec_items[] = { - {0, "NONE", 0, "None", ""}, + {0, "NONE", 0, N_("None"), ""}, {1, "PXR24", 0, "Pxr24 (lossy)", ""}, {2, "ZIP", 0, "ZIP (lossless)", ""}, {3, "PIZ", 0, "PIZ (lossless)", ""}, @@ -2088,20 +2089,20 @@ static void rna_def_scene_render_data(BlenderRNA *brna) #ifdef WITH_OPENJPEG static EnumPropertyItem jp2_preset_items[] = { - {0, "NO_PRESET", 0, "No Preset", ""}, - {1, "CINE_24FPS", 0, "Cinema 24fps 2048x1080", ""}, - {2, "CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""}, - {3, "CINE_24FPS_4K", 0, "Cinema 24fps 4096x2160", ""}, - {4, "CINE_SCOPE_24FPS", 0, "Cine-Scope 24fps 2048x858", ""}, - {5, "CINE_SCOPE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""}, - {6, "CINE_FLAT_24FPS", 0, "Cine-Flat 24fps 1998x1080", ""}, - {7, "CINE_FLAT_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""}, + {0, "NO_PRESET", 0, N_("No Preset"), ""}, + {1, "CINE_24FPS", 0, N_("Cinema 24fps 2048x1080"), ""}, + {2, "CINE_48FPS", 0, N_("Cinema 48fps 2048x1080"), ""}, + {3, "CINE_24FPS_4K", 0, N_("Cinema 24fps 4096x2160"), ""}, + {4, "CINE_SCOPE_24FPS", 0, N_("Cine-Scope 24fps 2048x858"), ""}, + {5, "CINE_SCOPE_48FPS", 0, N_("Cine-Scope 48fps 2048x858"), ""}, + {6, "CINE_FLAT_24FPS", 0, N_("Cine-Flat 24fps 1998x1080"), ""}, + {7, "CINE_FLAT_48FPS", 0, N_("Cine-Flat 48fps 1998x1080"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem jp2_depth_items[] = { - {8, "8", 0, "8", "8 bit color channels"}, - {12, "12", 0, "12", "12 bit color channels"}, - {16, "16", 0, "16", "16 bit color channels"}, + {8, "8", 0, "8", N_("8 bit color channels")}, + {12, "12", 0, "12", N_("12 bit color channels")}, + {16, "16", 0, "16", N_("16 bit color channels")}, {0, NULL, 0, NULL, NULL}}; #endif @@ -2183,62 +2184,62 @@ static void rna_def_scene_render_data(BlenderRNA *brna) #endif static EnumPropertyItem engine_items[] = { - {0, "BLENDER_RENDER", 0, "Blender Render", "Use the Blender internal rendering engine for rendering"}, + {0, "BLENDER_RENDER", 0, N_("Blender Render"), N_("Use the Blender internal rendering engine for rendering")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "RenderSettings", NULL); RNA_def_struct_sdna(srna, "RenderData"); RNA_def_struct_nested(brna, srna, "Scene"); RNA_def_struct_path_func(srna, "rna_RenderSettings_path"); - RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock"); + RNA_def_struct_ui_text(srna, N_("Render Data"), N_("Rendering settings for a Scene datablock")); prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes"); RNA_def_property_enum_items(prop, color_mode_items); - RNA_def_property_ui_text(prop, "Color Mode", "Choose BW for saving greyscale images, RGB for saving red, green and blue channels, AND RGBA for saving red, green, blue + alpha channels"); + RNA_def_property_ui_text(prop, N_("Color Mode"), N_("Choose BW for saving greyscale images, RGB for saving red, green and blue channels, AND RGBA for saving red, green, blue + alpha channels")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "xsch"); RNA_def_property_range(prop, 4, 10000); - RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image"); + RNA_def_property_ui_text(prop, N_("Resolution X"), N_("Number of horizontal pixels in the rendered image")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ysch"); RNA_def_property_range(prop, 4, 10000); - RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image"); + RNA_def_property_ui_text(prop, N_("Resolution Y"), N_("Number of vertical pixels in the rendered image")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE); RNA_def_property_int_sdna(prop, NULL, "size"); RNA_def_property_range(prop, 1, SHRT_MAX); RNA_def_property_ui_range(prop, 1, 100, 10, 1); - RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution"); + RNA_def_property_ui_text(prop, N_("Resolution %"), N_("Percentage scale for render resolution")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "xparts"); RNA_def_property_range(prop, 1, 512); - RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering"); + RNA_def_property_ui_text(prop, N_("Parts X"), N_("Number of horizontal tiles to use while rendering")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "yparts"); RNA_def_property_range(prop, 1, 512); - RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering"); + RNA_def_property_ui_text(prop, N_("Parts Y"), N_("Number of vertical tiles to use while rendering")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xasp"); RNA_def_property_range(prop, 1.0f, 200.0f); - RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output"); + RNA_def_property_ui_text(prop, N_("Pixel Aspect X"), N_("Horizontal aspect ratio - for anamorphic or non-square pixel output")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "yasp"); RNA_def_property_range(prop, 1.0f, 200.0f); - RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output"); + RNA_def_property_ui_text(prop, N_("Pixel Aspect Y"), N_("Vertical aspect ratio - for anamorphic or non-square pixel output")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* JPEG and AVI JPEG */ @@ -2246,39 +2247,39 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "file_quality", PROP_INT, PROP_PERCENTAGE); RNA_def_property_int_sdna(prop, NULL, "quality"); RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */ - RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies, Compression for PNG's"); + RNA_def_property_ui_text(prop, N_("Quality"), N_("Quality of JPEG images, AVI Jpeg and SGI movies, Compression for PNG's")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* Tiff */ prop= RNA_def_property(srna, "use_tiff_16bit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT); - RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel"); + RNA_def_property_ui_text(prop, "16 Bit", N_("Save TIFF with 16 bits per channel")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* Cineon and DPX */ prop= RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_CINEON_LOG); - RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space"); + RNA_def_property_ui_text(prop, N_("Log"), N_("Convert to logarithmic color space")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "cineonblack"); RNA_def_property_range(prop, 0, 1024); - RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint"); + RNA_def_property_ui_text(prop, "B", N_("Log conversion reference blackpoint")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "cineonwhite"); RNA_def_property_range(prop, 0, 1024); - RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint"); + RNA_def_property_ui_text(prop, "W", N_("Log conversion reference whitepoint")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cineongamma"); RNA_def_property_range(prop, 0.0f, 10.0f); - RNA_def_property_ui_text(prop, "G", "Log conversion gamma"); + RNA_def_property_ui_text(prop, "G", N_("Log conversion gamma")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); #ifdef WITH_OPENEXR @@ -2287,22 +2288,22 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "quality"); RNA_def_property_enum_items(prop, exr_codec_items); - RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR"); + RNA_def_property_ui_text(prop, N_("Codec"), N_("Codec settings for OpenEXR")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_exr_half", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF); - RNA_def_property_ui_text(prop, "Half", "Use 16 bit floats instead of 32 bit floats per channel"); + RNA_def_property_ui_text(prop, N_("Half"), N_("Use 16 bit floats instead of 32 bit floats per channel")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "exr_zbuf", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_ZBUF); - RNA_def_property_ui_text(prop, "Zbuf", "Save the z-depth per pixel (32 bit unsigned int z-buffer)"); + RNA_def_property_ui_text(prop, N_("Zbuf"), N_("Save the z-depth per pixel (32 bit unsigned int z-buffer)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "exr_preview", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG); - RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory"); + RNA_def_property_ui_text(prop, N_("Preview"), N_("When rendering animations, save JPG preview images in same directory")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); #endif @@ -2313,19 +2314,19 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "jp2_preset"); RNA_def_property_enum_items(prop, jp2_preset_items); RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_jpeg2k_preset_set", NULL); - RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000"); + RNA_def_property_ui_text(prop, N_("Preset"), N_("Use a DCI Standard preset for saving jpeg2000")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "jpeg2k_depth", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth"); RNA_def_property_enum_items(prop, jp2_depth_items); RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_jpeg2k_depth_set", NULL); - RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel"); + RNA_def_property_ui_text(prop, N_("Depth"), N_("Bit depth per channel")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC); - RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors"); + RNA_def_property_ui_text(prop, "YCC", N_("Save luminance-chrominance-chrominance channels instead of RGB colors")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); #endif @@ -2338,13 +2339,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_codecType_get", "rna_RenderSettings_qtcodecsettings_codecType_set", "rna_RenderSettings_qtcodecsettings_codecType_itemf"); - RNA_def_property_ui_text(prop, "Codec", "QuickTime codec type"); + RNA_def_property_ui_text(prop, N_("Codec"), N_("QuickTime codec type")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "quicktime_codec_spatial_quality", PROP_INT, PROP_PERCENTAGE); RNA_def_property_int_sdna(prop, NULL, "qtcodecsettings.codecSpatialQuality"); RNA_def_property_range(prop, 0, 100); - RNA_def_property_ui_text(prop, "Spatial quality", "Intra-frame spatial quality level"); + RNA_def_property_ui_text(prop, N_("Spatial quality"), N_("Intra-frame spatial quality level")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); #ifdef USE_QTKIT @@ -2354,35 +2355,35 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_audiocodecType_get", "rna_RenderSettings_qtcodecsettings_audiocodecType_set", "rna_RenderSettings_qtcodecsettings_audiocodecType_itemf"); - RNA_def_property_ui_text(prop, "Audio Codec", "QuickTime audio codec type"); + RNA_def_property_ui_text(prop, N_("Audio Codec"), N_("QuickTime audio codec type")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "quicktime_audio_samplerate", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "qtcodecsettings.audioSampleRate"); RNA_def_property_enum_items(prop, quicktime_audio_samplerate_items); - RNA_def_property_ui_text(prop, "Smp Rate", "Sample Rate"); + RNA_def_property_ui_text(prop, N_("Smp Rate"), N_("Sample Rate")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "quicktime_audio_bitdepth", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "qtcodecsettings.audioBitDepth"); RNA_def_property_enum_items(prop, quicktime_audio_bitdepth_items); - RNA_def_property_ui_text(prop, "Bit Depth", "Bit Depth"); + RNA_def_property_ui_text(prop, N_("Bit Depth"), N_("Bit Depth")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "quicktime_audio_resampling_hq", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "qtcodecsettings.audioCodecFlags", QTAUDIO_FLAG_RESAMPLE_NOHQ); - RNA_def_property_ui_text(prop, "HQ", "Use High Quality resampling algorithm"); + RNA_def_property_ui_text(prop, "HQ", N_("Use High Quality resampling algorithm")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "quicktime_audio_codec_isvbr", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "qtcodecsettings.audioCodecFlags", QTAUDIO_FLAG_CODEC_ISCBR); - RNA_def_property_ui_text(prop, "VBR", "Use Variable Bit Rate compression (improves quality at same bitrate)"); + RNA_def_property_ui_text(prop, "VBR", N_("Use Variable Bit Rate compression (improves quality at same bitrate)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "quicktime_audio_bitrate", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "qtcodecsettings.audioBitRate"); RNA_def_property_enum_items(prop, quicktime_audio_bitrate_items); - RNA_def_property_ui_text(prop, "Bitrate", "Compressed audio bitrate"); + RNA_def_property_ui_text(prop, "Bitrate", N_("Compressed audio bitrate")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); #endif #endif @@ -2393,85 +2394,85 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type"); RNA_def_property_enum_items(prop, ffmpeg_format_items); - RNA_def_property_ui_text(prop, "Format", "Output file format"); + RNA_def_property_ui_text(prop, N_("Format"), N_("Output file format")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_codec", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.codec"); RNA_def_property_enum_items(prop, ffmpeg_codec_items); - RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use"); + RNA_def_property_ui_text(prop, N_("Codec"), N_("FFMpeg codec to use")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate"); RNA_def_property_range(prop, 1, 14000); - RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate(kb/s)"); + RNA_def_property_ui_text(prop, N_("Bitrate"), N_("Video bitrate(kb/s)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_minrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_min_rate"); RNA_def_property_range(prop, 0, 9000); - RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate(kb/s)"); + RNA_def_property_ui_text(prop, N_("Min Rate"), N_("Rate control: min rate(kb/s)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_maxrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_max_rate"); RNA_def_property_range(prop, 1, 14000); - RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate(kb/s)"); + RNA_def_property_ui_text(prop, N_("Max Rate"), N_("Rate control: max rate(kb/s)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_muxrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_rate"); RNA_def_property_range(prop, 0, 100000000); - RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))"); + RNA_def_property_ui_text(prop, N_("Mux Rate"), N_("Mux rate (bits/s(!))")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_gopsize", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.gop_size"); RNA_def_property_range(prop, 0, 100); - RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames"); + RNA_def_property_ui_text(prop, N_("GOP Size"), N_("Distance between key frames")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_buffersize", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_buffer_size"); RNA_def_property_range(prop, 0, 2000); - RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)"); + RNA_def_property_ui_text(prop, N_("Buffersize"), N_("Rate control: buffer size (kb)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_packetsize", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_packet_size"); RNA_def_property_range(prop, 0, 16384); - RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)"); + RNA_def_property_ui_text(prop, N_("Mux Packet Size"), N_("Mux packet size (byte)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_autosplit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_AUTOSPLIT_OUTPUT); - RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary"); + RNA_def_property_ui_text(prop, N_("Autosplit Output"), N_("Autosplit output at 2GB boundary")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* FFMPEG Audio*/ prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec"); RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items); - RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use"); + RNA_def_property_ui_text(prop, N_("Audio Codec"), N_("FFMpeg audio codec to use")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate"); RNA_def_property_range(prop, 32, 384); - RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate(kb/s)"); + RNA_def_property_ui_text(prop, N_("Bitrate"), N_("Audio bitrate(kb/s)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_audio_mixrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_mixrate"); RNA_def_property_range(prop, 8000, 192000); - RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)"); + RNA_def_property_ui_text(prop, N_("Samplerate"), N_("Audio samplerate(samples/s)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "ffmpeg_audio_volume", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ffcodecdata.audio_volume"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Volume", "Audio volume"); + RNA_def_property_ui_text(prop, N_("Volume"), N_("Audio volume")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); #endif @@ -2480,14 +2481,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "frs_sec"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 1, 120); - RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second"); + RNA_def_property_ui_text(prop, N_("FPS"), N_("Framerate, expressed in frames per second")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "frs_sec_base"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.1f, 120.0f); - RNA_def_property_ui_text(prop, "FPS Base", "Framerate base"); + RNA_def_property_ui_text(prop, N_("FPS Base"), N_("Framerate base")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* frame mapping */ @@ -2495,136 +2496,136 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "framapto"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 1, 900); - RNA_def_property_ui_text(prop, "Frame Map Old", "Specify old mapping value in frames"); + RNA_def_property_ui_text(prop, N_("Frame Map Old"), N_("Specify old mapping value in frames")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update"); prop= RNA_def_property(srna, "frame_map_new", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "images"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 1, 900); - RNA_def_property_ui_text(prop, "Frame Map New", "Specify how many frames the Map Old will last"); + RNA_def_property_ui_text(prop, N_("Frame Map New"), N_("Specify how many frames the Map Old will last")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update"); prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dither_intensity"); RNA_def_property_range(prop, 0.0f, 2.0f); - RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding"); + RNA_def_property_ui_text(prop, N_("Dither Intensity"), N_("Amount of dithering noise added to the rendered image to break up banding")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "pixel_filter_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "filtertype"); RNA_def_property_enum_items(prop, pixel_filter_items); - RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples"); + RNA_def_property_ui_text(prop, N_("Pixel Filter"), N_("Reconstruction filter used for combining anti-aliasing samples")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "gauss"); RNA_def_property_range(prop, 0.5f, 1.5f); - RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples"); + RNA_def_property_ui_text(prop, N_("Filter Size"), N_("Pixel width over which the reconstruction filter combines samples")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "alphamode"); RNA_def_property_enum_items(prop, alpha_mode_items); - RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels"); + RNA_def_property_ui_text(prop, N_("Alpha Mode"), N_("Representation of alpha information in the RGBA pixels")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ocres"); RNA_def_property_enum_items(prop, octree_resolution_items); - RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes"); + RNA_def_property_ui_text(prop, N_("Octree Resolution"), N_("Resolution of raytrace accelerator. Use higher resolutions for larger scenes")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "raytrace_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "raytrace_structure"); RNA_def_property_enum_items(prop, raytrace_structure_items); - RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure"); + RNA_def_property_ui_text(prop, N_("Raytrace Acceleration Structure"), N_("Type of raytrace accelerator structure")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES); - RNA_def_property_ui_text(prop, "Use Instances", "Instance support leads to effective memory reduction when using duplicates"); + RNA_def_property_ui_text(prop, N_("Use Instances"), N_("Instance support leads to effective memory reduction when using duplicates")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS); - RNA_def_property_ui_text(prop, "Use Local Coords", "Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed"); + RNA_def_property_ui_text(prop, N_("Use Local Coords"), N_("Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA); - RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges"); + RNA_def_property_ui_text(prop, N_("Anti-Aliasing"), N_("Render and combine multiple samples per pixel to prevent jagged edges")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "osa"); RNA_def_property_enum_items(prop, fixed_oversample_items); - RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel"); + RNA_def_property_ui_text(prop, N_("Anti-Aliasing Samples"), N_("Amount of anti-aliasing samples per pixel")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS); - RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output"); + RNA_def_property_ui_text(prop, N_("Fields"), N_("Render image to two fields per frame, for interlaced TV output")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, field_order_items); - RNA_def_property_ui_text(prop, "Field Order", "Order of video fields. Select which lines get rendered first, to create smooth motion for TV output"); + RNA_def_property_ui_text(prop, N_("Field Order"), N_("Order of video fields. Select which lines get rendered first, to create smooth motion for TV output")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_fields_still", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL); - RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields"); + RNA_def_property_ui_text(prop, N_("Fields Still"), N_("Disable the time difference between fields")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* rendering features */ prop= RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW); - RNA_def_property_ui_text(prop, "Shadows", "Calculate shadows while rendering"); + RNA_def_property_ui_text(prop, N_("Shadows"), N_("Calculate shadows while rendering")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_envmaps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP); - RNA_def_property_ui_text(prop, "Environment Maps", "Calculate environment maps while rendering"); + RNA_def_property_ui_text(prop, N_("Environment Maps"), N_("Calculate environment maps while rendering")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_radiosity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO); - RNA_def_property_ui_text(prop, "Radiosity", "Calculate radiosity in a pre-process before rendering"); + RNA_def_property_ui_text(prop, N_("Radiosity"), N_("Calculate radiosity in a pre-process before rendering")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS); - RNA_def_property_ui_text(prop, "Subsurface Scattering", "Calculate sub-surface scattering in materials rendering"); + RNA_def_property_ui_text(prop, N_("Subsurface Scattering"), N_("Calculate sub-surface scattering in materials rendering")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE); - RNA_def_property_ui_text(prop, "Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects"); + RNA_def_property_ui_text(prop, N_("Raytracing"), N_("Pre-calculate the raytrace accelerator and render raytracing effects")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX); - RNA_def_property_ui_text(prop, "Textures", "Use textures to affect material properties"); + RNA_def_property_ui_text(prop, N_("Textures"), N_("Use textures to affect material properties")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE); - RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry"); + RNA_def_property_ui_text(prop, N_("Edge"), N_("Create a toon outline around the edges of geometry")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "edgeint"); RNA_def_property_range(prop, 0, 255); - RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges"); + RNA_def_property_ui_text(prop, N_("Edge Threshold"), N_("Threshold for drawing outlines on geometry edges")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "edgeR"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Edge Color", "Edge color"); + RNA_def_property_ui_text(prop, N_("Edge Color"), N_("Edge color")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* threads */ @@ -2632,148 +2633,148 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "threads"); RNA_def_property_range(prop, 1, BLENDER_MAX_THREADS); RNA_def_property_int_funcs(prop, "rna_RenderSettings_threads_get", NULL, NULL); - RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)"); + RNA_def_property_ui_text(prop, N_("Threads"), N_("Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, threads_mode_items); - RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used"); + RNA_def_property_ui_text(prop, N_("Threads Mode"), N_("Determine the amount of render threads used")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* motion blur */ prop= RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR); - RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur"); + RNA_def_property_ui_text(prop, N_("Motion Blur"), N_("Use multi-sampled 3D scene motion blur")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "mblur_samples"); RNA_def_property_range(prop, 1, 32); - RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene samples to take with motion blur"); + RNA_def_property_ui_text(prop, N_("Motion Samples"), N_("Number of scene samples to take with motion blur")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "blurfac"); RNA_def_property_range(prop, 0.01f, 10.0f); RNA_def_property_ui_range(prop, 0.01, 2.0f, 1, 0); - RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between shutter open and close"); + RNA_def_property_ui_text(prop, N_("Shutter"), N_("Time taken in frames between shutter open and close")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* border */ prop= RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER); - RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size. Note, this disables save_buffers and full_sample"); + RNA_def_property_ui_text(prop, N_("Border"), N_("Render a user-defined border region, within the frame size. Note, this disables save_buffers and full_sample")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "border.xmin"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Border Minimum X", "Sets minimum X value to for the render border"); + RNA_def_property_ui_text(prop, N_("Border Minimum X"), N_("Sets minimum X value to for the render border")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "border.ymin"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Border Minimum Y", "Sets minimum Y value for the render border"); + RNA_def_property_ui_text(prop, N_("Border Minimum Y"), N_("Sets minimum Y value for the render border")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "border.xmax"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Border Maximum X", "Sets maximum X value for the render border"); + RNA_def_property_ui_text(prop, N_("Border Maximum X"), N_("Sets maximum X value for the render border")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "border.ymax"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Border Maximum Y", "Sets maximum Y value for the render border"); + RNA_def_property_ui_text(prop, N_("Border Maximum Y"), N_("Sets maximum Y value for the render border")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_crop_to_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP); - RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size"); + RNA_def_property_ui_text(prop, N_("Crop to Border"), N_("Crop the rendered frame to the defined border size")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH); - RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch')"); + RNA_def_property_ui_text(prop, N_("Placeholders"), N_("Create empty placeholder files while rendering frames (similar to Unix 'touch')")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE); - RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering"); + RNA_def_property_ui_text(prop, N_("Overwrite"), N_("Overwrite existing files while rendering")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP); - RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if compositing nodes are enabled"); + RNA_def_property_ui_text(prop, N_("Compositing"), N_("Process the render result through the compositing pipeline, if compositing nodes are enabled")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ); - RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist"); + RNA_def_property_ui_text(prop, N_("Sequencer"), N_("Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_color_management", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT); - RNA_def_property_ui_text(prop, "Color Management", "Use linear workflow - gamma corrected imaging pipeline"); + RNA_def_property_ui_text(prop, N_("Color Management"), N_("Use linear workflow - gamma corrected imaging pipeline")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_RenderSettings_color_management_update"); prop= RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION); - RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)"); + RNA_def_property_ui_text(prop, N_("File Extensions"), N_("Add the file format extensions to the rendered file name (eg: filename + .jpg)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "imtype"); RNA_def_property_enum_items(prop, image_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_set", NULL); - RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as"); + RNA_def_property_ui_text(prop, N_("File Format"), N_("File format to save the rendered images as")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_SceneRender_file_ext_get", "rna_SceneRender_file_ext_length", NULL); - RNA_def_property_ui_text(prop, "Extension", "The file extension used for saving renders"); + RNA_def_property_ui_text(prop, N_("Extension"), N_("The file extension used for saving renders")); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop= RNA_def_property(srna, "is_movie_format", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_is_movie_fomat_get", NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Movie Format", "When true the format is a movie"); + RNA_def_property_ui_text(prop, N_("Movie Format"), N_("When true the format is a movie")); prop= RNA_def_property(srna, "use_free_image_textures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE); - RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing"); + RNA_def_property_ui_text(prop, N_("Free Image Textures"), N_("Free all image texture from memory after render, to save memory before compositing")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_free_unused_nodes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_COMP_FREE); - RNA_def_property_ui_text(prop, "Free Unused Nodes", "Free Nodes that are not used while compositing, to save memory"); + RNA_def_property_ui_text(prop, N_("Free Unused Nodes"), N_("Free Nodes that are not used while compositing, to save memory")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE); RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_save_buffers_get", NULL); - RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample)"); + RNA_def_property_ui_text(prop, N_("Save Buffers"), N_("Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample)")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_full_sample", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE); RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_full_sample_get", NULL); - RNA_def_property_ui_text(prop, "Full Sample","Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing"); + RNA_def_property_ui_text(prop, N_("Full Sample"),N_("Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode"); RNA_def_property_enum_items(prop, display_mode_items); - RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed"); + RNA_def_property_ui_text(prop, N_("Display"), N_("Select where rendered images will be displayed")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "pic"); - RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers"); + RNA_def_property_ui_text(prop, N_("Output Path"), N_("Directory/name to save animations, # characters defines the position and length of frame numbers")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* Bake */ @@ -2781,181 +2782,181 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode"); RNA_def_property_enum_items(prop, bake_mode_items); - RNA_def_property_ui_text(prop, "Bake Mode", "Choose shading information to bake into the image"); + RNA_def_property_ui_text(prop, N_("Bake Mode"), N_("Choose shading information to bake into the image")); prop= RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space"); RNA_def_property_enum_items(prop, bake_normal_space_items); - RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking"); + RNA_def_property_ui_text(prop, N_("Normal Space"), N_("Choose normal space for baking")); prop= RNA_def_property(srna, "bake_quad_split", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, bake_qyad_split_items); - RNA_def_property_ui_text(prop, "Quad Split", "Choose the method used to split a quad into 2 triangles for baking"); + RNA_def_property_ui_text(prop, N_("Quad Split"), N_("Choose the method used to split a quad into 2 triangles for baking")); prop= RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa"); RNA_def_property_enum_items(prop, fixed_oversample_items); - RNA_def_property_ui_text(prop, "Anti-Aliasing Level", ""); + RNA_def_property_ui_text(prop, N_("Anti-Aliasing Level"), ""); prop= RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE); - RNA_def_property_ui_text(prop, "Selected to Active", "Bake shading on the surface of selected objects to the active object"); + RNA_def_property_ui_text(prop, N_("Selected to Active"), N_("Bake shading on the surface of selected objects to the active object")); prop= RNA_def_property(srna, "use_bake_normalize", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE); - RNA_def_property_ui_text(prop, "Normalized", "With displacement normalize to the distance, with ambient occlusion normalize without using material settings"); + RNA_def_property_ui_text(prop, N_("Normalized"), N_("With displacement normalize to the distance, with ambient occlusion normalize without using material settings")); prop= RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR); - RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking"); + RNA_def_property_ui_text(prop, N_("Clear"), N_("Clear Images before baking")); prop= RNA_def_property(srna, "use_bake_antialiasing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA); - RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing"); + RNA_def_property_ui_text(prop, N_("Anti-Aliasing"), N_("Enables Anti-aliasing")); prop= RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "bake_filter"); - RNA_def_property_range(prop, 0, 64); - RNA_def_property_ui_text(prop, "Margin", "Amount of pixels to extend the baked result with, as post process filter"); + RNA_def_property_range(prop, 0, 32); + RNA_def_property_ui_text(prop, N_("Margin"), N_("Amount of pixels to extend the baked result with, as post process filter")); prop= RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "bake_maxdist"); RNA_def_property_range(prop, 0.0, 1000.0); - RNA_def_property_ui_text(prop, "Distance", "Maximum distance from active object to other object (in blender units"); + RNA_def_property_ui_text(prop, N_("Distance"), N_("Maximum distance from active object to other object (in blender units")); prop= RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "bake_biasdist"); RNA_def_property_range(prop, 0.0, 1000.0); - RNA_def_property_ui_text(prop, "Bias", "Bias towards faces further away from the object (in blender units)"); + RNA_def_property_ui_text(prop, N_("Bias"), N_("Bias towards faces further away from the object (in blender units)")); prop= RNA_def_property(srna, "use_bake_multires", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_MULTIRES); - RNA_def_property_ui_text(prop, "Bake from Multires", "Bake directly from multires object"); + RNA_def_property_ui_text(prop, N_("Bake from Multires"), N_("Bake directly from multires object")); prop= RNA_def_property(srna, "use_bake_lores_mesh", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_LORES_MESH); - RNA_def_property_ui_text(prop, "Low Resolution Mesh", "Calculate heights against unsubdivided low resolution mesh"); + RNA_def_property_ui_text(prop, N_("Low Resolution Mesh"), N_("Calculate heights against unsubdivided low resolution mesh")); /* stamp */ prop= RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME); - RNA_def_property_ui_text(prop, "Stamp Time", "Include the render frame as HH:MM:SS.FF in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Time"), N_("Include the render frame as HH:MM:SS.FF in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_date", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE); - RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Date"), N_("Include the current date in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_frame", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME); - RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Frame"), N_("Include the frame number in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_camera", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA); - RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Camera"), N_("Include the name of the active camera in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_lens", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERALENS); - RNA_def_property_ui_text(prop, "Stamp Lens", "Include the name of the active cameras lens in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Lens"), N_("Include the name of the active cameras lens in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_scene", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE); - RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Scene"), N_("Include the name of the active scene in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_note", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE); - RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Note"), N_("Include a custom note in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_marker", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER); - RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Marker"), N_("Include the name of the last marker in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_filename", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME); - RNA_def_property_ui_text(prop, "Stamp Filename", "Include the filename of the .blend file in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Filename"), N_("Include the filename of the .blend file in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_sequencer_strip", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP); - RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata"); + RNA_def_property_ui_text(prop, N_("Stamp Sequence Strip"), N_("Include the name of the foreground sequence strip in image metadata")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp_render_time", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_RENDERTIME); - RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render time in the stamp image"); + RNA_def_property_ui_text(prop, N_("Stamp Render Time"), N_("Include the render time in the stamp image")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "stamp_udata"); - RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note"); + RNA_def_property_ui_text(prop, N_("Stamp Note Text"), N_("Custom text to appear in the stamp note")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "use_stamp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW); - RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image"); + RNA_def_property_ui_text(prop, N_("Render Stamp"), N_("Render the stamp info text in the rendered image")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "stamp_font_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "stamp_font_id"); RNA_def_property_range(prop, 8, 64); - RNA_def_property_ui_text(prop, "Font Size", "Size of the font used when rendering stamp text"); + RNA_def_property_ui_text(prop, N_("Font Size"), N_("Size of the font used when rendering stamp text")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "fg_stamp"); RNA_def_property_array(prop, 4); RNA_def_property_range(prop,0.0,1.0); - RNA_def_property_ui_text(prop, "Stamp Text Color", "Color to use for stamp text"); + RNA_def_property_ui_text(prop, N_("Stamp Text Color"), N_("Color to use for stamp text")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "bg_stamp"); RNA_def_property_array(prop, 4); RNA_def_property_range(prop,0.0,1.0); - RNA_def_property_ui_text(prop, "Stamp Background", "Color to use behind stamp text"); + RNA_def_property_ui_text(prop, N_("Stamp Background"), N_("Color to use behind stamp text")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* sequencer draw options */ prop= RNA_def_property(srna, "use_sequencer_gl_preview", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_PREV); - RNA_def_property_ui_text(prop, "Sequencer OpenGL", ""); + RNA_def_property_ui_text(prop, N_("Sequencer OpenGL"), ""); prop= RNA_def_property(srna, "use_sequencer_gl_render", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_REND); - RNA_def_property_ui_text(prop, "Sequencer OpenGL", ""); + RNA_def_property_ui_text(prop, N_("Sequencer OpenGL"), ""); prop= RNA_def_property(srna, "sequencer_gl_preview", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "seq_prev_type"); RNA_def_property_enum_items(prop, viewport_shade_items); - RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view"); + RNA_def_property_ui_text(prop, N_("Sequencer Preview Shading"), N_("Method to draw in the sequencer view")); prop= RNA_def_property(srna, "sequencer_gl_render", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "seq_rend_type"); RNA_def_property_enum_items(prop, viewport_shade_items); - RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view"); + RNA_def_property_ui_text(prop, N_("Sequencer Preview Shading"), N_("Method to draw in the sequencer view")); /* layers */ prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "layers", NULL); RNA_def_property_struct_type(prop, "SceneRenderLayer"); - RNA_def_property_ui_text(prop, "Render Layers", ""); + RNA_def_property_ui_text(prop, N_("Render Layers"), ""); rna_def_render_layers(brna, prop); prop= RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER); - RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer"); + RNA_def_property_ui_text(prop, N_("Single Layer"), N_("Only render the active layer")); RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); @@ -2963,50 +2964,50 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, engine_items); RNA_def_property_enum_funcs(prop, "rna_RenderSettings_engine_get", "rna_RenderSettings_engine_set", "rna_RenderSettings_engine_itemf"); - RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering"); + RNA_def_property_ui_text(prop, N_("Engine"), N_("Engine to use for rendering")); RNA_def_property_update(prop, NC_WINDOW, NULL); prop= RNA_def_property(srna, "has_multiple_engines", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_multiple_engines_get", NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available"); + RNA_def_property_ui_text(prop, N_("Multiple Engines"), N_("More than one rendering engine is available")); prop= RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_game_engine_get", NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine"); + RNA_def_property_ui_text(prop, N_("Use Game Engine"), N_("Current rendering engine is a game engine")); /* simplify */ prop= RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SIMPLIFY); - RNA_def_property_ui_text(prop, "Use Simplify", "Enable simplification of scene for quicker preview renders"); + RNA_def_property_ui_text(prop, N_("Use Simplify"), N_("Enable simplification of scene for quicker preview renders")); RNA_def_property_update(prop, 0, "rna_Scene_use_simplify_update"); prop= RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf"); RNA_def_property_ui_range(prop, 0, 6, 1, 0); - RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level"); + RNA_def_property_ui_text(prop, N_("Simplify Subdivision"), N_("Global maximum subdivision level")); RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); prop= RNA_def_property(srna, "simplify_child_particles", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "simplify_particles"); - RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage"); + RNA_def_property_ui_text(prop, N_("Simplify Child Particles"), N_("Global child particles percentage")); RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); prop= RNA_def_property(srna, "simplify_shadow_samples", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "simplify_shadowsamples"); RNA_def_property_ui_range(prop, 1, 16, 1, 0); - RNA_def_property_ui_text(prop, "Simplify Shadow Samples", "Global maximum shadow samples"); + RNA_def_property_ui_text(prop, N_("Simplify Shadow Samples"), N_("Global maximum shadow samples")); RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); prop= RNA_def_property(srna, "simplify_ao_sss", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "simplify_aosss"); - RNA_def_property_ui_text(prop, "Simplify AO and SSS", "Global approximate AA and SSS quality factor"); + RNA_def_property_ui_text(prop, N_("Simplify AO and SSS"), N_("Global approximate AA and SSS quality factor")); RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); prop= RNA_def_property(srna, "use_simplify_triangulate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", R_SIMPLE_NO_TRIANGULATE); - RNA_def_property_ui_text(prop, "Skip Quad to Triangles", "Disables non-planer quads being triangulated"); + RNA_def_property_ui_text(prop, N_("Skip Quad to Triangles"), N_("Disables non-planer quads being triangulated")); /* Scene API */ RNA_api_scene_render(srna); @@ -3114,30 +3115,30 @@ static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "KeyingSets"); srna= RNA_def_struct(brna, "KeyingSets", NULL); RNA_def_struct_sdna(srna, "Scene"); - RNA_def_struct_ui_text(srna, "Keying Sets", "Scene keying sets"); + RNA_def_struct_ui_text(srna, N_("Keying Sets"), N_("Scene keying sets")); /* Add Keying Set */ func= RNA_def_function(srna, "new", "rna_Scene_keying_set_new"); - RNA_def_function_ui_description(func, "Add a new Keying Set to Scene."); + RNA_def_function_ui_description(func, N_("Add a new Keying Set to Scene.")); RNA_def_function_flag(func, FUNC_USE_REPORTS); /* name */ - RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set"); + RNA_def_string(func, "name", "KeyingSet", 64, N_("Name"), N_("Name of Keying Set")); /* returns the new KeyingSet */ - parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set."); + parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", N_("Newly created Keying Set.")); RNA_def_function_return(func, parm); prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "KeyingSet"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes"); + RNA_def_property_ui_text(prop, N_("Active Keying Set"), N_("Active Keying Set used to insert/delete keyframes")); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "active_keyingset"); RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL); - RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index (negative for 'builtin' and positive for 'absolute')"); + RNA_def_property_ui_text(prop, N_("Active Keying Set Index"), N_("Current Keying Set index (negative for 'builtin' and positive for 'absolute')")); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); } @@ -3149,7 +3150,7 @@ static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "KeyingSetsAll"); srna= RNA_def_struct(brna, "KeyingSetsAll", NULL); RNA_def_struct_sdna(srna, "Scene"); - RNA_def_struct_ui_text(srna, "Keying Sets All", "All available keying sets"); + RNA_def_struct_ui_text(srna, N_("Keying Sets All"), N_("All available keying sets")); /* NOTE: no add/remove available here, without screwing up this amalgamated list... */ @@ -3157,13 +3158,13 @@ static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_struct_type(prop, "KeyingSet"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes"); + RNA_def_property_ui_text(prop, N_("Active Keying Set"), N_("Active Keying Set used to insert/delete keyframes")); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "active_keyingset"); RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL); - RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index (negative for 'builtin' and positive for 'absolute')"); + RNA_def_property_ui_text(prop, N_("Active Keying Set Index"), N_("Current Keying Set index (negative for 'builtin' and positive for 'absolute')")); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); } @@ -3174,24 +3175,24 @@ void RNA_def_scene(BlenderRNA *brna) FunctionRNA *func; static EnumPropertyItem audio_distance_model_items[] = { - {0, "NONE", 0, "None", "No distance attenuation"}, - {1, "INVERSE", 0, "Inverse", "Inverse distance model"}, - {2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping"}, - {3, "LINEAR", 0, "Linear", "Linear distance model"}, - {4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance model with clamping"}, - {5, "EXPONENT", 0, "Exponent", "Exponent distance model"}, - {6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distance model with clamping"}, + {0, "NONE", 0, N_("None"), N_("No distance attenuation")}, + {1, "INVERSE", 0, N_("Inverse"), N_("Inverse distance model")}, + {2, "INVERSE_CLAMPED", 0, N_("Inverse Clamped"), N_("Inverse distance model with clamping")}, + {3, "LINEAR", 0, N_("Linear"), N_("Linear distance model")}, + {4, "LINEAR_CLAMPED", 0, N_("Linear Clamped"), N_("Linear distance model with clamping")}, + {5, "EXPONENT", 0, N_("Exponent"), N_("Exponent distance model")}, + {6, "EXPONENT_CLAMPED", 0, N_("Exponent Clamped"), N_("Exponent distance model with clamping")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem sync_mode_items[] = { - {0, "NONE", 0, "No Sync", "Do not sync, play every frame"}, - {SCE_FRAME_DROP, "FRAME_DROP", 0, "Frame Dropping", "Drop frames if playback is too slow"}, - {AUDIO_SYNC, "AUDIO_SYNC", 0, "AV-sync", "Sync to audio playback, dropping frames"}, + {0, "NONE", 0, N_("No Sync"), N_("Do not sync, play every frame")}, + {SCE_FRAME_DROP, "FRAME_DROP", 0, N_("Frame Dropping"), N_("Drop frames if playback is too slow")}, + {AUDIO_SYNC, "AUDIO_SYNC", 0, N_("AV-sync"), N_("Sync to audio playback, dropping frames")}, {0, NULL, 0, NULL, NULL}}; /* Struct definition */ srna= RNA_def_struct(brna, "Scene", "ID"); - RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings"); + RNA_def_struct_ui_text(srna, N_("Scene"), N_("Scene consisting objects and defining time and render related settings")); RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA); RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT); @@ -3199,7 +3200,7 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll"); - RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene"); + RNA_def_property_ui_text(prop, N_("Camera"), N_("Active camera used for rendering the scene")); RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_view3d_update"); prop= RNA_def_property(srna, "background_set", PROP_POINTER, PROP_NONE); @@ -3207,17 +3208,17 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Scene"); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Background Scene", "Background set scene"); + RNA_def_property_ui_text(prop, N_("Background Scene"), N_("Background set scene")); RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL); prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "World", "World used for rendering the scene"); + RNA_def_property_ui_text(prop, N_("World"), N_("World used for rendering the scene")); RNA_def_property_update(prop, NC_SCENE|ND_WORLD, NULL); prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_float_sdna(prop, NULL, "cursor"); - RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location"); + RNA_def_property_ui_text(prop, N_("Cursor Location"), N_("3D cursor location")); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4); RNA_def_property_update(prop, NC_WINDOW, NULL); @@ -3225,14 +3226,14 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "object_bases", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "base", NULL); RNA_def_property_struct_type(prop, "ObjectBase"); - RNA_def_property_ui_text(prop, "Bases", ""); + RNA_def_property_ui_text(prop, N_("Bases"), ""); RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, "rna_Scene_object_bases_lookup_string"); rna_def_scene_bases(brna, prop); prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "base", NULL); RNA_def_property_struct_type(prop, "Object"); - RNA_def_property_ui_text(prop, "Objects", ""); + RNA_def_property_ui_text(prop, N_("Objects"), ""); RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0); rna_def_scene_objects(brna, prop); @@ -3242,7 +3243,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); RNA_def_property_array(prop, 20); RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set"); - RNA_def_property_ui_text(prop, "Layers", "Layers visible when rendering the scene"); + RNA_def_property_ui_text(prop, N_("Layers"), N_("Layers visible when rendering the scene")); RNA_def_property_update(prop, NC_SCENE|ND_LAYER, "rna_Scene_layer_update"); /* Frame Range Stuff */ @@ -3251,13 +3252,13 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "r.cfra"); RNA_def_property_range(prop, MINAFRAME, MAXFRAME); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_current_frame_set", NULL); - RNA_def_property_ui_text(prop, "Current Frame", "Current Frame"); + RNA_def_property_ui_text(prop, N_("Current Frame"), N_("Current Frame")); RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update"); prop= RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "r.subframe"); - RNA_def_property_ui_text(prop, "Current Sub-Frame", ""); + RNA_def_property_ui_text(prop, N_("Current Sub-Frame"), ""); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE); prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME); @@ -3265,7 +3266,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "r.sfra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL); RNA_def_property_range(prop, MINFRAME, MAXFRAME); - RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playback/rendering range"); + RNA_def_property_ui_text(prop, N_("Start Frame"), N_("First frame of the playback/rendering range")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL); prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME); @@ -3273,7 +3274,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "r.efra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL); RNA_def_property_range(prop, MINFRAME, MAXFRAME); - RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback/rendering range"); + RNA_def_property_ui_text(prop, N_("End Frame"), N_("Final frame of the playback/rendering range")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL); prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME); @@ -3281,7 +3282,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "r.frame_step"); RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_range(prop, 1, 100, 1, 0); - RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame"); + RNA_def_property_ui_text(prop, N_("Frame Step"), N_("Number of frames to skip forward while rendering/playing back each frame")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); /* Preview Range (frame-range for UI playback) */ @@ -3289,7 +3290,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_PRV_RANGE); RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_preview_range_set"); - RNA_def_property_ui_text(prop, "Use Preview Range", "Use an alternative start/end frame for UI playback, rather than the scene start/end frame"); + RNA_def_property_ui_text(prop, N_("Use Preview Range"), N_("Use an alternative start/end frame for UI playback, rather than the scene start/end frame")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); RNA_def_property_ui_icon(prop, ICON_PREVIEW_RANGE, 0); @@ -3297,20 +3298,20 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_sdna(prop, NULL, "r.psfra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL); - RNA_def_property_ui_text(prop, "Preview Range Start Frame", "Alternative start frame for UI playback"); + RNA_def_property_ui_text(prop, N_("Preview Range Start Frame"), N_("Alternative start frame for UI playback")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); prop= RNA_def_property(srna, "frame_preview_end", PROP_INT, PROP_TIME); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_sdna(prop, NULL, "r.pefra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL); - RNA_def_property_ui_text(prop, "Preview Range End Frame", "Alternative end frame for UI playback"); + RNA_def_property_ui_text(prop, N_("Preview Range End Frame"), N_("Alternative end frame for UI playback")); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); /* Stamp */ prop= RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata"); - RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping"); + RNA_def_property_ui_text(prop, N_("Stamp Note"), N_("User define note for the render stamping")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* Animation Data (for Scene) */ @@ -3320,51 +3321,51 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "is_nla_tweakmode", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_NLA_EDIT_ON); RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */ - RNA_def_property_ui_text(prop, "NLA TweakMode", "Indicates whether there is any action referenced by NLA being edited. Strictly read-only"); + RNA_def_property_ui_text(prop, N_("NLA TweakMode"), N_("Indicates whether there is any action referenced by NLA being edited. Strictly read-only")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); /* Frame dropping flag for playback and sync enum */ prop= RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_FRAME_DROP); - RNA_def_property_ui_text(prop, "Frame Dropping", "Play back dropping frames if frame display is too slow"); + RNA_def_property_ui_text(prop, N_("Frame Dropping"), N_("Play back dropping frames if frame display is too slow")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "sync_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_funcs(prop, "rna_Scene_sync_mode_get", "rna_Scene_sync_mode_set", NULL); RNA_def_property_enum_items(prop, sync_mode_items); - RNA_def_property_ui_text(prop, "Sync Mode", "How to sync playback"); + RNA_def_property_ui_text(prop, N_("Sync Mode"), N_("How to sync playback")); RNA_def_property_update(prop, NC_SCENE, NULL); /* Nodes (Compositing) */ prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); - RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree"); + RNA_def_property_ui_text(prop, N_("Node Tree"), N_("Compositing node tree")); prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1); RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_nodes_set"); - RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree"); + RNA_def_property_ui_text(prop, N_("Use Nodes"), N_("Enable the compositing node tree")); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* Sequencer */ prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "ed"); RNA_def_property_struct_type(prop, "SequenceEditor"); - RNA_def_property_ui_text(prop, "Sequence Editor", ""); + RNA_def_property_ui_text(prop, N_("Sequence Editor"), ""); /* Keying Sets */ prop= RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL); RNA_def_property_struct_type(prop, "KeyingSet"); - RNA_def_property_ui_text(prop, "Absolute Keying Sets", "Absolute Keying Sets for this Scene"); + RNA_def_property_ui_text(prop, N_("Absolute Keying Sets"), N_("Absolute Keying Sets for this Scene")); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); rna_def_scene_keying_sets(brna, prop); prop= RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0); RNA_def_property_struct_type(prop, "KeyingSet"); - RNA_def_property_ui_text(prop, "All Keying Sets", "All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)"); + RNA_def_property_ui_text(prop, N_("All Keying Sets"), N_("All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)")); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); rna_def_scene_keying_sets_all(brna, prop); @@ -3373,26 +3374,26 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "toolsettings"); RNA_def_property_struct_type(prop, "ToolSettings"); - RNA_def_property_ui_text(prop, "Tool Settings", ""); + RNA_def_property_ui_text(prop, N_("Tool Settings"), ""); /* Unit Settings */ prop= RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "unit"); RNA_def_property_struct_type(prop, "UnitSettings"); - RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings"); + RNA_def_property_ui_text(prop, N_("Unit Settings"), N_("Unit editing settings")); /* Physics Settings */ prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION); RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -200.0f, 200.0f); - RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in a given direction"); + RNA_def_property_ui_text(prop, N_("Gravity"), N_("Constant acceleration in a given direction")); RNA_def_property_update(prop, 0, "rna_Physics_update"); prop= RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "physics_settings.flag", PHYS_GLOBAL_GRAVITY); - RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for all dynamics"); + RNA_def_property_ui_text(prop, N_("Global Gravity"), N_("Use global gravity for all dynamics")); RNA_def_property_update(prop, 0, "rna_Physics_update"); /* Render Data */ @@ -3400,47 +3401,47 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "r"); RNA_def_property_struct_type(prop, "RenderSettings"); - RNA_def_property_ui_text(prop, "Render Data", ""); + RNA_def_property_ui_text(prop, N_("Render Data"), ""); /* Markers */ prop= RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "markers", NULL); RNA_def_property_struct_type(prop, "TimelineMarker"); - RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene"); + RNA_def_property_ui_text(prop, N_("Timeline Markers"), N_("Markers used in all timelines for the current scene")); rna_def_timeline_markers(brna, prop); /* Audio Settings */ prop= RNA_def_property(srna, "use_audio", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_Scene_use_audio_get", "rna_Scene_use_audio_set"); - RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted"); + RNA_def_property_ui_text(prop, N_("Audio Muted"), N_("Play back of audio from Sequence Editor will be muted")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC); - RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio clock, dropping frames if frame display is too slow"); + RNA_def_property_ui_text(prop, N_("Audio Sync"), N_("Play back and sync with audio clock, dropping frames if frame display is too slow")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "use_audio_scrub", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB); - RNA_def_property_ui_text(prop, "Audio Scrubbing", "Play audio from Sequence Editor while scrubbing"); + RNA_def_property_ui_text(prop, N_("Audio Scrubbing"), N_("Play audio from Sequence Editor while scrubbing")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "audio_doppler_speed", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound"); RNA_def_property_range(prop, 0.01f, FLT_MAX); - RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for Doppler effect calculation"); + RNA_def_property_ui_text(prop, N_("Speed of Sound"), N_("Speed of sound for Doppler effect calculation")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "audio_doppler_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor"); RNA_def_property_range(prop, 0.0, FLT_MAX); - RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for Doppler effect calculation"); + RNA_def_property_ui_text(prop, N_("Doppler Factor"), N_("Pitch factor for Doppler effect calculation")); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "audio_distance_model", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model"); RNA_def_property_enum_items(prop, audio_distance_model_items); - RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation"); + RNA_def_property_ui_text(prop, N_("Distance Model"), N_("Distance model for distance attenuation calculation")); RNA_def_property_update(prop, NC_SCENE, NULL); /* Game Settings */ @@ -3448,7 +3449,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "gm"); RNA_def_property_struct_type(prop, "SceneGameData"); - RNA_def_property_ui_text(prop, "Game Data", ""); + RNA_def_property_ui_text(prop, N_("Game Data"), ""); /* Statistics */ func= RNA_def_function(srna, "statistics", "ED_info_stats_string"); @@ -3460,13 +3461,13 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "gpd"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "GreasePencil"); - RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock"); + RNA_def_property_ui_text(prop, N_("Grease Pencil Data"), N_("Grease Pencil datablock")); /* Transform Orientations */ prop= RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "transform_spaces", NULL); RNA_def_property_struct_type(prop, "TransformOrientation"); - RNA_def_property_ui_text(prop, "Transform Orientations", ""); + RNA_def_property_ui_text(prop, N_("Transform Orientations"), ""); /* Nestled Data */ rna_def_tool_settings(brna); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index b79d5395eec..68da28788de 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -34,6 +34,8 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "BLF_api.h" + #include "rna_internal.h" #include "BKE_key.h" @@ -49,57 +51,57 @@ #include "WM_types.h" EnumPropertyItem space_type_items[] = { - {SPACE_EMPTY, "EMPTY", 0, "Empty", ""}, - {SPACE_VIEW3D, "VIEW_3D", 0, "3D View", ""}, - {SPACE_IPO, "GRAPH_EDITOR", 0, "Graph Editor", ""}, - {SPACE_OUTLINER, "OUTLINER", 0, "Outliner", ""}, - {SPACE_BUTS, "PROPERTIES", 0, "Properties", ""}, - {SPACE_FILE, "FILE_BROWSER", 0, "File Browser", ""}, - {SPACE_IMAGE, "IMAGE_EDITOR", 0, "Image Editor", ""}, - {SPACE_INFO, "INFO", 0, "Info", ""}, - {SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""}, - {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""}, + {SPACE_EMPTY, "EMPTY", 0, N_("Empty"), ""}, + {SPACE_VIEW3D, "VIEW_3D", 0, N_("3D View"), ""}, + {SPACE_IPO, "GRAPH_EDITOR", 0, N_("Graph Editor"), ""}, + {SPACE_OUTLINER, "OUTLINER", 0, N_("Outliner"), ""}, + {SPACE_BUTS, "PROPERTIES", 0, N_("Properties"), ""}, + {SPACE_FILE, "FILE_BROWSER", 0, N_("File Browser"), ""}, + {SPACE_IMAGE, "IMAGE_EDITOR", 0, N_("Image Editor"), ""}, + {SPACE_INFO, "INFO", 0, N_("Info"), ""}, + {SPACE_SEQ, "SEQUENCE_EDITOR", 0, N_("Sequence Editor"), ""}, + {SPACE_TEXT, "TEXT_EDITOR", 0, N_("Text Editor"), ""}, //{SPACE_IMASEL, "IMAGE_BROWSER", 0, "Image Browser", ""}, - {SPACE_SOUND, "AUDIO_WINDOW", 0, "Audio Window", ""}, - {SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""}, - {SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""}, - {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, "Scripts Window", ""}, - {SPACE_TIME, "TIMELINE", 0, "Timeline", ""}, - {SPACE_NODE, "NODE_EDITOR", 0, "Node Editor", ""}, - {SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""}, - {SPACE_CONSOLE, "CONSOLE", 0, "Python Console", ""}, - {SPACE_USERPREF, "USER_PREFERENCES", 0, "User Preferences", ""}, + {SPACE_SOUND, "AUDIO_WINDOW", 0, N_("Audio Window"), ""}, + {SPACE_ACTION, "DOPESHEET_EDITOR", 0, N_("DopeSheet Editor"), ""}, + {SPACE_NLA, "NLA_EDITOR", 0, N_("NLA Editor"), ""}, + {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, N_("Scripts Window"), ""}, + {SPACE_TIME, "TIMELINE", 0, N_("Timeline"), ""}, + {SPACE_NODE, "NODE_EDITOR", 0, N_("Node Editor"), ""}, + {SPACE_LOGIC, "LOGIC_EDITOR", 0, N_("Logic Editor"), ""}, + {SPACE_CONSOLE, "CONSOLE", 0, N_("Python Console"), ""}, + {SPACE_USERPREF, "USER_PREFERENCES", 0, N_("User Preferences"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem draw_channels_items[] = { - {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"}, - {SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency"}, - {SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel"}, - {SI_SHOW_ZBUF, "Z_BUFFER", ICON_IMAGE_ZDEPTH, "Z-Buffer", "Draw Z-buffer associated with image (mapped from camera clip start to end)"}, + {0, "COLOR", ICON_IMAGE_RGB, N_("Color"), N_("Draw image with RGB colors")}, + {SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, N_("Color and Alpha"), N_("Draw image with RGB colors and alpha transparency")}, + {SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, N_("Alpha"), N_("Draw alpha transparency channel")}, + {SI_SHOW_ZBUF, "Z_BUFFER", ICON_IMAGE_ZDEPTH, N_("Z-Buffer"), N_("Draw Z-buffer associated with image (mapped from camera clip start to end)")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem transform_orientation_items[] = { - {V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", "Align the transformation axes to world space"}, - {V3D_MANIP_LOCAL, "LOCAL", 0, "Local", "Align the transformation axes to the selected objects' local space"}, - {V3D_MANIP_GIMBAL, "GIMBAL", 0, "Gimbal", "Align each axis to the Euler rotation axis as used for input"}, - {V3D_MANIP_NORMAL, "NORMAL", 0, "Normal", "Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)"}, - {V3D_MANIP_VIEW, "VIEW", 0, "View", "Align the transformation axes to the window"}, - {V3D_MANIP_CUSTOM, "CUSTOM", 0, "Custom", "Use a custom transform orientation"}, + {V3D_MANIP_GLOBAL, "GLOBAL", 0, N_("Global"), N_("Align the transformation axes to world space")}, + {V3D_MANIP_LOCAL, "LOCAL", 0, N_("Local"), N_("Align the transformation axes to the selected objects' local space")}, + {V3D_MANIP_GIMBAL, "GIMBAL", 0, N_("Gimbal"), N_("Align each axis to the Euler rotation axis as used for input")}, + {V3D_MANIP_NORMAL, "NORMAL", 0, N_("Normal"), N_("Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)")}, + {V3D_MANIP_VIEW, "VIEW", 0, N_("View"), N_("Align the transformation axes to the window")}, + {V3D_MANIP_CUSTOM, "CUSTOM", 0, N_("Custom"), N_("Use a custom transform orientation")}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem autosnap_items[] = { - {SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""}, - {SACTSNAP_STEP, "STEP", 0, "Time Step", "Snap to 1.0 frame/second intervals"}, - {SACTSNAP_FRAME, "FRAME", 0, "Nearest Frame", "Snap to actual frames/seconds (nla-action time)"}, - {SACTSNAP_MARKER, "MARKER", 0, "Nearest Marker", "Snap to nearest marker"}, + {SACTSNAP_OFF, "NONE", 0, N_("No Auto-Snap"), ""}, + {SACTSNAP_STEP, "STEP", 0, N_("Time Step"), N_("Snap to 1.0 frame/second intervals")}, + {SACTSNAP_FRAME, "FRAME", 0, N_("Nearest Frame"), N_("Snap to actual frames/seconds (nla-action time)")}, + {SACTSNAP_MARKER, "MARKER", 0, N_("Nearest Marker"), N_("Snap to nearest marker")}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem viewport_shade_items[] = { - {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"}, - {OB_WIRE, "WIREFRAME", ICON_WIRE, "Wireframe", "Display the object as wire edges"}, - {OB_SOLID, "SOLID", ICON_SOLID, "Solid", "Display the object solid, lit with default OpenGL lights"}, + {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, N_("Bounding Box"), N_("Display the object's local bounding boxes only")}, + {OB_WIRE, "WIREFRAME", ICON_WIRE, N_("Wireframe"), N_("Display the object as wire edges")}, + {OB_SOLID, "SOLID", ICON_SOLID, N_("Solid"), N_("Display the object solid, lit with default OpenGL lights")}, //{OB_SHADED, "SHADED", ICON_SMOOTH, "Shaded", "Display the object solid, with preview shading interpolated at vertices"}, - {OB_TEXTURE, "TEXTURED", ICON_POTATO, "Textured", "Display the object solid, with face-assigned textures"}, + {OB_TEXTURE, "TEXTURED", ICON_POTATO, N_("Textured"), N_("Display the object solid, with face-assigned textures")}, {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME @@ -851,14 +853,14 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, if(ob) { if(ob->type == OB_LAMP) { tmp.value = SB_TEXC_MAT_OR_LAMP; - tmp.description = "Show Lamp Textures"; + tmp.description = _("Show Lamp Textures"); tmp.identifier = "LAMP"; tmp.icon = ICON_LAMP_POINT; RNA_enum_item_add(&item, &totitem, &tmp); } else if(ob->totcol) { tmp.value = SB_TEXC_MAT_OR_LAMP; - tmp.description = "Show Material Textures"; + tmp.description = _("Show Material Textures"); tmp.identifier = "MATERIAL"; tmp.icon = ICON_MATERIAL; RNA_enum_item_add(&item, &totitem, &tmp); @@ -866,7 +868,7 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, if(ob->particlesystem.first) { tmp.value = SB_TEXC_PARTICLES; - tmp.description = "Show Particle Textures"; + tmp.description = _("Show Particle Textures"); tmp.identifier = "PARTICLE"; tmp.icon = ICON_PARTICLES; RNA_enum_item_add(&item, &totitem, &tmp); @@ -875,14 +877,14 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, if(scene && scene->world) { tmp.value = SB_TEXC_WORLD; - tmp.description = "Show World Textures"; + tmp.description = _("Show World Textures"); tmp.identifier = "WORLD"; tmp.icon = ICON_WORLD; RNA_enum_item_add(&item, &totitem, &tmp); } tmp.value = SB_TEXC_BRUSH; - tmp.description = "Show Brush Textures"; + tmp.description = _("Show Brush Textures"); tmp.identifier = "BRUSH"; tmp.icon = ICON_BRUSH_DATA; RNA_enum_item_add(&item, &totitem, &tmp); @@ -902,14 +904,14 @@ static void rna_def_space(BlenderRNA *brna) srna= RNA_def_struct(brna, "Space", NULL); RNA_def_struct_sdna(srna, "SpaceLink"); - RNA_def_struct_ui_text(srna, "Space", "Space data for a screen area"); + RNA_def_struct_ui_text(srna, N_("Space"), N_("Space data for a screen area")); RNA_def_struct_refine_func(srna, "rna_Space_refine"); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "spacetype"); RNA_def_property_enum_items(prop, space_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Type", "Space data type"); + RNA_def_property_ui_text(prop, N_("Type"), N_("Space data type")); } static void rna_def_space_image_uv(BlenderRNA *brna) @@ -918,111 +920,111 @@ static void rna_def_space_image_uv(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem sticky_mode_items[] = { - {SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled"}, - {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "Shared Location", "Select UVs that are at the same location and share a mesh vertex"}, - {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, "Shared Vertex", "Select UVs that share mesh vertex, irrespective if they are in the same location"}, + {SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, N_("Disabled"), N_("Sticky vertex selection disabled")}, + {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, N_("Shared Location"), N_("Select UVs that are at the same location and share a mesh vertex")}, + {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, N_("Shared Vertex"), N_("Select UVs that share mesh vertex, irrespective if they are in the same location")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem dt_uv_items[] = { - {SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Draw white edges with black outline"}, - {SI_UVDT_DASH, "DASH", 0, "Dash", "Draw dashed black-white edges"}, - {SI_UVDT_BLACK, "BLACK", 0, "Black", "Draw black edges"}, - {SI_UVDT_WHITE, "WHITE", 0, "White", "Draw white edges"}, + {SI_UVDT_OUTLINE, "OUTLINE", 0, N_("Outline"), N_("Draw white edges with black outline")}, + {SI_UVDT_DASH, "DASH", 0, N_("Dash"), N_("Draw dashed black-white edges")}, + {SI_UVDT_BLACK, "BLACK", 0, N_("Black"), N_("Draw black edges")}, + {SI_UVDT_WHITE, "WHITE", 0, N_("White"), N_("Draw white edges")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem dt_uvstretch_items[] = { - {SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, "Angle", "Angular distortion between UV and 3D angles"}, - {SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces"}, + {SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, N_("Angle"), N_("Angular distortion between UV and 3D angles")}, + {SI_UVDT_STRETCH_AREA, "AREA", 0, N_("Area"), N_("Area distortion between UV and 3D faces")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem pivot_items[] = { - {V3D_CENTER, "CENTER", ICON_ROTATE, "Bounding Box Center", ""}, - {V3D_CENTROID, "MEDIAN", ICON_ROTATECENTER, "Median Point", ""}, - {V3D_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""}, + {V3D_CENTER, "CENTER", ICON_ROTATE, N_("Bounding Box Center"), ""}, + {V3D_CENTROID, "MEDIAN", ICON_ROTATECENTER, N_("Median Point"), ""}, + {V3D_CURSOR, "CURSOR", ICON_CURSOR, N_("2D Cursor"), ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "SpaceUVEditor", NULL); RNA_def_struct_sdna(srna, "SpaceImage"); RNA_def_struct_nested(brna, srna, "SpaceImageEditor"); - RNA_def_struct_ui_text(srna, "Space UV Editor", "UV editor data for the image editor space"); + RNA_def_struct_ui_text(srna, N_("Space UV Editor"), N_("UV editor data for the image editor space")); /* selection */ prop= RNA_def_property(srna, "sticky_select_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sticky"); RNA_def_property_enum_items(prop, sticky_mode_items); - RNA_def_property_ui_text(prop, "Sticky Selection Mode", "Automatically select also UVs sharing the same vertex as the ones being selected"); + RNA_def_property_ui_text(prop, N_("Sticky Selection Mode"), N_("Automatically select also UVs sharing the same vertex as the ones being selected")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); /* drawing */ prop= RNA_def_property(srna, "edge_draw_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "dt_uv"); RNA_def_property_enum_items(prop, dt_uv_items); - RNA_def_property_ui_text(prop, "Edge Draw Type", "Draw type for drawing UV edges"); + RNA_def_property_ui_text(prop, N_("Edge Draw Type"), N_("Draw type for drawing UV edges")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "show_smooth_edges", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SMOOTH_UV); - RNA_def_property_ui_text(prop, "Draw Smooth Edges", "Draw UV edges anti-aliased"); + RNA_def_property_ui_text(prop, N_("Draw Smooth Edges"), N_("Draw UV edges anti-aliased")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "show_stretch", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_STRETCH); - RNA_def_property_ui_text(prop, "Draw Stretch", "Draw faces colored according to the difference in shape between UVs and their 3D coordinates (blue for low distortion, red for high distortion)"); + RNA_def_property_ui_text(prop, N_("Draw Stretch"), N_("Draw faces colored according to the difference in shape between UVs and their 3D coordinates (blue for low distortion, red for high distortion)")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "draw_stretch_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "dt_uvstretch"); RNA_def_property_enum_items(prop, dt_uvstretch_items); - RNA_def_property_ui_text(prop, "Draw Stretch Type", "Type of stretch to draw"); + RNA_def_property_ui_text(prop, N_("Draw Stretch Type"), N_("Type of stretch to draw")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "show_modified_edges", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWSHADOW); - RNA_def_property_ui_text(prop, "Draw Modified Edges", "Draw edges after modifiers are applied"); + RNA_def_property_ui_text(prop, N_("Draw Modified Edges"), N_("Draw edges after modifiers are applied")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "show_other_objects", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_OTHER); - RNA_def_property_ui_text(prop, "Draw Other Objects", "Draw other selected objects that share the same image"); + RNA_def_property_ui_text(prop, N_("Draw Other Objects"), N_("Draw other selected objects that share the same image")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "show_normalized_coords", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS); - RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels"); + RNA_def_property_ui_text(prop, N_("Normalized Coordinates"), N_("Display UV coordinates from 0.0 to 1.0 rather than in pixels")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SI_NO_DRAWFACES); - RNA_def_property_ui_text(prop, "Draw Faces", "Draw faces over the image"); + RNA_def_property_ui_text(prop, N_("Draw Faces"), N_("Draw faces over the image")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ); RNA_def_property_array(prop, 2); RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_cursor_location_get", "rna_SpaceImageEditor_cursor_location_set", NULL); - RNA_def_property_ui_text(prop, "2D Cursor Location", "2D cursor location for this view"); + RNA_def_property_ui_text(prop, N_("2D Cursor Location"), N_("2D cursor location for this view")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); /* todo: move edge and face drawing options here from G.f */ prop= RNA_def_property(srna, "use_snap_to_pixels", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_PIXELSNAP); - RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixel locations while editing"); + RNA_def_property_ui_text(prop, N_("Snap to Pixels"), N_("Snap UVs to pixel locations while editing")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "lock_bounds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_CLIP_UV); - RNA_def_property_ui_text(prop, "Constrain to Image Bounds", "Constraint to stay within the image bounds while editing"); + RNA_def_property_ui_text(prop, N_("Constrain to Image Bounds"), N_("Constraint to stay within the image bounds while editing")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "use_live_unwrap", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LIVE_UNWRAP); - RNA_def_property_ui_text(prop, "Live Unwrap", "Continuously unwrap the selected UV island while transforming pinned vertices"); + RNA_def_property_ui_text(prop, N_("Live Unwrap"), N_("Continuously unwrap the selected UV island while transforming pinned vertices")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "around"); RNA_def_property_enum_items(prop, pivot_items); - RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot"); + RNA_def_property_ui_text(prop, N_("Pivot"), N_("Rotation/Scaling Pivot")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); } @@ -1032,18 +1034,18 @@ static void rna_def_space_outliner(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem display_mode_items[] = { - {SO_ALL_SCENES, "ALL_SCENES", 0, "All Scenes", "Display datablocks in all scenes"}, - {SO_CUR_SCENE, "CURRENT_SCENE", 0, "Current Scene", "Display datablocks in current scene"}, - {SO_VISIBLE, "VISIBLE_LAYERS", 0, "Visible Layers", "Display datablocks in visible layers"}, - {SO_SELECTED, "SELECTED", 0, "Selected", "Display datablocks of selected objects"}, - {SO_ACTIVE, "ACTIVE", 0, "Active", "Display datablocks of active object"}, - {SO_SAME_TYPE, "SAME_TYPES", 0, "Same Types", "Display datablocks of all objects of same type as selected object"}, - {SO_GROUPS, "GROUPS", 0, "Groups", "Display groups and their datablocks"}, - {SO_LIBRARIES, "LIBRARIES", 0, "Libraries", "Display libraries"}, - {SO_SEQUENCE, "SEQUENCE", 0, "Sequence", "Display sequence datablocks"}, - {SO_DATABLOCKS, "DATABLOCKS", 0, "Datablocks", "Display raw datablocks"}, - {SO_USERDEF, "USER_PREFERENCES", 0, "User Preferences", "Display the user preference datablocks"}, - {SO_KEYMAP, "KEYMAPS", 0, "Key Maps", "Display keymap datablocks"}, + {SO_ALL_SCENES, "ALL_SCENES", 0, N_("All Scenes"), N_("Display datablocks in all scenes")}, + {SO_CUR_SCENE, "CURRENT_SCENE", 0, N_("Current Scene"), N_("Display datablocks in current scene")}, + {SO_VISIBLE, "VISIBLE_LAYERS", 0, N_("Visible Layers"), N_("Display datablocks in visible layers")}, + {SO_SELECTED, "SELECTED", 0, N_("Selected"), N_("Display datablocks of selected objects")}, + {SO_ACTIVE, "ACTIVE", 0, N_("Active"), N_("Display datablocks of active object")}, + {SO_SAME_TYPE, "SAME_TYPES", 0, N_("Same Types"), N_("Display datablocks of all objects of same type as selected object")}, + {SO_GROUPS, "GROUPS", 0, N_("Groups"), N_("Display groups and their datablocks")}, + {SO_LIBRARIES, "LIBRARIES", 0, N_("Libraries"), N_("Display libraries")}, + {SO_SEQUENCE, "SEQUENCE", 0, N_("Sequence"), N_("Display sequence datablocks")}, + {SO_DATABLOCKS, "DATABLOCKS", 0, N_("Datablocks"), N_("Display raw datablocks")}, + {SO_USERDEF, "USER_PREFERENCES", 0, N_("User Preferences"), N_("Display the user preference datablocks")}, + {SO_KEYMAP, "KEYMAPS", 0, N_("Key Maps"), N_("Display keymap datablocks")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "SpaceOutliner", "Space"); @@ -1053,27 +1055,27 @@ static void rna_def_space_outliner(BlenderRNA *brna) prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "outlinevis"); RNA_def_property_enum_items(prop, display_mode_items); - RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display"); + RNA_def_property_ui_text(prop, N_("Display Mode"), N_("Type of information to display")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); prop= RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "search_string"); - RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string"); + RNA_def_property_ui_text(prop, N_("Display Filter"), N_("Live search filtering string")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); prop= RNA_def_property(srna, "use_filter_case_sensitive", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_CASE_SENSITIVE); - RNA_def_property_ui_text(prop, "Case Sensitive Matches Only", "Only use case sensitive matches of search string"); + RNA_def_property_ui_text(prop, N_("Case Sensitive Matches Only"), N_("Only use case sensitive matches of search string")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); prop= RNA_def_property(srna, "use_filter_complete", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_COMPLETE); - RNA_def_property_ui_text(prop, "Complete Matches Only", "Only use complete matches of search string"); + RNA_def_property_ui_text(prop, N_("Complete Matches Only"), N_("Only use complete matches of search string")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); prop= RNA_def_property(srna, "show_restrict_columns", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS); - RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show column"); + RNA_def_property_ui_text(prop, N_("Show Restriction Columns"), N_("Show column")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL); } @@ -1084,71 +1086,71 @@ static void rna_def_background_image(BlenderRNA *brna) /* note: combinations work but dont flip so arnt that useful */ static EnumPropertyItem bgpic_axis_items[] = { - {0, "", 0, "X Axis", ""}, - {(1<<RV3D_VIEW_LEFT), "LEFT", 0, "Left", "Show background image while looking to the left"}, - {(1<<RV3D_VIEW_RIGHT), "RIGHT", 0, "Right", "Show background image while looking to the right"}, + {0, "", 0, N_("X Axis"), ""}, + {(1<<RV3D_VIEW_LEFT), "LEFT", 0, N_("Left"), N_("Show background image while looking to the left")}, + {(1<<RV3D_VIEW_RIGHT), "RIGHT", 0, N_("Right"), N_("Show background image while looking to the right")}, /*{(1<<RV3D_VIEW_LEFT)|(1<<RV3D_VIEW_RIGHT), "LEFT_RIGHT", 0, "Left/Right", ""},*/ - {0, "", 0, "Y Axis", ""}, - {(1<<RV3D_VIEW_BACK), "BACK", 0, "Back", "Show background image in back view"}, - {(1<<RV3D_VIEW_FRONT), "FRONT", 0, "Front", "Show background image in front view"}, + {0, "", 0, N_("Y Axis"), ""}, + {(1<<RV3D_VIEW_BACK), "BACK", 0, N_("Back"), N_("Show background image in back view")}, + {(1<<RV3D_VIEW_FRONT), "FRONT", 0, N_("Front"), N_("Show background image in front view")}, /*{(1<<RV3D_VIEW_BACK)|(1<<RV3D_VIEW_FRONT), "BACK_FRONT", 0, "Back/Front", ""},*/ - {0, "", 0, "Z Axis", ""}, - {(1<<RV3D_VIEW_BOTTOM), "BOTTOM", 0, "Bottom", "Show background image in bottom view"}, - {(1<<RV3D_VIEW_TOP), "TOP", 0, "Top", "Show background image in top view"}, + {0, "", 0, N_("Z Axis"), ""}, + {(1<<RV3D_VIEW_BOTTOM), "BOTTOM", 0, N_("Bottom"), N_("Show background image in bottom view")}, + {(1<<RV3D_VIEW_TOP), "TOP", 0, N_("Top"), N_("Show background image in top view")}, /*{(1<<RV3D_VIEW_BOTTOM)|(1<<RV3D_VIEW_TOP), "BOTTOM_TOP", 0, "Top/Bottom", ""},*/ - {0, "", 0, "Other", ""}, - {0, "ALL", 0, "All Views", "Show background image in all views"}, - {(1<<RV3D_VIEW_CAMERA), "CAMERA", 0, "Camera", "Show background image in camera view"}, + {0, "", 0, N_("Other"), ""}, + {0, "ALL", 0, N_("All Views"), N_("Show background image in all views")}, + {(1<<RV3D_VIEW_CAMERA), "CAMERA", 0, N_("Camera"), N_("Show background image in camera view")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "BackgroundImage", NULL); RNA_def_struct_sdna(srna, "BGpic"); - RNA_def_struct_ui_text(srna, "Background Image", "Image and settings for display in the 3d View background"); + RNA_def_struct_ui_text(srna, N_("Background Image"), N_("Image and settings for display in the 3d View background")); prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "ima"); - RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space"); + RNA_def_property_ui_text(prop, N_("Image"), N_("Image displayed and edited in this space")); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "iuser"); - RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed"); + RNA_def_property_ui_text(prop, N_("Image User"), N_("Parameters defining which layer, pass and frame of the image is displayed")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xof"); - RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the world origin"); + RNA_def_property_ui_text(prop, N_("X Offset"), N_("Offsets image horizontally from the world origin")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "yof"); - RNA_def_property_ui_text(prop, "Y Offset", "Offsets image vertically from the world origin"); + RNA_def_property_ui_text(prop, N_("Y Offset"), N_("Offsets image vertically from the world origin")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "size"); - RNA_def_property_ui_text(prop, "Size", "Scaling factor for the background image"); + RNA_def_property_ui_text(prop, N_("Size"), N_("Scaling factor for the background image")); RNA_def_property_range(prop, 0.0, FLT_MAX); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "blend"); RNA_def_property_float_funcs(prop, "rna_BackgroundImage_opacity_get", "rna_BackgroundImage_opacity_set", NULL); - RNA_def_property_ui_text(prop, "Opacity", "Image opacity to blend the image against the background color"); + RNA_def_property_ui_text(prop, N_("Opacity"), N_("Image opacity to blend the image against the background color")); RNA_def_property_range(prop, 0.0, 1.0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "view_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "view"); RNA_def_property_enum_items(prop, bgpic_axis_items); - RNA_def_property_ui_text(prop, "Image Axis", "The axis to display the image on"); + RNA_def_property_ui_text(prop, N_("Image Axis"), N_("The axis to display the image on")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_EXPANDED); - RNA_def_property_ui_text(prop, "Show Expanded", "Show the expanded in the user interface"); + RNA_def_property_ui_text(prop, N_("Show Expanded"), N_("Show the expanded in the user interface")); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); } @@ -1160,198 +1162,198 @@ static void rna_def_space_view3d(BlenderRNA *brna) const int matrix_dimsize[]= {4, 4}; static EnumPropertyItem pivot_items[] = { - {V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", "Pivot around bounding box center of selected object(s)"}, - {V3D_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Pivot around the 3D cursor"}, - {V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, "Individual Origins", "Pivot around each object's own origin"}, - {V3D_CENTROID, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point", "Pivot around the median point of selected objects"}, - {V3D_ACTIVE, "ACTIVE_ELEMENT", ICON_ROTACTIVE, "Active Element", "Pivot around active object"}, + {V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, N_("Bounding Box Center"), N_("Pivot around bounding box center of selected object(s)")}, + {V3D_CURSOR, "CURSOR", ICON_CURSOR, N_("3D Cursor"), N_("Pivot around the 3D cursor")}, + {V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, N_("Individual Origins"), N_("Pivot around each object's own origin")}, + {V3D_CENTROID, "MEDIAN_POINT", ICON_ROTATECENTER, N_("Median Point"), N_("Pivot around the median point of selected objects")}, + {V3D_ACTIVE, "ACTIVE_ELEMENT", ICON_ROTACTIVE, N_("Active Element"), N_("Pivot around active object")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem rv3d_persp_items[] = { - {RV3D_PERSP, "PERSP", 0, "Perspective", ""}, - {RV3D_ORTHO, "ORTHO", 0, "Orthographic", ""}, - {RV3D_CAMOB, "CAMERA", 0, "Camera", ""}, + {RV3D_PERSP, "PERSP", 0, N_("Perspective"), ""}, + {RV3D_ORTHO, "ORTHO", 0, N_("Orthographic"), ""}, + {RV3D_CAMOB, "CAMERA", 0, N_("Camera"), ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "SpaceView3D", "Space"); RNA_def_struct_sdna(srna, "View3D"); - RNA_def_struct_ui_text(srna, "3D View Space", "3D View space data"); + RNA_def_struct_ui_text(srna, N_("3D View Space"), N_("3D View space data")); prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_sdna(prop, NULL, "camera"); - RNA_def_property_ui_text(prop, "Camera", "Active camera used in this view (when unlocked from the scene's active camera)"); + RNA_def_property_ui_text(prop, N_("Camera"), N_("Active camera used in this view (when unlocked from the scene's active camera)")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_sdna(prop, NULL, "ob_centre"); - RNA_def_property_ui_text(prop, "Lock to Object", "3D View center is locked to this object's position"); + RNA_def_property_ui_text(prop, N_("Lock to Object"), N_("3D View center is locked to this object's position")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "lock_bone", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "ob_centre_bone"); - RNA_def_property_ui_text(prop, "Lock to Bone", "3D View center is locked to this bone's position"); + RNA_def_property_ui_text(prop, N_("Lock to Bone"), N_("3D View center is locked to this bone's position")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "lock_cursor", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ob_centre_cursor", 1); - RNA_def_property_ui_text(prop, "Lock to Cursor", "3D View center is locked to the cursor's position"); + RNA_def_property_ui_text(prop, N_("Lock to Cursor"), N_("3D View center is locked to the cursor's position")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "viewport_shade", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "drawtype"); RNA_def_property_enum_items(prop, viewport_shade_items); - RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View"); + RNA_def_property_ui_text(prop, N_("Viewport Shading"), N_("Method to display/shade objects in the 3D View")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "localvd"); - RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility"); + RNA_def_property_ui_text(prop, N_("Local View"), N_("Display an isolated sub-set of objects, apart from the scene visibility")); prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_array(prop, 3); RNA_def_property_float_funcs(prop, "rna_View3D_CursorLocation_get", "rna_View3D_CursorLocation_set", NULL); - RNA_def_property_ui_text(prop, "3D Cursor Location", "3D cursor location for this view (dependent on local view setting)"); + RNA_def_property_ui_text(prop, N_("3D Cursor Location"), N_("3D cursor location for this view (dependent on local view setting)")); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "lens"); - RNA_def_property_ui_text(prop, "Lens", "Lens angle (mm) in perspective view"); + RNA_def_property_ui_text(prop, N_("Lens"), N_("Lens angle (mm) in perspective view")); RNA_def_property_range(prop, 1.0f, 250.0f); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "near"); RNA_def_property_range(prop, 0.001f, FLT_MAX); - RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance"); + RNA_def_property_ui_text(prop, N_("Clip Start"), N_("3D View near clipping distance")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "far"); RNA_def_property_range(prop, 1.0f, FLT_MAX); - RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance"); + RNA_def_property_ui_text(prop, N_("Clip End"), N_("3D View far clipping distance")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "grid_scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "grid"); - RNA_def_property_ui_text(prop, "Grid Scale", "The distance between 3D View grid lines"); + RNA_def_property_ui_text(prop, N_("Grid Scale"), N_("The distance between 3D View grid lines")); RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gridlines"); - RNA_def_property_ui_text(prop, "Grid Lines", "The number of grid lines to display in perspective view"); + RNA_def_property_ui_text(prop, N_("Grid Lines"), N_("The number of grid lines to display in perspective view")); RNA_def_property_range(prop, 0, 1024); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gridsubdiv"); - RNA_def_property_ui_text(prop, "Grid Subdivisions", "The number of subdivisions between grid lines"); + RNA_def_property_ui_text(prop, N_("Grid Subdivisions"), N_("The number of subdivisions between grid lines")); RNA_def_property_range(prop, 1, 1024); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR); - RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view"); + RNA_def_property_ui_text(prop, N_("Display Grid Floor"), N_("Show the ground plane grid in perspective view")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X); - RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line in perspective view"); + RNA_def_property_ui_text(prop, N_("Display X Axis"), N_("Show the X axis line in perspective view")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_axis_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y); - RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line in perspective view"); + RNA_def_property_ui_text(prop, N_("Display Y Axis"), N_("Show the Y axis line in perspective view")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_axis_z", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z); - RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line in perspective view"); + RNA_def_property_ui_text(prop, N_("Display Z Axis"), N_("Show the Z axis line in perspective view")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_outline_selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SELECT_OUTLINE); - RNA_def_property_ui_text(prop, "Outline Selected", "Show an outline highlight around selected objects in non-wireframe views"); + RNA_def_property_ui_text(prop, N_("Outline Selected"), N_("Show an outline highlight around selected objects in non-wireframe views")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_all_objects_origin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS); - RNA_def_property_ui_text(prop, "All Object Origins", "Show the object origin center dot for all (selected and unselected) objects"); + RNA_def_property_ui_text(prop, N_("All Object Origins"), N_("Show the object origin center dot for all (selected and unselected) objects")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_relationship_lines", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_HIDE_HELPLINES); - RNA_def_property_ui_text(prop, "Relationship Lines", "Show dashed lines indicating parent or constraint relationships"); + RNA_def_property_ui_text(prop, N_("Relationship Lines"), N_("Show dashed lines indicating parent or constraint relationships")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_textured_solid", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_TEX); - RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view"); + RNA_def_property_ui_text(prop, N_("Textured Solid"), N_("Display face-assigned textures in solid view")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "lock_camera", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_LOCK_CAMERA); - RNA_def_property_ui_text(prop, "Lock Camera to View", "Enable view navigation within the camera view"); + RNA_def_property_ui_text(prop, N_("Lock Camera to View"), N_("Enable view navigation within the camera view")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_only_render", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_RENDER_OVERRIDE); - RNA_def_property_ui_text(prop, "Only Render", "Display only objects which will be rendered"); + RNA_def_property_ui_text(prop, N_("Only Render"), N_("Display only objects which will be rendered")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "use_occlude_geometry", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ZBUF_SELECT); - RNA_def_property_ui_text(prop, "Occlude Geometry", "Limit selection to visible (clipped with depth buffer)"); + RNA_def_property_ui_text(prop, N_("Occlude Geometry"), N_("Limit selection to visible (clipped with depth buffer)")); RNA_def_property_ui_icon(prop, ICON_ORTHO, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "background_images", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "bgpicbase", NULL); RNA_def_property_struct_type(prop, "BackgroundImage"); - RNA_def_property_ui_text(prop, "Background Images", "List of background images"); + RNA_def_property_ui_text(prop, N_("Background Images"), N_("List of background images")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_background_images", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DISPBGPICS); - RNA_def_property_ui_text(prop, "Display Background Images", "Display reference images behind objects in the 3D View"); + RNA_def_property_ui_text(prop, N_("Display Background Images"), N_("Display reference images behind objects in the 3D View")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "around"); RNA_def_property_enum_items(prop, pivot_items); - RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling"); + RNA_def_property_ui_text(prop, N_("Pivot Point"), N_("Pivot center for rotation/scaling")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update"); prop= RNA_def_property(srna, "use_pivot_point_align", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ALIGN); - RNA_def_property_ui_text(prop, "Align", "Manipulate object centers only"); + RNA_def_property_ui_text(prop, N_("Align"), N_("Manipulate object centers only")); RNA_def_property_ui_icon(prop, ICON_ALIGN, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update"); prop= RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "twflag", V3D_USE_MANIPULATOR); - RNA_def_property_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms"); + RNA_def_property_ui_text(prop, N_("Manipulator"), N_("Use a 3D manipulator widget for controlling transforms")); RNA_def_property_ui_icon(prop, ICON_MANIPUL, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "use_manipulator_translate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_TRANSLATE); - RNA_def_property_ui_text(prop, "Manipulator Translate", "Use the manipulator for movement transformations"); + RNA_def_property_ui_text(prop, N_("Manipulator Translate"), N_("Use the manipulator for movement transformations")); RNA_def_property_ui_icon(prop, ICON_MAN_TRANS, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "use_manipulator_rotate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_ROTATE); - RNA_def_property_ui_text(prop, "Manipulator Rotate", "Use the manipulator for rotation transformations"); + RNA_def_property_ui_text(prop, N_("Manipulator Rotate"), N_("Use the manipulator for rotation transformations")); RNA_def_property_ui_icon(prop, ICON_MAN_ROT, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "use_manipulator_scale", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_SCALE); - RNA_def_property_ui_text(prop, "Manipulator Scale", "Use the manipulator for scale transformations"); + RNA_def_property_ui_text(prop, N_("Manipulator Scale"), N_("Use the manipulator for scale transformations")); RNA_def_property_ui_icon(prop, ICON_MAN_SCALE, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); @@ -1359,18 +1361,18 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "twmode"); RNA_def_property_enum_items(prop, transform_orientation_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_TransformOrientation_itemf"); - RNA_def_property_ui_text(prop, "Transform Orientation", "Transformation orientation"); + RNA_def_property_ui_text(prop, N_("Transform Orientation"), N_("Transformation orientation")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "current_orientation", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "TransformOrientation"); RNA_def_property_pointer_funcs(prop, "rna_CurrentOrientation_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Current Transform Orientation", "Current Transformation orientation"); + RNA_def_property_ui_text(prop, N_("Current Transform Orientation"), N_("Current Transformation orientation")); prop= RNA_def_property(srna, "lock_camera_and_layers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scenelock", 1); RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_lock_camera_and_layers_set"); - RNA_def_property_ui_text(prop, "Lock Camera and Layers", "Use the scene's active camera and layers in this view, rather than local layers"); + RNA_def_property_ui_text(prop, N_("Lock Camera and Layers"), N_("Use the scene's active camera and layers in this view, rather than local layers")); RNA_def_property_ui_icon(prop, ICON_LOCKVIEW_OFF, 1); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); @@ -1378,68 +1380,68 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); RNA_def_property_array(prop, 20); RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_layer_set"); - RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible in this 3D View"); + RNA_def_property_ui_text(prop, N_("Visible Layers"), N_("Layers visible in this 3D View")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_layer_update"); prop= RNA_def_property(srna, "layers_used", PROP_BOOLEAN, PROP_LAYER_MEMBER); RNA_def_property_boolean_sdna(prop, NULL, "lay_used", 1); RNA_def_property_array(prop, 20); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Used Layers", "Layers that contain something"); + RNA_def_property_ui_text(prop, N_("Used Layers"), N_("Layers that contain something")); prop= RNA_def_property(srna, "region_3d", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "RegionView3D"); RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_3d_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "3D Region", "3D region in this space, in case of quad view the camera region"); + RNA_def_property_ui_text(prop, N_("3D Region"), N_("3D region in this space, in case of quad view the camera region")); prop= RNA_def_property(srna, "region_quadview", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "RegionView3D"); RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_quadview_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Quad View Region", "3D region that defines the quad view settings"); + RNA_def_property_ui_text(prop, N_("Quad View Region"), N_("3D region that defines the quad view settings")); /* region */ srna= RNA_def_struct(brna, "RegionView3D", NULL); RNA_def_struct_sdna(srna, "RegionView3D"); - RNA_def_struct_ui_text(srna, "3D View Region", "3D View region data"); + RNA_def_struct_ui_text(srna, N_("3D View Region"), N_("3D View region data")); prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_LOCKED); - RNA_def_property_ui_text(prop, "Lock", "Lock view rotation in side views"); + RNA_def_property_ui_text(prop, N_("Lock"), N_("Lock view rotation in side views")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update"); prop= RNA_def_property(srna, "show_sync_view", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXVIEW); - RNA_def_property_ui_text(prop, "Box", "Sync view position between side views"); + RNA_def_property_ui_text(prop, N_("Box"), N_("Sync view position between side views")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update"); prop= RNA_def_property(srna, "use_box_clip", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXCLIP); - RNA_def_property_ui_text(prop, "Clip", "Clip objects based on what's visible in other side views"); + RNA_def_property_ui_text(prop, N_("Clip"), N_("Clip objects based on what's visible in other side views")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_clip_update"); prop= RNA_def_property(srna, "perspective_matrix", PROP_FLOAT, PROP_MATRIX); RNA_def_property_float_sdna(prop, NULL, "persmat"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX: for now, it's too risky for users to do this RNA_def_property_multi_array(prop, 2, matrix_dimsize); - RNA_def_property_ui_text(prop, "Perspective Matrix", "Current perspective matrix of the 3D region"); + RNA_def_property_ui_text(prop, N_("Perspective Matrix"), N_("Current perspective matrix of the 3D region")); prop= RNA_def_property(srna, "view_matrix", PROP_FLOAT, PROP_MATRIX); RNA_def_property_float_sdna(prop, NULL, "viewmat"); RNA_def_property_multi_array(prop, 2, matrix_dimsize); RNA_def_property_float_funcs(prop, NULL, "rna_RegionView3D_view_matrix_set", NULL); - RNA_def_property_ui_text(prop, "View Matrix", "Current view matrix of the 3D region"); + RNA_def_property_ui_text(prop, N_("View Matrix"), N_("Current view matrix of the 3D region")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "view_perspective", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "persp"); RNA_def_property_enum_items(prop, rv3d_persp_items); - RNA_def_property_ui_text(prop, "Perspective", "View Perspective"); + RNA_def_property_ui_text(prop, N_("Perspective"), N_("View Perspective")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "is_perspective", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "is_persp", 1); - RNA_def_property_ui_text(prop, "Is Perspective", ""); + RNA_def_property_ui_text(prop, N_("Is Perspective"), ""); RNA_def_property_flag(prop, PROP_EDITABLE); prop= RNA_def_property(srna, "view_location", PROP_FLOAT, PROP_TRANSLATION); @@ -1449,7 +1451,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_float_funcs(prop, "rna_RegionView3D_view_location_get", "rna_RegionView3D_view_location_set", NULL); #endif - RNA_def_property_ui_text(prop, "View Location", "View pivot location"); + RNA_def_property_ui_text(prop, N_("View Location"), N_("View pivot location")); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4); RNA_def_property_update(prop, NC_WINDOW, NULL); @@ -1460,13 +1462,13 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_array(prop, 4); RNA_def_property_float_funcs(prop, "rna_RegionView3D_view_rotation_get", "rna_RegionView3D_view_rotation_set", NULL); #endif - RNA_def_property_ui_text(prop, "View Rotation", "Rotation in quaternions (keep normalized)"); + RNA_def_property_ui_text(prop, N_("View Rotation"), N_("Rotation in quaternions (keep normalized)")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* not sure we need rna access to these but adding anyway */ prop= RNA_def_property(srna, "view_distance", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "dist"); - RNA_def_property_ui_text(prop, "Distance", "Distance to the view location"); + RNA_def_property_ui_text(prop, N_("Distance"), N_("Distance to the view location")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); } @@ -1476,52 +1478,52 @@ static void rna_def_space_buttons(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem buttons_context_items[] = { - {BCONTEXT_SCENE, "SCENE", ICON_SCENE, "Scene", "Scene"}, - {BCONTEXT_RENDER, "RENDER", ICON_SCENE_DATA, "Render", "Render"}, - {BCONTEXT_WORLD, "WORLD", ICON_WORLD, "World", "World"}, - {BCONTEXT_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Object"}, - {BCONTEXT_CONSTRAINT, "CONSTRAINT", ICON_CONSTRAINT, "Constraints", "Constraints"}, - {BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, "Modifiers", "Modifiers"}, - {BCONTEXT_DATA, "DATA", 0, "Data", "Data"}, - {BCONTEXT_BONE, "BONE", ICON_BONE_DATA, "Bone", "Bone"}, - {BCONTEXT_BONE_CONSTRAINT, "BONE_CONSTRAINT", ICON_CONSTRAINT, "Bone Constraints", "Bone Constraints"}, - {BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material"}, - {BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture"}, - {BCONTEXT_PARTICLE, "PARTICLES", ICON_PARTICLES, "Particles", "Particle"}, - {BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics"}, + {BCONTEXT_SCENE, "SCENE", ICON_SCENE, N_("Scene"), "Scene"}, + {BCONTEXT_RENDER, "RENDER", ICON_SCENE_DATA, N_("Render"), "Render"}, + {BCONTEXT_WORLD, "WORLD", ICON_WORLD, N_("World"), "World"}, + {BCONTEXT_OBJECT, "OBJECT", ICON_OBJECT_DATA, N_("Object"), "Object"}, + {BCONTEXT_CONSTRAINT, "CONSTRAINT", ICON_CONSTRAINT, N_("Constraints"), "Constraints"}, + {BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, N_("Modifiers"), "Modifiers"}, + {BCONTEXT_DATA, "DATA", 0, N_("Data"), "Data"}, + {BCONTEXT_BONE, "BONE", ICON_BONE_DATA, N_("Bone"), "Bone"}, + {BCONTEXT_BONE_CONSTRAINT, "BONE_CONSTRAINT", ICON_CONSTRAINT, N_("Bone Constraints"), "Bone Constraints"}, + {BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, N_("Material"), "Material"}, + {BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, N_("Texture"), "Texture"}, + {BCONTEXT_PARTICLE, "PARTICLES", ICON_PARTICLES, N_("Particles"), "Particle"}, + {BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, N_("Physics"), "Physics"}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem align_items[] = { - {BUT_HORIZONTAL, "HORIZONTAL", 0, "Horizontal", ""}, - {BUT_VERTICAL, "VERTICAL", 0, "Vertical", ""}, + {BUT_HORIZONTAL, "HORIZONTAL", 0, N_("Horizontal"), ""}, + {BUT_VERTICAL, "VERTICAL", 0, N_("Vertical"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem buttons_texture_context_items[] = { - {SB_TEXC_MAT_OR_LAMP, "MATERIAL", ICON_MATERIAL, "Material", "Material"}, + {SB_TEXC_MAT_OR_LAMP, "MATERIAL", ICON_MATERIAL, N_("Material"), "Material"}, {0, NULL, 0, NULL, NULL}}; //actually populated dynamically trough a function srna= RNA_def_struct(brna, "SpaceProperties", "Space"); RNA_def_struct_sdna(srna, "SpaceButs"); - RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data"); + RNA_def_struct_ui_text(srna, N_("Properties Space"), N_("Properties space data")); prop= RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mainb"); RNA_def_property_enum_items(prop, buttons_context_items); RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_context_set", NULL); - RNA_def_property_ui_text(prop, "Context", "Type of active data to display and edit"); + RNA_def_property_ui_text(prop, N_("Context"), N_("Type of active data to display and edit")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL); prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "align"); RNA_def_property_enum_items(prop, align_items); RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_align_set", NULL); - RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels"); + RNA_def_property_ui_text(prop, N_("Align"), N_("Arrangement of the panels")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL); prop= RNA_def_property(srna, "texture_context", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, buttons_texture_context_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceProperties_texture_context_itemf"); - RNA_def_property_ui_text(prop, "Texture Context", "Type of texture data to display and edit"); + RNA_def_property_ui_text(prop, N_("Texture Context"), N_("Type of texture data to display and edit")); RNA_def_property_update(prop, NC_TEXTURE, NULL); /* pinned data */ @@ -1535,7 +1537,7 @@ static void rna_def_space_buttons(BlenderRNA *brna) prop= RNA_def_property(srna, "use_pin_id", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_PIN_CONTEXT); - RNA_def_property_ui_text(prop, "Pin ID", "Use the pinned context"); + RNA_def_property_ui_text(prop, N_("Pin ID"), N_("Use the pinned context")); } static void rna_def_space_image(BlenderRNA *brna) @@ -1545,60 +1547,60 @@ static void rna_def_space_image(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceImageEditor", "Space"); RNA_def_struct_sdna(srna, "SpaceImage"); - RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data"); + RNA_def_struct_ui_text(srna, N_("Space Image Editor"), N_("Image and UV editor space data")); /* image */ prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceImageEditor_image_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space"); + RNA_def_property_ui_text(prop, N_("Image"), N_("Image displayed and edited in this space")); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL); // is handled in image editor too prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "iuser"); - RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed"); + RNA_def_property_ui_text(prop, N_("Image User"), N_("Parameters defining which layer, pass and frame of the image is displayed")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "cumap"); - RNA_def_property_ui_text(prop, "Curve", "Color curve mapping to use for displaying the image"); + RNA_def_property_ui_text(prop, N_("Curve"), N_("Color curve mapping to use for displaying the image")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_curves_update"); prop= RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "scopes"); RNA_def_property_struct_type(prop, "Scopes"); - RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize image statistics."); + RNA_def_property_ui_text(prop, N_("Scopes"), N_("Scopes to visualize image statistics.")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_scopes_update"); prop= RNA_def_property(srna, "use_image_pin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pin", 0); - RNA_def_property_ui_text(prop, "Image Pin", "Display current image regardless of object selection"); + RNA_def_property_ui_text(prop, N_("Image Pin"), N_("Display current image regardless of object selection")); RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "sample_histogram", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "sample_line_hist"); RNA_def_property_struct_type(prop, "Histogram"); - RNA_def_property_ui_text(prop, "Line sample", "Sampled colors along line"); + RNA_def_property_ui_text(prop, N_("Line sample"), N_("Sampled colors along line")); prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE); RNA_def_property_array(prop, 2); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_zoom_get", NULL, NULL); - RNA_def_property_ui_text(prop, "Zoom", "Zoom factor"); + RNA_def_property_ui_text(prop, N_("Zoom"), N_("Zoom factor")); /* image draw */ prop= RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE); - RNA_def_property_ui_text(prop, "Draw Repeated", "Draw the image repeated outside of the main view"); + RNA_def_property_ui_text(prop, N_("Draw Repeated"), N_("Draw the image repeated outside of the main view")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, draw_channels_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf"); - RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw"); + RNA_def_property_ui_text(prop, N_("Draw Channels"), N_("Channels of the image to draw")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); /* uv */ @@ -1606,12 +1608,12 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "SpaceUVEditor"); RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings"); + RNA_def_property_ui_text(prop, N_("UV Editor"), N_("UV editor settings")); /* paint */ prop= RNA_def_property(srna, "use_image_paint", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWTOOL); - RNA_def_property_ui_text(prop, "Image Painting", "Enable image painting mode"); + RNA_def_property_ui_text(prop, N_("Image Painting"), N_("Enable image painting mode")); RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_paint_update"); @@ -1620,32 +1622,32 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "gpd"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "GreasePencil"); - RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); + RNA_def_property_ui_text(prop, N_("Grease Pencil"), N_("Grease pencil data for this space")); prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DISPGP); - RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay"); + RNA_def_property_ui_text(prop, N_("Use Grease Pencil"), N_("Display and edit the grease pencil freehand annotations overlay")); /* update */ prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "lock", 0); - RNA_def_property_ui_text(prop, "Update Automatically", "Update other affected window spaces automatically to reflect changes during interactive operations such as transform"); + RNA_def_property_ui_text(prop, N_("Update Automatically"), N_("Update other affected window spaces automatically to reflect changes during interactive operations such as transform")); /* state */ prop= RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_render_get", NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Show Render", "Show render related properties"); + RNA_def_property_ui_text(prop, N_("Show Render"), N_("Show render related properties")); prop= RNA_def_property(srna, "show_paint", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_paint_get", NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Show Paint", "Show paint related properties"); + RNA_def_property_ui_text(prop, N_("Show Paint"), N_("Show paint related properties")); prop= RNA_def_property(srna, "show_uvedit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_uvedit_get", NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Show UV Editor", "Show UV editing related properties"); + RNA_def_property_ui_text(prop, N_("Show UV Editor"), N_("Show UV editing related properties")); rna_def_space_image_uv(brna); } @@ -1656,36 +1658,36 @@ static void rna_def_space_sequencer(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem view_type_items[] = { - {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""}, - {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""}, - {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SPLITVIEW, "Sequencer and Image Preview", ""}, + {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, N_("Sequencer"), ""}, + {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, N_("Image Preview"), ""}, + {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SPLITVIEW, N_("Sequencer and Image Preview"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem display_mode_items[] = { - {SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, "Image Preview", ""}, - {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, "Luma Waveform", ""}, - {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", ICON_SEQ_CHROMA_SCOPE, "Chroma Vectorscope", ""}, - {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", ICON_SEQ_HISTOGRAM, "Histogram", ""}, + {SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, N_("Image Preview"), ""}, + {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, N_("Luma Waveform"), ""}, + {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", ICON_SEQ_CHROMA_SCOPE, N_("Chroma Vectorscope"), ""}, + {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", ICON_SEQ_HISTOGRAM, N_("Histogram"), ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem proxy_render_size_items[] = { - {SEQ_PROXY_RENDER_SIZE_NONE, "NONE", 0, "No display", ""}, - {SEQ_PROXY_RENDER_SIZE_SCENE, "SCENE", 0, "Scene render size", ""}, - {SEQ_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""}, - {SEQ_PROXY_RENDER_SIZE_50, "PROXY_50", 0, "Proxy size 50%", ""}, - {SEQ_PROXY_RENDER_SIZE_75, "PROXY_75", 0, "Proxy size 75%", ""}, - {SEQ_PROXY_RENDER_SIZE_FULL, "FULL", 0, "No proxy, full render", ""}, + {SEQ_PROXY_RENDER_SIZE_NONE, "NONE", 0, N_("No display"), ""}, + {SEQ_PROXY_RENDER_SIZE_SCENE, "SCENE", 0, N_("Scene render size"), ""}, + {SEQ_PROXY_RENDER_SIZE_25, "PROXY_25", 0, N_("Proxy size 25%"), ""}, + {SEQ_PROXY_RENDER_SIZE_50, "PROXY_50", 0, N_("Proxy size 50%"), ""}, + {SEQ_PROXY_RENDER_SIZE_75, "PROXY_75", 0, N_("Proxy size 75%"), ""}, + {SEQ_PROXY_RENDER_SIZE_FULL, "FULL", 0, N_("No proxy, full render"), ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "SpaceSequenceEditor", "Space"); RNA_def_struct_sdna(srna, "SpaceSeq"); - RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data"); + RNA_def_struct_ui_text(srna, N_("Space Sequence Editor"), N_("Sequence editor space data")); /* view type, fairly important */ prop= RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "view"); RNA_def_property_enum_items(prop, view_type_items); - RNA_def_property_ui_text(prop, "View Type", "The type of the Sequencer view (sequencer, preview or both)"); + RNA_def_property_ui_text(prop, N_("View Type"), N_("The type of the Sequencer view (sequencer, preview or both)")); RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, 0, "rna_Sequencer_display_mode_update"); @@ -1693,80 +1695,80 @@ static void rna_def_space_sequencer(BlenderRNA *brna) prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mainb"); RNA_def_property_enum_items(prop, display_mode_items); - RNA_def_property_ui_text(prop, "Display Mode", "The view mode to use for displaying sequencer output"); + RNA_def_property_ui_text(prop, N_("Display Mode"), N_("The view mode to use for displaying sequencer output")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); /* flag's */ prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_NO_DRAW_CFRANUM); - RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line"); + RNA_def_property_ui_text(prop, N_("Show Frame Number Indicator"), N_("Show frame number beside the current frame indicator line")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "show_frames", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES); - RNA_def_property_ui_text(prop, "Draw Frames", "Draw frames rather than seconds"); + RNA_def_property_ui_text(prop, N_("Draw Frames"), N_("Draw frames rather than seconds")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS); - RNA_def_property_ui_text(prop, "Transform Markers", "Transform markers as well as strips"); + RNA_def_property_ui_text(prop, N_("Transform Markers"), N_("Transform markers as well as strips")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "show_separate_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_COLOR_SEPERATED); - RNA_def_property_ui_text(prop, "Separate Colors", "Separate color channels in preview"); + RNA_def_property_ui_text(prop, N_("Separate Colors"), N_("Separate color channels in preview")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "show_safe_margin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_SAFE_MARGINS); - RNA_def_property_ui_text(prop, "Safe Margin", "Draw title safe margins in preview"); + RNA_def_property_ui_text(prop, N_("Safe Margin"), N_("Draw title safe margins in preview")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_GPENCIL); - RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay"); + RNA_def_property_ui_text(prop, N_("Use Grease Pencil"), N_("Display and edit the grease pencil freehand annotations overlay")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); /* grease pencil */ prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "gpd"); RNA_def_property_struct_type(prop, "UnknownType"); - RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); + RNA_def_property_ui_text(prop, N_("Grease Pencil"), N_("Grease pencil data for this space")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "chanshown"); - RNA_def_property_ui_text(prop, "Display Channel", "The channel number shown in the image preview. 0 is the result of all strips combined"); + RNA_def_property_ui_text(prop, N_("Display Channel"), N_("The channel number shown in the image preview. 0 is the result of all strips combined")); RNA_def_property_range(prop, -5, 32); // MAXSEQ --- todo, move from BKE_sequencer.h, allow up to 5 layers up the metastack. Should be dynamic... RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "zebra"); - RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes"); + RNA_def_property_ui_text(prop, N_("Show Overexposed"), N_("Show overexposed areas with zebra stripes")); RNA_def_property_range(prop, 0, 110); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "render_size"); RNA_def_property_enum_items(prop, proxy_render_size_items); - RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using full resolution or different proxy resolutions"); + RNA_def_property_ui_text(prop, N_("Proxy render size"), N_("Draw preview using full resolution or different proxy resolutions")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); /* not sure we need rna access to these but adding anyway */ prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xof"); - RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center"); + RNA_def_property_ui_text(prop, N_("X Offset"), N_("Offsets image horizontally from the view center")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "yof"); - RNA_def_property_ui_text(prop, "Y Offset", "Offsets image horizontally from the view center"); + RNA_def_property_ui_text(prop, N_("Y Offset"), N_("Offsets image horizontally from the view center")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "zoom"); - RNA_def_property_ui_text(prop, "Zoom", "Display zoom level"); + RNA_def_property_ui_text(prop, N_("Zoom"), N_("Display zoom level")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); } @@ -1777,12 +1779,12 @@ static void rna_def_space_text(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceTextEditor", "Space"); RNA_def_struct_sdna(srna, "SpaceText"); - RNA_def_struct_ui_text(srna, "Space Text Editor", "Text editor space data"); + RNA_def_struct_ui_text(srna, N_("Space Text Editor"), N_("Text editor space data")); /* text */ prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space"); + RNA_def_property_ui_text(prop, N_("Text"), N_("Text displayed and edited in this space")); RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceTextEditor_text_set", NULL, NULL); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); @@ -1790,85 +1792,85 @@ static void rna_def_space_text(BlenderRNA *brna) prop= RNA_def_property(srna, "show_word_wrap", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "wordwrap", 0); RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceTextEditor_word_wrap_set"); - RNA_def_property_ui_text(prop, "Word Wrap", "Wrap words if there is not enough horizontal space"); + RNA_def_property_ui_text(prop, N_("Word Wrap"), N_("Wrap words if there is not enough horizontal space")); RNA_def_property_ui_icon(prop, ICON_WORDWRAP_OFF, 1); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "show_line_numbers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "showlinenrs", 0); - RNA_def_property_ui_text(prop, "Line Numbers", "Show line numbers next to the text"); + RNA_def_property_ui_text(prop, N_("Line Numbers"), N_("Show line numbers next to the text")); RNA_def_property_ui_icon(prop, ICON_LINENUMBERS_OFF, 1); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "show_syntax_highlight", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "showsyntax", 0); - RNA_def_property_ui_text(prop, "Syntax Highlight", "Syntax highlight for scripting"); + RNA_def_property_ui_text(prop, N_("Syntax Highlight"), N_("Syntax highlight for scripting")); RNA_def_property_ui_icon(prop, ICON_SYNTAX_OFF, 1); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "show_line_highlight", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "line_hlight", 0); - RNA_def_property_ui_text(prop, "Highlight Line", "Highlight the current line"); + RNA_def_property_ui_text(prop, N_("Highlight Line"), N_("Highlight the current line")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tabnumber"); RNA_def_property_range(prop, 2, 8); - RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with"); + RNA_def_property_ui_text(prop, N_("Tab Width"), N_("Number of spaces to display tabs with")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, "rna_SpaceTextEditor_updateEdited"); prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "lheight"); RNA_def_property_range(prop, 8, 32); - RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text"); + RNA_def_property_ui_text(prop, N_("Font Size"), N_("Font size to use for displaying the text")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "show_margin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_SHOW_MARGIN); - RNA_def_property_ui_text(prop, "Show Margin", "Show right margin"); + RNA_def_property_ui_text(prop, N_("Show Margin"), N_("Show right margin")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "margin_column", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "margin_column"); RNA_def_property_range(prop, 0, 1024); - RNA_def_property_ui_text(prop, "Margin Column", "Column number to show right margin at"); + RNA_def_property_ui_text(prop, N_("Margin Column"), N_("Column number to show right margin at")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); /* functionality options */ prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "overwrite", 1); - RNA_def_property_ui_text(prop, "Overwrite", "Overwrite characters when typing rather than inserting them"); + RNA_def_property_ui_text(prop, N_("Overwrite"), N_("Overwrite characters when typing rather than inserting them")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "use_live_edit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "live_edit", 1); - RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing"); + RNA_def_property_ui_text(prop, N_("Live Edit"), N_("Run python while editing")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); /* find */ prop= RNA_def_property(srna, "use_find_all", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_ALL); - RNA_def_property_ui_text(prop, "Find All", "Search in all text datablocks, instead of only the active one"); + RNA_def_property_ui_text(prop, N_("Find All"), N_("Search in all text datablocks, instead of only the active one")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "use_find_wrap", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_WRAP); - RNA_def_property_ui_text(prop, "Find Wrap", "Search again from the start of the file when reaching the end"); + RNA_def_property_ui_text(prop, N_("Find Wrap"), N_("Search again from the start of the file when reaching the end")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "use_match_case", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_MATCH_CASE); - RNA_def_property_ui_text(prop, "Match case", "Search string is sensitive to uppercase and lowercase letters"); + RNA_def_property_ui_text(prop, N_("Match case"), N_("Search string is sensitive to uppercase and lowercase letters")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "findstr"); - RNA_def_property_ui_text(prop, "Find Text", "Text to search for with the find tool"); + RNA_def_property_ui_text(prop, N_("Find Text"), N_("Text to search for with the find tool")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); prop= RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "replacestr"); - RNA_def_property_ui_text(prop, "Replace Text", "Text to replace selected text with using the replace tool"); + RNA_def_property_ui_text(prop, N_("Replace Text"), N_("Text to replace selected text with using the replace tool")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL); } @@ -1878,79 +1880,79 @@ static void rna_def_space_dopesheet(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem mode_items[] = { - {SACTCONT_DOPESHEET, "DOPESHEET", 0, "DopeSheet", "DopeSheet Editor"}, - {SACTCONT_ACTION, "ACTION", 0, "Action Editor", "Action Editor"}, - {SACTCONT_SHAPEKEY, "SHAPEKEY", 0, "ShapeKey Editor", "ShapeKey Editor"}, - {SACTCONT_GPENCIL, "GPENCIL", 0, "Grease Pencil", "Grease Pencil"}, + {SACTCONT_DOPESHEET, "DOPESHEET", 0, N_("DopeSheet"), N_("DopeSheet Editor")}, + {SACTCONT_ACTION, "ACTION", 0, N_("Action Editor"), N_("Action Editor")}, + {SACTCONT_SHAPEKEY, "SHAPEKEY", 0, N_("ShapeKey Editor"), N_("ShapeKey Editor")}, + {SACTCONT_GPENCIL, "GPENCIL", 0, N_("Grease Pencil"), N_("Grease Pencil")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space"); RNA_def_struct_sdna(srna, "SpaceAction"); - RNA_def_struct_ui_text(srna, "Space DopeSheet Editor", "DopeSheet space data"); + RNA_def_struct_ui_text(srna, N_("Space DopeSheet Editor"), N_("DopeSheet space data")); /* data */ prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceDopeSheetEditor_action_set", NULL, "rna_Action_actedit_assign_poll"); - RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space"); + RNA_def_property_ui_text(prop, N_("Action"), N_("Action displayed and edited in this space")); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, "rna_SpaceDopeSheetEditor_action_update"); /* mode */ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, mode_items); - RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed"); + RNA_def_property_ui_text(prop, N_("Mode"), N_("Editing context being displayed")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update"); /* display */ prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_DRAWTIME); RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator - RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames"); + RNA_def_property_ui_text(prop, N_("Show Seconds"), N_("Show timing in seconds not frames")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL); prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWCFRANUM); - RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line"); + RNA_def_property_ui_text(prop, N_("Show Frame Number Indicator"), N_("Show frame number beside the current frame indicator line")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL); prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SLIDERS); - RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels"); + RNA_def_property_ui_text(prop, N_("Show Sliders"), N_("Show sliders beside F-Curve channels")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL); prop= RNA_def_property(srna, "show_pose_markers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_POSEMARKERS_SHOW); - RNA_def_property_ui_text(prop, "Show Pose Markers", "Show markers belonging to the active action instead of Scene markers (Action and Shape Key Editors only)"); + RNA_def_property_ui_text(prop, N_("Show Pose Markers"), N_("Show markers belonging to the active action instead of Scene markers (Action and Shape Key Editors only)")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL); /* editing */ prop= RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL); - RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes"); + RNA_def_property_ui_text(prop, N_("AutoMerge Keyframes"), N_("Automatically merge nearby keyframes")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL); prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOREALTIMEUPDATES); - RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming keyframes, changes to the animation data are flushed to other views"); + RNA_def_property_ui_text(prop, N_("Realtime Updates"), N_("When transforming keyframes, changes to the animation data are flushed to other views")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL); prop= RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_MARKERS_MOVE); - RNA_def_property_ui_text(prop, "Sync Markers", "Sync Markers with keyframe edits"); + RNA_def_property_ui_text(prop, N_("Sync Markers"), N_("Sync Markers with keyframe edits")); /* dopesheet */ prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "DopeSheet"); RNA_def_property_pointer_sdna(prop, NULL, "ads"); - RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data"); + RNA_def_property_ui_text(prop, N_("DopeSheet"), N_("Settings for filtering animation data")); /* autosnap */ prop= RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "autosnap"); RNA_def_property_enum_items(prop, autosnap_items); - RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations"); + RNA_def_property_ui_text(prop, N_("Auto Snap"), N_("Automatic time snapping settings for transformations")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL); } @@ -1960,15 +1962,15 @@ static void rna_def_space_graph(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem mode_items[] = { - {SIPO_MODE_ANIMATION, "FCURVES", 0, "F-Curve Editor", "Edit f-curves"}, - {SIPO_MODE_DRIVERS, "DRIVERS", 0, "Drivers", "Edit drivers"}, + {SIPO_MODE_ANIMATION, "FCURVES", 0, N_("F-Curve Editor"), N_("Edit f-curves")}, + {SIPO_MODE_DRIVERS, "DRIVERS", 0, N_("Drivers"), N_("Edit drivers")}, {0, NULL, 0, NULL, NULL}}; /* this is basically the same as the one for the 3D-View, but with some entries ommitted */ static EnumPropertyItem gpivot_items[] = { - {V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", ""}, - {V3D_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""}, - {V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, "Individual Centers", ""}, + {V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, N_("Bounding Box Center"), ""}, + {V3D_CURSOR, "CURSOR", ICON_CURSOR, N_("2D Cursor"), ""}, + {V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, N_("Individual Centers"), ""}, //{V3D_CENTROID, "MEDIAN_POINT", 0, "Median Point", ""}, //{V3D_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""}, {0, NULL, 0, NULL, NULL}}; @@ -1976,13 +1978,13 @@ static void rna_def_space_graph(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceGraphEditor", "Space"); RNA_def_struct_sdna(srna, "SpaceIpo"); - RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data"); + RNA_def_struct_ui_text(srna, N_("Space Graph Editor"), N_("Graph Editor space data")); /* mode */ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, mode_items); - RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed"); + RNA_def_property_ui_text(prop, N_("Mode"), N_("Editing context being displayed")); RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update"); @@ -1990,85 +1992,85 @@ static void rna_def_space_graph(BlenderRNA *brna) prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_DRAWTIME); RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator - RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames"); + RNA_def_property_ui_text(prop, N_("Show Seconds"), N_("Show timing in seconds not frames")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCFRANUM); - RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line"); + RNA_def_property_ui_text(prop, N_("Show Frame Number Indicator"), N_("Show frame number beside the current frame indicator line")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SLIDERS); - RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels"); + RNA_def_property_ui_text(prop, N_("Show Sliders"), N_("Show sliders beside F-Curve channels")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOHANDLES); - RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points"); + RNA_def_property_ui_text(prop, N_("Show Handles"), N_("Show handles of Bezier control points")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); prop= RNA_def_property(srna, "use_only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELCUVERTSONLY); - RNA_def_property_ui_text(prop, "Only Selected Curve Keyframes", "Only keyframes of selected F-Curves are visible and editable"); + RNA_def_property_ui_text(prop, N_("Only Selected Curve Keyframes"), N_("Only keyframes of selected F-Curves are visible and editable")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); prop= RNA_def_property(srna, "use_only_selected_keyframe_handles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELVHANDLESONLY); - RNA_def_property_ui_text(prop, "Only Selected Keyframes Handles", "Only show and edit handles of selected keyframes"); + RNA_def_property_ui_text(prop, N_("Only Selected Keyframes Handles"), N_("Only show and edit handles of selected keyframes")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); prop= RNA_def_property(srna, "use_fancy_drawing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_BEAUTYDRAW_OFF); - RNA_def_property_ui_text(prop, "Use Fancy Drawing", "Draw F-Curves using Anti-Aliasing and other fancy effects. Disable for better performance"); + RNA_def_property_ui_text(prop, N_("Use Fancy Drawing"), N_("Draw F-Curves using Anti-Aliasing and other fancy effects. Disable for better performance")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); /* editing */ prop= RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL); - RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes"); + RNA_def_property_ui_text(prop, N_("AutoMerge Keyframes"), N_("Automatically merge nearby keyframes")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOREALTIMEUPDATES); - RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming keyframes, changes to the animation data are flushed to other views"); + RNA_def_property_ui_text(prop, N_("Realtime Updates"), N_("When transforming keyframes, changes to the animation data are flushed to other views")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); /* cursor */ prop= RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCURSOR); - RNA_def_property_ui_text(prop, "Show Cursor", "Show 2D cursor"); + RNA_def_property_ui_text(prop, N_("Show Cursor"), N_("Show 2D cursor")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); prop= RNA_def_property(srna, "cursor_position_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cursorVal"); - RNA_def_property_ui_text(prop, "Cursor Y-Value", "Graph Editor 2D-Value cursor - Y-Value component"); + RNA_def_property_ui_text(prop, N_("Cursor Y-Value"), N_("Graph Editor 2D-Value cursor - Y-Value component")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "around"); RNA_def_property_enum_items(prop, gpivot_items); - RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling"); + RNA_def_property_ui_text(prop, N_("Pivot Point"), N_("Pivot center for rotation/scaling")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); /* dopesheet */ prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "DopeSheet"); RNA_def_property_pointer_sdna(prop, NULL, "ads"); - RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data"); + RNA_def_property_ui_text(prop, N_("DopeSheet"), N_("Settings for filtering animation data")); /* autosnap */ prop= RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "autosnap"); RNA_def_property_enum_items(prop, autosnap_items); - RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations"); + RNA_def_property_ui_text(prop, N_("Auto Snap"), N_("Automatic time snapping settings for transformations")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); /* readonly state info */ prop= RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", 0); /* XXX: hack to make this compile, since this property doesn't actually exist*/ RNA_def_property_boolean_funcs(prop, "rna_SpaceGraphEditor_has_ghost_curves_get", NULL); - RNA_def_property_ui_text(prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored"); + RNA_def_property_ui_text(prop, N_("Has Ghost Curves"), N_("Graph Editor instance has some ghost curves stored")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); } @@ -2079,42 +2081,42 @@ static void rna_def_space_nla(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceNLA", "Space"); RNA_def_struct_sdna(srna, "SpaceNla"); - RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data"); + RNA_def_struct_ui_text(srna, N_("Space Nla Editor"), N_("NLA editor space data")); /* display */ prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SNLA_DRAWTIME); RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator - RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames"); + RNA_def_property_ui_text(prop, N_("Show Seconds"), N_("Show timing in seconds not frames")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL); prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NODRAWCFRANUM); - RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line"); + RNA_def_property_ui_text(prop, N_("Show Frame Number Indicator"), N_("Show frame number beside the current frame indicator line")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL); prop= RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOSTRIPCURVES); - RNA_def_property_ui_text(prop, "Show Control Curves", "Show influence curves on strips"); + RNA_def_property_ui_text(prop, N_("Show Control Curves"), N_("Show influence curves on strips")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL); /* editing */ prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOREALTIMEUPDATES); - RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming strips, changes to the animation data are flushed to other views"); + RNA_def_property_ui_text(prop, N_("Realtime Updates"), N_("When transforming strips, changes to the animation data are flushed to other views")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL); /* dopesheet */ prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "DopeSheet"); RNA_def_property_pointer_sdna(prop, NULL, "ads"); - RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data"); + RNA_def_property_ui_text(prop, N_("DopeSheet"), N_("Settings for filtering animation data")); /* autosnap */ prop= RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "autosnap"); RNA_def_property_enum_items(prop, autosnap_items); - RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations"); + RNA_def_property_ui_text(prop, N_("Auto Snap"), N_("Automatic time snapping settings for transformations")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL); } @@ -2125,43 +2127,43 @@ static void rna_def_space_time(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceTimeline", "Space"); RNA_def_struct_sdna(srna, "SpaceTime"); - RNA_def_struct_ui_text(srna, "Space Timeline Editor", "Timeline editor space data"); + RNA_def_struct_ui_text(srna, N_("Space Timeline Editor"), N_("Timeline editor space data")); /* view settings */ prop= RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL); - RNA_def_property_ui_text(prop, "Only Selected channels", "Show keyframes for active Object and/or its selected channels only"); + RNA_def_property_ui_text(prop, N_("Only Selected channels"), N_("Show keyframes for active Object and/or its selected channels only")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_CFRA_NUM); - RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line"); + RNA_def_property_ui_text(prop, N_("Show Frame Number Indicator"), N_("Show frame number beside the current frame indicator line")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); /* displaying cache status */ prop= RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DISPLAY); - RNA_def_property_ui_text(prop, "Show Cache", "Show the status of cached frames in the timeline"); + RNA_def_property_ui_text(prop, N_("Show Cache"), N_("Show the status of cached frames in the timeline")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "cache_softbody", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SOFTBODY); - RNA_def_property_ui_text(prop, "Softbody", "Show the active object's softbody point cache"); + RNA_def_property_ui_text(prop, N_("Softbody"), N_("Show the active object's softbody point cache")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "cache_particles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_PARTICLES); - RNA_def_property_ui_text(prop, "Particles", "Show the active object's particle point cache"); + RNA_def_property_ui_text(prop, N_("Particles"), N_("Show the active object's particle point cache")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "cache_cloth", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_CLOTH); - RNA_def_property_ui_text(prop, "Cloth", "Show the active object's cloth point cache"); + RNA_def_property_ui_text(prop, N_("Cloth"), N_("Show the active object's cloth point cache")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); prop= RNA_def_property(srna, "cache_smoke", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SMOKE); - RNA_def_property_ui_text(prop, "Smoke", "Show the active object's smoke cache"); + RNA_def_property_ui_text(prop, N_("Smoke"), N_("Show the active object's smoke cache")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL); } @@ -2171,12 +2173,12 @@ static void rna_def_console_line(BlenderRNA *brna) PropertyRNA *prop; srna = RNA_def_struct(brna, "ConsoleLine", NULL); - RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console"); + RNA_def_struct_ui_text(srna, N_("Console Input"), N_("Input line for the interactive console")); // XXX using non-inited "prop", uh? RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL); prop= RNA_def_property(srna, "body", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_ConsoleLine_body_get", "rna_ConsoleLine_body_length", "rna_ConsoleLine_body_set"); - RNA_def_property_ui_text(prop, "Line", "Text in the line"); + RNA_def_property_ui_text(prop, N_("Line"), N_("Text in the line")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL); prop= RNA_def_property(srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */ @@ -2192,13 +2194,13 @@ static void rna_def_space_console(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceConsole", "Space"); RNA_def_struct_sdna(srna, "SpaceConsole"); - RNA_def_struct_ui_text(srna, "Space Console", "Interactive python console"); + RNA_def_struct_ui_text(srna, N_("Space Console"), N_("Interactive python console")); /* display */ prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE); /* copied from text editor */ RNA_def_property_int_sdna(prop, NULL, "lheight"); RNA_def_property_range(prop, 8, 32); - RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text"); + RNA_def_property_ui_text(prop, N_("Font Size"), N_("Font size to use for displaying the text")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL); @@ -2211,20 +2213,20 @@ static void rna_def_space_console(BlenderRNA *brna) RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL); prop= RNA_def_property(srna, "prompt", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text(prop, "Prompt", "Command line prompt"); + RNA_def_property_ui_text(prop, N_("Prompt"), N_("Command line prompt")); prop= RNA_def_property(srna, "language", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text(prop, "Language", "Command line prompt language"); + RNA_def_property_ui_text(prop, N_("Language"), N_("Command line prompt language")); prop= RNA_def_property(srna, "history", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "history", NULL); RNA_def_property_struct_type(prop, "ConsoleLine"); - RNA_def_property_ui_text(prop, "History", "Command history"); + RNA_def_property_ui_text(prop, N_("History"), N_("Command history")); prop= RNA_def_property(srna, "scrollback", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "scrollback", NULL); RNA_def_property_struct_type(prop, "ConsoleLine"); - RNA_def_property_ui_text(prop, "Output", "Command output"); + RNA_def_property_ui_text(prop, N_("Output"), N_("Command output")); } static void rna_def_fileselect_params(BlenderRNA *brna) @@ -2233,109 +2235,109 @@ static void rna_def_fileselect_params(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem file_display_items[] = { - {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, - {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, - {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"}, + {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, N_("Short List"), N_("Display files as short list")}, + {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, N_("Long List"), N_("Display files as a detailed list")}, + {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, N_("Thumbnails"), N_("Display files as thumbnails")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem file_sort_items[] = { - {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically"}, - {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension"}, - {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"}, - {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size"}, + {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, N_("Sort alphabetically"), N_("Sort the file list alphabetically")}, + {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, N_("Sort by extension"), N_("Sort the file list by extension")}, + {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, N_("Sort by time"), N_("Sort files by modification time")}, + {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, N_("Sort by size"), N_("Sort files by size")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "FileSelectParams", NULL); - RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters"); + RNA_def_struct_ui_text(srna, N_("File Select Parameters"), N_("File Select Parameters")); prop= RNA_def_property(srna, "title", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "title"); - RNA_def_property_ui_text(prop, "Title", "Title for the file browser"); + RNA_def_property_ui_text(prop, N_("Title"), N_("Title for the file browser")); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "dir"); - RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser"); + RNA_def_property_ui_text(prop, N_("Directory"), N_("Directory displayed in the file browser")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME); RNA_def_property_string_sdna(prop, NULL, "file"); - RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser"); + RNA_def_property_ui_text(prop, N_("File Name"), N_("Active file in the file browser")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "display_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "display"); RNA_def_property_enum_items(prop, file_display_items); - RNA_def_property_ui_text(prop, "Display Mode", "Display mode for the file list"); + RNA_def_property_ui_text(prop, N_("Display Mode"), N_("Display mode for the file list")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_FILTER); - RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files"); + RNA_def_property_ui_text(prop, N_("Filter Files"), N_("Enable filtering of files")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FILE_HIDE_DOT); - RNA_def_property_ui_text(prop, "Show Hidden", "Show hidden dot files"); + RNA_def_property_ui_text(prop, N_("Show Hidden"), N_("Show hidden dot files")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS , NULL); prop= RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sort"); RNA_def_property_enum_items(prop, file_sort_items); - RNA_def_property_ui_text(prop, "Sort", ""); + RNA_def_property_ui_text(prop, N_("Sort"), ""); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_image", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", IMAGEFILE); - RNA_def_property_ui_text(prop, "Filter Images", "Show image files"); + RNA_def_property_ui_text(prop, N_("Filter Images"), N_("Show image files")); RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_blender", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", BLENDERFILE); - RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files"); + RNA_def_property_ui_text(prop, N_("Filter Blender"), N_("Show .blend files")); RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_movie", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", MOVIEFILE); - RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files"); + RNA_def_property_ui_text(prop, N_("Filter Movies"), N_("Show movie files")); RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_script", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", PYSCRIPTFILE); - RNA_def_property_ui_text(prop, "Filter Script", "Show script files"); + RNA_def_property_ui_text(prop, N_("Filter Script"), N_("Show script files")); RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_font", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", FTFONTFILE); - RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files"); + RNA_def_property_ui_text(prop, N_("Filter Fonts"), N_("Show font files")); RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_sound", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", SOUNDFILE); - RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files"); + RNA_def_property_ui_text(prop, N_("Filter Sound"), N_("Show sound files")); RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_text", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", TEXTFILE); - RNA_def_property_ui_text(prop, "Filter Text", "Show text files"); + RNA_def_property_ui_text(prop, N_("Filter Text"), N_("Show text files")); RNA_def_property_ui_icon(prop, ICON_FILE_BLANK, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "use_filter_folder", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filter", FOLDERFILE); - RNA_def_property_ui_text(prop, "Filter Folder", "Show folders"); + RNA_def_property_ui_text(prop, N_("Filter Folder"), N_("Show folders")); RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); prop= RNA_def_property(srna, "filter_glob", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "filter_glob"); - RNA_def_property_ui_text(prop, "Extension Filter", ""); + RNA_def_property_ui_text(prop, N_("Extension Filter"), ""); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL); } @@ -2347,15 +2349,15 @@ static void rna_def_space_filebrowser(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceFileBrowser", "Space"); RNA_def_struct_sdna(srna, "SpaceFile"); - RNA_def_struct_ui_text(srna, "Space File Browser", "File browser space data"); + RNA_def_struct_ui_text(srna, N_("Space File Browser"), N_("File browser space data")); prop= RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "params"); - RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser"); + RNA_def_property_ui_text(prop, N_("Filebrowser Parameter"), N_("Parameters and Settings for the Filebrowser")); prop= RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "op"); - RNA_def_property_ui_text(prop, "Operator", ""); + RNA_def_property_ui_text(prop, N_("Operator"), ""); } static void rna_def_space_info(BlenderRNA *brna) @@ -2365,32 +2367,32 @@ static void rna_def_space_info(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceInfo", "Space"); RNA_def_struct_sdna(srna, "SpaceInfo"); - RNA_def_struct_ui_text(srna, "Space Info", "Info space data"); + RNA_def_struct_ui_text(srna, N_("Space Info"), N_("Info space data")); /* reporting display */ prop= RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_DEBUG); - RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info"); + RNA_def_property_ui_text(prop, N_("Show Debug"), N_("Display debug reporting info")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL); prop= RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_INFO); - RNA_def_property_ui_text(prop, "Show Info", "Display general information"); + RNA_def_property_ui_text(prop, N_("Show Info"), N_("Display general information")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL); prop= RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_OP); - RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log"); + RNA_def_property_ui_text(prop, N_("Show Operator"), N_("Display the operator log")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL); prop= RNA_def_property(srna, "show_report_warning", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_WARN); - RNA_def_property_ui_text(prop, "Show Warn", "Display warnings"); + RNA_def_property_ui_text(prop, N_("Show Warn"), N_("Display warnings")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL); prop= RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_ERR); - RNA_def_property_ui_text(prop, "Show Error", "Display error text"); + RNA_def_property_ui_text(prop, N_("Show Error"), N_("Display error text")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL); } @@ -2401,11 +2403,11 @@ static void rna_def_space_userpref(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceUserPreferences", "Space"); RNA_def_struct_sdna(srna, "SpaceUserPref"); - RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data"); + RNA_def_struct_ui_text(srna, N_("Space User Preferences"), N_("User preferences space data")); prop= RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "filter"); - RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI"); + RNA_def_property_ui_text(prop, N_("Filter"), N_("Search term for filtering in the UI")); } @@ -2415,61 +2417,61 @@ static void rna_def_space_node(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem tree_type_items[] = { - {NTREE_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes"}, - {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes"}, - {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes"}, + {NTREE_SHADER, "MATERIAL", ICON_MATERIAL, N_("Material"), N_("Material nodes")}, + {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, N_("Texture"), N_("Texture nodes")}, + {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, N_("Compositing"), N_("Compositing nodes")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem texture_type_items[] = { - {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"}, - {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"}, - {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"}, + {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, N_("Object"), N_("Edit texture nodes from Object")}, + {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, N_("World"), N_("Edit texture nodes from World")}, + {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, N_("Brush"), N_("Edit texture nodes from Brush")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem backdrop_channels_items[] = { - {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"}, - {SNODE_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency"}, - {SNODE_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel"}, + {0, "COLOR", ICON_IMAGE_RGB, N_("Color"), N_("Draw image with RGB colors")}, + {SNODE_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, N_("Color and Alpha"), N_("Draw image with RGB colors and alpha transparency")}, + {SNODE_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, N_("Alpha"), N_("Draw alpha transparency channel")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "SpaceNodeEditor", "Space"); RNA_def_struct_sdna(srna, "SpaceNode"); - RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data"); + RNA_def_struct_ui_text(srna, N_("Space Node Editor"), N_("Node editor space data")); prop= RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "treetype"); RNA_def_property_enum_items(prop, tree_type_items); - RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit"); + RNA_def_property_ui_text(prop, N_("Tree Type"), N_("Node tree type to display and edit")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL); prop= RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "texfrom"); RNA_def_property_enum_items(prop, texture_type_items); - RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from"); + RNA_def_property_ui_text(prop, N_("Texture Type"), N_("Type of data to take texture from")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL); prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "ID", "Datablock whose nodes are being edited"); + RNA_def_property_ui_text(prop, "ID", N_("Datablock whose nodes are being edited")); prop= RNA_def_property(srna, "id_from", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "from"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "ID From", "Datablock from which the edited datablock is linked"); + RNA_def_property_ui_text(prop, N_("ID From"), N_("Datablock from which the edited datablock is linked")); prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited"); + RNA_def_property_ui_text(prop, N_("Node Tree"), N_("Node tree being displayed and edited")); prop= RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW); - RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes"); + RNA_def_property_ui_text(prop, N_("Backdrop"), N_("Use active Viewer Node output as backdrop for compositing nodes")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL); prop= RNA_def_property(srna, "use_auto_render", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_AUTO_RENDER); - RNA_def_property_ui_text(prop, "Auto Render", "Re-render and composite changed layer on 3D edits"); + RNA_def_property_ui_text(prop, N_("Auto Render"), N_("Re-render and composite changed layer on 3D edits")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL); prop= RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE); @@ -2477,23 +2479,23 @@ static void rna_def_space_node(BlenderRNA *brna) RNA_def_property_float_default(prop, 1.0f); RNA_def_property_range(prop, 0.01f, FLT_MAX); RNA_def_property_ui_range(prop, 0.01, 100, 1, 2); - RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor"); + RNA_def_property_ui_text(prop, N_("Backdrop Zoom"), N_("Backdrop zoom factor")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL); prop= RNA_def_property(srna, "backdrop_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xof"); - RNA_def_property_ui_text(prop, "Backdrop X", "Backdrop X offset"); + RNA_def_property_ui_text(prop, N_("Backdrop X"), N_("Backdrop X offset")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL); prop= RNA_def_property(srna, "backdrop_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "yof"); - RNA_def_property_ui_text(prop, "Backdrop Y", "Backdrop Y offset"); + RNA_def_property_ui_text(prop, N_("Backdrop Y"), N_("Backdrop Y offset")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL); prop= RNA_def_property(srna, "backdrop_channels", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, backdrop_channels_items); - RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw"); + RNA_def_property_ui_text(prop, N_("Draw Channels"), N_("Channels of the image to draw")); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL); } @@ -2504,64 +2506,64 @@ static void rna_def_space_logic(BlenderRNA *brna) srna= RNA_def_struct(brna, "SpaceLogicEditor", "Space"); RNA_def_struct_sdna(srna, "SpaceLogic"); - RNA_def_struct_ui_text(srna, "Space Logic Editor", "Logic editor space data"); + RNA_def_struct_ui_text(srna, N_("Space Logic Editor"), N_("Logic editor space data")); /* sensors */ prop= RNA_def_property(srna, "show_sensors_selected_objects", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_SEL); - RNA_def_property_ui_text(prop, "Show Selected Object", "Show sensors of all selected objects"); + RNA_def_property_ui_text(prop, N_("Show Selected Object"), N_("Show sensors of all selected objects")); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "show_sensors_active_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_ACT); - RNA_def_property_ui_text(prop, "Show Active Object", "Show sensors of active object"); + RNA_def_property_ui_text(prop, N_("Show Active Object"), N_("Show sensors of active object")); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "show_sensors_linked_controller", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_LINK); - RNA_def_property_ui_text(prop, "Show Linked to Controller", "Show linked objects to the controller"); + RNA_def_property_ui_text(prop, N_("Show Linked to Controller"), N_("Show linked objects to the controller")); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "show_sensors_active_states", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_STATE); - RNA_def_property_ui_text(prop, "Show Active States", "Show only sensors connected to active states"); + RNA_def_property_ui_text(prop, N_("Show Active States"), N_("Show only sensors connected to active states")); RNA_def_property_update(prop, NC_LOGIC, NULL); /* controllers */ prop= RNA_def_property(srna, "show_controllers_selected_objects", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_SEL); - RNA_def_property_ui_text(prop, "Show Selected Object", "Show controllers of all selected objects"); + RNA_def_property_ui_text(prop, N_("Show Selected Object"), N_("Show controllers of all selected objects")); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "show_controllers_active_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_ACT); - RNA_def_property_ui_text(prop, "Show Active Object", "Show controllers of active object"); + RNA_def_property_ui_text(prop, N_("Show Active Object"), N_("Show controllers of active object")); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "show_controllers_linked_controller", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_LINK); - RNA_def_property_ui_text(prop, "Show Linked to Controller", "Show linked objects to sensor/actuator"); + RNA_def_property_ui_text(prop, N_("Show Linked to Controller"), N_("Show linked objects to sensor/actuator")); RNA_def_property_update(prop, NC_LOGIC, NULL); /* actuators */ prop= RNA_def_property(srna, "show_actuators_selected_objects", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_SEL); - RNA_def_property_ui_text(prop, "Show Selected Object", "Show actuators of all selected objects"); + RNA_def_property_ui_text(prop, N_("Show Selected Object"), N_("Show actuators of all selected objects")); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "show_actuators_active_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_ACT); - RNA_def_property_ui_text(prop, "Show Active Object", "Show actuators of active object"); + RNA_def_property_ui_text(prop, N_("Show Active Object"), N_("Show actuators of active object")); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "show_actuators_linked_controller", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_LINK); - RNA_def_property_ui_text(prop, "Show Linked to Actuator", "Show linked objects to the actuator"); + RNA_def_property_ui_text(prop, N_("Show Linked to Actuator"), N_("Show linked objects to the actuator")); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "show_actuators_active_states", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_STATE); - RNA_def_property_ui_text(prop, "Show Active States", "Show only actuators connected to active states"); + RNA_def_property_ui_text(prop, N_("Show Active States"), N_("Show only actuators connected to active states")); RNA_def_property_update(prop, NC_LOGIC, NULL); } diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 4d1e1f175f2..3e2feec71d9 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -44,6 +44,7 @@ #include "WM_types.h" #include "BLI_utildefines.h" +#include "BLF_api.h" #include "BKE_sound.h" @@ -403,51 +404,51 @@ static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna) srna= RNA_def_struct(brna, "ThemeWidgetColors", NULL); RNA_def_struct_sdna(srna, "uiWidgetColors"); - RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings for widget color sets"); + RNA_def_struct_ui_text(srna, N_("Theme Widget Color Set"), N_("Theme settings for widget color sets")); prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Outline", ""); + RNA_def_property_ui_text(prop, N_("Outline"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 4); - RNA_def_property_ui_text(prop, "Inner", ""); + RNA_def_property_ui_text(prop, N_("Inner"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 4); - RNA_def_property_ui_text(prop, "Inner Selected", ""); + RNA_def_property_ui_text(prop, N_("Inner Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 4); - RNA_def_property_ui_text(prop, "Item", ""); + RNA_def_property_ui_text(prop, N_("Item"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Text", ""); + RNA_def_property_ui_text(prop, N_("Text"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Text Selected", ""); + RNA_def_property_ui_text(prop, N_("Text Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "show_shaded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1); - RNA_def_property_ui_text(prop, "Shaded", ""); + RNA_def_property_ui_text(prop, N_("Shaded"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE); RNA_def_property_range(prop, -100, 100); - RNA_def_property_ui_text(prop, "Shade Top", ""); + RNA_def_property_ui_text(prop, N_("Shade Top"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE); RNA_def_property_range(prop, -100, 100); - RNA_def_property_ui_text(prop, "Shade Down", ""); + RNA_def_property_ui_text(prop, N_("Shade Down"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); } @@ -458,40 +459,40 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna) srna= RNA_def_struct(brna, "ThemeWidgetStateColors", NULL); RNA_def_struct_sdna(srna, "uiWidgetStateColors"); - RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors"); + RNA_def_struct_ui_text(srna, N_("Theme Widget State Color"), N_("Theme settings for widget state colors")); prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Animated", ""); + RNA_def_property_ui_text(prop, N_("Animated"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Animated Selected", ""); + RNA_def_property_ui_text(prop, N_("Animated Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Keyframe", ""); + RNA_def_property_ui_text(prop, N_("Keyframe"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Keyframe Selected", ""); + RNA_def_property_ui_text(prop, N_("Keyframe Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Driven", ""); + RNA_def_property_ui_text(prop, N_("Driven"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Driven Selected", ""); + RNA_def_property_ui_text(prop, N_("Driven Selected"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR); - RNA_def_property_ui_text(prop, "Blend", ""); + RNA_def_property_ui_text(prop, N_("Blend"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); } @@ -628,7 +629,7 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "iconfile"); - RNA_def_property_ui_text(prop, "Icon File", ""); + RNA_def_property_ui_text(prop, N_("Icon File"), ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); } @@ -1713,28 +1714,28 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna) srna= RNA_def_struct(brna, "ThemeBoneColorSet", NULL); RNA_def_struct_sdna(srna, "ThemeWireColor"); - RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets"); + RNA_def_struct_ui_text(srna, N_("Theme Bone Color Set"), N_("Theme settings for bone color sets")); prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "solid"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of bones"); + RNA_def_property_ui_text(prop, N_("Normal"), N_("Color used for the surface of bones")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "select"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Select", "Color used for selected bones"); + RNA_def_property_ui_text(prop, N_("Select"), N_("Color used for selected bones")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Active", "Color used for active bones"); + RNA_def_property_ui_text(prop, N_("Active"), N_("Color used for active bones")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "show_colored_constraints", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS); - RNA_def_property_ui_text(prop, "Colored Constraints", "Allow the use of colors indicating constraints/keyed status"); + RNA_def_property_ui_text(prop, N_("Colored Constraints"), N_("Allow the use of colors indicating constraints/keyed status")); RNA_def_property_update(prop, 0, "rna_userdef_update"); } @@ -1744,24 +1745,24 @@ static void rna_def_userdef_themes(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem active_theme_area[] = { - {0, "USER_INTERFACE", ICON_UI, "User Interface", ""}, - {18, "BONE_COLOR_SETS", ICON_COLOR, "Bone Color Sets", ""}, - {1, "VIEW_3D", ICON_VIEW3D, "3D View", ""}, - {2, "TIMELINE", ICON_TIME, "Timeline", ""}, - {3, "GRAPH_EDITOR", ICON_IPO, "Graph Editor", ""}, - {4, "DOPESHEET_EDITOR", ICON_ACTION, "Dopesheet", ""}, - {5, "NLA_EDITOR", ICON_NLA, "NLA Editor", ""}, - {6, "IMAGE_EDITOR", ICON_IMAGE_COL, "UV/Image Editor", ""}, - {7, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequence Editor", ""}, - {8, "TEXT_EDITOR", ICON_TEXT, "Text Editor", ""}, - {9, "NODE_EDITOR", ICON_NODETREE, "Node Editor", ""}, - {10, "LOGIC_EDITOR", ICON_LOGIC, "Logic Editor", ""}, - {11, "PROPERTIES", ICON_BUTS, "Properties", ""}, - {12, "OUTLINER", ICON_OOPS, "Outliner", ""}, - {14, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", ""}, - {15, "INFO", ICON_INFO, "Info", ""}, - {16, "FILE_BROWSER", ICON_FILESEL, "File Browser", ""}, - {17, "CONSOLE", ICON_CONSOLE, "Python Console", ""}, + {0, "USER_INTERFACE", ICON_UI, N_("User Interface"), ""}, + {18, "BONE_COLOR_SETS", ICON_COLOR, N_("Bone Color Sets"), ""}, + {1, "VIEW_3D", ICON_VIEW3D, N_("3D View"), ""}, + {2, "TIMELINE", ICON_TIME, N_("Timeline"), ""}, + {3, "GRAPH_EDITOR", ICON_IPO, N_("Graph Editor"), ""}, + {4, "DOPESHEET_EDITOR", ICON_ACTION, N_("Dopesheet"), ""}, + {5, "NLA_EDITOR", ICON_NLA, N_("NLA Editor"), ""}, + {6, "IMAGE_EDITOR", ICON_IMAGE_COL, N_("UV/Image Editor"), ""}, + {7, "SEQUENCE_EDITOR", ICON_SEQUENCE, N_("Video Sequence Editor"), ""}, + {8, "TEXT_EDITOR", ICON_TEXT, N_("Text Editor"), ""}, + {9, "NODE_EDITOR", ICON_NODETREE, N_("Node Editor"), ""}, + {10, "LOGIC_EDITOR", ICON_LOGIC, N_("Logic Editor"), ""}, + {11, "PROPERTIES", ICON_BUTS, N_("Properties"), ""}, + {12, "OUTLINER", ICON_OOPS, N_("Outliner"), ""}, + {14, "USER_PREFERENCES", ICON_PREFERENCES, N_("User Preferences"), ""}, + {15, "INFO", ICON_INFO, N_("Info"), ""}, + {16, "FILE_BROWSER", ICON_FILESEL, N_("File Browser"), ""}, + {17, "CONSOLE", ICON_CONSOLE, N_("Python Console"), ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "Theme", NULL); @@ -1769,121 +1770,121 @@ static void rna_def_userdef_themes(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw style and colors in the user interface"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text(prop, "Name", "Name of the theme"); + RNA_def_property_ui_text(prop, N_("Name"), N_("Name of the theme")); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "active_theme_area"); RNA_def_property_enum_items(prop, active_theme_area); - RNA_def_property_ui_text(prop, "Active Theme Area", ""); + RNA_def_property_ui_text(prop, N_("Active Theme Area"), ""); prop= RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tui"); RNA_def_property_struct_type(prop, "ThemeUserInterface"); - RNA_def_property_ui_text(prop, "User Interface", ""); + RNA_def_property_ui_text(prop, N_("User Interface"), ""); prop= RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tv3d"); RNA_def_property_struct_type(prop, "ThemeView3D"); - RNA_def_property_ui_text(prop, "3D View", ""); + RNA_def_property_ui_text(prop, N_("3D View"), ""); prop= RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tipo"); RNA_def_property_struct_type(prop, "ThemeGraphEditor"); - RNA_def_property_ui_text(prop, "Graph Editor", ""); + RNA_def_property_ui_text(prop, N_("Graph Editor"), ""); prop= RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tfile"); RNA_def_property_struct_type(prop, "ThemeFileBrowser"); - RNA_def_property_ui_text(prop, "File Browser", ""); + RNA_def_property_ui_text(prop, N_("File Browser"), ""); prop= RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tnla"); RNA_def_property_struct_type(prop, "ThemeNLAEditor"); - RNA_def_property_ui_text(prop, "NLA Editor", ""); + RNA_def_property_ui_text(prop, N_("NLA Editor"), ""); prop= RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tact"); RNA_def_property_struct_type(prop, "ThemeDopeSheet"); - RNA_def_property_ui_text(prop, "DopeSheet", ""); + RNA_def_property_ui_text(prop, N_("DopeSheet"), ""); prop= RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tima"); RNA_def_property_struct_type(prop, "ThemeImageEditor"); - RNA_def_property_ui_text(prop, "Image Editor", ""); + RNA_def_property_ui_text(prop, N_("Image Editor"), ""); prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tseq"); RNA_def_property_struct_type(prop, "ThemeSequenceEditor"); - RNA_def_property_ui_text(prop, "Sequence Editor", ""); + RNA_def_property_ui_text(prop, N_("Sequence Editor"), ""); prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tbuts"); RNA_def_property_struct_type(prop, "ThemeProperties"); - RNA_def_property_ui_text(prop, "Properties", ""); + RNA_def_property_ui_text(prop, N_("Properties"), ""); prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "text"); RNA_def_property_struct_type(prop, "ThemeTextEditor"); - RNA_def_property_ui_text(prop, "Text Editor", ""); + RNA_def_property_ui_text(prop, N_("Text Editor"), ""); prop= RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "ttime"); RNA_def_property_struct_type(prop, "ThemeTimeline"); - RNA_def_property_ui_text(prop, "Timeline", ""); + RNA_def_property_ui_text(prop, N_("Timeline"), ""); prop= RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tnode"); RNA_def_property_struct_type(prop, "ThemeNodeEditor"); - RNA_def_property_ui_text(prop, "Node Editor", ""); + RNA_def_property_ui_text(prop, N_("Node Editor"), ""); prop= RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tlogic"); RNA_def_property_struct_type(prop, "ThemeLogicEditor"); - RNA_def_property_ui_text(prop, "Logic Editor", ""); + RNA_def_property_ui_text(prop, N_("Logic Editor"), ""); prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "toops"); RNA_def_property_struct_type(prop, "ThemeOutliner"); - RNA_def_property_ui_text(prop, "Outliner", ""); + RNA_def_property_ui_text(prop, N_("Outliner"), ""); prop= RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tinfo"); RNA_def_property_struct_type(prop, "ThemeInfo"); - RNA_def_property_ui_text(prop, "Info", ""); + RNA_def_property_ui_text(prop, N_("Info"), ""); prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tuserpref"); RNA_def_property_struct_type(prop, "ThemeUserPreferences"); - RNA_def_property_ui_text(prop, "User Preferences", ""); + RNA_def_property_ui_text(prop, N_("User Preferences"), ""); prop= RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "tconsole"); RNA_def_property_struct_type(prop, "ThemeConsole"); - RNA_def_property_ui_text(prop, "Console", ""); + RNA_def_property_ui_text(prop, N_("Console"), ""); prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_collection_sdna(prop, NULL, "tarm", ""); RNA_def_property_struct_type(prop, "ThemeBoneColorSet"); - RNA_def_property_ui_text(prop, "Bone Color Sets", ""); + RNA_def_property_ui_text(prop, N_("Bone Color Sets"), ""); } static void rna_def_userdef_addon(BlenderRNA *brna) @@ -1964,11 +1965,11 @@ static void rna_def_userdef_solidlight(BlenderRNA *brna) static void rna_def_userdef_view(BlenderRNA *brna) { static EnumPropertyItem timecode_styles[] = { - {USER_TIMECODE_MINIMAL, "MINIMAL", 0, "Minimal Info", "Most compact representation. Uses '+' as separator for sub-second frame numbers, with left and right truncation of the timecode as necessary"}, - {USER_TIMECODE_SMPTE_FULL, "SMPTE", 0, "SMPTE (Full)", "Full SMPTE timecode. Format is HH:MM:SS:FF"}, - {USER_TIMECODE_SMPTE_MSF, "SMPTE_COMPACT", 0, "SMPTE (Compact)", "SMPTE timecode showing minutes, seconds, and frames only. Hours are also shown if necessary, but not by default"}, - {USER_TIMECODE_MILLISECONDS, "MILLISECONDS", 0, "Compact with Milliseconds", "Similar to SMPTE (Compact), except that instead of frames, milliseconds are shown instead"}, - {USER_TIMECODE_SECONDS_ONLY, "SECONDS_ONLY", 0, "Only Seconds", "Direct conversion of frame numbers to seconds"}, + {USER_TIMECODE_MINIMAL, "MINIMAL", 0, N_("Minimal Info"), N_("Most compact representation. Uses '+' as separator for sub-second frame numbers, with left and right truncation of the timecode as necessary")}, + {USER_TIMECODE_SMPTE_FULL, "SMPTE", 0, N_("SMPTE (Full)"), N_("Full SMPTE timecode. Format is HH:MM:SS:FF")}, + {USER_TIMECODE_SMPTE_MSF, "SMPTE_COMPACT", 0, N_("SMPTE (Compact)"), N_("SMPTE timecode showing minutes, seconds, and frames only. Hours are also shown if necessary, but not by default")}, + {USER_TIMECODE_MILLISECONDS, "MILLISECONDS", 0, N_("Compact with Milliseconds"), N_("Similar to SMPTE (Compact), except that instead of frames, milliseconds are shown instead")}, + {USER_TIMECODE_SECONDS_ONLY, "SECONDS_ONLY", 0, N_("Only Seconds"), N_("Direct conversion of frame numbers to seconds")}, {0, NULL, 0, NULL, NULL}}; PropertyRNA *prop; @@ -1984,166 +1985,166 @@ static void rna_def_userdef_view(BlenderRNA *brna) /* display */ prop= RNA_def_property(srna, "show_tooltips", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TOOLTIPS); - RNA_def_property_ui_text(prop, "Tooltips", "Display tooltips"); + RNA_def_property_ui_text(prop, N_("Tooltips"), N_("Display tooltips")); prop= RNA_def_property(srna, "show_tooltips_python", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TOOLTIPS_PYTHON); - RNA_def_property_ui_text(prop, "Show Python Tooltips", "Show Python references in tooltips"); + RNA_def_property_ui_text(prop, N_("Show Python Tooltips"), N_("Show Python references in tooltips")); prop= RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO); - RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3D view"); + RNA_def_property_ui_text(prop, N_("Display Object Info"), N_("Display objects name and frame number in 3D view")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "use_global_scene", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL); - RNA_def_property_ui_text(prop, "Global Scene", "Forces the current Scene to be displayed in all Screens"); + RNA_def_property_ui_text(prop, N_("Global Scene"), N_("Forces the current Scene to be displayed in all Screens")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "show_large_cursors", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0); - RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors when available"); + RNA_def_property_ui_text(prop, N_("Large Cursors"), N_("Use large mouse cursors when available")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME); - RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View"); + RNA_def_property_ui_text(prop, N_("Show View Name"), N_("Show the name of the view's direction in each 3D View")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH_DISABLE); - RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on startup"); + RNA_def_property_ui_text(prop, N_("Show Splash"), N_("Display splash screen on startup")); prop= RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS); - RNA_def_property_ui_text(prop, "Show Playback FPS", "Show the frames per second screen refresh rate, while animation is played back"); + RNA_def_property_ui_text(prop, N_("Show Playback FPS"), N_("Show the frames per second screen refresh rate, while animation is played back")); RNA_def_property_update(prop, 0, "rna_userdef_update"); /* menus */ prop= RNA_def_property(srna, "use_mouse_over_open", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MENUOPENAUTO); - RNA_def_property_ui_text(prop, "Open On Mouse Over", "Open menu buttons and pulldowns automatically when the mouse is hovering"); + RNA_def_property_ui_text(prop, N_("Open On Mouse Over"), N_("Open menu buttons and pulldowns automatically when the mouse is hovering")); prop= RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "menuthreshold1"); RNA_def_property_range(prop, 1, 40); - RNA_def_property_ui_text(prop, "Top Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening top level menus"); + RNA_def_property_ui_text(prop, N_("Top Level Menu Open Delay"), N_("Time delay in 1/10 seconds before automatically opening top level menus")); prop= RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "menuthreshold2"); RNA_def_property_range(prop, 1, 40); - RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening sub level menus"); + RNA_def_property_ui_text(prop, N_("Sub Level Menu Open Delay"), N_("Time delay in 1/10 seconds before automatically opening sub level menus")); /* Toolbox click-hold delay */ prop= RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tb_leftmouse"); RNA_def_property_range(prop, 1, 40); - RNA_def_property_ui_text(prop, "Hold LMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox"); + RNA_def_property_ui_text(prop, N_("Hold LMB Open Toolbox Delay"), N_("Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox")); prop= RNA_def_property(srna, "open_right_mouse_delay", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tb_rightmouse"); RNA_def_property_range(prop, 1, 40); - RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox"); + RNA_def_property_ui_text(prop, N_("Hold RMB Open Toolbox Delay"), N_("Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox")); prop= RNA_def_property(srna, "show_column_layout", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS); - RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox"); + RNA_def_property_ui_text(prop, N_("Toolbox Column Layout"), N_("Use a column layout for toolbox")); prop= RNA_def_property(srna, "use_directional_menus", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFIXEDORDER); - RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction"); + RNA_def_property_ui_text(prop, N_("Contents Follow Opening Direction"), N_("Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction")); prop= RNA_def_property(srna, "use_global_pivot", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND); - RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views"); + RNA_def_property_ui_text(prop, N_("Global Pivot"), N_("Lock the same rotation/scaling pivot in all 3D Views")); prop= RNA_def_property(srna, "use_mouse_auto_depth", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF); - RNA_def_property_ui_text(prop, "Auto Depth", "Use the depth under the mouse to improve view pan/rotate/zoom functionality"); + RNA_def_property_ui_text(prop, N_("Auto Depth"), N_("Use the depth under the mouse to improve view pan/rotate/zoom functionality")); prop= RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT); - RNA_def_property_ui_text(prop, "Camera Parent Lock", "When the camera is locked to the view and in fly mode, transform the parent rather than the camera"); + RNA_def_property_ui_text(prop, N_("Camera Parent Lock"), N_("When the camera is locked to the view and in fly mode, transform the parent rather than the camera")); /* view zoom */ prop= RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPOS); - RNA_def_property_ui_text(prop, "Zoom To Mouse Position", "Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center"); + RNA_def_property_ui_text(prop, N_("Zoom To Mouse Position"), N_("Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center")); /* view rotation */ prop= RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP); - RNA_def_property_ui_text(prop, "Auto Perspective", "Automatically switch between orthographic and perspective when changing from top/front/side views"); + RNA_def_property_ui_text(prop, N_("Auto Perspective"), N_("Automatically switch between orthographic and perspective when changing from top/front/side views")); prop= RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION); - RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection as the pivot point"); + RNA_def_property_ui_text(prop, N_("Rotate Around Selection"), N_("Use selection as the pivot point")); /* mini axis */ prop= RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICON); - RNA_def_property_ui_text(prop, "Show Mini Axis", "Show a small rotating 3D axis in the bottom left corner of the 3D View"); + RNA_def_property_ui_text(prop, N_("Show Mini Axis"), N_("Show a small rotating 3D axis in the bottom left corner of the 3D View")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "rvisize"); RNA_def_property_range(prop, 10, 64); - RNA_def_property_ui_text(prop, "Mini Axis Size", "The axis icon's size"); + RNA_def_property_ui_text(prop, N_("Mini Axis Size"), N_("The axis icon's size")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "rvibright"); RNA_def_property_range(prop, 0, 10); - RNA_def_property_ui_text(prop, "Mini Axis Brightness", "The brightness of the icon"); + RNA_def_property_ui_text(prop, N_("Mini Axis Brightness"), N_("The brightness of the icon")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx"); RNA_def_property_range(prop, 0, 1000); - RNA_def_property_ui_text(prop, "Smooth View", "The time to animate the view in milliseconds, zero to disable"); + RNA_def_property_ui_text(prop, N_("Smooth View"), N_("The time to animate the view in milliseconds, zero to disable")); prop= RNA_def_property(srna, "rotation_angle", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pad_rot_angle"); RNA_def_property_range(prop, 0, 90); - RNA_def_property_ui_text(prop, "Rotation Angle", "The rotation step for numerical pad keys (2 4 6 8)"); + RNA_def_property_ui_text(prop, N_("Rotation Angle"), N_("The rotation step for numerical pad keys (2 4 6 8)")); /* 3D transform widget */ prop= RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", V3D_USE_MANIPULATOR); - RNA_def_property_ui_text(prop, "Manipulator", "Use 3D transform manipulator"); + RNA_def_property_ui_text(prop, N_("Manipulator"), N_("Use 3D transform manipulator")); RNA_def_property_update(prop, 0, "rna_userdef_show_manipulator_update"); prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tw_size"); RNA_def_property_range(prop, 2, 40); RNA_def_property_int_default(prop, 15); - RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units"); + RNA_def_property_ui_text(prop, N_("Manipulator Size"), N_("Diameter of widget, in 10 pixel units")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tw_handlesize"); RNA_def_property_range(prop, 2, 40); RNA_def_property_int_default(prop, 25); - RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius"); + RNA_def_property_ui_text(prop, N_("Manipulator Handle Size"), N_("Size of widget handles as percentage of widget radius")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tw_hotspot"); RNA_def_property_range(prop, 4, 40); RNA_def_property_int_default(prop, 14); - RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Pixel distance around the handles to accept mouse clicks"); + RNA_def_property_ui_text(prop, N_("Manipulator Hotspot"), N_("Pixel distance around the handles to accept mouse clicks")); prop= RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "obcenter_dia"); RNA_def_property_range(prop, 4, 10); - RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels for Object/Lamp origin display"); + RNA_def_property_ui_text(prop, N_("Object Origin Size"), N_("Diameter in Pixels for Object/Lamp origin display")); RNA_def_property_update(prop, 0, "rna_userdef_update"); /* View2D Grid Displays */ prop= RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "v2d_min_gridsize"); RNA_def_property_range(prop, 1, 500); // XXX: perhaps the lower range should only go down to 5? - RNA_def_property_ui_text(prop, "2D View Minimum Grid Spacing", "Minimum number of pixels between each gridline in 2D Viewports"); + RNA_def_property_ui_text(prop, N_("2D View Minimum Grid Spacing"), N_("Minimum number of pixels between each gridline in 2D Viewports")); RNA_def_property_update(prop, 0, "rna_userdef_update"); // TODO: add a setter for this, so that we can bump up the minimum size as necessary... @@ -2151,7 +2152,7 @@ static void rna_def_userdef_view(BlenderRNA *brna) RNA_def_property_enum_items(prop, timecode_styles); RNA_def_property_enum_sdna(prop, NULL, "timecode_style"); RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_timecode_style_set", NULL); - RNA_def_property_ui_text(prop, "TimeCode Style", "Format of Time Codes displayed when not displaying timing in terms of frames"); + RNA_def_property_ui_text(prop, N_("TimeCode Style"), N_("Format of Time Codes displayed when not displaying timing in terms of frames")); RNA_def_property_update(prop, 0, "rna_userdef_update"); } @@ -2166,178 +2167,178 @@ static void rna_def_userdef_edit(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static const EnumPropertyItem material_link_items[]= { - {0, "OBDATA", 0, "ObData", "Toggle whether the material is linked to object data or the object block"}, - {USER_MAT_ON_OB, "OBJECT", 0, "Object", "Toggle whether the material is linked to object data or the object block"}, + {0, "OBDATA", 0, N_("ObData"), N_("Toggle whether the material is linked to object data or the object block")}, + {USER_MAT_ON_OB, "OBJECT", 0, N_("Object"), N_("Toggle whether the material is linked to object data or the object block")}, {0, NULL, 0, NULL, NULL}}; static const EnumPropertyItem object_align_items[]= { - {0, "WORLD", 0, "World", "Align newly added objects to the world coordinates"}, - {USER_ADD_VIEWALIGNED, "VIEW", 0, "View", "Align newly added objects facing the active 3D View direction"}, + {0, "WORLD", 0, N_("World"), N_("Align newly added objects to the world coordinates")}, + {USER_ADD_VIEWALIGNED, "VIEW", 0, N_("View"), N_("Align newly added objects facing the active 3D View direction")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "UserPreferencesEdit", NULL); RNA_def_struct_sdna(srna, "UserDef"); RNA_def_struct_nested(brna, srna, "UserPreferences"); - RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data"); + RNA_def_struct_ui_text(srna, N_("Edit Methods"), N_("Settings for interacting with Blender data")); /* Edit Methods */ prop= RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, material_link_items); - RNA_def_property_ui_text(prop, "Material Link To", "Toggle whether the material is linked to object data or the object block"); + RNA_def_property_ui_text(prop, N_("Material Link To"), N_("Toggle whether the material is linked to object data or the object block")); prop= RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, object_align_items); - RNA_def_property_ui_text(prop, "Align Object To", "When adding objects from a 3D View menu, either align them to that view's direction or the world coordinates"); + RNA_def_property_ui_text(prop, N_("Align Object To"), N_("When adding objects from a 3D View menu, either align them to that view's direction or the world coordinates")); prop= RNA_def_property(srna, "use_enter_edit_mode", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE); - RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode automatically after adding a new object"); + RNA_def_property_ui_text(prop, N_("Enter Edit Mode"), N_("Enter Edit Mode automatically after adding a new object")); prop= RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELEASECONFIRM); - RNA_def_property_ui_text(prop, "Release confirms", "Moving things with a mouse drag confirms when releasing the button"); + RNA_def_property_ui_text(prop, N_("Release confirms"), N_("Moving things with a mouse drag confirms when releasing the button")); /* Undo */ prop= RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "undosteps"); RNA_def_property_range(prop, 0, 64); - RNA_def_property_ui_text(prop, "Undo Steps", "Number of undo steps available (smaller values conserve memory)"); + RNA_def_property_ui_text(prop, N_("Undo Steps"), N_("Number of undo steps available (smaller values conserve memory)")); prop= RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "undomemory"); RNA_def_property_range(prop, 0, 32767); - RNA_def_property_ui_text(prop, "Undo Memory Size", "Maximum memory usage in megabytes (0 means unlimited)"); + RNA_def_property_ui_text(prop, N_("Undo Memory Size"), N_("Maximum memory usage in megabytes (0 means unlimited)")); prop= RNA_def_property(srna, "use_global_undo", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO); - RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory"); + RNA_def_property_ui_text(prop, N_("Global Undo"), N_("Global undo works by keeping a full copy of the file itself in memory, so takes extra memory")); /* auto keyframing */ prop= RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON); - RNA_def_property_ui_text(prop, "Auto Keying Enable", "Automatic keyframe insertion for Objects and Bones"); + RNA_def_property_ui_text(prop, N_("Auto Keying Enable"), N_("Automatic keyframe insertion for Objects and Bones")); RNA_def_property_ui_icon(prop, ICON_REC, 0); prop= RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, auto_key_modes); RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_userdef_autokeymode_set", NULL); - RNA_def_property_ui_text(prop, "Auto Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones"); + RNA_def_property_ui_text(prop, N_("Auto Keying Mode"), N_("Mode of automatic keyframe insertion for Objects and Bones")); prop= RNA_def_property(srna, "use_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTAVAIL); - RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available", "Automatic keyframe insertion in available curves"); + RNA_def_property_ui_text(prop, N_("Auto Keyframe Insert Available"), N_("Automatic keyframe insertion in available curves")); /* keyframing settings */ prop= RNA_def_property(srna, "use_keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTNEEDED); - RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe insertion only when keyframe needed"); + RNA_def_property_ui_text(prop, N_("Keyframe Insert Needed"), N_("Keyframe insertion only when keyframe needed")); prop= RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_AUTOMATKEY); - RNA_def_property_ui_text(prop, "Visual Keying", "Use Visual keying automatically for constrained objects"); + RNA_def_property_ui_text(prop, N_("Visual Keying"), N_("Use Visual keying automatically for constrained objects")); prop= RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_XYZ2RGB); - RNA_def_property_ui_text(prop, "New F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis"); + RNA_def_property_ui_text(prop, N_("New F-Curve Colors - XYZ to RGB"), N_("Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis")); prop= RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items); RNA_def_property_enum_sdna(prop, NULL, "ipo_new"); - RNA_def_property_ui_text(prop, "New Interpolation Type", ""); + RNA_def_property_ui_text(prop, N_("New Interpolation Type"), ""); prop= RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, beztriple_handle_type_items); RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new"); - RNA_def_property_ui_text(prop, "New Handles Type", ""); + RNA_def_property_ui_text(prop, N_("New Handles Type"), ""); /* frame numbers */ prop= RNA_def_property(srna, "use_negative_frames", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_NONEGFRAMES); - RNA_def_property_ui_text(prop, "Allow Negative Frames", "Current frame number can be manually set to a negative value"); + RNA_def_property_ui_text(prop, N_("Allow Negative Frames"), N_("Current frame number can be manually set to a negative value")); /* grease pencil */ prop= RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist"); RNA_def_property_range(prop, 0, 100); - RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance", "Pixels moved by mouse per axis when drawing stroke"); + RNA_def_property_ui_text(prop, N_("Grease Pencil Manhattan Distance"), N_("Pixels moved by mouse per axis when drawing stroke")); prop= RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist"); RNA_def_property_range(prop, 0, 100); - RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance", "Distance moved by mouse when drawing stroke (in pixels) to include"); + RNA_def_property_ui_text(prop, N_("Grease Pencil Euclidean Distance"), N_("Distance moved by mouse when drawing stroke (in pixels) to include")); prop= RNA_def_property(srna, "use_grease_pencil_smooth_stroke", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOOTH); - RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth the final stroke"); + RNA_def_property_ui_text(prop, N_("Grease Pencil Smooth Stroke"), N_("Smooth the final stroke")); prop= RNA_def_property(srna, "use_grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY); - RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke"); + RNA_def_property_ui_text(prop, N_("Grease Pencil Simplify Stroke"), N_("Simplify the final stroke")); prop= RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gp_eraser"); RNA_def_property_range(prop, 0, 100); - RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'"); + RNA_def_property_ui_text(prop, N_("Grease Pencil Eraser Radius"), N_("Radius of eraser 'brush'")); /* sculpt and paint */ prop= RNA_def_property(srna, "sculpt_paint_overlay_color", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "sculpt_paint_overlay_col"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Sculpt/Paint Overlay Color", "Color of texture overlay"); + RNA_def_property_ui_text(prop, N_("Sculpt/Paint Overlay Color"), N_("Color of texture overlay")); /* duplication linking */ prop= RNA_def_property(srna, "use_duplicate_mesh", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MESH); - RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Mesh"), N_("Causes mesh data to be duplicated with the object")); prop= RNA_def_property(srna, "use_duplicate_surface", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SURF); - RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Surface"), N_("Causes surface data to be duplicated with the object")); prop= RNA_def_property(srna, "use_duplicate_curve", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CURVE); - RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Curve"), N_("Causes curve data to be duplicated with the object")); prop= RNA_def_property(srna, "use_duplicate_text", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT); - RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Text"), N_("Causes text data to be duplicated with the object")); prop= RNA_def_property(srna, "use_duplicate_metaball", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MBALL); - RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Metaball"), N_("Causes metaball data to be duplicated with the object")); prop= RNA_def_property(srna, "use_duplicate_armature", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM); - RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Armature"), N_("Causes armature data to be duplicated with the object")); prop= RNA_def_property(srna, "use_duplicate_lamp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP); - RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Lamp"), N_("Causes lamp data to be duplicated with the object")); prop= RNA_def_property(srna, "use_duplicate_material", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT); - RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Material"), N_("Causes material data to be duplicated with the object")); prop= RNA_def_property(srna, "use_duplicate_texture", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_TEX); - RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Texture"), N_("Causes texture data to be duplicated with the object")); // xxx prop= RNA_def_property(srna, "use_duplicate_fcurve", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_IPO); - RNA_def_property_ui_text(prop, "Duplicate F-Curve", "Causes F-curve data to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate F-Curve"), N_("Causes F-curve data to be duplicated with the object")); // xxx prop= RNA_def_property(srna, "use_duplicate_action", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ACT); - RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Action"), N_("Causes actions to be duplicated with the object")); prop= RNA_def_property(srna, "use_duplicate_particle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_PSYS); - RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object"); + RNA_def_property_ui_text(prop, N_("Duplicate Particle"), N_("Causes particle systems to be duplicated with the object")); } static void rna_def_userdef_system(BlenderRNA *brna) @@ -2346,7 +2347,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) StructRNA *srna; static EnumPropertyItem gl_texture_clamp_items[] = { - {0, "CLAMP_OFF", 0, "Off", ""}, + {0, "CLAMP_OFF", 0, N_("Off"), ""}, {8192, "CLAMP_8192", 0, "8192", ""}, {4096, "CLAMP_4096", 0, "4096", ""}, {2048, "CLAMP_2048", 0, "2048", ""}, @@ -2365,26 +2366,26 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem audio_mixing_samples_items[] = { - {256, "SAMPLES_256", 0, "256", "Set audio mixing buffer size to 256 samples"}, - {512, "SAMPLES_512", 0, "512", "Set audio mixing buffer size to 512 samples"}, - {1024, "SAMPLES_1024", 0, "1024", "Set audio mixing buffer size to 1024 samples"}, - {2048, "SAMPLES_2048", 0, "2048", "Set audio mixing buffer size to 2048 samples"}, - {4096, "SAMPLES_4096", 0, "4096", "Set audio mixing buffer size to 4096 samples"}, - {8192, "SAMPLES_8192", 0, "8192", "Set audio mixing buffer size to 8192 samples"}, - {16384, "SAMPLES_16384", 0, "16384", "Set audio mixing buffer size to 16384 samples"}, - {32768, "SAMPLES_32768", 0, "32768", "Set audio mixing buffer size to 32768 samples"}, + {256, "SAMPLES_256", 0, "256", N_("Set audio mixing buffer size to 256 samples")}, + {512, "SAMPLES_512", 0, "512", N_("Set audio mixing buffer size to 512 samples")}, + {1024, "SAMPLES_1024", 0, "1024", N_("Set audio mixing buffer size to 1024 samples")}, + {2048, "SAMPLES_2048", 0, "2048", N_("Set audio mixing buffer size to 2048 samples")}, + {4096, "SAMPLES_4096", 0, "4096", N_("Set audio mixing buffer size to 4096 samples")}, + {8192, "SAMPLES_8192", 0, "8192", N_("Set audio mixing buffer size to 8192 samples")}, + {16384, "SAMPLES_16384", 0, "16384", N_("Set audio mixing buffer size to 16384 samples")}, + {32768, "SAMPLES_32768", 0, "32768", N_("Set audio mixing buffer size to 32768 samples")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem audio_device_items[] = { - {0, "NONE", 0, "None", "Null device - there will be no audio output"}, + {0, "NONE", 0, N_("None"), N_("Null device - there will be no audio output")}, #ifdef WITH_SDL - {1, "SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage"}, + {1, "SDL", 0, "SDL", N_("SDL device - simple direct media layer, recommended for sequencer usage")}, #endif #ifdef WITH_OPENAL - {2, "OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage"}, + {2, "OPENAL", 0, "OpenAL", N_("OpenAL device - supports 3D audio, recommended for game engine usage")}, #endif #ifdef WITH_JACK - {3, "JACK", 0, "Jack", "Jack device - open source pro audio, recommended for pro audio users"}, + {3, "JACK", 0, N_("Jack"), N_("Jack device - open source pro audio, recommended for pro audio users")}, #endif {0, NULL, 0, NULL, NULL}}; @@ -2394,70 +2395,74 @@ static void rna_def_userdef_system(BlenderRNA *brna) // {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second"}, // {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second"}, // {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second"}, - {44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second"}, - {48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second"}, + {44100, "RATE_44100", 0, "44.1 kHz", N_("Set audio sampling rate to 44100 samples per second")}, + {48000, "RATE_48000", 0, "48 kHz", N_("Set audio sampling rate to 48000 samples per second")}, // {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second"}, - {96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second"}, - {192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second"}, + {96000, "RATE_96000", 0, "96 kHz", N_("Set audio sampling rate to 96000 samples per second")}, + {192000, "RATE_192000", 0, "192 kHz", N_("Set audio sampling rate to 192000 samples per second")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem audio_format_items[] = { - {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer"}, - {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer"}, - {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer"}, - {0x14, "S32", 0, "32-bit Signed", "Set audio sample format to 32 bit signed integer"}, - {0x24, "FLOAT", 0, "32-bit Float", "Set audio sample format to 32 bit float"}, - {0x28, "DOUBLE", 0, "64-bit Float", "Set audio sample format to 64 bit float"}, + {0x01, "U8", 0, N_("8-bit Unsigned"), N_("Set audio sample format to 8 bit unsigned integer")}, + {0x12, "S16", 0, N_("16-bit Signed"), N_("Set audio sample format to 16 bit signed integer")}, + {0x13, "S24", 0, N_("24-bit Signed"), N_("Set audio sample format to 24 bit signed integer")}, + {0x14, "S32", 0, N_("32-bit Signed"), N_("Set audio sample format to 32 bit signed integer")}, + {0x24, "FLOAT", 0, N_("32-bit Float"), N_("Set audio sample format to 32 bit float")}, + {0x28, "DOUBLE", 0, N_("64-bit Float"), N_("Set audio sample format to 64 bit float")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem audio_channel_items[] = { - {1, "MONO", 0, "Mono", "Set audio channels to mono"}, - {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"}, - {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"}, - {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"}, - {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"}, + {1, "MONO", 0, N_("Mono"), N_("Set audio channels to mono")}, + {2, "STEREO", 0, N_("Stereo"), N_("Set audio channels to stereo")}, + {4, "SURROUND4", 0, N_("4 Channels"), N_("Set audio channels to 4 channels")}, + {6, "SURROUND51", 0, N_("5.1 Surround"), N_("Set audio channels to 5.1 surround sound")}, + {8, "SURROUND71", 0, N_("7.1 Surround"), N_("Set audio channels to 7.1 surround sound")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem draw_method_items[] = { - {USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, "Automatic", "Automatically set based on graphics card and driver"}, - {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", "Use a third buffer for minimal redraws at the cost of more memory"}, - {USER_DRAW_OVERLAP, "OVERLAP", 0, "Overlap", "Redraw all overlapping regions, minimal memory usage but more redraws"}, - {USER_DRAW_OVERLAP_FLIP, "OVERLAP_FLIP", 0, "Overlap Flip", "Redraw all overlapping regions, minimal memory usage but more redraws (for graphics drivers that do flipping)"}, - {USER_DRAW_FULL, "FULL", 0, "Full", "Do a full redraw each time, slow, only use for reference or when all else fails"}, + {USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, N_("Automatic"), N_("Automatically set based on graphics card and driver")}, + {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, N_("Triple Buffer"), N_("Use a third buffer for minimal redraws at the cost of more memory")}, + {USER_DRAW_OVERLAP, "OVERLAP", 0, N_("Overlap"), N_("Redraw all overlapping regions, minimal memory usage but more redraws")}, + {USER_DRAW_OVERLAP_FLIP, "OVERLAP_FLIP", 0, N_("Overlap Flip"), N_("Redraw all overlapping regions, minimal memory usage but more redraws (for graphics drivers that do flipping)")}, + {USER_DRAW_FULL, "FULL", 0, N_("Full"), N_("Do a full redraw each time, slow, only use for reference or when all else fails")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem color_picker_types[] = { - {USER_CP_CIRCLE, "CIRCLE", 0, "Circle", "A circular Hue/Saturation color wheel, with Value slider"}, - {USER_CP_SQUARE_SV, "SQUARE_SV", 0, "Square (SV + H)", "A square showing Saturation/Value, with Hue slider"}, - {USER_CP_SQUARE_HS, "SQUARE_HS", 0, "Square (HS + V)", "A square showing Hue/Saturation, with Value slider"}, - {USER_CP_SQUARE_HV, "SQUARE_HV", 0, "Square (HV + S)", "A square showing Hue/Value, with Saturation slider"}, + {USER_CP_CIRCLE, "CIRCLE", 0, N_("Circle"), N_("A circular Hue/Saturation color wheel, with Value slider")}, + {USER_CP_SQUARE_SV, "SQUARE_SV", 0, N_("Square (SV + H)"), N_("A square showing Saturation/Value, with Hue slider")}, + {USER_CP_SQUARE_HS, "SQUARE_HS", 0, N_("Square (HS + V)"), N_("A square showing Hue/Saturation, with Value slider")}, + {USER_CP_SQUARE_HV, "SQUARE_HV", 0, N_("Square (HV + S)"), N_("A square showing Hue/Value, with Saturation slider")}, {0, NULL, 0, NULL, NULL}}; /* hardcoded here, could become dynamic somehow */ + /* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */ + /* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */ static EnumPropertyItem language_items[] = { - {0, "ENGLISH", 0, "English", ""}, - {1, "JAPANESE", 0, "Japanese", ""}, - {2, "DUTCH", 0, "Dutch", ""}, - {3, "ITALIAN", 0, "Italian", ""}, - {4, "GERMAN", 0, "German", ""}, - {5, "FINNISH", 0, "Finnish", ""}, - {6, "SWEDISH", 0, "Swedish", ""}, - {7, "FRENCH", 0, "French", ""}, - {8, "SPANISH", 0, "Spanish", ""}, - {9, "CATALAN", 0, "Catalan", ""}, - {10, "CZECH", 0, "Czech", ""}, - {11, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese", ""}, - {12, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese", ""}, - {13, "RUSSIAN", 0, "Russian", ""}, - {14, "CROATIAN", 0, "Croatian", ""}, - {15, "SERBIAN", 0, "Serbian", ""}, - {16, "UKRAINIAN", 0, "Ukrainian", ""}, - {17, "POLISH", 0, "Polish", ""}, - {18, "ROMANIAN", 0, "Romanian", ""}, - {19, "ARABIC", 0, "Arabic", ""}, - {20, "BULGARIAN", 0, "Bulgarian", ""}, - {21, "GREEK", 0, "Greek", ""}, - {22, "KOREAN", 0, "Korean", ""}, + {0, "DEFAULT", 0, N_("Default (Default)"), ""}, + {1, "ENGLISH", 0, N_("English (English)"), "en_US"}, + {2, "JAPANESE", 0, N_("Japanese (日本語)"), "ja_JP"}, + {3, "DUTCH", 0, N_("Dutch (Nederlandse taal)"), "nl_NL"}, + {4, "ITALIAN", 0, N_("Italian (Italiano)"), "it_IT"}, + {5, "GERMAN", 0, N_("German (Deutsch)"), "de_DE"}, + {6, "FINNISH", 0, N_("Finnish (Suomalainen)"), "fi_FI"}, + {7, "SWEDISH", 0, N_("Swedish (Svenska)"), "sv_SE"}, + {8, "FRENCH", 0, N_("French (Française)"), "fr_FR"}, + {9, "SPANISH", 0, N_("Spanish (Español)"), "es_ES"}, + {10, "CATALAN", 0, N_("Catalan (Català)"), "ca_AD"}, + {11, "CZECH", 0, N_("Czech (Český)"), "cs_CZ"}, + {12, "BRAZILIAN_PORTUGUESE", 0, N_("Brazilian Portuguese (Português do Brasil)"), "pt_BR"}, + {13, "SIMPLIFIED_CHINESE", 0, N_("Simplified Chinese (简体中文)"), "zh_CN"}, + {14, "TRADITIONAL_CHINESE", 0, N_("Traditional Chinese (繁體中文)"), "zh_TW"}, + {15, "RUSSIAN", 0, N_("Russian (Русский)"), "ru_RU"}, + {16, "CROATIAN", 0, N_("Croatian (Hrvatski)"), "hr_HR"}, + {17, "SERBIAN", 0, N_("Serbian (Српском језику)"), "sr_RS"}, + {18, "UKRAINIAN", 0, N_("Ukrainian (Український)"), "uk_UA"}, + {19, "POLISH", 0, N_("Polish (Polski)"), "pl_PL"}, + {20, "ROMANIAN", 0, N_("Romanian (Român)"), "ro_RO"}, + {21, "ARABIC", 0, N_("Arabic (العربية)"), "ar_EG"}, + {22, "BULGARIAN", 0, N_("Bulgarian (Български)"), "bg_BG"}, + {23, "GREEK", 0, N_("Greek (Ελληνικά)"), "el_GR"}, + {24, "KOREAN", 0, N_("Korean (한국 언어)"), "ko_KR"}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL); @@ -2469,50 +2474,50 @@ static void rna_def_userdef_system(BlenderRNA *brna) prop= RNA_def_property(srna, "use_international_fonts", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE); - RNA_def_property_ui_text(prop, "International Fonts", "Use international fonts"); + RNA_def_property_ui_text(prop, N_("International Fonts"), N_("Use international fonts")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "dpi"); RNA_def_property_range(prop, 48, 128); - RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for display"); + RNA_def_property_ui_text(prop, "DPI", N_("Font size and resolution for display")); RNA_def_property_update(prop, 0, "rna_userdef_dpi_update"); prop= RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "scrollback"); RNA_def_property_range(prop, 32, 32768); - RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to store for the console buffer"); + RNA_def_property_ui_text(prop, N_("Scrollback"), N_("Maximum number of lines to store for the console buffer")); prop= RNA_def_property(srna, "author", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "author"); RNA_def_property_string_maxlength(prop, 80); - RNA_def_property_ui_text(prop, "Author", "Name that will be used in exported files when format supports such feature"); + RNA_def_property_ui_text(prop, N_("Author"), N_("Name that will be used in exported files when format supports such feature")); /* Language Selection */ prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, language_items); - RNA_def_property_ui_text(prop, "Language", "Language use for translation"); + RNA_def_property_ui_text(prop, N_("Language"), N_("Language use for translation")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS); - RNA_def_property_ui_text(prop, "Translate Tooltips", "Translate Tooltips"); + RNA_def_property_ui_text(prop, N_("Translate Tooltips"), N_("Translate Tooltips")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "use_translate_buttons", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_BUTTONS); - RNA_def_property_ui_text(prop, "Translate Buttons", "Translate button labels"); + RNA_def_property_ui_text(prop, N_("Translate Buttons"), N_("Translate button labels")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "use_translate_toolbox", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_MENUS); - RNA_def_property_ui_text(prop, "Translate Toolbox", "Translate toolbox menu"); + RNA_def_property_ui_text(prop, N_("Translate Toolbox"), N_("Translate toolbox menu")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT); - RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts"); + RNA_def_property_ui_text(prop, N_("Textured Fonts"), N_("Use textures for drawing international fonts")); RNA_def_property_update(prop, 0, "rna_userdef_update"); /* System & OpenGL */ @@ -2520,155 +2525,155 @@ static void rna_def_userdef_system(BlenderRNA *brna) prop= RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "light", ""); RNA_def_property_struct_type(prop, "UserSolidLight"); - RNA_def_property_ui_text(prop, "Solid Lights", "Lights user to display objects in solid draw mode"); + RNA_def_property_ui_text(prop, N_("Solid Lights"), N_("Lights user to display objects in solid draw mode")); prop= RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE); - RNA_def_property_ui_text(prop, "Use Weight Color Range", "Enable color range used for weight visualization in weight painting mode"); + RNA_def_property_ui_text(prop, N_("Use Weight Color Range"), N_("Enable color range used for weight visualization in weight painting mode")); RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update"); prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "coba_weight"); RNA_def_property_struct_type(prop, "ColorRamp"); - RNA_def_property_ui_text(prop, "Weight Color Range", "Color range used for weight visualization in weight painting mode"); + RNA_def_property_ui_text(prop, N_("Weight Color Range"), N_("Color range used for weight visualization in weight painting mode")); RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update"); prop= RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, color_picker_types); RNA_def_property_enum_sdna(prop, NULL, "color_picker_type"); - RNA_def_property_ui_text(prop, "Color Picker Type", "Different styles of displaying the color picker widget"); + RNA_def_property_ui_text(prop, N_("Color Picker Type"), N_("Different styles of displaying the color picker widget")); prop= RNA_def_property(srna, "use_preview_images", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ALLWINCODECS); - RNA_def_property_ui_text(prop, "Enable All Codecs", "Enables automatic saving of preview images in the .blend file (Windows only)"); + RNA_def_property_ui_text(prop, N_("Enable All Codecs"), N_("Enables automatic saving of preview images in the .blend file (Windows only)")); prop= RNA_def_property(srna, "use_scripts_auto_execute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_SCRIPT_AUTOEXEC_DISABLE); - RNA_def_property_ui_text(prop, "Auto Run Python Scripts", "Allow any .blend file to run scripts automatically (unsafe with blend files from an untrusted source)"); + RNA_def_property_ui_text(prop, N_("Auto Run Python Scripts"), N_("Allow any .blend file to run scripts automatically (unsafe with blend files from an untrusted source)")); RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update"); prop= RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TXT_TABSTOSPACES_DISABLE); - RNA_def_property_ui_text(prop, "Tabs as Spaces", "Automatically converts all new tabs into spaces for new and loaded text files"); + RNA_def_property_ui_text(prop, N_("Tabs as Spaces"), N_("Automatically converts all new tabs into spaces for new and loaded text files")); prop= RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "prefetchframes"); RNA_def_property_range(prop, 0, 500); - RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback"); + RNA_def_property_ui_text(prop, N_("Prefetch Frames"), N_("Number of frames to render ahead during playback")); prop= RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "memcachelimit"); RNA_def_property_range(prop, 0, (sizeof(void *) ==8)? 1024*16: 1024); /* 32 bit 2 GB, 64 bit 16 GB */ - RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit in sequencer (megabytes)"); + RNA_def_property_ui_text(prop, N_("Memory Cache Limit"), N_("Memory cache limit in sequencer (megabytes)")); RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update"); prop= RNA_def_property(srna, "frame_server_port", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "frameserverport"); RNA_def_property_range(prop, 0, 32727); - RNA_def_property_ui_text(prop, "Frame Server Port", "Frameserver Port for Frameserver Rendering"); + RNA_def_property_ui_text(prop, N_("Frame Server Port"), N_("Frameserver Port for Frameserver Rendering")); prop= RNA_def_property(srna, "gl_clip_alpha", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "glalphaclip"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this threshold in the 3D textured view"); + RNA_def_property_ui_text(prop, N_("Clip Alpha"), N_("Clip alpha below this threshold in the 3D textured view")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "use_mipmaps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_MIPMAP); - RNA_def_property_ui_text(prop, "Mipmaps", "Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)"); + RNA_def_property_ui_text(prop, N_("Mipmaps"), N_("Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)")); RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update"); prop= RNA_def_property(srna, "use_vertex_buffer_objects", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_VBO); - RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering"); + RNA_def_property_ui_text(prop, N_("VBOs"), N_("Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering")); prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_AA); - RNA_def_property_ui_text(prop, "Anti-aliasing", "Use anti-aliasing for the 3D view (may impact redraw performance)"); + RNA_def_property_ui_text(prop, N_("Anti-aliasing"), N_("Use anti-aliasing for the 3D view (may impact redraw performance)")); prop= RNA_def_property(srna, "anisotropic_filter", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "anisotropic_filter"); RNA_def_property_enum_items(prop, anisotropic_items); RNA_def_property_enum_default(prop, 1); - RNA_def_property_ui_text(prop, "Anisotropic Filter", "The quality of the anisotropic filtering (values greater than 1.0 enable anisotropic filtering)"); + RNA_def_property_ui_text(prop, N_("Anisotropic Filter"), N_("The quality of the anisotropic filtering (values greater than 1.0 enable anisotropic filtering)")); RNA_def_property_update(prop, 0, "rna_userdef_anisotropic_update"); prop= RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "glreslimit"); RNA_def_property_enum_items(prop, gl_texture_clamp_items); - RNA_def_property_ui_text(prop, "GL Texture Limit", "Limit the texture size to save graphics memory"); + RNA_def_property_ui_text(prop, N_("GL Texture Limit"), N_("Limit the texture size to save graphics memory")); RNA_def_property_update(prop, 0, "rna_userdef_gl_texture_limit_update"); prop= RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "textimeout"); RNA_def_property_range(prop, 0, 3600); - RNA_def_property_ui_text(prop, "Texture Time Out", "Time since last access of a GL texture in seconds after which it is freed. (Set to 0 to keep textures allocated.)"); + RNA_def_property_ui_text(prop, N_("Texture Time Out"), N_("Time since last access of a GL texture in seconds after which it is freed. (Set to 0 to keep textures allocated.)")); prop= RNA_def_property(srna, "texture_collection_rate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "texcollectrate"); RNA_def_property_range(prop, 1, 3600); - RNA_def_property_ui_text(prop, "Texture Collection Rate", "Number of seconds between each run of the GL texture garbage collector"); + RNA_def_property_ui_text(prop, N_("Texture Collection Rate"), N_("Number of seconds between each run of the GL texture garbage collector")); prop= RNA_def_property(srna, "window_draw_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "wmdrawmethod"); RNA_def_property_enum_items(prop, draw_method_items); - RNA_def_property_ui_text(prop, "Window Draw Method", "Drawing method used by the window manager"); + RNA_def_property_ui_text(prop, N_("Window Draw Method"), N_("Drawing method used by the window manager")); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mixbufsize"); RNA_def_property_enum_items(prop, audio_mixing_samples_items); - RNA_def_property_ui_text(prop, "Audio Mixing Buffer", "Sets the number of samples used by the audio mixing buffer"); + RNA_def_property_ui_text(prop, N_("Audio Mixing Buffer"), N_("Sets the number of samples used by the audio mixing buffer")); RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); prop= RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "audiodevice"); RNA_def_property_enum_items(prop, audio_device_items); - RNA_def_property_ui_text(prop, "Audio Device", "Sets the audio output device"); + RNA_def_property_ui_text(prop, N_("Audio Device"), N_("Sets the audio output device")); RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); prop= RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "audiorate"); RNA_def_property_enum_items(prop, audio_rate_items); - RNA_def_property_ui_text(prop, "Audio Sample Rate", "Sets the audio sample rate"); + RNA_def_property_ui_text(prop, N_("Audio Sample Rate"), N_("Sets the audio sample rate")); RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); prop= RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "audioformat"); RNA_def_property_enum_items(prop, audio_format_items); - RNA_def_property_ui_text(prop, "Audio Sample Format", "Sets the audio sample format"); + RNA_def_property_ui_text(prop, N_("Audio Sample Format"), N_("Sets the audio sample format")); RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); prop= RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "audiochannels"); RNA_def_property_enum_items(prop, audio_channel_items); - RNA_def_property_ui_text(prop, "Audio Channels", "Sets the audio channel count"); + RNA_def_property_ui_text(prop, N_("Audio Channels"), N_("Sets the audio channel count")); RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); prop= RNA_def_property(srna, "screencast_fps", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "scrcastfps"); RNA_def_property_range(prop, 10, 50); - RNA_def_property_ui_text(prop, "FPS", "Frame rate for the screencast to be played back"); + RNA_def_property_ui_text(prop, N_("FPS"), N_("Frame rate for the screencast to be played back")); prop= RNA_def_property(srna, "screencast_wait_time", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "scrcastwait"); RNA_def_property_range(prop, 50, 1000); - RNA_def_property_ui_text(prop, "Wait Timer (ms)", "Time in milliseconds between each frame recorded for screencast"); + RNA_def_property_ui_text(prop, N_("Wait Timer (ms)"), N_("Time in milliseconds between each frame recorded for screencast")); prop= RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_TEXT_DISABLE_AA); - RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased"); + RNA_def_property_ui_text(prop, N_("Text Anti-aliasing"), N_("Draw user interface text anti-aliased")); RNA_def_property_update(prop, 0, "rna_userdef_text_update"); #if 0 prop= RNA_def_property(srna, "verse_master", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "versemaster"); - RNA_def_property_ui_text(prop, "Verse Master", "The Verse Master-server IP"); + RNA_def_property_ui_text(prop, N_("Verse Master"), N_("The Verse Master-server IP")); prop= RNA_def_property(srna, "verse_username", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "verseuser"); - RNA_def_property_ui_text(prop, "Verse Username", "The Verse user name"); + RNA_def_property_ui_text(prop, N_("Verse Username"), N_("The Verse user name")); #endif } @@ -2678,112 +2683,112 @@ static void rna_def_userdef_input(BlenderRNA *brna) StructRNA *srna; static EnumPropertyItem select_mouse_items[] = { - {USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button for selection"}, - {0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection"}, + {USER_LMOUSESELECT, "LEFT", 0, N_("Left"), N_("Use left Mouse Button for selection")}, + {0, "RIGHT", 0, N_("Right"), N_("Use Right Mouse Button for selection")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem view_rotation_items[] = { - {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"}, - {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"}, + {0, "TURNTABLE", 0, N_("Turntable"), N_("Use turntable style rotation in the viewport")}, + {USER_TRACKBALL, "TRACKBALL", 0, N_("Trackball"), N_("Use trackball style rotation in the viewport")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem view_zoom_styles[] = { - {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down"}, - {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zooms in and out based on vertical mouse movement"}, - {USER_ZOOM_SCALE, "SCALE", 0, "Scale", "Zooms in and out like scaling the view, mouse movements relative to center"}, + {USER_ZOOM_CONT, "CONTINUE", 0, N_("Continue"), N_("Old style zoom, continues while moving mouse up or down")}, + {USER_ZOOM_DOLLY, "DOLLY", 0, N_("Dolly"), N_("Zooms in and out based on vertical mouse movement")}, + {USER_ZOOM_SCALE, "SCALE", 0, N_("Scale"), N_("Zooms in and out like scaling the view, mouse movements relative to center")}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem view_zoom_axes[] = { - {0, "VERTICAL", 0, "Vertical", "Zooms in and out based on vertical mouse movement"}, - {USER_ZOOM_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zooms in and out based on horizontal mouse movement"}, + {0, "VERTICAL", 0, N_("Vertical"), N_("Zooms in and out based on vertical mouse movement")}, + {USER_ZOOM_HORIZ, "HORIZONTAL", 0, N_("Horizontal"), N_("Zooms in and out based on horizontal mouse movement")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "UserPreferencesInput", NULL); RNA_def_struct_sdna(srna, "UserDef"); RNA_def_struct_nested(brna, srna, "UserPreferences"); - RNA_def_struct_ui_text(srna, "Input", "Settings for input devices"); + RNA_def_struct_ui_text(srna, N_("Input"), N_("Settings for input devices")); prop= RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, select_mouse_items); RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_select_mouse_set", NULL); - RNA_def_property_ui_text(prop, "Select Mouse", "The mouse button used for selection"); + RNA_def_property_ui_text(prop, N_("Select Mouse"), N_("The mouse button used for selection")); prop= RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "viewzoom"); RNA_def_property_enum_items(prop, view_zoom_styles); - RNA_def_property_ui_text(prop, "Zoom Style", "Which style to use for viewport scaling"); + RNA_def_property_ui_text(prop, N_("Zoom Style"), N_("Which style to use for viewport scaling")); prop= RNA_def_property(srna, "view_zoom_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag"); RNA_def_property_enum_items(prop, view_zoom_axes); - RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to zoom in or out on"); + RNA_def_property_ui_text(prop, N_("Zoom Axis"), N_("Axis of mouse movement to zoom in or out on")); prop= RNA_def_property(srna, "invert_mouse_zoom", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT); - RNA_def_property_ui_text(prop, "Invert Zoom Direction", "Invert the axis of mouse movement for zooming"); + RNA_def_property_ui_text(prop, N_("Invert Zoom Direction"), N_("Invert the axis of mouse movement for zooming")); prop= RNA_def_property(srna, "view_rotate_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, view_rotation_items); - RNA_def_property_ui_text(prop, "View Rotation", "Rotation style in the viewport"); + RNA_def_property_ui_text(prop, N_("View Rotation"), N_("Rotation style in the viewport")); prop= RNA_def_property(srna, "use_mouse_continuous", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_CONTINUOUS_MOUSE); - RNA_def_property_ui_text(prop, "Continuous Grab", "Allow moving the mouse outside the view on some manipulations (transform, ui control drag)"); + RNA_def_property_ui_text(prop, N_("Continuous Grab"), N_("Allow moving the mouse outside the view on some manipulations (transform, ui control drag)")); /* tweak tablet & mouse preset */ prop= RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "dragthreshold"); RNA_def_property_range(prop, 3, 40); - RNA_def_property_ui_text(prop, "Drag Threshold", "Amount of pixels you have to drag before dragging UI items happens"); + RNA_def_property_ui_text(prop, N_("Drag Threshold"), N_("Amount of pixels you have to drag before dragging UI items happens")); prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ndof_pan"); RNA_def_property_range(prop, 0, 200); - RNA_def_property_ui_text(prop, "NDof Pan Speed", "The overall panning speed of an NDOF device, as percent of standard"); + RNA_def_property_ui_text(prop, N_("NDof Pan Speed"), N_("The overall panning speed of an NDOF device, as percent of standard")); prop= RNA_def_property(srna, "ndof_rotate_speed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ndof_rotate"); RNA_def_property_range(prop, 0, 200); - RNA_def_property_ui_text(prop, "NDof Rotation Speed", "The overall rotation speed of an NDOF device, as percent of standard"); + RNA_def_property_ui_text(prop, N_("NDof Rotation Speed"), N_("The overall rotation speed of an NDOF device, as percent of standard")); prop= RNA_def_property(srna, "mouse_double_click_time", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "dbl_click_time"); RNA_def_property_range(prop, 1, 1000); - RNA_def_property_ui_text(prop, "Double Click Timeout", "The time (in ms) for a double click"); + RNA_def_property_ui_text(prop, N_("Double Click Timeout"), N_("The time (in ms) for a double click")); prop= RNA_def_property(srna, "use_mouse_emulate_3_button", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE); - RNA_def_property_ui_text(prop, "Emulate 3 Button Mouse", "Emulates Middle Mouse with Alt+Left Mouse (doesn't work with Left Mouse Select option)"); + RNA_def_property_ui_text(prop, N_("Emulate 3 Button Mouse"), N_("Emulates Middle Mouse with Alt+Left Mouse (doesn't work with Left Mouse Select option)")); prop= RNA_def_property(srna, "use_emulate_numpad", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_NONUMPAD); - RNA_def_property_ui_text(prop, "Emulate Numpad", "Causes the 1 to 0 keys to act as the numpad (useful for laptops)"); + RNA_def_property_ui_text(prop, N_("Emulate Numpad"), N_("Causes the 1 to 0 keys to act as the numpad (useful for laptops)")); /* middle mouse button */ prop= RNA_def_property(srna, "use_mouse_mmb_paste", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE); - RNA_def_property_ui_text(prop, "Middle Mouse Paste", "In text window, paste with middle mouse button instead of panning"); + RNA_def_property_ui_text(prop, N_("Middle Mouse Paste"), N_("In text window, paste with middle mouse button instead of panning")); prop= RNA_def_property(srna, "invert_zoom_wheel", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR); - RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Wheel zoom direction"); + RNA_def_property_ui_text(prop, N_("Wheel Invert Zoom"), N_("Swap the Mouse Wheel zoom direction")); prop= RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "wheellinescroll"); RNA_def_property_range(prop, 0, 32); - RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "The number of lines scrolled at a time with the mouse wheel"); + RNA_def_property_ui_text(prop, N_("Wheel Scroll Lines"), N_("The number of lines scrolled at a time with the mouse wheel")); /* U.keymaps - custom keymaps that have been edited from default configs */ prop= RNA_def_property(srna, "edited_keymaps", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "keymaps", NULL); RNA_def_property_struct_type(prop, "KeyMap"); - RNA_def_property_ui_text(prop, "Edited Keymaps", ""); + RNA_def_property_ui_text(prop, N_("Edited Keymaps"), ""); prop= RNA_def_property(srna, "active_keyconfig", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "keyconfigstr"); - RNA_def_property_ui_text(prop, "Key Config", "The name of the active key configuration"); + RNA_def_property_ui_text(prop, N_("Key Config"), N_("The name of the active key configuration")); } static void rna_def_userdef_filepaths(BlenderRNA *brna) @@ -2793,12 +2798,12 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) static EnumPropertyItem anim_player_presets[] = { //{0, "INTERNAL", 0, "Internal", "Built-in animation player"}, // doesn't work yet! - {1, "BLENDER24", 0, "Blender 2.4", "Blender command line animation playback - path to Blender 2.4"}, - {2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourceforge.net"}, - {3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"}, - {4, "RV", 0, "rv", "Frame player from Tweak Software"}, - {5, "MPLAYER", 0, "MPlayer", "Media player for video & png/jpeg/sgi image sequences"}, - {50, "CUSTOM", 0, "Custom", "Custom animation player executable path"}, + {1, "BLENDER24", 0, "Blender 2.4", N_("Blender command line animation playback - path to Blender 2.4")}, + {2, "DJV", 0, "Djv", N_("Open source frame player: http://djv.sourceforge.net")}, + {3, "FRAMECYCLER", 0, N_("FrameCycler"), N_("Frame player from IRIDAS")}, + {4, "RV", 0, "rv", N_("Frame player from Tweak Software")}, + {5, "MPLAYER", 0, "MPlayer", N_("Media player for video & png/jpeg/sgi image sequences")}, + {50, "CUSTOM", 0, N_("Custom"), N_("Custom animation player executable path")}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "UserPreferencesFilePaths", NULL); @@ -2808,78 +2813,78 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) prop= RNA_def_property(srna, "show_hidden_files_datablocks", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT); - RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/datablocks that start with a dot(.*)"); + RNA_def_property_ui_text(prop, N_("Hide Dot Files/Datablocks"), N_("Hide files/datablocks that start with a dot(.*)")); prop= RNA_def_property(srna, "use_filter_files", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS); - RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window"); + RNA_def_property_ui_text(prop, N_("Filter File Extensions"), N_("Display only files with extensions in the image select window")); prop= RNA_def_property(srna, "hide_recent_locations", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_RECENT); - RNA_def_property_ui_text(prop, "Hide Recent Locations", "Hide recent locations in the file selector"); + RNA_def_property_ui_text(prop, N_("Hide Recent Locations"), N_("Hide recent locations in the file selector")); prop= RNA_def_property(srna, "show_thumbnails", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_THUMBNAILS); - RNA_def_property_ui_text(prop, "Show Thumbnails", "Open in thumbnail view for images and movies"); + RNA_def_property_ui_text(prop, N_("Show Thumbnails"), N_("Open in thumbnail view for images and movies")); prop= RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELPATHS); - RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path option for the file selector"); + RNA_def_property_ui_text(prop, N_("Relative Paths"), N_("Default relative path option for the file selector")); prop= RNA_def_property(srna, "use_file_compression", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FILECOMPRESS); - RNA_def_property_ui_text(prop, "Compress File", "Enable file compression when saving .blend files"); + RNA_def_property_ui_text(prop, N_("Compress File"), N_("Enable file compression when saving .blend files")); prop= RNA_def_property(srna, "use_load_ui", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_FILENOUI); - RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup when loading .blend files"); + RNA_def_property_ui_text(prop, N_("Load UI"), N_("Load user interface setup when loading .blend files")); prop= RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "fontdir"); - RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory to search for loading fonts"); + RNA_def_property_ui_text(prop, N_("Fonts Directory"), N_("The default directory to search for loading fonts")); prop= RNA_def_property(srna, "texture_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "textudir"); - RNA_def_property_ui_text(prop, "Textures Directory", "The default directory to search for textures"); + RNA_def_property_ui_text(prop, N_("Textures Directory"), N_("The default directory to search for textures")); prop= RNA_def_property(srna, "texture_plugin_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "plugtexdir"); - RNA_def_property_ui_text(prop, "Texture Plugin Directory", "The default directory to search for texture plugins"); + RNA_def_property_ui_text(prop, N_("Texture Plugin Directory"), N_("The default directory to search for texture plugins")); prop= RNA_def_property(srna, "sequence_plugin_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "plugseqdir"); - RNA_def_property_ui_text(prop, "Sequence Plugin Directory", "The default directory to search for sequence plugins"); + RNA_def_property_ui_text(prop, N_("Sequence Plugin Directory"), N_("The default directory to search for sequence plugins")); prop= RNA_def_property(srna, "render_output_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "renderdir"); - RNA_def_property_ui_text(prop, "Render Output Directory", "The default directory for rendering output, for new scenes"); + RNA_def_property_ui_text(prop, N_("Render Output Directory"), N_("The default directory for rendering output, for new scenes")); prop= RNA_def_property(srna, "script_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "pythondir"); - RNA_def_property_ui_text(prop, "Python Scripts Directory", "Alternate script path, matching the default layout with subdirs: startup, addons & modules (requires restart)"); + RNA_def_property_ui_text(prop, N_("Python Scripts Directory"), N_("Alternate script path, matching the default layout with subdirs: startup, addons & modules (requires restart)")); /* TODO, editing should reset sys.path! */ prop= RNA_def_property(srna, "sound_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "sounddir"); - RNA_def_property_ui_text(prop, "Sounds Directory", "The default directory to search for sounds"); + RNA_def_property_ui_text(prop, N_("Sounds Directory"), N_("The default directory to search for sounds")); prop= RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "tempdir"); - RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for storing temporary save files"); + RNA_def_property_ui_text(prop, N_("Temporary Directory"), N_("The directory for storing temporary save files")); RNA_def_property_update(prop, 0, "rna_userdef_temp_update"); prop= RNA_def_property(srna, "image_editor", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "image_editor"); - RNA_def_property_ui_text(prop, "Image Editor", "Path to an image editor"); + RNA_def_property_ui_text(prop, N_("Image Editor"), N_("Path to an image editor")); prop= RNA_def_property(srna, "animation_player", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "anim_player"); - RNA_def_property_ui_text(prop, "Animation Player", "Path to a custom animation/frame sequence player"); + RNA_def_property_ui_text(prop, N_("Animation Player"), N_("Path to a custom animation/frame sequence player")); prop= RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset"); RNA_def_property_enum_items(prop, anim_player_presets); - RNA_def_property_ui_text(prop, "Animation Player Preset", "Preset configs for external animation players"); + RNA_def_property_ui_text(prop, N_("Animation Player Preset"), N_("Preset configs for external animation players")); RNA_def_property_enum_default(prop, 1); /* set default to blender 2.4 player until an internal one is back */ /* Autosave */ @@ -2887,26 +2892,26 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) prop= RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "versions"); RNA_def_property_range(prop, 0, 32); - RNA_def_property_ui_text(prop, "Save Versions", "The number of old versions to maintain in the current directory, when manually saving"); + RNA_def_property_ui_text(prop, N_("Save Versions"), N_("The number of old versions to maintain in the current directory, when manually saving")); prop= RNA_def_property(srna, "use_auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE); - RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files in temp directory, uses process ID"); + RNA_def_property_ui_text(prop, N_("Auto Save Temporary Files"), N_("Automatic saving of temporary files in temp directory, uses process ID")); RNA_def_property_update(prop, 0, "rna_userdef_autosave_update"); prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "savetime"); RNA_def_property_range(prop, 1, 60); - RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves"); + RNA_def_property_ui_text(prop, N_("Auto Save Time"), N_("The time (in minutes) to wait between automatic temporary saves")); RNA_def_property_update(prop, 0, "rna_userdef_autosave_update"); prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 0, 30); - RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recently opened files to remember"); + RNA_def_property_ui_text(prop, N_("Recent Files"), N_("Maximum number of recently opened files to remember")); prop= RNA_def_property(srna, "use_save_preview_images", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SAVE_PREVIEWS); - RNA_def_property_ui_text(prop, "Save Preview Images", "Enables automatic saving of preview images in the .blend file"); + RNA_def_property_ui_text(prop, N_("Save Preview Images"), N_("Enables automatic saving of preview images in the .blend file")); } void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop) @@ -2939,13 +2944,13 @@ void RNA_def_userdef(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem user_pref_sections[] = { - {USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""}, - {USER_SECTION_EDIT, "EDITING", 0, "Editing", ""}, - {USER_SECTION_INPUT, "INPUT", 0, "Input", ""}, - {USER_SECTION_ADDONS, "ADDONS", 0, "Add-Ons", ""}, - {USER_SECTION_THEME, "THEMES", 0, "Themes", ""}, - {USER_SECTION_FILE, "FILES", 0, "File", ""}, - {USER_SECTION_SYSTEM, "SYSTEM", 0, "System", ""}, + {USER_SECTION_INTERFACE, "INTERFACE", 0, N_("Interface"), ""}, + {USER_SECTION_EDIT, "EDITING", 0, N_("Editing"), ""}, + {USER_SECTION_INPUT, "INPUT", 0, N_("Input"), ""}, + {USER_SECTION_ADDONS, "ADDONS", 0, N_("Add-Ons"), ""}, + {USER_SECTION_THEME, "THEMES", 0, N_("Themes"), ""}, + {USER_SECTION_FILE, "FILES", 0, N_("File"), ""}, + {USER_SECTION_SYSTEM, "SYSTEM", 0, N_("System"), ""}, {0, NULL, 0, NULL, NULL}}; rna_def_userdef_dothemes(brna); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 73221c47c90..3db4d319420 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -33,6 +33,8 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "BLF_api.h" + #include "rna_internal.h" #include "DNA_screen_types.h" @@ -43,97 +45,97 @@ #include "WM_types.h" EnumPropertyItem event_keymouse_value_items[] = { - {KM_ANY, "ANY", 0, "Any", ""}, - {KM_PRESS, "PRESS", 0, "Press", ""}, - {KM_RELEASE, "RELEASE", 0, "Release", ""}, - {KM_CLICK, "CLICK", 0, "Click", ""}, - {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""}, + {KM_ANY, "ANY", 0, N_("Any"), ""}, + {KM_PRESS, "PRESS", 0, N_("Press"), ""}, + {KM_RELEASE, "RELEASE", 0, N_("Release"), ""}, + {KM_CLICK, "CLICK", 0, N_("Click"), ""}, + {KM_DBL_CLICK, "DOUBLE_CLICK", 0, N_("Double Click"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem event_tweak_value_items[]= { - {KM_ANY, "ANY", 0, "Any", ""}, - {EVT_GESTURE_N, "NORTH", 0, "North", ""}, - {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""}, - {EVT_GESTURE_E, "EAST", 0, "East", ""}, - {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""}, - {EVT_GESTURE_S, "SOUTH", 0, "South", ""}, - {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""}, - {EVT_GESTURE_W, "WEST", 0, "West", ""}, - {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""}, + {KM_ANY, "ANY", 0, N_("Any"), ""}, + {EVT_GESTURE_N, "NORTH", 0, N_("North"), ""}, + {EVT_GESTURE_NE, "NORTH_EAST", 0, N_("North-East"), ""}, + {EVT_GESTURE_E, "EAST", 0, N_("East"), ""}, + {EVT_GESTURE_SE, "SOUTH_EAST", 0, N_("South-East"), ""}, + {EVT_GESTURE_S, "SOUTH", 0, N_("South"), ""}, + {EVT_GESTURE_SW, "SOUTH_WEST", 0, N_("South-West"), ""}, + {EVT_GESTURE_W, "WEST", 0, N_("West"), ""}, + {EVT_GESTURE_NW, "NORTH_WEST", 0, N_("North-West"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem event_value_items[] = { - {KM_ANY, "ANY", 0, "Any", ""}, - {KM_NOTHING, "NOTHING", 0, "Nothing", ""}, - {KM_PRESS, "PRESS", 0, "Press", ""}, - {KM_RELEASE, "RELEASE", 0, "Release", ""}, - {KM_CLICK, "CLICK", 0, "Click", ""}, - {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""}, + {KM_ANY, "ANY", 0, N_("Any"), ""}, + {KM_NOTHING, "NOTHING", 0, N_("Nothing"), ""}, + {KM_PRESS, "PRESS", 0, N_("Press"), ""}, + {KM_RELEASE, "RELEASE", 0, N_("Release"), ""}, + {KM_CLICK, "CLICK", 0, N_("Click"), ""}, + {KM_DBL_CLICK, "DOUBLE_CLICK", 0, N_("Double Click"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem event_tweak_type_items[]= { - {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Left", ""}, - {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Middle", ""}, - {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Right", ""}, - {EVT_TWEAK_A, "EVT_TWEAK_A", 0, "Action", ""}, - {EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Select", ""}, + {EVT_TWEAK_L, "EVT_TWEAK_L", 0, N_("Left"), ""}, + {EVT_TWEAK_M, "EVT_TWEAK_M", 0, N_("Middle"), ""}, + {EVT_TWEAK_R, "EVT_TWEAK_R", 0, N_("Right"), ""}, + {EVT_TWEAK_A, "EVT_TWEAK_A", 0, N_("Action"), ""}, + {EVT_TWEAK_S, "EVT_TWEAK_S", 0, N_("Select"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem event_mouse_type_items[]= { - {LEFTMOUSE, "LEFTMOUSE", 0, "Left", ""}, - {MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle", ""}, - {RIGHTMOUSE, "RIGHTMOUSE", 0, "Right", ""}, - {BUTTON4MOUSE, "BUTTON4MOUSE", 0, "Button4", ""}, - {BUTTON5MOUSE, "BUTTON5MOUSE", 0, "Button5", ""}, - {ACTIONMOUSE, "ACTIONMOUSE", 0, "Action", ""}, - {SELECTMOUSE, "SELECTMOUSE", 0, "Select", ""}, + {LEFTMOUSE, "LEFTMOUSE", 0, N_("Left"), ""}, + {MIDDLEMOUSE, "MIDDLEMOUSE", 0, N_("Middle"), ""}, + {RIGHTMOUSE, "RIGHTMOUSE", 0, N_("Right"), ""}, + {BUTTON4MOUSE, "BUTTON4MOUSE", 0, N_("Button4"), ""}, + {BUTTON5MOUSE, "BUTTON5MOUSE", 0, N_("Button5"), ""}, + {ACTIONMOUSE, "ACTIONMOUSE", 0, N_("Action"), ""}, + {SELECTMOUSE, "SELECTMOUSE", 0, N_("Select"), ""}, {0, "", 0, NULL, NULL}, - {MOUSEMOVE, "MOUSEMOVE", 0, "Move", ""}, - {MOUSEPAN, "TRACKPADPAN", 0, "Mouse/Trackpad Pan", ""}, - {MOUSEZOOM, "TRACKPADZOOM", 0, "Mouse/Trackpad Zoom", ""}, - {MOUSEROTATE, "MOUSEROTATE", 0, "Mouse/Trackpad Rotate", ""}, + {MOUSEMOVE, "MOUSEMOVE", 0, N_("Move"), ""}, + {MOUSEPAN, "TRACKPADPAN", 0, N_("Mouse/Trackpad Pan"), ""}, + {MOUSEZOOM, "TRACKPADZOOM", 0, N_("Mouse/Trackpad Zoom"), ""}, + {MOUSEROTATE, "MOUSEROTATE", 0, N_("Mouse/Trackpad Rotate"), ""}, {0, "", 0, NULL, NULL}, - {WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", ""}, - {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", ""}, - {WHEELINMOUSE, "WHEELINMOUSE", 0, "Wheel In", ""}, - {WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, "Wheel Out", ""}, + {WHEELUPMOUSE, "WHEELUPMOUSE", 0, N_("Wheel Up"), ""}, + {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, N_("Wheel Down"), ""}, + {WHEELINMOUSE, "WHEELINMOUSE", 0, N_("Wheel In"), ""}, + {WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, N_("Wheel Out"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem event_timer_type_items[]= { - {TIMER, "TIMER", 0, "Timer", ""}, - {TIMER0, "TIMER0", 0, "Timer 0", ""}, - {TIMER1, "TIMER1", 0, "Timer 1", ""}, - {TIMER2, "TIMER2", 0, "Timer 2", ""}, + {TIMER, "TIMER", 0, N_("Timer"), ""}, + {TIMER0, "TIMER0", 0, N_("Timer 0"), ""}, + {TIMER1, "TIMER1", 0, N_("Timer 1"), ""}, + {TIMER2, "TIMER2", 0, N_("Timer 2"), ""}, {0, NULL, 0, NULL, NULL}}; /* not returned: CAPSLOCKKEY, UNKNOWNKEY */ EnumPropertyItem event_type_items[] = { {0, "NONE", 0, "", ""}, - {LEFTMOUSE, "LEFTMOUSE", 0, "Left Mouse", ""}, - {MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle Mouse", ""}, - {RIGHTMOUSE, "RIGHTMOUSE", 0, "Right Mouse", ""}, - {BUTTON4MOUSE, "BUTTON4MOUSE", 0, "Button4 Mouse", ""}, - {BUTTON5MOUSE, "BUTTON5MOUSE", 0, "Button5 Mouse", ""}, - {ACTIONMOUSE, "ACTIONMOUSE", 0, "Action Mouse", ""}, - {SELECTMOUSE, "SELECTMOUSE", 0, "Select Mouse", ""}, + {LEFTMOUSE, "LEFTMOUSE", 0, N_("Left Mouse"), ""}, + {MIDDLEMOUSE, "MIDDLEMOUSE", 0, N_("Middle Mouse"), ""}, + {RIGHTMOUSE, "RIGHTMOUSE", 0, N_("Right Mouse"), ""}, + {BUTTON4MOUSE, "BUTTON4MOUSE", 0, N_("Button4 Mouse"), ""}, + {BUTTON5MOUSE, "BUTTON5MOUSE", 0, N_("Button5 Mouse"), ""}, + {ACTIONMOUSE, "ACTIONMOUSE", 0, N_("Action Mouse"), ""}, + {SELECTMOUSE, "SELECTMOUSE", 0, N_("Select Mouse"), ""}, {0, "", 0, NULL, NULL}, - {MOUSEMOVE, "MOUSEMOVE", 0, "Mouse Move", ""}, - {INBETWEEN_MOUSEMOVE, "INBETWEEN_MOUSEMOVE", 0, "Inbetween Move", ""}, - {MOUSEPAN, "TRACKPADPAN", 0, "Mouse/Trackpad Pan", ""}, - {MOUSEZOOM, "TRACKPADZOOM", 0, "Mouse/Trackpad Zoom", ""}, - {MOUSEROTATE, "MOUSEROTATE", 0, "Mouse/Trackpad Rotate", ""}, + {MOUSEMOVE, "MOUSEMOVE", 0, N_("Mouse Move"), ""}, + {INBETWEEN_MOUSEMOVE, "INBETWEEN_MOUSEMOVE", 0, N_("Inbetween Move"), ""}, + {MOUSEPAN, "TRACKPADPAN", 0, N_("Mouse/Trackpad Pan"), ""}, + {MOUSEZOOM, "TRACKPADZOOM", 0, N_("Mouse/Trackpad Zoom"), ""}, + {MOUSEROTATE, "MOUSEROTATE", 0, N_("Mouse/Trackpad Rotate"), ""}, {0, "", 0, NULL, NULL}, - {WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", ""}, - {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", ""}, - {WHEELINMOUSE, "WHEELINMOUSE", 0, "Wheel In", ""}, - {WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, "Wheel Out", ""}, + {WHEELUPMOUSE, "WHEELUPMOUSE", 0, N_("Wheel Up"), ""}, + {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, N_("Wheel Down"), ""}, + {WHEELINMOUSE, "WHEELINMOUSE", 0, N_("Wheel In"), ""}, + {WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, N_("Wheel Out"), ""}, {0, "", 0, NULL, NULL}, - {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Tweak Left", ""}, - {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Tweak Middle", ""}, - {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Tweak Right", ""}, - {EVT_TWEAK_A, "EVT_TWEAK_A", 0, "Tweak Action", ""}, - {EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Tweak Select", ""}, + {EVT_TWEAK_L, "EVT_TWEAK_L", 0, N_("Tweak Left"), ""}, + {EVT_TWEAK_M, "EVT_TWEAK_M", 0, N_("Tweak Middle"), ""}, + {EVT_TWEAK_R, "EVT_TWEAK_R", 0, N_("Tweak Right"), ""}, + {EVT_TWEAK_A, "EVT_TWEAK_A", 0, N_("Tweak Action"), ""}, + {EVT_TWEAK_S, "EVT_TWEAK_S", 0, N_("Tweak Select"), ""}, {0, "", 0, NULL, NULL}, {AKEY, "A", 0, "A", ""}, {BKEY, "B", 0, "B", ""}, @@ -173,22 +175,22 @@ EnumPropertyItem event_type_items[] = { {EIGHTKEY, "EIGHT", 0, "8", ""}, {NINEKEY, "NINE", 0, "9", ""}, {0, "", 0, NULL, NULL}, - {LEFTCTRLKEY, "LEFT_CTRL", 0, "Left Ctrl", ""}, - {LEFTALTKEY, "LEFT_ALT", 0, "Left Alt", ""}, - {LEFTSHIFTKEY, "LEFT_SHIFT", 0, "Left Shift", ""}, - {RIGHTALTKEY, "RIGHT_ALT", 0, "Right Alt", ""}, - {RIGHTCTRLKEY, "RIGHT_CTRL", 0, "Right Ctrl", ""}, - {RIGHTSHIFTKEY, "RIGHT_SHIFT", 0, "Right Shift", ""}, + {LEFTCTRLKEY, "LEFT_CTRL", 0, N_("Left Ctrl"), ""}, + {LEFTALTKEY, "LEFT_ALT", 0, N_("Left Alt"), ""}, + {LEFTSHIFTKEY, "LEFT_SHIFT", 0, N_("Left Shift"), ""}, + {RIGHTALTKEY, "RIGHT_ALT", 0, N_("Right Alt"), ""}, + {RIGHTCTRLKEY, "RIGHT_CTRL", 0, N_("Right Ctrl"), ""}, + {RIGHTSHIFTKEY, "RIGHT_SHIFT", 0, N_("Right Shift"), ""}, {0, "", 0, NULL, NULL}, - {OSKEY, "OSKEY", 0, "OS Key", ""}, - {GRLESSKEY, "GRLESS", 0, "Grless", ""}, + {OSKEY, "OSKEY", 0, N_("OS Key"), ""}, + {GRLESSKEY, "GRLESS", 0, N_("Grless"), ""}, {ESCKEY, "ESC", 0, "Esc", ""}, {TABKEY, "TAB", 0, "Tab", ""}, - {RETKEY, "RET", 0, "Return", ""}, - {SPACEKEY, "SPACE", 0, "Spacebar", ""}, - {LINEFEEDKEY, "LINE_FEED", 0, "Line Feed", ""}, - {BACKSPACEKEY, "BACK_SPACE", 0, "Back Space", ""}, - {DELKEY, "DEL", 0, "Delete", ""}, + {RETKEY, "RET", 0, N_("Return"), ""}, + {SPACEKEY, "SPACE", 0, N_("Spacebar"), ""}, + {LINEFEEDKEY, "LINE_FEED", 0, N_("Line Feed"), ""}, + {BACKSPACEKEY, "BACK_SPACE", 0, N_("Back Space"), ""}, + {DELKEY, "DEL", 0, N_("Delete"), ""}, {SEMICOLONKEY, "SEMI_COLON", 0, ";", ""}, {PERIODKEY, "PERIOD", 0, ".", ""}, {COMMAKEY, "COMMA", 0, ",", ""}, @@ -200,26 +202,26 @@ EnumPropertyItem event_type_items[] = { {EQUALKEY, "EQUAL", 0, "=", ""}, {LEFTBRACKETKEY, "LEFT_BRACKET", 0, "[", ""}, {RIGHTBRACKETKEY, "RIGHT_BRACKET", 0, "]", ""}, - {LEFTARROWKEY, "LEFT_ARROW", 0, "Left Arrow", ""}, - {DOWNARROWKEY, "DOWN_ARROW", 0, "Down Arrow", ""}, - {RIGHTARROWKEY, "RIGHT_ARROW", 0, "Right Arrow", ""}, - {UPARROWKEY, "UP_ARROW", 0, "Up Arrow", ""}, - {PAD2, "NUMPAD_2", 0, "Numpad 2", ""}, - {PAD4, "NUMPAD_4", 0, "Numpad 4", ""}, - {PAD6, "NUMPAD_6", 0, "Numpad 6", ""}, - {PAD8, "NUMPAD_8", 0, "Numpad 8", ""}, - {PAD1, "NUMPAD_1", 0, "Numpad 1", ""}, - {PAD3, "NUMPAD_3", 0, "Numpad 3", ""}, - {PAD5, "NUMPAD_5", 0, "Numpad 5", ""}, - {PAD7, "NUMPAD_7", 0, "Numpad 7", ""}, - {PAD9, "NUMPAD_9", 0, "Numpad 9", ""}, - {PADPERIOD, "NUMPAD_PERIOD", 0, "Numpad .", ""}, - {PADSLASHKEY, "NUMPAD_SLASH", 0, "Numpad /", ""}, - {PADASTERKEY, "NUMPAD_ASTERIX", 0, "Numpad *", ""}, - {PAD0, "NUMPAD_0", 0, "Numpad 0", ""}, - {PADMINUS, "NUMPAD_MINUS", 0, "Numpad -", ""}, - {PADENTER, "NUMPAD_ENTER", 0, "Numpad Enter", ""}, - {PADPLUSKEY, "NUMPAD_PLUS", 0, "Numpad +", ""}, + {LEFTARROWKEY, "LEFT_ARROW", 0, N_("Left Arrow"), ""}, + {DOWNARROWKEY, "DOWN_ARROW", 0, N_("Down Arrow"), ""}, + {RIGHTARROWKEY, "RIGHT_ARROW", 0, N_("Right Arrow"), ""}, + {UPARROWKEY, "UP_ARROW", 0, N_("Up Arrow"), ""}, + {PAD2, "NUMPAD_2", 0, N_("Numpad 2"), ""}, + {PAD4, "NUMPAD_4", 0, N_("Numpad 4"), ""}, + {PAD6, "NUMPAD_6", 0, N_("Numpad 6"), ""}, + {PAD8, "NUMPAD_8", 0, N_("Numpad 8"), ""}, + {PAD1, "NUMPAD_1", 0, N_("Numpad 1"), ""}, + {PAD3, "NUMPAD_3", 0, N_("Numpad 3"), ""}, + {PAD5, "NUMPAD_5", 0, N_("Numpad 5"), ""}, + {PAD7, "NUMPAD_7", 0, N_("Numpad 7"), ""}, + {PAD9, "NUMPAD_9", 0, N_("Numpad 9"), ""}, + {PADPERIOD, "NUMPAD_PERIOD", 0, N_("Numpad ."), ""}, + {PADSLASHKEY, "NUMPAD_SLASH", 0, N_("Numpad /"), ""}, + {PADASTERKEY, "NUMPAD_ASTERIX", 0, N_("Numpad *"), ""}, + {PAD0, "NUMPAD_0", 0, N_("Numpad 0"), ""}, + {PADMINUS, "NUMPAD_MINUS", 0, N_("Numpad -"), ""}, + {PADENTER, "NUMPAD_ENTER", 0, N_("Numpad Enter"), ""}, + {PADPLUSKEY, "NUMPAD_PLUS", 0, N_("Numpad +"), ""}, {F1KEY, "F1", 0, "F1", ""}, {F2KEY, "F2", 0, "F2", ""}, {F3KEY, "F3", 0, "F3", ""}, @@ -239,23 +241,23 @@ EnumPropertyItem event_type_items[] = { {F17KEY, "F17", 0, "F17", ""}, {F18KEY, "F18", 0, "F18", ""}, {F19KEY, "F19", 0, "F19", ""}, - {PAUSEKEY, "PAUSE", 0, "Pause", ""}, - {INSERTKEY, "INSERT", 0, "Insert", ""}, + {PAUSEKEY, "PAUSE", 0, N_("Pause"), ""}, + {INSERTKEY, "INSERT", 0, N_("Insert"), ""}, {HOMEKEY, "HOME", 0, "Home", ""}, - {PAGEUPKEY, "PAGE_UP", 0, "Page Up", ""}, - {PAGEDOWNKEY, "PAGE_DOWN", 0, "Page Down", ""}, + {PAGEUPKEY, "PAGE_UP", 0, N_("Page Up"), ""}, + {PAGEDOWNKEY, "PAGE_DOWN", 0, N_("Page Down"), ""}, {ENDKEY, "END", 0, "End", ""}, {0, "", 0, NULL, NULL}, - {MEDIAPLAY, "MEDIA_PLAY", 0, "Media Play/Pause", ""}, - {MEDIASTOP, "MEDIA_STOP", 0, "Media Stop", ""}, - {MEDIAFIRST, "MEDIA_FIRST", 0, "Media First", ""}, - {MEDIALAST, "MEDIA_LAST", 0, "Media Last", ""}, + {MEDIAPLAY, "MEDIA_PLAY", 0, N_("Media Play/Pause"), ""}, + {MEDIASTOP, "MEDIA_STOP", 0, N_("Media Stop"), ""}, + {MEDIAFIRST, "MEDIA_FIRST", 0, N_("Media First"), ""}, + {MEDIALAST, "MEDIA_LAST", 0, N_("Media Last"), ""}, {0, "", 0, NULL, NULL}, - {WINDEACTIVATE, "WINDOW_DEACTIVATE", 0, "Window Deactivate", ""}, - {TIMER, "TIMER", 0, "Timer", ""}, - {TIMER0, "TIMER0", 0, "Timer 0", ""}, - {TIMER1, "TIMER1", 0, "Timer 1", ""}, - {TIMER2, "TIMER2", 0, "Timer 2", ""}, + {WINDEACTIVATE, "WINDOW_DEACTIVATE", 0, N_("Window Deactivate"), ""}, + {TIMER, "TIMER", 0, N_("Timer"), ""}, + {TIMER0, "TIMER0", 0, N_("Timer 0"), ""}, + {TIMER1, "TIMER1", 0, N_("Timer 1"), ""}, + {TIMER2, "TIMER2", 0, N_("Timer 2"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem keymap_propvalue_items[] = { @@ -263,39 +265,39 @@ EnumPropertyItem keymap_propvalue_items[] = { {0, NULL, 0, NULL, NULL}}; EnumPropertyItem keymap_modifiers_items[] = { - {KM_ANY, "ANY", 0, "Any", ""}, - {0, "NONE", 0, "None", ""}, - {1, "FIRST", 0, "First", ""}, - {2, "SECOND", 0, "Second", ""}, + {KM_ANY, "ANY", 0, N_("Any"), ""}, + {0, "NONE", 0, N_("None"), ""}, + {1, "FIRST", 0, N_("First"), ""}, + {2, "SECOND", 0, N_("Second"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem operator_flag_items[] = { - {OPTYPE_REGISTER, "REGISTER", 0, "Register", ""}, - {OPTYPE_UNDO, "UNDO", 0, "Undo", ""}, - {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", ""}, - {OPTYPE_MACRO, "MACRO", 0, "Macro", ""}, - {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, "Grab Pointer", ""}, - {OPTYPE_PRESET, "PRESET", 0, "Preset", ""}, - {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", ""}, + {OPTYPE_REGISTER, "REGISTER", 0, N_("Register"), ""}, + {OPTYPE_UNDO, "UNDO", 0, N_("Undo"), ""}, + {OPTYPE_BLOCKING, "BLOCKING", 0, N_("Blocking"), ""}, + {OPTYPE_MACRO, "MACRO", 0, N_("Macro"), ""}, + {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, N_("Grab Pointer"), ""}, + {OPTYPE_PRESET, "PRESET", 0, N_("Preset"), ""}, + {OPTYPE_INTERNAL, "INTERNAL", 0, N_("Internal"), ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem operator_return_items[] = { - {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", ""}, - {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", ""}, - {OPERATOR_FINISHED, "FINISHED", 0, "Finished", ""}, - {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", ""}, // used as a flag + {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, N_("Running Modal"), ""}, + {OPERATOR_CANCELLED, "CANCELLED", 0, N_("Cancelled"), ""}, + {OPERATOR_FINISHED, "FINISHED", 0, N_("Finished"), ""}, + {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, N_("Pass Through"), ""}, // used as a flag {0, NULL, 0, NULL, NULL}}; /* flag/enum */ EnumPropertyItem wm_report_items[] = { - {RPT_DEBUG, "DEBUG", 0, "Debug", ""}, - {RPT_INFO, "INFO", 0, "Info", ""}, - {RPT_OPERATOR, "OPERATOR", 0, "Operator", ""}, - {RPT_WARNING, "WARNING", 0, "Warning", ""}, - {RPT_ERROR, "ERROR", 0, "Error", ""}, - {RPT_ERROR_INVALID_INPUT, "ERROR_INVALID_INPUT", 0, "Invalid Input", ""},\ - {RPT_ERROR_INVALID_CONTEXT, "ERROR_INVALID_CONTEXT", 0, "Invalid Context", ""}, - {RPT_ERROR_OUT_OF_MEMORY, "ERROR_OUT_OF_MEMORY", 0, "Out of Memory", ""}, + {RPT_DEBUG, "DEBUG", 0, N_("Debug"), ""}, + {RPT_INFO, "INFO", 0, N_("Info"), ""}, + {RPT_OPERATOR, "OPERATOR", 0, N_("Operator"), ""}, + {RPT_WARNING, "WARNING", 0, N_("Warning"), ""}, + {RPT_ERROR, "ERROR", 0, N_("Error"), ""}, + {RPT_ERROR_INVALID_INPUT, "ERROR_INVALID_INPUT", 0, N_("Invalid Input"), ""},\ + {RPT_ERROR_INVALID_CONTEXT, "ERROR_INVALID_CONTEXT", 0, N_("Invalid Context"), ""}, + {RPT_ERROR_OUT_OF_MEMORY, "ERROR_OUT_OF_MEMORY", 0, N_("Out of Memory"), ""}, {0, NULL, 0, NULL, NULL}}; #define KMI_TYPE_KEYBOARD 0 @@ -1650,81 +1652,81 @@ static void rna_def_keyconfig(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem map_type_items[] = { - {KMI_TYPE_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""}, - {KMI_TYPE_TWEAK, "TWEAK", 0, "Tweak", ""}, - {KMI_TYPE_MOUSE, "MOUSE", 0, "Mouse", ""}, - {KMI_TYPE_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""}, - {KMI_TYPE_TIMER, "TIMER", 0, "Timer", ""}, + {KMI_TYPE_KEYBOARD, "KEYBOARD", 0, N_("Keyboard"), ""}, + {KMI_TYPE_TWEAK, "TWEAK", 0, N_("Tweak"), ""}, + {KMI_TYPE_MOUSE, "MOUSE", 0, N_("Mouse"), ""}, + {KMI_TYPE_TEXTINPUT, "TEXTINPUT", 0, N_("Text Input"), ""}, + {KMI_TYPE_TIMER, "TIMER", 0, N_("Timer"), ""}, {0, NULL, 0, NULL, NULL}}; /* KeyConfig */ srna= RNA_def_struct(brna, "KeyConfig", NULL); RNA_def_struct_sdna(srna, "wmKeyConfig"); - RNA_def_struct_ui_text(srna, "Key Configuration", "Input configuration, including keymaps"); + RNA_def_struct_ui_text(srna, N_("Key Configuration"), N_("Input configuration, including keymaps")); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); - RNA_def_property_ui_text(prop, "Name", "Name of the key configuration"); + RNA_def_property_ui_text(prop, N_("Name"), N_("Name of the key configuration")); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "keymaps", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "KeyMap"); - RNA_def_property_ui_text(prop, "Key Maps", "Key maps configured as part of this configuration"); + RNA_def_property_ui_text(prop, N_("Key Maps"), N_("Key maps configured as part of this configuration")); rna_def_wm_keymaps(brna, prop); prop= RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYCONF_USER); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "User Defined", "Indicates that a keyconfig was defined by the user"); + RNA_def_property_ui_text(prop, N_("User Defined"), N_("Indicates that a keyconfig was defined by the user")); RNA_api_keyconfig(srna); /* KeyMap */ srna= RNA_def_struct(brna, "KeyMap", NULL); RNA_def_struct_sdna(srna, "wmKeyMap"); - RNA_def_struct_ui_text(srna, "Key Map", "Input configuration, including keymaps"); + RNA_def_struct_ui_text(srna, N_("Key Map"), N_("Input configuration, including keymaps")); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Name", "Name of the key map"); + RNA_def_property_ui_text(prop, N_("Name"), N_("Name of the key map")); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "spaceid"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, space_type_items); - RNA_def_property_ui_text(prop, "Space Type", "Optional space type keymap is associated with"); + RNA_def_property_ui_text(prop, N_("Space Type"), N_("Optional space type keymap is associated with")); prop= RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "regionid"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, region_type_items); - RNA_def_property_ui_text(prop, "Region Type", "Optional region type keymap is associated with"); + RNA_def_property_ui_text(prop, N_("Region Type"), N_("Optional region type keymap is associated with")); prop= RNA_def_property(srna, "keymap_items", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "items", NULL); RNA_def_property_struct_type(prop, "KeyMapItem"); - RNA_def_property_ui_text(prop, "Items", "Items in the keymap, linking an operator to an input event"); + RNA_def_property_ui_text(prop, N_("Items"), N_("Items in the keymap, linking an operator to an input event")); rna_def_keymap_items(brna, prop); prop= RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NEVER_NULL); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_USER); - RNA_def_property_ui_text(prop, "User Defined", "Keymap is defined by the user"); + RNA_def_property_ui_text(prop, N_("User Defined"), N_("Keymap is defined by the user")); prop= RNA_def_property(srna, "is_modal", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_MODAL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Modal Keymap", "Indicates that a keymap is used for translate modal events for an operator"); + RNA_def_property_ui_text(prop, N_("Modal Keymap"), N_("Indicates that a keymap is used for translate modal events for an operator")); prop= RNA_def_property(srna, "show_expanded_items", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_EXPANDED); - RNA_def_property_ui_text(prop, "Items Expanded", "Expanded in the user interface"); + RNA_def_property_ui_text(prop, N_("Items Expanded"), N_("Expanded in the user interface")); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); prop= RNA_def_property(srna, "show_expanded_children", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_CHILDREN_EXPANDED); - RNA_def_property_ui_text(prop, "Children Expanded", "Children expanded in the user interface"); + RNA_def_property_ui_text(prop, N_("Children Expanded"), N_("Children expanded in the user interface")); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); @@ -1733,99 +1735,99 @@ static void rna_def_keyconfig(BlenderRNA *brna) /* KeyMapItem */ srna= RNA_def_struct(brna, "KeyMapItem", NULL); RNA_def_struct_sdna(srna, "wmKeyMapItem"); - RNA_def_struct_ui_text(srna, "Key Map Item", "Item in a Key Map"); + RNA_def_struct_ui_text(srna, N_("Key Map Item"), N_("Item in a Key Map")); prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); - RNA_def_property_ui_text(prop, "Identifier", "Identifier of operator to call on input event"); + RNA_def_property_ui_text(prop, N_("Identifier"), N_("Identifier of operator to call on input event")); RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_idname_get", "rna_wmKeyMapItem_idname_length", "rna_wmKeyMapItem_idname_set"); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Name", "Name of operator to call on input event"); + RNA_def_property_ui_text(prop, N_("Name"), N_("Name of operator to call on input event")); RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_name_get", "rna_wmKeyMapItem_name_length", NULL); prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "OperatorProperties"); RNA_def_property_pointer_funcs(prop, "rna_KeyMapItem_properties_get", NULL, NULL, NULL); - RNA_def_property_ui_text(prop, "Properties", "Properties to set when the operator is called"); + RNA_def_property_ui_text(prop, N_("Properties"), N_("Properties to set when the operator is called")); prop= RNA_def_property(srna, "map_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "maptype"); RNA_def_property_enum_items(prop, map_type_items); RNA_def_property_enum_funcs(prop, "rna_wmKeyMapItem_map_type_get", "rna_wmKeyMapItem_map_type_set", NULL); - RNA_def_property_ui_text(prop, "Map Type", "Type of event mapping"); + RNA_def_property_ui_text(prop, N_("Map Type"), N_("Type of event mapping")); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, event_type_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_type_itemf"); - RNA_def_property_ui_text(prop, "Type", "Type of event"); + RNA_def_property_ui_text(prop, N_("Type"), N_("Type of event")); prop= RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "val"); RNA_def_property_enum_items(prop, event_value_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_value_itemf"); - RNA_def_property_ui_text(prop, "Value", ""); + RNA_def_property_ui_text(prop, N_("Value"), ""); prop= RNA_def_property(srna, "id", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "id"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "id", "ID of the item"); + RNA_def_property_ui_text(prop, "id", N_("ID of the item")); prop= RNA_def_property(srna, "any", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_KeyMapItem_any_getf", "rna_KeyMapItem_any_setf"); - RNA_def_property_ui_text(prop, "Any", "Any modifier keys pressed"); + RNA_def_property_ui_text(prop, N_("Any"), N_("Any modifier keys pressed")); prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shift", 0); // RNA_def_property_enum_sdna(prop, NULL, "shift"); // RNA_def_property_enum_items(prop, keymap_modifiers_items); - RNA_def_property_ui_text(prop, "Shift", "Shift key pressed"); + RNA_def_property_ui_text(prop, "Shift", N_("Shift key pressed")); prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 0); // RNA_def_property_enum_sdna(prop, NULL, "ctrl"); // RNA_def_property_enum_items(prop, keymap_modifiers_items); - RNA_def_property_ui_text(prop, "Ctrl", "Control key pressed"); + RNA_def_property_ui_text(prop, "Ctrl", N_("Control key pressed")); prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "alt", 0); // RNA_def_property_enum_sdna(prop, NULL, "alt"); // RNA_def_property_enum_items(prop, keymap_modifiers_items); - RNA_def_property_ui_text(prop, "Alt", "Alt key pressed"); + RNA_def_property_ui_text(prop, "Alt", N_("Alt key pressed")); prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "oskey", 0); // RNA_def_property_enum_sdna(prop, NULL, "oskey"); // RNA_def_property_enum_items(prop, keymap_modifiers_items); - RNA_def_property_ui_text(prop, "OS Key", "Operating system key pressed"); + RNA_def_property_ui_text(prop, N_("OS Key"), N_("Operating system key pressed")); prop= RNA_def_property(srna, "key_modifier", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "keymodifier"); RNA_def_property_enum_items(prop, event_type_items); - RNA_def_property_ui_text(prop, "Key Modifier", "Regular key pressed as a modifier"); + RNA_def_property_ui_text(prop, N_("Key Modifier"), N_("Regular key pressed as a modifier")); prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_EXPANDED); - RNA_def_property_ui_text(prop, "Expanded", "Show key map event and property details in the user interface"); + RNA_def_property_ui_text(prop, N_("Expanded"), N_("Show key map event and property details in the user interface")); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); prop= RNA_def_property(srna, "propvalue", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "propvalue"); RNA_def_property_enum_items(prop, keymap_propvalue_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_propvalue_itemf"); - RNA_def_property_ui_text(prop, "Property Value", "The value this event translates to in a modal keymap"); + RNA_def_property_ui_text(prop, N_("Property Value"), N_("The value this event translates to in a modal keymap")); prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", KMI_INACTIVE); - RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item"); + RNA_def_property_ui_text(prop, N_("Active"), N_("Activate or deactivate item")); RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1); prop= RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "User Defined", "Is this keymap item user defined (doesn't just override a builtin item)"); + RNA_def_property_ui_text(prop, N_("User Defined"), N_("Is this keymap item user defined (doesn't just override a builtin item)")); RNA_def_property_boolean_funcs(prop, "rna_KeyMapItem_userdefined_get", NULL); RNA_api_keymapitem(srna); diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c index 3cf0b0f1f27..a6bbb26be86 100644 --- a/source/blender/python/generic/blf_py_api.c +++ b/source/blender/python/generic/blf_py_api.c @@ -367,6 +367,51 @@ static PyObject *py_blf_load(PyObject *UNUSED(self), PyObject *args) return PyLong_FromLong(BLF_load(filename)); } +PyDoc_STRVAR(py_blf_gettext_doc, +".. function:: gettext(msgid)\n" +"\n" +" Get a msg in local language.\n" +"\n" +" :arg msgid: the source string.\n" +" :type msgid: string\n" +" :return: the localized string.\n" +" :rtype: string\n" +); +static PyObject *py_blf_gettext(PyObject *UNUSED(self), PyObject *args) +{ + char* msgid; + char* msgstr; + char* error_handle; + + if (!PyArg_ParseTuple(args, "s:blf.gettext", &msgid)) + return NULL; + + msgstr = BLF_gettext( msgid ); + + return PyUnicode_DecodeUTF8( msgstr, strlen(msgstr), error_handle ); +} + +PyDoc_STRVAR(py_blf_fake_gettext_doc, +".. function:: fake_gettext(msgid)\n" +"\n" +" Just tag the msgid.\n" +"\n" +" :arg msgid: the source string.\n" +" :type msgid: string\n" +" :return: the source string.\n" +" :rtype: string\n" +); +static PyObject *py_blf_fake_gettext(PyObject *UNUSED(self), PyObject *args) +{ + char* msgid; + char* error_handle; + + if (!PyArg_ParseTuple(args, "s:blf.gettext", &msgid)) + return NULL; + + return PyUnicode_DecodeUTF8( msgid, strlen(msgid), error_handle ); +} + /*----------------------------MODULE INIT-------------------------*/ static PyMethodDef BLF_methods[] = { {"aspect", (PyCFunction) py_blf_aspect, METH_VARARGS, py_blf_aspect_doc}, @@ -382,6 +427,8 @@ static PyMethodDef BLF_methods[] = { {"shadow_offset", (PyCFunction) py_blf_shadow_offset, METH_VARARGS, py_blf_shadow_offset_doc}, {"size", (PyCFunction) py_blf_size, METH_VARARGS, py_blf_size_doc}, {"load", (PyCFunction) py_blf_load, METH_VARARGS, py_blf_load_doc}, + {"gettext", (PyCFunction) py_blf_gettext, METH_VARARGS, py_blf_gettext_doc}, + {"fake_gettext", (PyCFunction) py_blf_fake_gettext, METH_VARARGS, py_blf_fake_gettext_doc}, {NULL, NULL, 0, NULL} }; diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index 26d9ca76e3f..77ba6031da5 100644..100755 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: bpy_app_handlers.c 37799 2011-06-24 23:14:26Z gsrb3d $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/intern/bpy_app_handlers.h b/source/blender/python/intern/bpy_app_handlers.h index bfa413438b1..8c1faa19c54 100644..100755 --- a/source/blender/python/intern/bpy_app_handlers.h +++ b/source/blender/python/intern/bpy_app_handlers.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: bpy_app_handlers.h 37799 2011-06-24 23:14:26Z gsrb3d $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/intern/bpy_intern_string.c b/source/blender/python/intern/bpy_intern_string.c index c6629007532..963c3469847 100644..100755 --- a/source/blender/python/intern/bpy_intern_string.c +++ b/source/blender/python/intern/bpy_intern_string.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: bpy_intern_string.c 37626 2011-06-18 23:22:55Z gsrb3d $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/intern/bpy_intern_string.h b/source/blender/python/intern/bpy_intern_string.h index af6a9b7101a..2a4be2b6341 100644..100755 --- a/source/blender/python/intern/bpy_intern_string.h +++ b/source/blender/python/intern/bpy_intern_string.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: bpy_intern_string.h 37626 2011-06-18 23:22:55Z gsrb3d $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/CMakeLists.txt b/source/blender/python/mathutils/CMakeLists.txt index b28496d612e..b28496d612e 100644..100755 --- a/source/blender/python/mathutils/CMakeLists.txt +++ b/source/blender/python/mathutils/CMakeLists.txt diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index 50b75b09cb2..4a0fa509a0d 100644..100755 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils.c 38409 2011-07-15 04:01:47Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h index b798b5e7003..300c054c061 100644..100755 --- a/source/blender/python/mathutils/mathutils.h +++ b/source/blender/python/mathutils/mathutils.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils.h 38674 2011-07-25 01:44:19Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c index d0c7ec72cea..37730ba4649 100644..100755 --- a/source/blender/python/mathutils/mathutils_Color.c +++ b/source/blender/python/mathutils/mathutils_Color.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Color.c 38409 2011-07-15 04:01:47Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_Color.h b/source/blender/python/mathutils/mathutils_Color.h index 0fc880363f4..0afb0ee4dc1 100644..100755 --- a/source/blender/python/mathutils/mathutils_Color.h +++ b/source/blender/python/mathutils/mathutils_Color.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Color.h 38409 2011-07-15 04:01:47Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c index 5c609d8961f..afff9275aa0 100644..100755 --- a/source/blender/python/mathutils/mathutils_Euler.c +++ b/source/blender/python/mathutils/mathutils_Euler.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Euler.c 38409 2011-07-15 04:01:47Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_Euler.h b/source/blender/python/mathutils/mathutils_Euler.h index 849e16c2bb7..2df3d6198b8 100644..100755 --- a/source/blender/python/mathutils/mathutils_Euler.h +++ b/source/blender/python/mathutils/mathutils_Euler.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Euler.h 38409 2011-07-15 04:01:47Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 3953171f263..1a1a9f8aff3 100644..100755 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Matrix.c 38674 2011-07-25 01:44:19Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_Matrix.h b/source/blender/python/mathutils/mathutils_Matrix.h index aa736d1e959..84a92bae2be 100644..100755 --- a/source/blender/python/mathutils/mathutils_Matrix.h +++ b/source/blender/python/mathutils/mathutils_Matrix.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Matrix.h 38409 2011-07-15 04:01:47Z campbellbarton $ * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index 2be258a1ef0..d43cae9edd7 100644..100755 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Quaternion.c 38674 2011-07-25 01:44:19Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_Quaternion.h b/source/blender/python/mathutils/mathutils_Quaternion.h index d606621390a..4ba70895680 100644..100755 --- a/source/blender/python/mathutils/mathutils_Quaternion.h +++ b/source/blender/python/mathutils/mathutils_Quaternion.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Quaternion.h 38409 2011-07-15 04:01:47Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index a954c07c98d..5d0e467f6e8 100644..100755 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Vector.c 38674 2011-07-25 01:44:19Z campbellbarton $ * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/python/mathutils/mathutils_Vector.h b/source/blender/python/mathutils/mathutils_Vector.h index 0ede836ce44..e430a100836 100644..100755 --- a/source/blender/python/mathutils/mathutils_Vector.h +++ b/source/blender/python/mathutils/mathutils_Vector.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_Vector.h 38409 2011-07-15 04:01:47Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c index bcdfe020e1a..acfb8a91416 100644..100755 --- a/source/blender/python/mathutils/mathutils_geometry.c +++ b/source/blender/python/mathutils/mathutils_geometry.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_geometry.c 38409 2011-07-15 04:01:47Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/mathutils/mathutils_geometry.h b/source/blender/python/mathutils/mathutils_geometry.h index c963a63ce7f..0b07fc12c69 100644..100755 --- a/source/blender/python/mathutils/mathutils_geometry.h +++ b/source/blender/python/mathutils/mathutils_geometry.h @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: mathutils_geometry.h 38409 2011-07-15 04:01:47Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index e6325e2101a..fc41c2b37a1 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -93,7 +93,8 @@ void WM_window_open_temp (struct bContext *C, struct rcti *position, int type); /* files */ int WM_read_homefile_exec(struct bContext *C, struct wmOperator *op); -int WM_read_homefile (struct bContext *C, struct ReportList *reports, short from_memory); +int WM_read_homefile (struct bContext *C, struct ReportList *reports, short from_memory, ListBase *wmbase); +int WM_read_homefile_proc(struct bContext *C, ListBase *wmbase); int WM_write_homefile (struct bContext *C, struct wmOperator *op); void WM_read_file (struct bContext *C, const char *filepath, struct ReportList *reports); int WM_write_file (struct bContext *C, const char *target, int fileflags, struct ReportList *reports, int copy); diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 27fc0caeccc..d69aa8c1c4c 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -59,6 +59,8 @@ #include "BLI_utildefines.h" #include "BLI_callbacks.h" +#include "BLF_api.h" + #include "DNA_anim_types.h" #include "DNA_ipo_types.h" // XXX old animation system #include "DNA_object_types.h" @@ -421,16 +423,16 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports) else if(retval == BKE_READ_EXOTIC_OK_OTHER) BKE_write_undo(C, "Import file"); else if(retval == BKE_READ_EXOTIC_FAIL_OPEN) { - BKE_reportf(reports, RPT_ERROR, "Can't read file: \"%s\", %s.", filepath, errno ? strerror(errno) : "Unable to open the file"); + BKE_reportf(reports, RPT_ERROR, _("Can't read file: \"%s\", %s."), filepath, errno ? strerror(errno) : _("Unable to open the file")); } else if(retval == BKE_READ_EXOTIC_FAIL_FORMAT) { - BKE_reportf(reports, RPT_ERROR, "File format is not supported in file: \"%s\".", filepath); + BKE_reportf(reports, RPT_ERROR, _("File format is not supported in file: \"%s\"."), filepath); } else if(retval == BKE_READ_EXOTIC_FAIL_PATH) { - BKE_reportf(reports, RPT_ERROR, "File path invalid: \"%s\".", filepath); + BKE_reportf(reports, RPT_ERROR, _("File path invalid: \"%s\"."), filepath); } else { - BKE_reportf(reports, RPT_ERROR, "Unknown error loading: \"%s\".", filepath); + BKE_reportf(reports, RPT_ERROR, _("Unknown error loading: \"%s\"."), filepath); BLI_assert(!"invalid 'retval'"); } @@ -442,9 +444,8 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports) /* called on startup, (context entirely filled with NULLs) */ /* or called for 'New File' */ /* op can be NULL */ -int WM_read_homefile(bContext *C, ReportList *reports, short from_memory) +int WM_read_homefile(bContext *C, ReportList *reports, short from_memory, ListBase *wmbase) { - ListBase wmbase; char tstr[FILE_MAXDIR+FILE_MAXFILE]; int success= 0; @@ -466,7 +467,7 @@ int WM_read_homefile(bContext *C, ReportList *reports, short from_memory) G.fileflags &= ~G_FILE_NO_UI; /* put aside screens to match with persistant windows later */ - wm_window_match_init(C, &wmbase); + wm_window_match_init(C, wmbase); if (!from_memory && BLI_exists(tstr)) { success = (BKE_read_file(C, tstr, NULL) != BKE_READ_FILE_FAIL); @@ -478,7 +479,7 @@ int WM_read_homefile(bContext *C, ReportList *reports, short from_memory) } if(success==0) { success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL); - if (wmbase.first == NULL) wm_clear_default_size(C); + if (wmbase->first == NULL) wm_clear_default_size(C); #ifdef WITH_PYTHON_SECURITY /* not default */ /* use alternative setting for security nuts @@ -486,7 +487,12 @@ int WM_read_homefile(bContext *C, ReportList *reports, short from_memory) U.flag |= USER_SCRIPT_AUTOEXEC_DISABLE; #endif } - + return TRUE; +} + +/* split from the old WM_read_homefile */ +int WM_read_homefile_proc(bContext *C, ListBase *wmbase) +{ /* prevent buggy files that had G_FILE_RELATIVE_REMAP written out by mistake. Screws up autosaves otherwise * can remove this eventually, only in a 2.53 and older, now its not written */ G.fileflags &= ~G_FILE_RELATIVE_REMAP; @@ -495,7 +501,7 @@ int WM_read_homefile(bContext *C, ReportList *reports, short from_memory) wm_init_userdef(C); /* match the read WM with current WM */ - wm_window_match_do(C, &wmbase); + wm_window_match_do(C, wmbase); WM_check(C); /* opens window(s), checks keymaps */ G.main->name[0]= '\0'; @@ -540,8 +546,9 @@ int WM_read_homefile(bContext *C, ReportList *reports, short from_memory) int WM_read_homefile_exec(bContext *C, wmOperator *op) { + ListBase wmbase; int from_memory= strcmp(op->type->idname, "WM_OT_read_factory_settings") == 0; - return WM_read_homefile(C, op->reports, from_memory) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; + return WM_read_homefile(C, op->reports, from_memory, &wmbase) && WM_read_homefile_proc(C, &wmbase) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } void WM_read_history(void) diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index ed28696ef69..daaaee771fd 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -79,6 +79,7 @@ #include "GHOST_C-api.h" #include "RNA_define.h" +#include "RNA_access.h" #include "WM_api.h" #include "WM_types.h" @@ -121,11 +122,22 @@ int wm_start_with_console = 0; /* only called once, for startup */ void WM_init(bContext *C, int argc, const char **argv) { + ListBase wmbase; if (!G.background) { wm_ghost_init(C); /* note: it assigns C to ghost! */ wm_init_cursor_data(); } GHOST_CreateSystemPaths(); + BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */ + BLF_lang_init(); + // use default settings + BLF_lang_encoding(""); + /* get the default database, plus a wm */ + WM_read_homefile(C, NULL, G.factory_startup, &wmbase); + BLF_lang_set(NULL); + + RNA_types_init_gettext(); + wm_operatortype_init(); set_free_windowmanager_cb(wm_close_and_free); /* library.c */ @@ -136,12 +148,8 @@ void WM_init(bContext *C, int argc, const char **argv) ED_file_init(); /* for fsmenu */ ED_init_node_butfuncs(); - - BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */ - BLF_lang_init(); - /* get the default database, plus a wm */ - WM_read_homefile(C, NULL, G.factory_startup); + WM_read_homefile_proc(C, &wmbase); /* note: there is a bug where python needs initializing before loading the * startup.blend because it may contain PyDrivers. It also needs to be after * initializing space types and other internal data. @@ -338,6 +346,7 @@ extern void free_anim_copybuf(void); extern void free_anim_drivers_copybuf(void); extern void free_fmodifiers_copybuf(void); extern void free_posebuf(void); +extern void free_datatoc_bunifont_ttf(void); /* called in creator.c even... tsk, split this! */ void WM_exit(bContext *C) @@ -376,7 +385,7 @@ void WM_exit(bContext *C) BIF_freeTemplates(C); free_ttfont(); /* bke_font.h */ - + free_datatoc_bunifont_ttf(); /* bunifont.ttf.c */ free_openrecent(); BKE_freecubetable(); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 29afdb570ea..ea8e6d9bb31 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -77,6 +77,7 @@ #include "BIF_gl.h" #include "BIF_glutil.h" /* for paint cursor */ +#include "BLF_api.h" #include "IMB_imbuf_types.h" @@ -140,12 +141,11 @@ void WM_operatortype_append(void (*opfunc)(wmOperatorType*)) opfunc(ot); if(ot->name==NULL) { - static char dummy_name[] = "Dummy Name"; fprintf(stderr, "ERROR: Operator %s has no name property!\n", ot->idname); - ot->name= dummy_name; + ot->name= _("Dummy Name"); } - RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:"(undocumented operator)"); // XXX All ops should have a description but for now allow them not to. + RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:_("(undocumented operator)")); // XXX All ops should have a description but for now allow them not to. RNA_def_struct_identifier(ot->srna, ot->idname); BLI_addtail(&global_ops, ot); } @@ -157,7 +157,7 @@ void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType*, void*), void *us ot= MEM_callocN(sizeof(wmOperatorType), "operatortype"); ot->srna= RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); opfunc(ot, userdata); - RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:"(undocumented operator)"); + RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:_("(undocumented operator)")); RNA_def_struct_identifier(ot->srna, ot->idname); BLI_addtail(&global_ops, ot); } @@ -346,7 +346,7 @@ wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *nam ot->poll= NULL; if(!ot->description) - ot->description= "(undocumented operator)"; + ot->description= _("(undocumented operator)"); RNA_def_struct_ui_text(ot->srna, ot->name, ot->description); // XXX All ops should have a description but for now allow them not to. RNA_def_struct_identifier(ot->srna, ot->idname); @@ -371,7 +371,7 @@ void WM_operatortype_append_macro_ptr(void (*opfunc)(wmOperatorType*, void*), vo ot->poll= NULL; if(!ot->description) - ot->description= "(undocumented operator)"; + ot->description= _("(undocumented operator)"); opfunc(ot, userdata); @@ -766,7 +766,7 @@ int WM_operator_confirm_message(bContext *C, wmOperator *op, const char *message else properties= NULL; - pup= uiPupMenuBegin(C, "OK?", ICON_QUESTION); + pup= uiPupMenuBegin(C, _("OK?"), ICON_QUESTION); layout= uiPupMenuLayout(pup); uiItemFullO(layout, op->type->idname, message, ICON_NONE, properties, WM_OP_EXEC_REGION_WIN, 0); uiPupMenuEnd(C, pup); @@ -799,82 +799,82 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, if(flag & WM_FILESEL_FILEPATH) - RNA_def_string_file_path(ot->srna, "filepath", "", FILE_MAX, "File Path", "Path to file"); + RNA_def_string_file_path(ot->srna, "filepath", "", FILE_MAX, _("File Path"), _("Path to file")); if(flag & WM_FILESEL_DIRECTORY) - RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Directory of the file"); + RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, _("Directory"), _("Directory of the file")); if(flag & WM_FILESEL_FILENAME) - RNA_def_string_file_name(ot->srna, "filename", "", FILE_MAX, "File Name", "Name of the file"); + RNA_def_string_file_name(ot->srna, "filename", "", FILE_MAX, _("File Name"), _("Name of the file")); if (action == FILE_SAVE) { - prop= RNA_def_boolean(ot->srna, "check_existing", 1, "Check Existing", "Check and warn on overwriting existing files"); + prop= RNA_def_boolean(ot->srna, "check_existing", 1, _("Check Existing"), _("Check and warn on overwriting existing files")); RNA_def_property_flag(prop, PROP_HIDDEN); } - prop= RNA_def_boolean(ot->srna, "filter_blender", (filter & BLENDERFILE), "Filter .blend files", ""); + prop= RNA_def_boolean(ot->srna, "filter_blender", (filter & BLENDERFILE), _("Filter .blend files"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_image", (filter & IMAGEFILE), "Filter image files", ""); + prop= RNA_def_boolean(ot->srna, "filter_image", (filter & IMAGEFILE), _("Filter image files"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_movie", (filter & MOVIEFILE), "Filter movie files", ""); + prop= RNA_def_boolean(ot->srna, "filter_movie", (filter & MOVIEFILE), _("Filter movie files"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_python", (filter & PYSCRIPTFILE), "Filter python files", ""); + prop= RNA_def_boolean(ot->srna, "filter_python", (filter & PYSCRIPTFILE), _("Filter python files"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_font", (filter & FTFONTFILE), "Filter font files", ""); + prop= RNA_def_boolean(ot->srna, "filter_font", (filter & FTFONTFILE), _("Filter font files"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_sound", (filter & SOUNDFILE), "Filter sound files", ""); + prop= RNA_def_boolean(ot->srna, "filter_sound", (filter & SOUNDFILE), _("Filter sound files"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_text", (filter & TEXTFILE), "Filter text files", ""); + prop= RNA_def_boolean(ot->srna, "filter_text", (filter & TEXTFILE), _("Filter text files"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_btx", (filter & BTXFILE), "Filter btx files", ""); + prop= RNA_def_boolean(ot->srna, "filter_btx", (filter & BTXFILE), _("Filter btx files"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_collada", (filter & COLLADAFILE), "Filter COLLADA files", ""); + prop= RNA_def_boolean(ot->srna, "filter_collada", (filter & COLLADAFILE), _("Filter COLLADA files"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_folder", (filter & FOLDERFILE), "Filter folders", ""); + prop= RNA_def_boolean(ot->srna, "filter_folder", (filter & FOLDERFILE), _("Filter folders"), ""); RNA_def_property_flag(prop, PROP_HIDDEN); prop= RNA_def_int(ot->srna, "filemode", type, FILE_LOADLIB, FILE_SPECIAL, - "File Browser Mode", "The setting for the file browser mode to load a .blend file, a library or a special file", + _("File Browser Mode"), _("The setting for the file browser mode to load a .blend file, a library or a special file"), FILE_LOADLIB, FILE_SPECIAL); RNA_def_property_flag(prop, PROP_HIDDEN); if(flag & WM_FILESEL_RELPATH) - RNA_def_boolean(ot->srna, "relative_path", (U.flag & USER_RELPATHS) ? 1:0, "Relative Path", "Select the file relative to the blend file"); + RNA_def_boolean(ot->srna, "relative_path", (U.flag & USER_RELPATHS) ? 1:0, _("Relative Path"), _("Select the file relative to the blend file")); } void WM_operator_properties_select_all(wmOperatorType *ot) { static EnumPropertyItem select_all_actions[] = { - {SEL_TOGGLE, "TOGGLE", 0, "Toggle", "Toggle selection for all elements"}, - {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"}, - {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"}, - {SEL_INVERT, "INVERT", 0, "Invert", "Invert selection of all elements"}, + {SEL_TOGGLE, "TOGGLE", 0, N_("Toggle"), N_("Toggle selection for all elements")}, + {SEL_SELECT, "SELECT", 0, N_("Select"), N_("Select all elements")}, + {SEL_DESELECT, "DESELECT", 0, N_("Deselect"), N_("Deselect all elements")}, + {SEL_INVERT, "INVERT", 0, N_("Invert"), N_("Invert selection of all elements")}, {0, NULL, 0, NULL, NULL} }; - RNA_def_enum(ot->srna, "action", select_all_actions, SEL_TOGGLE, "Action", "Selection action to execute"); + RNA_def_enum(ot->srna, "action", RNA_enum_items_gettexted(select_all_actions), SEL_TOGGLE, _("Action"), _("Selection action to execute")); } void WM_operator_properties_gesture_border(wmOperatorType *ot, int extend) { - RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Gesture Mode", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, _("Gesture Mode"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, _("X Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, _("X Max"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, _("Y Min"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, _("Y Max"), "", INT_MIN, INT_MAX); if(extend) - RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", 1, _("Extend"), _("Extend selection instead of deselecting everything first")); } void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor) { - RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, "X End", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, "Y Start", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, "Y End", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, _("X Start"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, _("X End"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, _("Y Start"), "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, _("Y End"), "", INT_MIN, INT_MAX); if(cursor) - RNA_def_int(ot->srna, "cursor", cursor, 0, INT_MAX, "Cursor", "Mouse cursor style to use during the modal operator", 0, INT_MAX); + RNA_def_int(ot->srna, "cursor", cursor, 0, INT_MAX, _("Cursor"), _("Mouse cursor style to use during the modal operator"), 0, INT_MAX); } @@ -903,7 +903,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) wmOperator *op= arg_op; uiBlock *block; uiLayout *layout; - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); int width= 300; @@ -981,7 +981,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData) wmOperator *op= data->op; uiBlock *block; uiLayout *layout; - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); block = uiBeginBlock(C, ar, "operator dialog", UI_EMBOSS); uiBlockClearFlag(block, UI_BLOCK_LOOP); @@ -1005,7 +1005,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData) col= uiLayoutColumn(layout, FALSE); col_block= uiLayoutGetBlock(col); /* Create OK button, the callback of which will execute op */ - btn= uiDefBut(col_block, BUT, 0, "OK", 0, -30, 0, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); + btn= uiDefBut(col_block, BUT, 0, _("OK"), 0, -30, 0, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); uiButSetFunc(btn, dialog_exec_cb, data, col_block); } @@ -1022,7 +1022,7 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData) wmOperator *op= data->op; uiBlock *block; uiLayout *layout; - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); block= uiBeginBlock(C, ar, "opui_popup", UI_EMBOSS); uiBlockClearFlag(block, UI_BLOCK_LOOP); @@ -1129,15 +1129,15 @@ static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve static void WM_OT_debug_menu(wmOperatorType *ot) { - ot->name= "Debug Menu"; + ot->name= _("Debug Menu"); ot->idname= "WM_OT_debug_menu"; - ot->description= "Open a popup to set the debug level"; + ot->description= _("Open a popup to set the debug level"); ot->invoke= wm_debug_menu_invoke; ot->exec= wm_debug_menu_exec; ot->poll= WM_operator_winactive; - RNA_def_int(ot->srna, "debug_value", 0, -10000, 10000, "Debug Value", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "debug_value", 0, -10000, 10000, _("Debug Value"), "", INT_MIN, INT_MAX); } @@ -1189,7 +1189,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiBlock *block; uiBut *but; uiLayout *layout, *split, *col; - uiStyle *style= U.uistyles.first; + uiStyle *style= UI_GetStyle(); struct RecentFile *recent; int i; MenuType *mt= WM_menutype_find("USERPREF_MT_splash", TRUE); @@ -1245,19 +1245,19 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar split = uiLayoutSplit(layout, 0, 0); col = uiLayoutColumn(split, 0); - uiItemL(col, "Links", ICON_NONE); - uiItemStringO(col, "Donations", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment/"); - uiItemStringO(col, "Release Log", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-258/"); - uiItemStringO(col, "Manual", ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual"); - uiItemStringO(col, "Blender Website", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/"); - uiItemStringO(col, "User Community", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community/"); // + uiItemL(col, _("Links"), ICON_NONE); + uiItemStringO(col, _("Donations"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment/"); + uiItemStringO(col, _("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-257/"); + uiItemStringO(col, _("Manual"), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual"); + uiItemStringO(col, _("Blender Website"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/"); + uiItemStringO(col, _("User Community"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community/"); // if(strcmp(STRINGIFY(BLENDER_VERSION_CYCLE), "release")==0) { BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d" STRINGIFY(BLENDER_VERSION_CHAR) "_release", BLENDER_VERSION/100, BLENDER_VERSION%100); } else { BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d_%d", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION); } - uiItemStringO(col, "Python API Reference", ICON_URL, "WM_OT_url_open", "url", url); + uiItemStringO(col, _("Python API Reference"), ICON_URL, "WM_OT_url_open", "url", url); uiItemL(col, "", ICON_NONE); col = uiLayoutColumn(split, 0); @@ -1267,7 +1267,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiItemS(col); } - uiItemL(col, "Recent", ICON_NONE); + uiItemL(col, _("Recent"), ICON_NONE); for(recent = G.recent_files.first, i=0; (i<5) && (recent); recent = recent->next, i++) { uiItemStringO(col, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath); } @@ -1291,9 +1291,9 @@ static int wm_splash_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED static void WM_OT_splash(wmOperatorType *ot) { - ot->name= "Splash Screen"; + ot->name= _("Splash Screen"); ot->idname= "WM_OT_splash"; - ot->description= "Opens a blocking popup region with release info"; + ot->description= _("Opens a blocking popup region with release info"); ot->invoke= wm_splash_invoke; ot->poll= WM_operator_winactive; @@ -1403,7 +1403,7 @@ static int wm_search_menu_poll(bContext *C) static void WM_OT_search_menu(wmOperatorType *ot) { - ot->name= "Search Menu"; + ot->name= _("Search Menu"); ot->idname= "WM_OT_search_menu"; ot->invoke= wm_search_menu_invoke; @@ -1423,7 +1423,7 @@ static int wm_call_menu_exec(bContext *C, wmOperator *op) static void WM_OT_call_menu(wmOperatorType *ot) { - ot->name= "Call Menu"; + ot->name= _("Call Menu"); ot->idname= "WM_OT_call_menu"; ot->exec= wm_call_menu_exec; @@ -1431,7 +1431,7 @@ static void WM_OT_call_menu(wmOperatorType *ot) ot->flag= OPTYPE_INTERNAL; - RNA_def_string(ot->srna, "name", "", BKE_ST_MAXNAME, "Name", "Name of the menu"); + RNA_def_string(ot->srna, "name", "", BKE_ST_MAXNAME, _("Name"), _("Name of the menu")); } /* ************ window / screen operator definitions ************** */ @@ -1450,9 +1450,9 @@ static int wm_operator_winactive_normal(bContext *C) static void WM_OT_window_duplicate(wmOperatorType *ot) { - ot->name= "Duplicate Window"; + ot->name= _("Duplicate Window"); ot->idname= "WM_OT_window_duplicate"; - ot->description="Duplicate the current Blender window"; + ot->description=_("Duplicate the current Blender window"); ot->exec= wm_window_duplicate_exec; ot->poll= wm_operator_winactive_normal; @@ -1460,9 +1460,9 @@ static void WM_OT_window_duplicate(wmOperatorType *ot) static void WM_OT_save_homefile(wmOperatorType *ot) { - ot->name= "Save User Settings"; + ot->name= _("Save User Settings"); ot->idname= "WM_OT_save_homefile"; - ot->description="Make the current file the default .blend file"; + ot->description=_("Make the current file the default .blend file"); ot->invoke= WM_operator_confirm; ot->exec= WM_write_homefile; @@ -1471,9 +1471,9 @@ static void WM_OT_save_homefile(wmOperatorType *ot) static void WM_OT_read_homefile(wmOperatorType *ot) { - ot->name= "Reload Start-Up File"; + ot->name= _("Reload Start-Up File"); ot->idname= "WM_OT_read_homefile"; - ot->description="Open the default file (doesn't save the current file)"; + ot->description=_("Open the default file (doesn't save the current file)"); ot->invoke= WM_operator_confirm; ot->exec= WM_read_homefile_exec; @@ -1482,9 +1482,9 @@ static void WM_OT_read_homefile(wmOperatorType *ot) static void WM_OT_read_factory_settings(wmOperatorType *ot) { - ot->name= "Load Factory Settings"; + ot->name= _("Load Factory Settings"); ot->idname= "WM_OT_read_factory_settings"; - ot->description="Load default file and user preferences"; + ot->description=_("Load default file and user preferences"); ot->invoke= WM_operator_confirm; ot->exec= WM_read_homefile_exec; @@ -1565,9 +1565,9 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op) static void WM_OT_open_mainfile(wmOperatorType *ot) { - ot->name= "Open Blender File"; + ot->name= _("Open Blender File"); ot->idname= "WM_OT_open_mainfile"; - ot->description="Open a Blender file"; + ot->description=_("Open a Blender file"); ot->invoke= wm_open_mainfile_invoke; ot->exec= wm_open_mainfile_exec; @@ -1575,8 +1575,8 @@ static void WM_OT_open_mainfile(wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH); - RNA_def_boolean(ot->srna, "load_ui", 1, "Load UI", "Load user interface setup in the .blend file"); - RNA_def_boolean(ot->srna, "use_scripts", 1, "Trusted Source", "Allow blend file execute scripts automatically, default available from system preferences"); + RNA_def_boolean(ot->srna, "load_ui", 1, _("Load UI"), _("Load user interface setup in the .blend file")); + RNA_def_boolean(ot->srna, "use_scripts", 1, _("Trusted Source"), _("Allow blend file execute scripts automatically, default available from system preferences")); } /* **************** link/append *************** */ @@ -1733,9 +1733,9 @@ static int wm_link_append_exec(bContext *C, wmOperator *op) static void WM_OT_link_append(wmOperatorType *ot) { - ot->name= "Link/Append from Library"; + ot->name= _("Link/Append from Library"); ot->idname= "WM_OT_link_append"; - ot->description= "Link or Append from a Library .blend file"; + ot->description= _("Link or Append from a Library .blend file"); ot->invoke= wm_link_append_invoke; ot->exec= wm_link_append_exec; @@ -1745,10 +1745,10 @@ static void WM_OT_link_append(wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_LOADLIB, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_DIRECTORY|WM_FILESEL_FILENAME| WM_FILESEL_RELPATH); - RNA_def_boolean(ot->srna, "link", 1, "Link", "Link the objects or datablocks rather than appending"); - RNA_def_boolean(ot->srna, "autoselect", 1, "Select", "Select the linked objects"); - RNA_def_boolean(ot->srna, "active_layer", 1, "Active Layer", "Put the linked objects on the active layer"); - RNA_def_boolean(ot->srna, "instance_groups", 1, "Instance Groups", "Create instances for each group as a DupliGroup"); + RNA_def_boolean(ot->srna, "link", 1, _("Link"), _("Link the objects or datablocks rather than appending")); + RNA_def_boolean(ot->srna, "autoselect", 1, _("Select"), _("Select the linked objects")); + RNA_def_boolean(ot->srna, "active_layer", 1, _("Active Layer"), _("Put the linked objects on the active layer")); + RNA_def_boolean(ot->srna, "instance_groups", 1, _("Instance Groups"), _("Create instances for each group as a DupliGroup")); RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, "Files", ""); } @@ -1775,9 +1775,9 @@ static int wm_recover_last_session_exec(bContext *C, wmOperator *op) static void WM_OT_recover_last_session(wmOperatorType *ot) { - ot->name= "Recover Last Session"; + ot->name= _("Recover Last Session"); ot->idname= "WM_OT_recover_last_session"; - ot->description="Open the last closed file (\"quit.blend\")"; + ot->description=_("Open the last closed file (\"quit.blend\")"); ot->exec= wm_recover_last_session_exec; ot->poll= WM_operator_winactive; @@ -1818,9 +1818,9 @@ static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *UNU static void WM_OT_recover_auto_save(wmOperatorType *ot) { - ot->name= "Recover Auto Save"; + ot->name= _("Recover Auto Save"); ot->idname= "WM_OT_recover_auto_save"; - ot->description="Open an automatically saved file to recover it"; + ot->description=_("Open an automatically saved file to recover it"); ot->exec= wm_recover_auto_save_exec; ot->invoke= wm_recover_auto_save_invoke; @@ -1837,9 +1837,9 @@ static void untitled(char *name) char *c= BLI_last_slash(name); if(c) - strcpy(&c[1], "untitled.blend"); + strcpy(&c[1], _("untitled.blend")); else - strcpy(name, "untitled.blend"); + strcpy(name, _("untitled.blend")); } } @@ -1924,9 +1924,9 @@ static int blend_save_check(bContext *UNUSED(C), wmOperator *op) static void WM_OT_save_as_mainfile(wmOperatorType *ot) { - ot->name= "Save As Blender File"; + ot->name= _("Save As Blender File"); ot->idname= "WM_OT_save_as_mainfile"; - ot->description="Save the current file in the desired location"; + ot->description=_("Save the current file in the desired location"); ot->invoke= wm_save_as_mainfile_invoke; ot->exec= wm_save_as_mainfile_exec; @@ -1934,9 +1934,9 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot) /* ommit window poll so this can work in background mode */ WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH); - RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file"); - RNA_def_boolean(ot->srna, "relative_remap", 1, "Remap Relative", "Remap relative paths when saving in a different directory"); - RNA_def_boolean(ot->srna, "copy", 0, "Save Copy", "Save a copy of the actual working state but does not make saved file active."); + RNA_def_boolean(ot->srna, "compress", 0, _("Compress"), _("Write compressed .blend file")); + RNA_def_boolean(ot->srna, "relative_remap", 1, _("Remap Relative"), _("Remap relative paths when saving in a different directory")); + RNA_def_boolean(ot->srna, "copy", 0, _("Save Copy"), _("Save a copy of the actual working state but does not make saved file active.")); } /* *************** save file directly ******** */ @@ -1983,9 +1983,9 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED( static void WM_OT_save_mainfile(wmOperatorType *ot) { - ot->name= "Save Blender File"; + ot->name= _("Save Blender File"); ot->idname= "WM_OT_save_mainfile"; - ot->description="Save the current Blender file"; + ot->description=_("Save the current Blender file"); ot->invoke= wm_save_mainfile_invoke; ot->exec= wm_save_as_mainfile_exec; @@ -1993,8 +1993,8 @@ static void WM_OT_save_mainfile(wmOperatorType *ot) /* ommit window poll so this can work in background mode */ WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH); - RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file"); - RNA_def_boolean(ot->srna, "relative_remap", 0, "Remap Relative", "Remap relative paths when saving in a different directory"); + RNA_def_boolean(ot->srna, "compress", 0, _("Compress"), _("Write compressed .blend file")); + RNA_def_boolean(ot->srna, "relative_remap", 0, _("Remap Relative"), _("Remap relative paths when saving in a different directory")); } /* XXX: move these collada operators to a more appropriate place */ @@ -2041,7 +2041,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) static void WM_OT_collada_export(wmOperatorType *ot) { - ot->name= "Export COLLADA"; + ot->name= _("Export COLLADA"); ot->idname= "WM_OT_collada_export"; ot->invoke= wm_collada_export_invoke; @@ -2049,8 +2049,8 @@ static void WM_OT_collada_export(wmOperatorType *ot) ot->poll= WM_operator_winactive; WM_operator_properties_filesel(ot, FOLDERFILE|COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH); - RNA_def_boolean(ot->srna, "selected", 0, "Export only selected", - "Export only selected elements"); + RNA_def_boolean(ot->srna, "selected", 0, _("Export only selected"), + _("Export only selected elements")); } /* function used for WM_OT_save_mainfile too */ @@ -2071,7 +2071,7 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op) static void WM_OT_collada_import(wmOperatorType *ot) { - ot->name= "Import COLLADA"; + ot->name= _("Import COLLADA"); ot->idname= "WM_OT_collada_import"; ot->invoke= WM_operator_filesel; @@ -2088,9 +2088,9 @@ static void WM_OT_collada_import(wmOperatorType *ot) static void WM_OT_window_fullscreen_toggle(wmOperatorType *ot) { - ot->name= "Toggle Fullscreen"; + ot->name= _("Toggle Fullscreen"); ot->idname= "WM_OT_window_fullscreen_toggle"; - ot->description="Toggle the current window fullscreen"; + ot->description=_("Toggle the current window fullscreen"); ot->exec= wm_window_fullscreen_toggle_exec; ot->poll= WM_operator_winactive; @@ -2107,9 +2107,9 @@ static int wm_exit_blender_op(bContext *C, wmOperator *op) static void WM_OT_quit_blender(wmOperatorType *ot) { - ot->name= "Quit Blender"; + ot->name= _("Quit Blender"); ot->idname= "WM_OT_quit_blender"; - ot->description= "Quit Blender"; + ot->description= _("Quit Blender"); ot->invoke= WM_operator_confirm; ot->exec= wm_exit_blender_op; @@ -2128,9 +2128,9 @@ static int wm_console_toggle_op(bContext *UNUSED(C), wmOperator *UNUSED(op)) static void WM_OT_console_toggle(wmOperatorType *ot) { - ot->name= "Toggle System Console"; + ot->name= _("Toggle System Console"); ot->idname= "WM_OT_console_toggle"; - ot->description= "Toggle System Console"; + ot->description= _("Toggle System Console"); ot->exec= wm_console_toggle_op; ot->poll= WM_operator_winactive; @@ -2414,9 +2414,9 @@ int WM_gesture_circle_cancel(bContext *C, wmOperator *op) /* template to copy from */ void WM_OT_circle_gesture(wmOperatorType *ot) { - ot->name= "Circle Gesture"; + ot->name= _("Circle Gesture"); ot->idname= "WM_OT_circle_gesture"; - ot->description="Enter rotate mode with a circular gesture"; + ot->description=_("Enter rotate mode with a circular gesture"); ot->invoke= WM_gesture_circle_invoke; ot->modal= WM_gesture_circle_modal; @@ -2660,9 +2660,9 @@ void WM_OT_lasso_gesture(wmOperatorType *ot) { PropertyRNA *prop; - ot->name= "Lasso Gesture"; + ot->name= _("Lasso Gesture"); ot->idname= "WM_OT_lasso_gesture"; - ot->description="Select objects within the lasso as you move the pointer"; + ot->description=_("Select objects within the lasso as you move the pointer"); ot->invoke= WM_gesture_lasso_invoke; ot->modal= WM_gesture_lasso_modal; @@ -2774,9 +2774,9 @@ void WM_OT_straightline_gesture(wmOperatorType *ot) { PropertyRNA *prop; - ot->name= "Straight Line Gesture"; + ot->name= _("Straight Line Gesture"); ot->idname= "WM_OT_straightline_gesture"; - ot->description="Draw a straight line as you move the pointer"; + ot->description=_("Draw a straight line as you move the pointer"); ot->invoke= WM_gesture_straightline_invoke; ot->modal= WM_gesture_straightline_modal; @@ -3245,7 +3245,7 @@ static int radial_control_modal(bContext *C, wmOperator *op, wmEvent *event) static void WM_OT_radial_control(wmOperatorType *ot) { - ot->name= "Radial Control"; + ot->name= _("Radial Control"); ot->idname= "WM_OT_radial_control"; ot->invoke= radial_control_invoke; @@ -3255,12 +3255,12 @@ static void WM_OT_radial_control(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* all paths relative to the context */ - RNA_def_string(ot->srna, "data_path", "", 0, "Data Path", "Path of property to be set by the radial control."); - RNA_def_string(ot->srna, "rotation_path", "", 0, "Rotation Path", "Path of property used to rotate the texture display."); - RNA_def_string(ot->srna, "color_path", "", 0, "Color Path", "Path of property used to set the color of the control."); - RNA_def_string(ot->srna, "fill_color_path", "", 0, "Fill Color Path", "Path of property used to set the fill color of the control."); - RNA_def_string(ot->srna, "zoom_path", "", 0, "Zoom Path", "Path of property used to set the zoom level for the control."); - RNA_def_string(ot->srna, "image_id", "", 0, "Image ID", "Path of ID that is used to generate an image for the control."); + RNA_def_string(ot->srna, "data_path", "", 0, _("Data Path"), _("Path of property to be set by the radial control.")); + RNA_def_string(ot->srna, "rotation_path", "", 0, _("Rotation Path"), _("Path of property used to rotate the texture display.")); + RNA_def_string(ot->srna, "color_path", "", 0, _("Color Path"), _("Path of property used to set the color of the control.")); + RNA_def_string(ot->srna, "fill_color_path", "", 0, _("Fill Color Path"), _("Path of property used to set the fill color of the control.")); + RNA_def_string(ot->srna, "zoom_path", "", 0, _("Zoom Path"), _("Path of property used to set the zoom level for the control.")); + RNA_def_string(ot->srna, "image_id", "", 0, _("Image ID"), _("Path of ID that is used to generate an image for the control.")); } /* ************************** timer for testing ***************** */ @@ -3280,13 +3280,13 @@ static void redraw_timer_window_swap(bContext *C) } static EnumPropertyItem redraw_timer_type_items[] = { - {0, "DRAW", 0, "Draw Region", "Draw Region"}, - {1, "DRAW_SWAP", 0, "Draw Region + Swap", "Draw Region and Swap"}, - {2, "DRAW_WIN", 0, "Draw Window", "Draw Window"}, - {3, "DRAW_WIN_SWAP", 0, "Draw Window + Swap", "Draw Window and Swap"}, - {4, "ANIM_STEP", 0, "Anim Step", "Animation Steps"}, - {5, "ANIM_PLAY", 0, "Anim Play", "Animation Playback"}, - {6, "UNDO", 0, "Undo/Redo", "Undo/Redo"}, + {0, "DRAW", 0, N_("Draw Region"), N_("Draw Region")}, + {1, "DRAW_SWAP", 0, N_("Draw Region + Swap"), N_("Draw Region and Swap")}, + {2, "DRAW_WIN", 0, N_("Draw Window"), N_("Draw Window")}, + {3, "DRAW_WIN_SWAP", 0, N_("Draw Window + Swap"), N_("Draw Window and Swap")}, + {4, "ANIM_STEP", 0, N_("Anim Step"), N_("Animation Steps")}, + {5, "ANIM_PLAY", 0, N_("Anim Play"), N_("Animation Playback")}, + {6, "UNDO", 0, N_("Undo/Redo"), N_("Undo/Redo")}, {0, NULL, 0, NULL, NULL}}; static int redraw_timer_exec(bContext *C, wmOperator *op) @@ -3385,16 +3385,16 @@ static int redraw_timer_exec(bContext *C, wmOperator *op) static void WM_OT_redraw_timer(wmOperatorType *ot) { - ot->name= "Redraw Timer"; + ot->name= _("Redraw Timer"); ot->idname= "WM_OT_redraw_timer"; - ot->description="Simple redraw timer to test the speed of updating the interface"; + ot->description=_("Simple redraw timer to test the speed of updating the interface"); ot->invoke= WM_menu_invoke; ot->exec= redraw_timer_exec; ot->poll= WM_operator_winactive; - ot->prop= RNA_def_enum(ot->srna, "type", redraw_timer_type_items, 0, "Type", ""); - RNA_def_int(ot->srna, "iterations", 10, 1,INT_MAX, "Iterations", "Number of times to redraw", 1,1000); + ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(redraw_timer_type_items), 0, _("Type"), ""); + RNA_def_int(ot->srna, "iterations", 10, 1,INT_MAX, _("Iterations"), _("Number of times to redraw"), 1,1000); } @@ -3408,9 +3408,9 @@ static int memory_statistics_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) static void WM_OT_memory_statistics(wmOperatorType *ot) { - ot->name= "Memory Statistics"; + ot->name= _("Memory Statistics"); ot->idname= "WM_OT_memory_statistics"; - ot->description= "Print memory statistics to the console"; + ot->description= _("Print memory statistics to the console"); ot->exec= memory_statistics_exec; } @@ -3471,14 +3471,14 @@ void wm_operatortype_init(void) static void gesture_circle_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {GESTURE_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, - {GESTURE_MODAL_CIRCLE_ADD, "ADD", 0, "Add", ""}, - {GESTURE_MODAL_CIRCLE_SUB, "SUBTRACT", 0, "Subtract", ""}, + {GESTURE_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""}, + {GESTURE_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""}, + {GESTURE_MODAL_CIRCLE_ADD, "ADD", 0, N_("Add"), ""}, + {GESTURE_MODAL_CIRCLE_SUB, "SUBTRACT", 0, N_("Subtract"), ""}, - {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, - {GESTURE_MODAL_DESELECT,"DESELECT", 0, "DeSelect", ""}, - {GESTURE_MODAL_NOP,"NOP", 0, "No Operation", ""}, + {GESTURE_MODAL_SELECT, "SELECT", 0, N_("Select"), ""}, + {GESTURE_MODAL_DESELECT,"DESELECT", 0, N_("DeSelect"), ""}, + {GESTURE_MODAL_NOP,"NOP", 0, N_("No Operation"), ""}, {0, NULL, 0, NULL, NULL}}; @@ -3488,7 +3488,7 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Gesture Circle", modal_items); + keymap= WM_modalkeymap_add(keyconf, "View3D Gesture Circle", RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); @@ -3524,9 +3524,9 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf) static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, - {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, + {GESTURE_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""}, + {GESTURE_MODAL_SELECT, "SELECT", 0, N_("Select"), ""}, + {GESTURE_MODAL_BEGIN, "BEGIN", 0, N_("Begin"), ""}, {0, NULL, 0, NULL, NULL}}; wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Straight Line"); @@ -3534,7 +3534,7 @@ static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "Gesture Straight Line", modal_items); + keymap= WM_modalkeymap_add(keyconf, "Gesture Straight Line", RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); @@ -3552,10 +3552,10 @@ static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf) static void gesture_border_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, - {GESTURE_MODAL_DESELECT,"DESELECT", 0, "DeSelect", ""}, - {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, + {GESTURE_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""}, + {GESTURE_MODAL_SELECT, "SELECT", 0, N_("Select"), ""}, + {GESTURE_MODAL_DESELECT,"DESELECT", 0, N_("DeSelect"), ""}, + {GESTURE_MODAL_BEGIN, "BEGIN", 0, N_("Begin"), ""}, {0, NULL, 0, NULL, NULL}}; wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Border"); @@ -3563,7 +3563,7 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "Gesture Border", modal_items); + keymap= WM_modalkeymap_add(keyconf, "Gesture Border", RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); @@ -3607,10 +3607,10 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf) static void gesture_zoom_border_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {GESTURE_MODAL_IN, "IN", 0, "In", ""}, - {GESTURE_MODAL_OUT, "OUT", 0, "Out", ""}, - {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, + {GESTURE_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""}, + {GESTURE_MODAL_IN, "IN", 0, N_("In"), ""}, + {GESTURE_MODAL_OUT, "OUT", 0, N_("Out"), ""}, + {GESTURE_MODAL_BEGIN, "BEGIN", 0, N_("Begin"), ""}, {0, NULL, 0, NULL, NULL}}; wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Zoom Border"); @@ -3618,7 +3618,7 @@ static void gesture_zoom_border_modal_keymap(wmKeyConfig *keyconf) /* this function is called for each spacetype, only needs to add map once */ if(keymap) return; - keymap= WM_modalkeymap_add(keyconf, "Gesture Zoom Border", modal_items); + keymap= WM_modalkeymap_add(keyconf, _("Gesture Zoom Border"), RNA_enum_items_gettexted(modal_items)); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 9b1695be67a..5836c432181 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -48,6 +48,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_api.h" + #include "BKE_blender.h" #include "BKE_context.h" #include "BKE_library.h" @@ -504,11 +506,11 @@ void WM_window_open_temp(bContext *C, rcti *position, int type) ED_screen_set(C, win->screen); if(sa->spacetype==SPACE_IMAGE) - GHOST_SetTitle(win->ghostwin, "Blender Render"); + GHOST_SetTitle(win->ghostwin, _("Blender Render")); else if(ELEM(sa->spacetype, SPACE_OUTLINER, SPACE_USERPREF)) - GHOST_SetTitle(win->ghostwin, "Blender User Preferences"); + GHOST_SetTitle(win->ghostwin, _("Blender User Preferences")); else if(sa->spacetype==SPACE_FILE) - GHOST_SetTitle(win->ghostwin, "Blender File View"); + GHOST_SetTitle(win->ghostwin, _("Blender File View")); else GHOST_SetTitle(win->ghostwin, "Blender"); } |