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/editors/space_buttons
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/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c30
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c14
2 files changed, 21 insertions, 23 deletions
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index 831461e4b82..4c137c6d886 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -125,24 +125,24 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
#define BUTTON_HEADER_CTX(_ctx, _icon, _tip) \
if(sbuts->pathflag & (1<<_ctx)) { \
- but= uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, _tip); \
+ but= uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, \
+ ((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_TOOLTIPS)) ? BLF_gettext(_tip) : _tip); \
uiButClearFlag(but, UI_BUT_UNDO); \
} \
-
- BUTTON_HEADER_CTX(BCONTEXT_RENDER, ICON_SCENE, _("Render"))
- BUTTON_HEADER_CTX(BCONTEXT_SCENE, ICON_SCENE_DATA, _("Scene"));
- BUTTON_HEADER_CTX(BCONTEXT_WORLD, ICON_WORLD, _("World"));
- BUTTON_HEADER_CTX(BCONTEXT_OBJECT, ICON_OBJECT_DATA, _("Object"));
- BUTTON_HEADER_CTX(BCONTEXT_CONSTRAINT, ICON_CONSTRAINT, _("Object Constraints"));
- BUTTON_HEADER_CTX(BCONTEXT_MODIFIER, ICON_MODIFIER, _("Object Modifiers"));
- BUTTON_HEADER_CTX(BCONTEXT_DATA, sbuts->dataicon, _("Object Data"));
- BUTTON_HEADER_CTX(BCONTEXT_BONE, ICON_BONE_DATA, _("Bone"));
- BUTTON_HEADER_CTX(BCONTEXT_BONE_CONSTRAINT, ICON_CONSTRAINT_BONE, _("Bone Constraints"));
- BUTTON_HEADER_CTX(BCONTEXT_MATERIAL, ICON_MATERIAL, _("Material"));
- BUTTON_HEADER_CTX(BCONTEXT_TEXTURE, ICON_TEXTURE, _("Textures"));
- BUTTON_HEADER_CTX(BCONTEXT_PARTICLE, ICON_PARTICLES, _("Particles"));
- BUTTON_HEADER_CTX(BCONTEXT_PHYSICS, ICON_PHYSICS, _("Physics"));
+ BUTTON_HEADER_CTX(BCONTEXT_RENDER, ICON_SCENE, N_("Render"))
+ BUTTON_HEADER_CTX(BCONTEXT_SCENE, ICON_SCENE_DATA, N_("Scene"));
+ BUTTON_HEADER_CTX(BCONTEXT_WORLD, ICON_WORLD, N_("World"));
+ BUTTON_HEADER_CTX(BCONTEXT_OBJECT, ICON_OBJECT_DATA, N_("Object"));
+ BUTTON_HEADER_CTX(BCONTEXT_CONSTRAINT, ICON_CONSTRAINT, N_("Object Constraints"));
+ BUTTON_HEADER_CTX(BCONTEXT_MODIFIER, ICON_MODIFIER, N_("Object Modifiers"));
+ BUTTON_HEADER_CTX(BCONTEXT_DATA, sbuts->dataicon, N_("Object Data"));
+ BUTTON_HEADER_CTX(BCONTEXT_BONE, ICON_BONE_DATA, N_("Bone"));
+ BUTTON_HEADER_CTX(BCONTEXT_BONE_CONSTRAINT, ICON_CONSTRAINT_BONE, N_("Bone Constraints"));
+ BUTTON_HEADER_CTX(BCONTEXT_MATERIAL, ICON_MATERIAL, N_("Material"));
+ BUTTON_HEADER_CTX(BCONTEXT_TEXTURE, ICON_TEXTURE, N_("Textures"));
+ BUTTON_HEADER_CTX(BCONTEXT_PARTICLE, ICON_PARTICLES, N_("Particles"));
+ BUTTON_HEADER_CTX(BCONTEXT_PHYSICS, ICON_PHYSICS, N_("Physics"));
#undef BUTTON_HEADER_CTX
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 346531b2b11..99e5c6d693e 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -43,8 +43,6 @@
#include "BLI_string.h"
#include "BLI_utildefines.h"
-#include "BLF_api.h"
-
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
@@ -85,8 +83,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 */
@@ -218,8 +216,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 */
@@ -235,8 +233,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 */