Broken grammar in event recurrence summary in Russian (and likely other non-English languages)
I wasn't entirely sure whether this should be posted as a bug or an enhancement... in the end I thought this is more of a language parity problem for an existing feature, and thus a bug.
Brace yourselves, we've got come linguistics to cover. ✊
Steps to reproduce
- Switch Nextcloud to Russian language (may be applicable to others also, needs input)
- Open a new event dialog in the Calendar app
- Fill in a recurrence rule such as "Every {year}, on the {last} {Sunday} of {November}"
- See the Summary
Expected behaviour
Perfect:
Ежегодно в последнее воскресенье ноября
(Yearly on last Sunday of November) [translation, may not exactly match what's rendered in English]
Alright:
Ежегодно, в ноябре, в последнее воскресенье
(Yearly, in November, on last Sunday)[translation, may not exactly match what's rendered in English]
There may be other, simpler ways to word this in a way that's easier to implement... I'll post a comment if I get any ideas.
Actual behaviour
Ежегодно в Ноябрь по прошедшие Воскресенье
(I've already suggested the use of "последнее" [final] instead of "прошедшее" [past, prior] in Transifex, but there's more to it than that.)
Calendar app
Calendar app version: 2.1.2
CalDAV-clients used: N/A (web)
There is a multitude of issues to handle here in order to generate valid Russian sentences, some are fixable by providing correct translations, but some aren't, I may be able to fix some in Transifex, but certainly not all. But in the end Nextcloud should probably render valid sentences in all languages, I guess we have to start somewhere.
- Month and weekday names aren't normally capitalized in Russian (should be fixable in Transifex, but I need to check which translations are being used in several places)
- Weekdays in Russian have different grammatical genders, which requires different forms of the (ordinal?) word that specifies which one of the weekdays to use (first, second, last, etc.). There are 3 genders in Russian: feminine, masculine and neuter:
- в последнюю (last) среду (Wednesday) [fem.]
- в последний (last) вторник (Tuesday) [masc.]
- в последнее (last) воскресенье (Sunday) [neut.]
- In "of {month}" in Russian "of" is typically expressed using genitive case with a different form of the month name ("ноябрь" in nominative, but "ноября" in genitive), thankfully, these forms are not affected by other words of this sentence
- For the "alright" expectation, similarly, "in {month}", the translation, while retaining the the preposition "in" ("в"), requires prepositional case ("ноябре") (overall "в ноябре"); so the effort in implementing this variant looks comparable to that of a "perfect" expectation, doesn't seem to be worth it.
- Preposition "в" is sometimes replaced with "во"... not sure what the exact rule is, but for the suggested wordings there is only one case when it happens, "во вторую/второй/второе {weekday}" ("on second {weekday}")
And ideally, these should be reflected not only in the summary, but in the selection dropdowns as well.
So overall the ruleset for Russian would seem to be, roughly, this, for the "perfect" wording:
{{periodicity}} {{ ("во" if ordinal=second) || "в" }} {{ ordinal(weekday) }} {{ weekday::accusative }} {{ month::genitive }}
For the "alright" it's this:
{{periodicity}}, в {{ month::prepositional}}, {{ ("во" if ordinal=second) || "в" }} {{ ordinal(weekday) }} {{ weekday::accusative }}
Other languages may have more applicable rules here. Should we gather information on others here also?
Where do we even start here? 🤔 Maybe an entirely different (less locale-dependent) way of displaying summary would be more effective?