python-humanize / python-humanize/humanize
German requires different cases for ‘%s ago’ and ‘%s from now’
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 756
- Fork
- 148
- Merge medio
- 6g 1h
- PR unite (30g)
- 12
Descrizione
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)
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in src/humanize/time.py, intorno all'output di naturaldelta() e alla stringa di formato i18n per “%s ago.”. Traccia come vengono assemblate le traduzioni tedesche per le espressioni al passato e al futuro, quindi determina come rappresentare le forme dativali richieste senza compromettere le altre localizzazioni. Il lavoro è completato quando le espressioni tedesche per “ago” e “from now” usano il caso corretto e le traduzioni esistenti rimangono valide.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- localization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100