python-humanize / python-humanize/humanize
German requires different cases for ‘%s ago’ and ‘%s from now’
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 756
- Forks
- 148
- Merge medio
- 6 d 1 h
- PR fusionados (30 d)
- 12
Descripción
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)
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza en src/humanize/time.py, alrededor de la salida de naturaldelta() y de la cadena de formato de i18n para “%s ago.”. Sigue cómo se ensamblan las traducciones al alemán para las expresiones de pasado y futuro, y determina después cómo se pueden representar las formas de dativo requeridas sin romper otros locales. Se considera terminado cuando las expresiones alemanas para “ago” y “from now” usan el caso correcto y las traducciones existentes siguen siendo válidas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- localization
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100