[Geany-devel] intltool usage question

Lex Trotman elextr at xxxxx
Sat Aug 29 11:40:01 UTC 2009


2009/8/29 Enrico Tröger <enrico.troeger at uvena.de>:
> On Sat, 29 Aug 2009 21:02:35 +1000, Lex wrote:
>
>>> I'm still not too happy about this as it adds some overhead for a
>>> rather small effort.
>>>
>>> I think Nick suggested this earlier:
>>>
>>> why don't we simply put the defaul labels somewhere into src/build.c
>>> so that intltool grabs them as usual. And then when reading the
>>> labels from the config file, we simply pass them through gettext()
>>> to get them translated automatically. If I don't miss anything
>>> obvious, this should have the same result but without the need for
>>> an external script. The only drawback with this effort is that we
>>> have the English labels itself twice (one in src/build.c, one in the
>>> config file) but since they probably won't change much at all it
>>> might be not such a big issue.
>>

But you also have the overhead of every time the filetype file is
loaded, filetypes.c having to check for labels in the string list and
load the translation but only for the system filetypes files since we
don't want this behavior on filetypes users have modified.  And of
course the system config file labels are now hard coded into the
program so system administrators can't configure using the
configuration files for site changes...

If no solution that uses the current translation process can be found
then  maybe the best idea is just to ask users who want translated
labels to submit a patch or at least the translation and type it
manually into the filetype file, after all its only likely to be one
or two words to be translated like this:

FT_00_LB=Beer!!
FT_00_LB[de]=Bier!!

Now thats the sort of menu item I'd like to see, and nearly the limit
of my German :-D


>>That looks kinda like a maintenance nightmare keeping the strings in
>>the code in line with the labels in config files, please don't go
>>there for your own sakes ;-)
>
> It depends how often the labels are added/removed/changed. Will it that
> often?
>

As I said above, its unknown, just have to see.

Cheers
Lex

>
> Regards,
> Enrico
>
> --
> Get my GPG key from http://www.uvena.de/pub.asc
>
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
>



More information about the Devel mailing list