Defect #25130
opensupport of agglutinative languages like Hungarian/Magyar
0%
Description
I tried to fix hu.yml, but the time related strings are used in to many contexts incompatibly, so even subtle/clumsy rewording can't help in all cases. We don't use plural form after numbers greater than one, but we use other forms for different expressions.
E.g. hour is óra in Magyar;
[point in time] x hour(s) ago is x órája or x órával ezelőtt;
[present perfect continuous] for x hour(s) is x órája;
[past, future or undetermined tense] for x hour(s) is x óráig or x órán át.
Label_added_time_by needs point in time (and optional non-relative times, but that's a different issue, although a possible workaround);
while e.g. setting_session_lifetime needs óra without agglutination.
Filters:
label_between: between x [and] y should be x és y között;
day related filters are somewhat clumsy in English, too (e.g. less than days ago ... days), but I could improve it in Magyar: "label_less_than_ago: nem régebbi, mint" meaning not older than, but it must be followed by x nap (base word of day), not x napja (point in time);
label_in_the_past_days: needs to be followed by napban (base word of day + in postfix), etc.
Files
Related issues
Updated by Greg T over 7 years ago
Elements of datetime.distance_in_words should not be used outside of the method distance_of_time_in_words. Please duplicate the x_days and x_hours strings outside of the distance_in_words array in the language files and use those where needed.
Does it help if I attach a patch?
x_days is currently:
one: '1 napja' other: '%{count} napja'in hu.yml. That works for e.g.
label_added_time_by: "%{author} adta hozzá %{age}".It makes no sense in other contexts.
While x_hours is
one: "1 óra" other: "%{count} óra"which is not correct for the current label_added_time_by (which needs órája), but is OK in some other places.
- In issue_relation.rb
def to_s(issue=nil) issue ||= issue_from issue_text = block_given? ? yield(other_issue(issue)) : "##{other_issue(issue).try(:id)}" s = [] s << l(label_for(issue)) s << "(#{l('datetime.distance_in_words.x_days', :count => delay)})" if delay && delay != 0 s << issue_text s.join(' ') end
needs the root word nap instead of datetime.distance_in_words.x_days.
- session_lifetime_options
needs the root words (óra and nap) instead of datetime.distance_in_words.x_hours and datetime.distance_in_words.x_days;
- session_timeout_options
needs the root word óra instead of datetime.distance_in_words.x_hours.
- autologin
Instead of datetime.distance_in_words.x_days, we either need "x napig" (for/up to x day(s)), or - better yet - we need the root word nap AND setting_autologin needs to be changed to Automatikus bejelentkezés érvényességi ideje (... ~ expiration time).
- password_max_age
Instead of datetime.distance_in_words.x_days, we need the root word nap.
Updated by Toshi MARUYAMA over 7 years ago
- Category changed from I18n to Translations
Updated by Toshi MARUYAMA over 7 years ago
In Russian source:tags/3.3.2/config/locales/ru.yml#L124
x_days:
one: "%{count} день"
few: "%{count} дня"
many: "%{count} дней"
other: "%{count} дня"
Updated by Greg T over 7 years ago
Toshi MARUYAMA wrote:
In Russian source:tags/3.3.2/config/locales/ru.yml#L124
What do you mean by that note?
I've found what you mean here.
That's a whole different problem. Hungarian uses the same singular nouns after any number.
Alas, I cannot change the subject, but this issue is about the misusing of distance_in_words array. See note-1.
Updated by Toshi MARUYAMA over 7 years ago
"distance_in_words" is Rails core feature.
Updated by Greg T over 7 years ago
Toshi MARUYAMA wrote:
"distance_in_words" is Rails core feature.
So? Have you read my note-1?
"Elements of datetime.distance_in_words should not be used outside of the method distance_of_time_in_words."
Updated by Toshi MARUYAMA over 7 years ago
Greg T wrote:
Toshi MARUYAMA wrote:
"distance_in_words" is Rails core feature.
So? Have you read my note-1?
"Elements of datetime.distance_in_words should not be used outside of the method distance_of_time_in_words."
Please post a patch because I cannot understand.
Updated by Toshi MARUYAMA over 7 years ago
- Related to Patch #25402: stop misusing distance_in_words added
Updated by Greg T over 7 years ago
- File distance_in_words.patch distance_in_words.patch added
Updated by Toshi MARUYAMA almost 7 years ago
Where did you pick datetime.x_hours and datetime.x_days from in other languages?
Updated by Greg T almost 7 years ago
- File lang_datetime.pl lang_datetime.pl added
Toshi MARUYAMA wrote:
Where did you pick datetime.x_hours and datetime.x_days from in other languages?
I upload a perl script I think I used for that.
Updated by Go MAEDA over 6 years ago
I will try to understand the expression of numbers and "ago" in Hungarian, to understand the patch.
p.s. My native language is Japanese. It is also agglutinative language.
Updated by Go MAEDA over 6 years ago
- Target version set to Candidate for next major release
Updated by Greg T over 6 years ago
Go MAEDA wrote:
I will try to understand the expression of numbers and "ago" in Hungarian, to understand the patch.
p.s. My native language is Japanese. It is also agglutinative language.
Thanks. I chose a wrong subject that I'm not allowed to modify here. I think I have a better description in Patch #25402 ("stop misusing distance_in_words").
Updated by Greg T about 5 years ago
Will you ever accept my patches, please?
Greg T wrote:
When x_hours and x_days are not used for a reference to a past point in time relative to the present moment then datetime.distance_in_words must not be used as it's impossible to fix the Hungarian/Magyar language files that way.
Go MAEDA wrote:
I will try to understand the expression of numbers and "ago" in Hungarian, to understand the patch.
p.s. My native language is Japanese.
Examples by Google Translates:
en
It happened 8 hours ago.
Session maximum lifetime: 8 hours.
It happened 8 years ago.
Session maximum lifetime: 8 years.
ja (I don't know kanjis/Japanese at all, sorry.)
Sore wa 8-jikan mae ni okorimashita.
Sesshon no saidai yūkōkigen: 8-Jikan.
Sore wa 8-nen mae ni okorimashita.
Sesshon no saidai yūkōkigen: 8-Nen.
hu
8 órával ezelőtt történt.
A munkamenet maximális élettartama: 8 óra.
8 évvel ezelőtt történt.
A munkamenet maximális élettartama: 8 év.