Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-09-15 17:20:18 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-09-15 17:20:18 +0400
commit0eda51f2eabe24016efdc8f07825f1ba667cac33 (patch)
tree03d6f876da6b1256b8890b89db09b63952fa544f /source/blender/windowmanager
parent30293dc2ca8052ad0c7113c77365feca590f4d05 (diff)
Fixing issues with i18n stuff:
- Make gettext stuff draw-time. so switching between languages can happens without restart now. - Added option to translate visible interface (menus, buttons, labels) and tooltips. Now it's possible to have english UI and localized tooltips. - Clean-up sources, do not use gettext stuff for things which can be collected with RNA. - Fix issues with windows 64bit and ru_RU locale on my desktop (it was codepage issue). - Added operator "Get Messages" which generates new text block with with all strings collected from RNA. - Changed script for updating blender.pot so now it appends messages collected from rna to automatically gathered messages. To update .pot you have to re-generate messages.txt using "Get Messages" operator and then run update_pot script. - Clean up old translation stuff which wasn't used and most probably wouldn't be used. - Return back "International Fonts" option, so if it's disabled, no gettext lookups happens on draw. - Merged read_homefile function back. No need in splitting it. TODO: - Custom fonts and font size. Current font isn't nice at least for russian locale, it's difficult to read it. - Put references to messages.txt so gettext can merge translation when name/description of some property changes.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_api.h3
-rw-r--r--source/blender/windowmanager/intern/wm_files.c22
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c18
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c186
4 files changed, 108 insertions, 121 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 1ed84225d66..5bdf1ec2787 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -94,8 +94,7 @@ 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, ListBase *wmbase);
-int WM_read_homefile_proc(struct bContext *C, ListBase *wmbase);
+int WM_read_homefile (struct bContext *C, struct ReportList *reports, short from_memory);
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 5933d8ed4d6..a0be707f840 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -452,8 +452,9 @@ 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 *UNUSED(reports), short from_memory, ListBase *wmbase)
+int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory)
{
+ ListBase wmbase;
char tstr[FILE_MAXDIR+FILE_MAXFILE];
int success= 0;
@@ -474,7 +475,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(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);
@@ -486,7 +487,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(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
@@ -494,15 +495,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory
U.flag |= USER_SCRIPT_AUTOEXEC_DISABLE;
#endif
}
- return TRUE;
-}
-
-/* split from the old WM_read_homefile, as the locale setting should
- * be called after loading user preference, while the
- * WM_read_homefile_proc may need i18n support. So we split them, and
- * insert locale setting steps */
-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;
@@ -511,7 +504,7 @@ int WM_read_homefile_proc(bContext *C, ListBase *wmbase)
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';
@@ -556,9 +549,8 @@ int WM_read_homefile_proc(bContext *C, ListBase *wmbase)
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, &wmbase) && WM_read_homefile_proc(C, &wmbase) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
+ return WM_read_homefile(C, op->reports, from_memory) ? 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 7bbfce19c12..2bfeb104d2a 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -122,21 +122,11 @@ int wm_start_with_console = 0; /* used in creator.c */
/* 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();
WM_menutype_init();
@@ -150,7 +140,13 @@ void WM_init(bContext *C, int argc, const char **argv)
ED_file_init(); /* for fsmenu */
ED_init_node_butfuncs();
- WM_read_homefile_proc(C, &wmbase);
+ 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);
+
+ BLF_lang_set(NULL);
+
/* 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.
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 338be5c077c..ab18792d75b 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -816,62 +816,62 @@ 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(flag & WM_FILESEL_FILES)
RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, "Files", "");
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, 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")},
+ {SEL_TOGGLE, "TOGGLE", 0, N_("Toggle"), "Toggle selection for all elements"},
+ {SEL_SELECT, "SELECT", 0, N_("Select"), "Select all elements"},
+ {SEL_DESELECT, "DESELECT", 0, N_("Deselect"), "Deselect all elements"},
+ {SEL_INVERT, "INVERT", 0, N_("Invert"), "Invert selection of all elements"},
{0, NULL, 0, NULL, NULL}
};
- RNA_def_enum(ot->srna, "action", RNA_enum_items_gettexted(select_all_actions), SEL_TOGGLE, _("Action"), _("Selection action to execute"));
+ RNA_def_enum(ot->srna, "action", select_all_actions, SEL_TOGGLE, "Action", "Selection action to execute");
}
void WM_operator_properties_gesture_border(wmOperatorType *ot, int extend)
@@ -1149,15 +1149,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);
}
@@ -1312,9 +1312,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;
@@ -1426,7 +1426,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;
@@ -1446,7 +1446,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;
@@ -1454,7 +1454,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 ************** */
@@ -1473,9 +1473,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;
@@ -1483,9 +1483,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;
@@ -1494,9 +1494,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;
@@ -1505,9 +1505,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;
@@ -1588,9 +1588,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;
@@ -1598,8 +1598,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 *************** */
@@ -1755,9 +1755,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;
@@ -1767,10 +1767,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|WM_FILESEL_FILES);
- 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");
}
/* *************** recover last session **************** */
@@ -1795,9 +1795,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;
@@ -1838,9 +1838,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;
@@ -1944,9 +1944,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;
@@ -1954,9 +1954,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 ******** */
@@ -2003,9 +2003,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;
@@ -2013,8 +2013,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 */
@@ -2059,7 +2059,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;
@@ -2067,8 +2067,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 */
@@ -2091,7 +2091,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;
@@ -2108,9 +2108,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;
@@ -2127,9 +2127,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;
@@ -2148,9 +2148,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;
@@ -2433,9 +2433,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;
@@ -2678,9 +2678,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;
@@ -2792,9 +2792,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;
@@ -3263,7 +3263,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;
@@ -3273,12 +3273,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 ***************** */
@@ -3403,16 +3403,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", 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);
+ 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);
}
@@ -3426,9 +3426,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;
}
@@ -3554,7 +3554,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", RNA_enum_items_gettexted(modal_items));
+ keymap= WM_modalkeymap_add(keyconf, "View3D Gesture Circle", modal_items);
/* items for modal map */
WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL);
@@ -3600,7 +3600,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", RNA_enum_items_gettexted(modal_items));
+ keymap= WM_modalkeymap_add(keyconf, "Gesture Straight Line", modal_items);
/* items for modal map */
WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL);
@@ -3629,7 +3629,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", RNA_enum_items_gettexted(modal_items));
+ keymap= WM_modalkeymap_add(keyconf, "Gesture Border", modal_items);
/* items for modal map */
WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL);
@@ -3684,7 +3684,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"), RNA_enum_items_gettexted(modal_items));
+ keymap= WM_modalkeymap_add(keyconf, "Gesture Zoom Border", modal_items);
/* items for modal map */
WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL);