Age | Commit message (Collapse) | Author |
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
seems the right one!
Else, persian was just unavailable on Linux (at least, on Debian...).
|
|
|
|
|
|
- Mipmaps are generated in BLF when drawing text in-game. In that case, padding around each glyph is increased to prevent bleeding.
- Texture filtering is turned on for in-game text.
- All glyphs are now "twisted": the leading edge is brought a small distance forward, to prevent z-fighting in overlapping (kerned) glyphs. This happens both in the game engine and the rest of the UI, but should have no effect in the UI due to Z-compression in the clipping matrix.
Reviewed and approved by bdiego; see patch [#29882] in the tracker. Tested by dfelinto.
|
|
|
|
As Campbell point, this is to avoid call glGet/glTexEnvi
on each character.
|
|
[#25834] no color of textobjects in game engine when combined with
textured objects
[#26893] Curruption of displayed text (debug properties/fps info or bgui)
when using animated/tile uv mode
The first bug was beacuse a bad mode on the texture environment, now
we save the current glTexEnvi, set the one that we need, draw and
restore the original at the end.
The second was because a missing call to glLoadIdentity for the
texture matrix and as we do before, now we do a gl-Push/Identity/Pop
for this matrix to.
The first problem was solved by Kanttori and the second by Dalai.
|
|
|
|
Reset only LANG variable to it's default value when setting locale to
short/long name failed and set LANGUAGE to value calculated from LANG
or value in user preferences (depending on if Default language is set)
so correct language ill be used for messages even if locale files aren't
generated.
Also disabled i18n prints in non-debug run so console wouldn't be polluted
by messages which aren't really informative for user now and might confuse.
|
|
own error with moving image settings.
|
|
sr was no more working). My mistake, using only sr wasn't useful here (unlike spanish, we only have one version of serbian, in cyrilic and latin forms...)!
|
|
Problem was caused by trying to set locale to short named "es" locale
which failed. It's not really obvious which full locale name should
be used here (there are plenty of dialects), so rather than keeping
locale stuff on state when both of locale and utf-8 locale names
failed, restore default settings (restore environment variables and
use default locale for gettext).
This will resolve cases when spanish language is native on the system,
but it will fail in cases when somebody will want to have spanish
interface in non-spanish system. This might be worked around by setting
LANG and LANGUAGE environment variables to es_<dialect>.UTF-8 and it
should work fine,
|
|
This commit implements a way to define context of property which is used by
localization stuff and which is needed to resolve translation context when
some word wit the same english spelling is used in different meanings
(like Manual in meaning of tutorial, and Manual in meaning of something is
setting up by hand).
To define property's context there's a function RNA_def_property_translation_context.
If property doesn't have context, regular BLF_gettext function is used to get
translation of property name, otherwise BLF_pgettext is used for this.
Hence, for correct translation, messages in .po files should be marked
by "msgctxt" context, otherwise property with context declared wouldn't
be translated at all. Toolchain scripts from bf-translation project
would be updated soon.
If context for some values of enumerator property, property itself should
be moved to other context and all items from this enum would be moved to
this context automatically (it's impossible to move one few items to
another context).
P.S. Think context like "BRUSH" or "MODIFIER" are preferable than "NOUN" and "VERB"
because in some cases the same english noun used in different areas better be
translated differently to make translation more native.
|
|
* Added serbian_latin locale (sr@latin).
* Changed serbian UI to "Serbian (Српски)" (as requested by Nikola Radovanovic, serbian translator).
* Reordered languages in menu in alphabetical order!
|
|
|
|
translation is es.po...).
Else, gettext first search into es_ES (and es_MX it seems???), before using content from es, which currently is not good.
|
|
- use NULL rather then 0 for pointers
- use static functions where possible
- add own includes to ensure func's and their declarations don't get out of sync.
|
|
This way, we will be able to use it in non-UI parts of the code too.
|
|
strings (better change then the one I made recently).
|
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
made less cryptic and changed to indicate if they work on files or directories.
|
|
called the other, they did the same thing.
|
|
|
|
- remove redundant casts
- replace strcmp's with "" to just check first char.
- added WM_event_print(), debug mode only to print events since the structs values are not that meaningful.
- added warnings if locale/font dirs cant be found.
|
|
also fixed some spelling errors.
|
|
- also ifdef'd out more smoke function when the modifiers disabled.
|
|
|
|
Language Enum
|
|
since it doesnt ensure \0 termination.
also dont call CTX_data_scene() twice when checking for function arguments.
|
|
also rename backface_culling --> use_backface_culling (which is used elsewhere in rna)
|
|
|
|
|
|
add image strip crashes Blender
Crash was caused by sprintf which tried to parse bytes sequence belongs to chinese letter.
Using codepage 1252 for LC_ALL seems to fix this issue, but needs further testing.
|
|
|
|
|
|
- Move all translation-related declarations to BLF_translation.h
- Reverted some changes to match trunk svn rev40365
|
|
|
|
when toggling use antialising user preference. Also fix some other use of
uninitialized memory found by valgrind.
|
|
|
|
|
|
|
|
- remove saniy checks from blf_font.c, the callers now check instead.
- move duplicate code into defines (may move into static functions).
- move kerning checks into const values set at the start of the function, rather then checking on every character.
|
|
- Static variables can be initialized with constants only.
- Removed bunifont.ttf.c from datafiles -- it's not actually a
data file. Unicode font loading stuff is not in blenkernel/font.c
- Allocate as much memory for unzipped data as it's needed.
Default read chunk is 512Kb.
- Fixed regression (or just a typo) in setting utf locale.
- Default locale set to en_US:en works fine now.
- Commented put Nepali language in user preferences -- it's
not supported by current droid font and imo it's better to
have nice font for languages we actually have translation for
rather than allowing to choose more languages in user preferences.
|
|
glGetIntegerv(GL_TEXTURE_2D_BINDING_EXT, &cur_tex);
... with shadow enabled glGetFloatv(GL_CURRENT_COLOR, color) was called twice per character as well.
Now only call glGetFloatv(GL_CURRENT_COLOR, ...) once per string and only when drawing with shadow or blur, texture bind is stored in the font.
Gives 8% overall FPS speedup when displaying heavy UI in my test.
|
|
|
|
|
|
- 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.
|
|
|