Page MenuHomePhabricator

All inspector titles should be passed through GRAMMAR to allow languages that need to vary case based on context
Open, LowPublic8 Estimated Story Points

Description

  • Create a new message (maybe called 'visualeditor-tool-substitutetitle') that consists merely of $1 in English and a lengthy qqq that tells them to use {{GRAMMAR:foo|$1}} for languages that need it.
  • Replace all lines like ve.ui.MWGalleryInspectorTool.static.title = OO.ui.deferMsg( 'visualeditor-mwgalleryinspector-title' ); with ve.ui.MWGalleryInspectorTool.static.title = OO.ui.deferMsg( 'visualeditor-tool-substitutetitle', 'visualeditor-mwgalleryinspector-title' );
  • Help the translators update all their messages as needed. Weep for languages in which the case should vary for all the extra work we've made them do.

https://translatewiki.net/wiki/Thread:Support/Visualeditor-toolbar-insert_and_related_items

Event Timeline

I don't agree that items in the menu have to be in the accusative. 'Insert' is really just shorthand for 'Insertable items'. The items themselves are in the nominative, otherwise in English 'Insert' would have an ellipsis (Insert...) and the items would be lower case.

I don't agree that items in the menu have to be in the accusative. 'Insert' is really just shorthand for 'Insertable items'.

In English, you mean? This is about translations; surely translators are more qualified to tell whether their language requires an accusative and so on?

Using accusative case here in Polish would technically be more correct, but I've never seen it done that way in any other software, and if you were to implement this, I'd definitely disable this for Polish translation. I can't speak for Bosnian.

To elaborate. For the following English menu:

  • Insert
    • Gallery
    • Table

Literal translations are insert→wstaw, gallery→galeria (accus. galerię), table→tabela (accus. tabelę).

The current translation (and I think the best translation) is:

  • Wstaw
    • Galeria
    • Tabela

The following would also be acceptable (but weird):

  • Wstaw
    • Wstaw galerię
    • Wstaw tabelę
  • Wstaw…
    • …galerię
    • …tabelę

The following wouldn't be acceptable to me:

  • Wstaw
    • Galerię
    • Tabelę

So you would use "$1" or maybe "…{{GRAMMAR:accusative|$1}}" if you felt like it? :-)

In English, you mean? This is about translations; surely translators are more qualified to tell whether their language requires an accusative and so on?

The grammar in any language depends on the semantics, which is what I am talking about. Our translators have been prone to hyper-correction in the past (e.g. translating B/I/U even though local users are only used to the English versions). If we're going to implement a massive messy change we should go on more than just the word of one translator.

The following would also be acceptable (but weird):

I suspect most software takes this same shortcut of using the same case for menu labels and titles, so regardless of what might be correct in a sentence, it would look "weird" as Bartosz says.

Note that in some languages, you can't do the "Insert... ...table" thing at all due to word order. In Dutch, menus like this typically use the imperative mood ("Invoegen" for "Insert") and standalone nouns for the options ("Tabel" for "Table", "Afbeelding" for "Image", etc.). But it's ungrammatical to say "Invoegen tabel", because the correct way to say "Insert table" is "Tabel invoegen" or "Voeg tabel in" (we have split verbs, like English, just more of them and with less grammatical flexibility).

So a menu like this would be ungrammatical:

  • Invoegen...
    • ...tabel
    • ...afbeelding

A menu like this would be grammatical but weird:

  • Invoegen
    • Tabel invoegen
    • Afbeelding invoegen

Most software uses menus like this:

  • Invoegen
    • Tabel
    • Afbeelding

This is really only needed for the items in the "Insert" list – the rest of the uses can simply be in the nominative case. The only reason I actually mentioned this is because it's already been done with tables, from what I can tell. The message <visualeditor-table-insert-table> is for the item in the "Insert" list, and <visualeditor-toolbar-table> is for when you click on an existing table. This isn't the case for <visualeditor-dialogbutton-media-tooltip> as it's used in the list, and when you click on an image. Wouldn't it be easier if you just had 12 of these separate labels with an additional designation like "-menu" for the "Insert" menu? You can just keep the "old" labels for every other use since they can be in the nominative case.

The grammar in any language depends on the semantics, which is what I am talking about.

False dichotomy.

Our translators have been prone to hyper-correction in the past (e.g. translating B/I/U even though local users are only used to the English versions).

This is an ad hominem (or ad genus if you prefer) and is highly discouraged in civil conversations, in addition to being definitely off-topic for this specific request. See https://www.mediawiki.org/wiki/Bug_management/Phabricator_etiquette and let me know if you need suggestions on appropriate venues where to voice your concerns. If/when you do so, I'll address one mistake which your sentence contains.

A correct question is:

So you would use "$1" or maybe "…{{GRAMMAR:accusative|$1}}" if you felt like it? :-)

And as far as I understand the answer is "yes" hence the validity of this request is confirmed.

Our translators have been prone to hyper-correction in the past (e.g. translating B/I/U even though local users are only used to the English versions).

This is an ad hominem (or ad genus if you prefer) and is highly discouraged in civil conversations, in addition to being definitely off-topic for this specific request.

Um, what? We're not dismissing your or anyone's concerns because you or anyone personally made mistakes in the past, or anything. It looks like you're trying to shame people into agreeing with you. It is common practice to, when there are several options, use the simplest and least confusing one possible, because everyone makes mistakes and we try to leave as little space for them as we can. The same principles apply when writing code libraries for others to use, where we try to make it so that doing something wrong is impossible.

B/I/U is a good example here, I remember being confused by it being translated to G/K/P when I first used OpenOffice years ago (Polish version of Microsoft Word had them untranslated and everyone was already used to it). Current LibreOffice instead uses a/‌a‌/‌a, clearly trying to make it impossible to translate this in a confusing way.

In T130121#2130520, @Srdjan_m wrote:

The only reason I actually mentioned this is because it's already been done with tables, from what I can tell. The message <visualeditor-table-insert-table> is for the item in the "Insert" list, and <visualeditor-toolbar-table> is for when you click on an existing table. This isn't the case for <visualeditor-dialogbutton-media-tooltip> as it's used in the list, and when you click on an image. Wouldn't it be easier if you just had 12 of these separate labels with an additional designation like "-menu" for the "Insert" menu? You can just keep the "old" labels for every other use since they can be in the nominative.

If anything, I'd do this, in case there are languages where a {{GRAMMAR}}-based solution will be insufficient. It's not going to be any more inconvenient, either, because the (limited) automatic grammar conversion that we have is unavailable on the JavaScript side anyway (only $wgGrammarForms is supported, which requires you to "hard-code" the map, and which is currently only done for project names as far as I know) (sorry, that's not true). Hopefully it won't be too inconvenient for you :)

@Jdforrester-WMF: Any update on this? It's been a while.

In T130121#4013749, @Srdjan_m wrote:

@Jdforrester-WMF: Any update on this? It's been a while.

I'm afraid that the Editing team currently has no plans to work on this task.