Page MenuHomePhabricator

the 'and' message often sounds not so natural in Hebrew, and maybe other languages
Open, MediumPublic

Description

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.


Version: unspecified
Severity: normal

Details

Reference
bz46106

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:16 AM
bzimport set Reference to bz46106.
bzimport added a subscriber: Unknown Object (MLST).

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.

p.selitskas wrote:

(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 :)).

p.selitskas wrote:

(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 :)).

This.

Reported as T126900.