>>>>> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes:

Juergen> Jean-Marc Lasgouttes wrote:
>> I would really like to see a patch where only the type of float is
>> used internally, and the GUI name is only for displaying.

Juergen> I decided to do this properly now (use no translatable
Juergen> strings internally). Some new funtions were needed. See
Juergen> attached patch. For 1.3.6, I propose just to remove the l10n
Juergen> marks from "TOC" again. MenuBackend looks for "TOC", and if
Juergen> this string is translated, menu generation might fail.

Juergen> Jean-Marc, what do you think?

I do not like this much:

+       FloatList::const_iterator it = floats.begin();
+       FloatList::const_iterator end = floats.end();
+       if (guiname == _("Table of Contents"))
+               return "TOC";
+       for (; it != end; ++it) {
+               if (_(it->second.name()) == guiname)
+                       return it->second.type();
+       }
+       return guiname;

You should never have to compare against a translated value. I think
GUIName should be untranslated, and all translation should happen in
the frontends.

So basically, I'd try to avoid using gettext at all in toc.C.

JMarc

Reply via email to