>>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

Martin> As bugzilla is down, attached the summary of my hebrew-related
Martin> changes as a patch.

The following part is not good:

@@ -271,10 +272,16 @@ string Counters::labelItem(string const 
                return string(1, hebrewCounter(value(ctr)));
 
        if (numbertype == "alph")
-               return string(1, loweralphaCounter(value(ctr)));
+               if (language == "hebrew")
+                       return string(1, hebrewCounter(value(ctr)));
+               else
+                       return string(1, loweralphaCounter(value(ctr)));
 
        if (numbertype == "Alph")
-               return string(1, alphaCounter(value(ctr)));
+               if (language == "hebrew")
+                       return string(1, hebrewCounter(value(ctr)));
+               else
+                       return string(1, alphaCounter(value(ctr)));


If the hebrew version needs \hebrew{counter} instead of
\alph{counter}, this should be done in he.po. No need to hardcode any
of this logic.

We should not need to pass the language to the counter methods.
Actually only enumLabel needs it for now, but it can be fixed by
something like (untested):

string Counters::enumLabel(string const & ctr, Buffer const & buf)
{
        string format;

        if (ctr == "enumi")
                format = buf.B_("\\arabic{enumi}.");
        else if (ctr == "enumii")
                format = buf.B_("(\\alph{enumii})");
        else if (ctr == "enumiii")
                format = buf.B_("\\roman{enumiii}.");
        else if (ctr == "enumiv")
                format = buf.B_("\\Alph{enumiv}.");
        }

        return counterLabel(format);
}

This would allow to make the hebrew tricks in he.po, but also to
change for other languages (at least french would like that). I really
think most explicit tests for "hebrew" should go away.

Note that if strings like "\\arabic{enumi}." seem cryptic, they can be
replaced by something like
"\\arabic{enumi}.[[First level in enumerate environment]]"

JMarc

Reply via email to