[Bf-committers] Re: i18n and UI - Theory...

Ton Roosendaal bf-committers@blender.org
Sun, 21 Mar 2004 16:02:32 +0100

Hi Dani,

(I cc-ed this to committers mailing list, more people might find it an  
interesting topic!)

Your not the first with this problem... and it is mainly due to the  
current design of the Blender UI, which still demands many small  
buttons cramped together having only a short abbreviated text in it.  
Translating that is horrible, and mostly not useful at all.
The (pulldown) menus in Blender also are generated dynamically quite  
often, which makes translating not easy too.

Your proposal could only work when we recode the GUI to become  
completely flexible. That's not possible right now, all buttons have a  
hardcoded space, and depend on a fixed location as well. Also: many  
people like this 'dashboard' approach, where you can see in a glance a  
load of settings, and where the actual text in the button (Amb, Spec,  
Hard) is interpreted all the time.

My idea still is to officially restrict UI translation to the tooltips  
only, which then can serve as a quick online 'manual' to verfify what  
an option does in your own language. These strings are easy to extract  
from the sources.


On Friday, Mar 19, 2004, at 00:11 Europe/Amsterdam, Dani wrote:

> Hello Ton!
> ***********
> The Problem
> Let me present quickly myself: I'm Daniel Barbeau Vasquez
> and I'm a blenderhead since version 1.7x (strange way of
> counting years, hum...) lately, I'm more concerned about
> the technical aspect of blender as my creativity is having
> a major block (whatever).
> I take care of the french localisation (much more advanced
> than the one actually bundled with blender, I did that one
> too with JMS, but I didn't rewrite the header of th .po
> file so it credits ztonzy, hehe), and there's a blenderhead
> (Mooky) who's translating the online documentation, so we
> are putting our efforts together to make the docs match the
> UI.
> However I keep stumbling accross a few problems:
> 1-all character strings aren't translated by gettext...
> some are, some aren't, the strings with "..." at the end
> (like "open..." ) don't get translated... and so do others.
> Why is this?
> 2-Geez, after turning and turning a word all ways around,
> it still doesn't fit in the button's space! grrrr!
> 3-Some strings are common to the UI and the python API... I
> don't know how python's behaviour is affected, if it is.
> *********************
> A Possible Solution ?
> During the long winter nights, I took some time to think of
> a solution...
> I'll post it here and let you think about it:
> The basic concept is to allow translators to modify
> slightly the interface to adapt it to the specificities of
> each language.
> How? By giving the possibility for each team in charge of a
> translation to describe any interface widget through an
> external script file, or a markup language file.
> This means: the size, position, button type, text, tooltip,
> menu entries, header, ui block, panel type...
> -It wouldn't cost much more to translate than the actual
> gettext method, with surely more satifying results. (in the
> past I even considered doing a brut force translation, i.e.
> translating the source code itself, to get better results)
> -Blender would parse the file on start up, interpret it,
> and apply the modifications to the UI. These could be
> stored in the .B.blend
> -The file wouldn't need to describe the WHOLE interface
> (quite huge):
> -it could call one part of the interface, say,
> the "material buttons" panel, from there it could call
> the "map to" tab and there it could do the needed
> modifications.
> (this hierarchy should be respected "window
> type">"header">"panel">"tab">"buttons")
> -The file would have a header, with a version number in it,
> so blender doesn't need to execute it on every start up,
> only if the version number changes. The version number is
> manually incremented, or it can be done by python scripts.
> -python scripts could register there own button panel INTO
> the interface, or add a button, somewhere in the edit
> buttons, or an entry in some menu, or a new tab.
> Problems that could occur
> Q : What if a script or a human messed up the interface
> file? (let's call it fr.blender, "fr" as the localisation
> index, and "blender" because we're worth it)
> A : Indeed, space is a big problem and adding a button
> somewhere can make it overlap with the others. When parsing
> the file, Blender could do a quick and dirty integrity
> check. I have my idea how, if you are interested in this
> drop me a mail.
> Q : What if the file is empty or doesn't exist?
> A : DO NOT CRASH! ;) Load the default Ui setup!
> Q : Hum... on tutorials  might not match the UI...
> A : The translation files should be done by a dedicated
> team. There mission would be to do the best translation,
> with the lest changes in the UI. That way, newbies can find
> their way through, and since they are newbies, they won't
> know how to modify heavily the interface. Whereas advanced
> users know where are the tools and how they customized
> their blender... so tutorials shouldn't be a problem.
> *************************
> Disclaimer and Conclusion
> I really do think this could be a way to expand the UI and
> improve l10n. However, I'll let you judge that since I'm
> still nothing of a programmer, it might be a lot more
> difficult to do than what I thought.
> I read your messages in the committers' board, saying that
> for the moment, translators should just stick to tooltips.
> And I also read that the i18n method could change in the
> future... this is quite discouraging but I continued to
> update the .po file from time to time, until I came up with
> the idea above.
> Excuse me if I didn't post in the developpers' board, I'm
> of the unsure type and I feel my english is a bit messy...
> BTW, if you don't understand something (or anything) drop
> me a mail and I'll try to clarify things.
> To finish this never ending mail: if my idea is worthless
> or too complicated (thus worthless ;]), it doesn't matter!
> I consider it's better to share an idea and then realize
> that it's a bad one, than to keep it and ignore if it has
> any potential.
> I guess that's it....
> Greetings
> Dani
Ton Roosendaal  Blender Foundation ton@blender.org