Project

General

Profile

Translation: "1 day" vs. "1 day ago"

Added by Anonymous about 15 years ago

Hi all,

I have one question or request regarding to translation of time strings.

In redmine are used two types of time string:

1st type:
- 1 day
- 2 months
- 5 hours

2nd type:
- 1 day ago
- 2 months ago
- 5 hours ago

In English is the base (e.g. "1 day") same in both of types, so it is possible to use one translation string (e.g. actionview_datehelper_time_in_words_day) for both types.

But in others languages it can be different.

For example in Slovak:
1st type:
- 1 deň
- 2 mesiace
- 5 hodín

2nd type:
- pred 1 dňom
- pred 2 mesiacmi
- pred 5 hodinami

For example in Czech:
1st type:
- 1 den

2nd type:
- před 1 dnem

So it's not possible to use only one translation string for both types.

I think it's needed to add this new translation strings:

actionview_datehelper_time_in_words_day_ago:
actionview_datehelper_time_in_words_day_ago_plural:
actionview_datehelper_time_in_words_hour_about_ago:
actionview_datehelper_time_in_words_hour_about_ago_plural:
actionview_datehelper_time_in_words_hour_about_single_ago:
actionview_datehelper_time_in_words_minute_ago:
actionview_datehelper_time_in_words_minute_half_ago:
actionview_datehelper_time_in_words_minute_less_than_ago:
actionview_datehelper_time_in_words_minute_ago_plural:
actionview_datehelper_time_in_words_minute_single_ago:
actionview_datehelper_time_in_words_second_less_than_ago:
actionview_datehelper_time_in_words_second_less_than_ago_plural:

and to create new function distance_of_time_in_words_ago, which will be similar as distance_of_time_in_words, but will use this new translation strings.

The old distance_of_time_in_words function will be used only in the repository browsing (column "Age") and in the other cases will be used new function distance_of_time_in_words_ago.

I created patch for 0.8.0 version and this solution works fine for me.