nextcloud / nextcloud/calendar

Broken grammar in event recurrence summary in Russian (and likely other non-English languages)

Open
#2,723 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug Feature: Editor feature: language/translations (l10n/i18n) hotspot: recurring events
Dominant language
JavaScript
Stars
1.2k
Forks
332
Avg merge
16h 13m
Merged PRs (30d)
137

Description

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
  1. Switch Nextcloud to Russian language (may be applicable to others also, needs input)
  2. Open a new event dialog in the Calendar app
  3. Fill in a recurrence rule such as "Every {year}, on the {last} {Sunday} of {November}"
  4. 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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the recurrence summary in the Calendar app's new event dialog with Russian selected, then compare the actual wording with the proposed Russian forms. Review the related Transifex translations and the recurrence controls, including the selection dropdowns; done means valid, grammatically appropriate summaries and dropdown text for the supported language cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, internationalization, localization
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.