python-humanize / python-humanize/humanize
German requires different cases for ‘%s ago’ and ‘%s from now’
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 756
- Forks
- 148
- Merge moyen
- 6 j 1 h
- PR mergées (30 j)
- 12
Description
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)
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez dans src/humanize/time.py, autour de la sortie de naturaldelta() et de la chaîne de formatage i18n pour « %s ago. ». Suivez la manière dont sont assemblées les traductions allemandes des expressions au passé et au futur, puis déterminez comment représenter les formes au datif requises sans casser les autres locales. Le travail est terminé lorsque les expressions allemandes pour « ago » et « from now » utilisent le cas correct et que les traductions existantes restent valides.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- localization
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100