Last modified: 2013-05-03 14:10:52 UTC
listToText and probably other functions use the 'and' message. Its translation into Hebrew is good for some phrases, but not so good for others. It may be true for some other languages, too. It should probably work more like {{GRAMMAR}}, picking the right word according to the context.
What would be the input to the magic word?
(In reply to comment #1) > What would be the input to the magic word? I'm not sure at all, it's just an idea. It bothered me in Hebrew for a long time, and now somebody else complained about it in relation to Lua. So I just filed it. What input? - Maybe the kind of list that we are expecting. Maybe it can be custom for each language, like it is with GRAMMAR rule names.
It can't be custom for each language, since the only one who can provide it is the developer. I'm trying to find something actionable here.
specifically for hebrew, we would want something that depends on the type of "thing" that appears immediately after the "and". in hebrew, "and" is not a separate word, but rather a prefix attached to the word (so if the space between the "and" and the next token is in the code, e.g. in time/date format, we'll need to address this too). the desired replacement in hebrew is the character "HEBREW LETTER VAV" (U+05D5, " ו "), with no space between it and the next word. HOWEVER, if the next word is a number (as in "10 minutes and 13 seconds"), then there should be a dash after the ו, since numbers are not hebrew words: (not sure if the following will appear correctly, because this page's direction is ltr. i attached invisible rtl direction markers, so hopefully it will work): "and 50" should be " ו-50 " (and not " ו50 " or " ו 50 "). if what appears after the "and" is a word, no space or dash should appear: "minute" in hebrew is " דקה ". "and 1 minute" should be " ודקה ". peace.
(In reply to comment #2) > (In reply to comment #1) > > What would be the input to the magic word? > > I'm not sure at all, it's just an idea. It bothered me in Hebrew for a long > time, and now somebody else complained about it in relation to Lua. So I just > filed it. > > What input? - Maybe the kind of list that we are expecting. Maybe it can be > custom for each language, like it is with GRAMMAR rule names. By the way, currently GRAMMAR is used for changing the case of the given word only. By means of changing the behaviour of CoreParserFunctions::grammar() and overridden Language::convertGrammar() we can make the first argument a "mode" and then the usual arguments following. For example, {{GRAMMAR:decline|genitive|dog}} would do what it does now called {{GRAMMAR:genitive|dog}}. Then we can go further by creating a new mode: {{GRAMMAR:list|one|two|three|threepointonefour|etc}}, and it will do what it says: it makes a list. I think it's more appropriate to have list feature there (although this is syntax, not grammar :)).