Page MenuHomePhabricator

Change the locative form of Ukrainian sitenames
Open, MediumPublic


If I got it right, the use of locative form of the sitenames is governed by this document: link.

We need to remove the prepositions, because:

  • We don't always use one and the same preposition for all the cases. E. g. "Search Wikipedia" in Ukrainian might be "Пошук у Вікіпедії" or "Пошук по Вікіпедії". In some cases we might also need another preposition – "на".
  • If we use {{GRAMMAR:locative|{{SITENAME}}}}, we end up having messages with the sitenames like, meta-wiki, etc, with no prepositions at all, which is wrong.

That's why the prepositions should be set outside of the "grammar" function. This is also true for be- and be-tarask languages, that don't have prepositions set in the php file mentioned (see prepositional).

The relevant section of the document should look like:

	 'locative' => array(
		'Вікіпедія' => 'Вікіпедії',
		'Вікісловник' => 'Вікісловнику',
		'Вікіпідручник' => 'Вікіпідручнику',
		'Вікіцитати' => 'Вікіцитатах',
		'Вікіджерела' => 'Вікіджерелах',
		'Вікіновини' => 'Вікіновинах',
		'Вікідані' => 'Вікіданих',
		'Вікімандри' => 'Вікімандрах',

Event Timeline

Restricted Application added subscribers: Base, Aklapper. · View Herald TranscriptOct 31 2016, 8:03 AM

By the way, are there any means to list all the messages using "grammar" for Ukrainian? I don't think there are many (if any) of those using locative (we usually avoid it, considering the issues mentioned), but It would be nice to be able to check.

Nemo_bis added a subscriber: Nemo_bis.

Was there some discussion on the matter?

If the "locative" is just preposition + nominative, then this is not a case and there is no reason to use the grammar forms. GRAMMAR is meant to override the variables provided in nominative form where there would otherwise be no way to produce a grammatical sentence.

Can we just remove the locative section for Ukrainian?

As for which messages use grammar, Special:SearchTranslations should be able to tell:

Nemo_bis triaged this task as Medium priority.Nov 6 2016, 10:45 AM

There was a discussion but outside Wikipedia. And locative is not just preposition + nominative. It's that just some words change form in locative (like Wikipedia) and some don't (like Meta-wiki), but the preposition is needed everywhere, so it's best to leave the preposition outside the grammar form, so that some words can be defined in the document mentioned, while the others would be left unchanged, but will have a preposition as well.

Base added a comment.EditedNov 6 2016, 2:41 PM

Locative is a full scale grammar case of Ukrainian language along with 6 others. Україна — в Україні: it is not always preposition + nominative case spelling.
The problem here is that though for current Wikimedia projects the preposition is always у, there might occur cases when it would be e.g. на. E.g. if Wikimedia Commons in Ukrainian were called not Вікісховище, but Вікісклад, as in Russian, then the correct locative form would be на Вікіскладі (since it is склад — на складі normally) and not у Вікіскладі. As I said it is not a problem with Wikimedia projects now but it might be in the future, also if we translate with assumption that there is no preposition in grammar form, thus by putting у, it would become impossible for e.g. third parties wikis to use correct preposition (i.e. if they just put it in the similar file they will get something like «у на Вікістолі» for some theoretical third party Wikitable project instead of desired «на Вікістолі».)
What is the real problem for translators now that while for Wikimedia wikis there are those forms with preposition defined, for default case they are not (which is not just third parties but e.g. chapters wikis or Meta) thus both using preposition and not using if before Grammar:locative is a bad idea (you might get two preposition together or vice versa not agreeed sentence). I rather agree though that between the two evils the proposed one perhaps is smaller, but @Piramidion, which discussion are you referring to?
@Nemo_bis, what I personally now see as a possible better solution is, if it is possible altogether, but I am rather sure it is, to set default locative form for any sitename. Thus making it «у {{SITENAME}}» for default case with then leaving room for overriding this value with concrete per name values. This default should be Mediawiki wide not just Wikimedia bounded otherwise it does not solve anything for translators. What do you think? I am not sure if I'd better put make it a separate task or we consider it as an alternate solution of this one.

Base added a comment.Nov 6 2016, 2:54 PM

@Piramidion btw are you sure the по form is locative? I am no linguist to know for sure. I just noticed that it would be [пошук] по Вікістолу, while на Вікістолі — the noun form changes. I think it is rather dative or genitive in this use case.
I also see that you too mention на but I do not see how your solution which removes per wiki customisation of the pronoun (well if we do not consider those wikis creating local Mediawiki messages for all GRAMMAR:locative containing translations) solves it.

Piramidion added a comment.EditedNov 6 2016, 3:52 PM

I'm not sure about the use of "по" too. You may be right saying that it's some other case. But the noun "стіл" has two locative forms – "столі" and "столу" (see dictionaries)... Either way, the preposition should be added outside the grammar form in this case as well.

As for "на" — I thought it theoretically might be used in some Commons-related message that uses {{SITENAME}}: we might want to use "на Вікісховищі" instead of "у Вікісховищі"; or Meta-wiki related ("на Мета-вікі"). But those are secondary reasons, the primary is that there are such examples as "у", "у Вікімедіа Україна" etc which, if we use grammar locative, are shown with no preposition at all. E. g. now we have "Пошук Вікімедіа Україна", as if we want to search for Wikimedia Ukraine, not on the site (which, if we put the preposition out, would be "Пошук у Вікімедіа Україна").

And I don't see how my suggestion can become a "smaller evil", the only evil here is that the messages now using grammar:locative should be updated, that's all.

As for the conversation, we discussed this with Ата, you may contact her for details.

Piramidion added a comment.EditedNov 6 2016, 4:06 PM

@Base I'm not sure if you understand what I mean by removing the prepositions from that file. I'll try to explain.
On we have a message

Search {{SITENAME}}

We translate it as

Пошук {{GRAMMAR:locative|{{SITENAME}}}}

We get:

  • Пошук у Вікіпедії
  • Пошук у Вікіданих
  • Пошук у Вікіцитатах

...and so on, but the other messages don't have prepositions:

  • Пошук Meta
  • Пошук MediaWiki
  • Пошук Вікімедіа Україна
  • Пошук

...and so on – and all these messages have no preposition, which is wrong.
But if we remove those prepositions, all we'll have to do is add these to appropriate translatewiki messages. In this case:

Пошук у {{GRAMMAR:locative|{{SITENAME}}}}

And we'll get:

  • Пошук у Вікіпедії
  • Пошук у Вікіданих
  • Пошук у Вікіцитатах
  • Пошук у Meta
  • Пошук у MediaWiki
  • Пошук у Вікімедіа Україна
  • Пошук у

...and so on, meaning that every such message will have that preposition.

Btw, in this message you've used genitive instead of locative – just to put the preposition out, which resulted in

  • Шукати у Вікісловника
  • Шукати у Вікіджерел

This clearly illustrates the problem.

Base added a subscriber: Ata.EditedNov 6 2016, 6:22 PM

@Piramidion I think it is either that my reply wasn't clear enough or you did not read it completely, as not only it contains confirmation that I understand the current state of affairs but it also illustrates the downside of your proposal, and that is why I call it evil even if lesser one, but also there is alternate solution to the problem I propose which allows to get rid of both the downside I mention (inability to use different pronouns on per Sitename basis in your solution) and of downside you mention (my solution does not require an update of the translations which assumed GRAMMAR:locative working as it is now, though this one I as a bot master do not deem a major one).
As to your private conversation with @Ata on this matter that is not exactly what is usually deemed a community discussion here, I was conversing with her on this matter in the past too but I do not consider it anything more than a private conversation between two users. I do not have reliable means of communication with her as of now to boot, but that is irrelevant here. Anyway considering that only about 4 users have over 5k translations on twn for Ukrainian and not much more would understand what the issue in question is (you even doubted me, I in my turn allow myself to doubt many other users) that is not a big deal, e.g. I would more likely notice a task here as I did than a discussion on Ukrainian portal on TWN.

what I personally now see as a possible better solution is, if it is possible altogether, but I am rather sure it is, to set default locative form for any sitename

If so, there is nothing we can do: WikimediaMessages would stay as it is and every single wiki would need to take care of setting the grammar forms.

Patches in gerrit to add more locative forms to the configuration of the various wikis will certainly be accepted.

Base added a comment.Nov 6 2016, 6:34 PM

Oh I see, I mixed some words in my comment which has probably rendered it virtually unreadible, it should now be better.

Base added a comment.EditedNov 6 2016, 6:39 PM

@Nemo_bis is it possible to make the default locative for GRAMAR:locative|{{SITENAME}} to be "у {{SITENAME}}" (with prepended preposition у) Mediawiki wide for Ukrainian?
That indeed should be done not in WikimediaMessages but in some upstream file.

@Base Sorry, I didn't read it carefully enough. Now I see what you've meant and completely agree with you.
@Nemo_bis So who can make those patches? I have no clue how this is done. But I can create a more or less complete list of Wikimedia sitenames (I guess can be included?) and all their case forms, locative in particular. Anyway I'd like this task to result in an update of the php file

Besides, as @Base mentioned above, it would be good to make a default locative form of "у {{SITENAME}}" for Ukrainian, which would be overridden by the php file mentioned. This is needed, for example, for Meta-wiki. In Ukrainian it's spelled as "Мета-вікі" or simply "Мета", but the appropriate message there says "Пошук Meta" (Meta in English for some reason), and for such cases we'd like to have a default preposition. Is this at all possible? If not - the only solution would be to add a locative form for "Meta" in English spelling along with its cyrillic version.

Base added a comment.EditedNov 6 2016, 8:33 PM

I took a closer look, it appears that [[ | LanguageUk.php ]] already has some default conjugation rules for some grammar cases. I did some test (archived version, for the sake of observing when software behavior changes are made) and confirmed that it was able to conjugate "Дурнопедія" (some theoretical Stupidpedia) into correct genitive form of "Дурнопедії" even though there is no explicit genitive case definition for "Дурнопедія" in WikimediaGrammarForms.php (and thanks Gods that there isn't :) ).
I guess thus it is absolutely possible to extend LanguageUk.php's convertGrammar function with default behavior for locative case then.

For the most primitive solution it should be

case 'locative': # місцевий відмінок
  $word = "у $word";

We can do some brainstorming for supporting more complex behavior considering some common for sitenames words ending like it is done for genitive but that is what can certainly wait.

@Piramidion anyone can do patches (while only certain people can merge them), here is a tutorial. Unfortunately I am unable to do it from Windows which is my main system, and my wooden laptop works about 4 times slower on bootstick launched Ubuntu so the only way for me to do it is to go to Wikimedia Ukraine office where are some decent Ubuntu laptops, but I do hope that @Nemo_bis or someone else would make my life easier by doing it in my stead (I am still not very good at PHP to boot) O:)

Change 604883 had a related patch set uploaded (by Base; owner: Base):
[mediawiki/core@master] Adding default locative rule for Ukrainian

Base added a comment.Jun 11 2020, 10:16 PM

@Piramidion , @Ata , I have uploaded a patch that does what I have described above (except that because of T115217 I had to edit a json file instead of the php file mentioned): it makes the default locative to be «у {{SITENAME}}». Do you feel we should go with this or seek another solution?

Change 604883 merged by jenkins-bot:
[mediawiki/core@master] Adding default locative rule for Ukrainian

Base added a comment.EditedJun 15 2020, 12:15 PM

@Nikerabbit , thank you

I guess I will go through translations containing locative to make sure that all of them are aligned with this, and the ticket can be closed after that.