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
AgeCommit message (Collapse)Author
2015-08-18Refactor translation code out of blenfontCampbell Barton
- Add blentranslation `BLT_*` module. - moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`). - moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-04-10BLF translation: fix BLF_lang_get(), add UI-agnostic BLF_translate/_do helpers.Bastien Montagne
BLF_lang_get() shall return 'default' Blender locale (en_US) when translations are completely disabled! Also, add BLF_translate() and BLF_translate_do() to allow translating some strings outside of label/tip context, but still only when i18n global flag is enabled.
2015-02-06Cleanup: styleCampbell Barton
2015-02-04Fix for recent LANG locale workaroundSergey Sharybin
Need to get a copy of the string since stored pointer is affected by subsequent calls of setlocale().
2015-02-03Fix T43544: Runtime Error when Locale is not validSergey Sharybin
This is not a real fix and only prevents crash, textures IO might be not working totally correct if they're unicode path or so. Proper solution would be to detect which locale we can use and set LANG, LC_ALL and friends.
2014-11-23Refactor: BLI_path_util (part 2)Campbell Barton
Use BKE_appdir/tempdir naming prefix for functions extracted from BLI_path_util
2014-11-23Refactor: BLI_path_util (split out app directory access)Campbell Barton
This module is intended for path manipulation functions but had utility functions added to access various directories.
2014-08-05Fix for double freeing of MEM_guardedalloc'ed memory originating from ↵Tamito Kajiyama
BLF_lang_set().
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-01-19Docs: doxygen file descriptions for BLF, GPU and WMCampbell Barton
2013-06-21Code cleanup: fix some vs2012 compiler warningsBrecht Van Lommel
2013-03-22code cleanup: unused defines, shadowing and unintended enum-as-variable.Campbell Barton
2013-03-05patch [#34103]Campbell Barton
from Lawrence D'Oliveiro (ldo) More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places - storage.c: make some variables only used in bli_builddir local to that - storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor - path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well - path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error - blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)
2013-01-21Fixes to BLF_locale_explode, was not handling all cases correctly (own fault) :/Bastien Montagne
2013-01-21Various cleanup in i18n code (having funcs implemented in two different ↵Bastien Montagne
places is tricky, you quickly forget to add/edit one, we already have this problem with ugly bplayer stub... e.g. since r53938, BLF_locale_explode was not implemented in non-WITH_INTERNATIONAL builds). Also tried to simplify #ifdef's here...
2013-01-21Fix compiling problems with translation stuff disabledJoshua Leung
2013-01-21code cleanup: style & warnings.Campbell Barton
2013-01-20Python i18n API. Many thanks to Campbell and Brecht for the reviews and ↵Bastien Montagne
suggestions! This commit adds: * A new bpy.app.translations module giving some info about locales/translation stuff (current active locale, all locales currently known by blender, all translation contexts currently defined, etc.). * The ability for addons to feature translations, using the (un)register functions of above module. * Also cleans up "translate py string when storing into RNA prop" by removing "PROP_TRANSLATE" string's subtype, and adding a PROP_STRING_PY_TRANSLATE flag instead (this way it is no more exposed to python...). Addon translations work with py dictionaries: each addon features a dict {lang: {(context, message): translation, ...}, ...}, which is registered when the addon is enabled (and unregistered when disabled). Then, when a key (context, message) is not found in regular mo catalog, a cache dict for current locale is built from all registered addon translations, and key is searched in it. Note: currently addons writers have to do all the work by hand, will add something (probably extend "edit translation" addon) to automate messages extraction from addons soon(ish)! To get a look to expected behavior from addons, have a look at render_copy_settings/__init__.py and render_copy_settings/translations.py (rather stupid example currently, but...). Once we have a complete process, I'll also update relevant wiki pages.
2012-12-28style cleanupCampbell Barton
2012-12-18Various minor fixes to i18n code (mostly, translation of enum items' ↵Bastien Montagne
tooltips was wrongly bound to iface option, not tooltips one, and recent changes in r53119 were incorectly using BLF_pgettext, made them simpler by using CTX_IFACE_ macro). Also fixed CTX_FOO_ macros when building without i18n, those were kinda wrong. And hid i18n ui section in userpreferences when built without its support too.
2012-11-11Replacing gettext i18n backend by boost::locale one.Bastien Montagne
This commit adds a small and simplistic C wrapper around boost's locale library as intern/locale, and heavily simplifies/reduces Blender's own i18n code (under blenfont/ dir). And it adds back UI translation on windows' official builds (with msvc)! Note to platform maintainers: iconv and gettext (libintl) can now be removed from precompiled libs (not gettext binaries, under windows, of course ;) ). Note to MinGW32/64 users: boost_locale lib has not yet been uploaded for those build env, please disable WITH_INTERNATIONAL for now (hopefully will be fixed very soon, have contacted psy-fy).
2012-11-09code cleanup: double promotion warnings, also allow cmake to build SDL ↵Campbell Barton
without audaspace.
2012-11-03Fix for [#32992] Switching language does nothing under Windows.Bastien Montagne
Our current intl build for windows is quite old (don't know the exact version), and does not have the new setlocale overwrite. Problem is, new windows dll have no more the gettext_putenv helper, which is currently mandatory to make it work for this OS. So back for now to the ugly long_locales for win. Best fix is probably to build our own static version of libl, but this is not trivial and will require some time. :/ PS: I had a look over i18n/translation in wxWidget, Qt and boost: all implement their own system, even though wxWidget and boost use po/mo files...
2012-10-23Fix #2 for [#32954] Crash when activating 'International Fonts' in User ↵Bastien Montagne
Preferences I though allocating zero-sized mem would return a NULL pointer, but it looks like it does not... :/ Anyway, Blender should no more crash in case languages file is missing, will just use default (system) locale...
2012-10-23Fix #32954: Crash when activating 'International Fonts' in User PreferencesSergey Sharybin
2012-10-22Update of the tools for the new "dynamic" i18n menu, to generate the ↵Bastien Montagne
languages file into locale dir...
2012-10-22New "dynamic" i18n menu.Bastien Montagne
Now both UI translation menu (in userprefs) and isocodes are defined in a text file (release/datafiles/locale/languages), parsed at lunchtime. This way: * No more need to edit Blender code each time we want to add an new language or reorganize the existing menu; * Translators can easily add a new language for testing, by just editing the text file, so no more need to ask to change Blender code and wait for a new build to see your new translation work in Blender! Remaining todo: * Commit i18n py tools * Update wiki doc!
2012-10-20Atempt to get rid of those ugly "long locales" under windows. Tested by me ↵Bastien Montagne
(win7 64, VC2008) and by Sergey. However, older OS (XP) may not work... The idea behind this is that gettext lib has a func that mimics usual setlocale, but doing also the conversion to windows locale names. Let's hope it works everywhere!
2012-10-20Remove six languages from Blender UI (rational: very low level of ↵Bastien Montagne
translation, 1-2% at most, and no commit done in branch since more than one year): fi (Finnish), ca (Catalan), bg (Bulgarian), el (Greek), ne (Nepali) and pl (Polish). Also fix compile in paranoid warning=errors mode for own last commit.
2012-10-20Fix unix language setting fallback (long_locale is windows only!). This was ↵Bastien Montagne
preventing setting language when you did not have the relevant locale installed under Linux...
2012-10-16Fix #32819: Crash when starting CUDA kernel compilation if UI translation is ↵Sergey Sharybin
not "Default" Issue was caused by some boost filesystem routines accessing current locale and such an access failed in cases code page isn't specified for the current locale. Made it so UTF-8 locale name would be tried to be used first.
2012-10-15Adding new Esperanto language.Bastien Montagne
2012-10-14Adding Estonian new language.Bastien Montagne
2012-09-25Fix own error (wrong portuguese-brazilian Windows "long_locale" - yuck!), ↵Bastien Montagne
and some minor, non-code edits.
2012-09-15code cleanup: remove paranoid/invalid NULL checks and also reduce some ↵Campbell Barton
unneeded size_t -> int conversions.
2012-09-07Adding Hebrew language.Bastien Montagne
Note: looks like we do not have hebrew chars in current font... More FontForge fun ahead. :/
2012-09-05Adding brazilian portuguese language, as requested by portuguese team.Bastien Montagne
2012-07-23Portuguese is now over 60% (also finisehd old ↵Bastien Montagne
portuguse_brazilian->portuguese move).
2012-07-09UI translation from inside Blender UI: first part.Bastien Montagne
This commit reshapes a bit runtime button info getter, by adding a new uiButGetStrInfo() which accepts a variable number of uiStringInfo parameters, and tries to fill them with the requested strings, for the given button (label, tip, context, RNA identifier, keymap, etc.). Currently used mostly by existing ui_tooltip_create(), and new UI_OT_edittranslation_init operator. It also adds a few getters (to get RNA i18n context, and current language iso code). Finally, it adds to C operators needed for the py ui_translation addon: *UI_OT_edittranslation_init, which gathers requested data and launch the py operator. *UI_OT_reloadtranslation, which forces a full reload of the whole UI translation (including rechecking the directory containing mo files). For the first operator to work, it also adds a new user preferences path: i18n_branches_directory, to point to the /branch part of a bf-translation checkout.
2012-05-11style cleanup: whitespaceCampbell Barton
2012-04-30Adding Hungarian language.Bastien Montagne
2012-04-29style cleanup: function calls & whitespace.Campbell Barton
2012-04-05Adding turkish (tr_TR) language.Bastien Montagne
2012-03-31Fixing kyrgyz language (code is ky_KG, just ky does not work...).Bastien Montagne
These keycodes are a mess, and impossible to test them all under linux, as you always have to install the corresponding locales... :(
2012-03-31move debug flag into its own global var (G.debug), split up debug options.Campbell Barton
--debug --debug-ffmpeg --debug-python --debug-events --debug-wm This makes debug output easier to read - event debug prints would flood output too much before. For convenience: --debug-all turns all debug flags on (works as --debug did before). also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-26Renaming pt_BR to pt, as a recent reform [1] made most country speaking ↵Bastien Montagne
portugese use a same, common version of it, which we want to use here. [1] http://www.reformaortografica.com/
2012-03-12Style cleanup in blenfont (spaces, C++ comments, etc.).Bastien Montagne
2012-02-17fa_PE is no valid language code (how comes no one noted that yet?), fa_IR ↵Bastien Montagne
seems the right one! Else, persian was just unavailable on Linux (at least, on Debian...).
2012-01-10Adding the kyrgyz language.Bastien Montagne
2011-12-27* Fixing compile after recent i18 commits. Thomas Dinges