German requires different cases for ‘%s ago’ and ‘%s from now’

Offen
#263 0 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
localization

Rechercherichtung

Beginne in src/humanize/time.py im Bereich der Ausgabe von naturaldelta() und des i18n-Formatstrings für „%s ago.“ Verfolge, wie die deutschen Übersetzungen für Ausdrücke der Vergangenheit und Zukunft zusammengesetzt werden, und ermittle dann, wie die erforderlichen Dativformen dargestellt werden können, ohne andere Locales zu beeinträchtigen. Als erledigt gilt die Aufgabe, wenn die deutschen Ausdrücke für „ago“ und „from now“ den korrekten Kasus verwenden und bestehende Übersetzungen weiterhin gültig sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

help wanted

This is somewhat related to #88 , but hasn’t been resolved and also needs changes to more than the translation files I am afraid.

So what this is about is that German grammar is a beast, and prepositions require certain cases. For instance, ’vor‘ will need a dativ. ‘an hour ago’ thus translates into ‘vor einer Stunde‘, rather than ‘vor eine Stunde‘ (that’s nominativ).

humanize forms the expression ‘an hour ago‘ by piping the output of naturaldelta straight into the i18n format string for %s ago. naturaldelta() returns a nominativ, that is correct as long as the expression stands by itself. However, as soon as a preposition is placed in front of the value, the grammatical case should change.

(The same is true for ‘in ...’/‘... from now’(which currently translates into ‘... ab jetzt’ which sounds odd). Conveniently, both ‘in’ and ‘vor’ require the same case, dativ)

I would be happy to contribute, but I do not know where to start without breaking things big time. If anybody can give me some directions of how to implement this best, I would go ahead and dig my head in

I don’t properly speak any Slavic languages, but I would expect similar issues with those (correct me if I am wrong)

Vorherrschende Sprache
Python
Sterne
757
Forks
148
Ø Merge
6 T. 1 Std.
Gemergte PRs (30 T.)
12

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python-humanize/humanize

Alle Issues in python-humanize/humanize

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.