python-humanize / python-humanize/humanize
German requires different cases for ‘%s ago’ and ‘%s from now’
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 756
- Fork
- 148
- Merge trung bình
- 6 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 12
Mô tả
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)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu trong src/humanize/time.py, xung quanh output của naturaldelta() và chuỗi định dạng i18n cho “%s ago.”. Theo dõi cách các bản dịch tiếng Đức cho những biểu thức chỉ quá khứ và tương lai được ghép lại, sau đó xác định cách biểu diễn các dạng cách tặng cần thiết mà không làm hỏng các locale khác. Được xem là hoàn tất khi các biểu thức tiếng Đức cho “ago” và “from now” sử dụng đúng cách và các bản dịch hiện có vẫn hợp lệ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- localization
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100