https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292017-02-21T13:59:05ZRedmineRedmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=768132017-02-21T13:59:05ZGreg T
<ul></ul><p><strong>Elements of datetime.distance_in_words should not be used outside of the method distance_of_time_in_words. Please duplicate the <em>x_days</em> and <em>x_hours</em> strings outside of the <em>distance_in_words</em> array in the language files and use those where needed.</strong></p>
<p>Does it help if I attach a patch?</p>
<p>x_days is currently:<br /><pre>
one: '1 napja'
other: '%{count} napja'</pre>in hu.yml. That works for e.g.<br /><pre>label_added_time_by: "%{author} adta hozzá %{age}".</pre>It makes no sense in other contexts.</p>
<p>While x_hours is<br /><pre>
one: "1 óra"
other: "%{count} óra"
</pre>which is not correct for the current label_added_time_by (which needs <em>órája</em>), but is OK in some other places.</p>
<ul>
<li>In issue_relation.rb<br /><pre>
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
</pre>needs the root word <em>nap</em> instead of datetime.distance_in_words.x_days.</li>
</ul>
In settings_helper.rb
<ul>
<li>session_lifetime_options<br />needs the root words (<em>óra</em> and <em>nap</em>) instead of datetime.distance_in_words.x_hours and datetime.distance_in_words.x_days;</li>
</ul>
<ul>
<li>session_timeout_options<br />needs the root word <em>óra</em> instead of datetime.distance_in_words.x_hours.</li>
</ul>
In _authentication.html.erb
<ul>
<li>autologin<br />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 <em>nap</em> AND setting_autologin needs to be changed to <em>Automatikus bejelentkezés érvényességi ideje</em> (... ~ expiration time).</li>
</ul>
<ul>
<li>password_max_age<br />Instead of datetime.distance_in_words.x_days, we need the root word <em>nap</em>.</li>
</ul> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=773852017-03-21T10:15:10ZToshi MARUYAMA
<ul><li><strong>Category</strong> changed from <i>I18n</i> to <i>Translations</i></li></ul> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=773862017-03-21T10:17:38ZToshi MARUYAMA
<ul></ul><p>In Russian <a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/3.3.2/config/locales/ru.yml#L124">source:tags/3.3.2/config/locales/ru.yml#L124</a></p>
<pre><code class="yaml syntaxhl"> <span class="na">x_days</span><span class="pi">:</span>
<span class="na">one</span><span class="pi">:</span> <span class="s2">"</span><span class="s">%{count}</span><span class="nv"> </span><span class="s">день"</span>
<span class="na">few</span><span class="pi">:</span> <span class="s2">"</span><span class="s">%{count}</span><span class="nv"> </span><span class="s">дня"</span>
<span class="na">many</span><span class="pi">:</span> <span class="s2">"</span><span class="s">%{count}</span><span class="nv"> </span><span class="s">дней"</span>
<span class="na">other</span><span class="pi">:</span> <span class="s2">"</span><span class="s">%{count}</span><span class="nv"> </span><span class="s">дня"</span>
</code></pre> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=773892017-03-21T11:53:05ZGreg T
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>In Russian <a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/3.3.2/config/locales/ru.yml#L124">source:tags/3.3.2/config/locales/ru.yml#L124</a></p>
</blockquote>
<p><del>What do you mean by that note?</del><br />I've found what you mean <a href="http://stackoverflow.com/questions/6166064/i18n-pluralization#26979816" class="external">here.</a><br />That's a whole different problem. Hungarian uses the same singular nouns after any number.</p>
<p>Alas, I cannot change the subject, but this issue is about the misusing of distance_in_words array. See note-1.</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=773902017-03-21T12:15:49ZToshi MARUYAMA
<ul></ul><p>"distance_in_words" is Rails core feature.</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=773922017-03-21T12:25:06ZGreg T
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>"distance_in_words" is Rails core feature.</p>
</blockquote>
<p>So? Have you read my note-1?<br />"Elements of datetime.distance_in_words should not be used outside of the method distance_of_time_in_words."</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=774142017-03-22T04:42:24ZToshi MARUYAMA
<ul></ul><p>Greg T wrote:</p>
<blockquote>
<p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>"distance_in_words" is Rails core feature.</p>
</blockquote>
<p>So? Have you read my note-1?<br />"Elements of datetime.distance_in_words should not be used outside of the method distance_of_time_in_words."</p>
</blockquote>
<p>Please post a patch because I cannot understand.</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=774312017-03-22T12:28:01ZGreg T
<ul></ul><p>See issue <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: stop misusing distance_in_words (Closed)" href="https://www.redmine.org/issues/25402">#25402</a> with my patch.</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=774372017-03-22T16:21:41ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-3 status-5 priority-4 priority-default closed" href="/issues/25402">Patch #25402</a>: stop misusing distance_in_words</i> added</li></ul> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=774542017-03-23T09:34:16ZGreg T
<ul><li><strong>File</strong> <a href="/attachments/17976">distance_in_words.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/17976/distance_in_words.patch">distance_in_words.patch</a> added</li></ul> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=831852018-01-17T11:06:29ZGreg T
<ul></ul><p>Would you accept my patch, please?</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=831922018-01-17T12:37:18ZToshi MARUYAMA
<ul></ul><p>Where did you pick datetime.x_hours and datetime.x_days from in other languages?</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=831992018-01-17T14:37:04ZGreg T
<ul><li><strong>File</strong> <a href="/attachments/19928">lang_datetime.pl</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/19928/lang_datetime.pl">lang_datetime.pl</a> added</li></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>Where did you pick datetime.x_hours and datetime.x_days from in other languages?</p>
</blockquote>
<p>I upload a perl script I think I used for that.</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=851362018-05-22T09:01:01ZGreg T
<ul></ul><p>Would you accept my patch, please?</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=851402018-05-22T10:04:06ZGo MAEDA
<ul></ul><p>I will try to understand the expression of numbers and "ago" in Hungarian, to understand the patch.</p>
<p>p.s. My native language is Japanese. It is also agglutinative language.</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=851412018-05-22T10:04:38ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=851462018-05-22T10:54:53ZGreg T
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>I will try to understand the expression of numbers and "ago" in Hungarian, to understand the patch.</p>
<p>p.s. My native language is Japanese. It is also agglutinative language.</p>
</blockquote>
<p>Thanks. I chose a wrong subject that I'm not allowed to modify here. I think I have a better description in Patch <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: stop misusing distance_in_words (Closed)" href="https://www.redmine.org/issues/25402">#25402</a> ("stop misusing <strong>distance</strong>_in_words").</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=876472018-09-28T10:36:07ZGreg T
<ul></ul><p>How can I help?</p> Redmine - Defect #25130: support of agglutinative languages like Hungarian/Magyarhttps://www.redmine.org/issues/25130?journal_id=944482019-10-21T11:57:44ZGreg T
<ul></ul><p>Will you ever accept my patches, please?</p>
<p>Greg T wrote:</p>
<blockquote>
<p>When <em>x_hours</em> and <em>x_days</em> are <strong>not</strong> 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.</p>
</blockquote>
<p>Go MAEDA wrote:</p>
<blockquote>
<p>I will try to understand the expression of numbers and "ago" in Hungarian, to understand the patch.<br />p.s. My native language is Japanese.</p>
</blockquote>
<p>Examples by Google Translates:<br /><strong>en</strong><br />It happened <strong>8 hours</strong> ago.<br />Session maximum lifetime: <strong>8 hours</strong>.<br />It happened <strong>8 years</strong> ago.<br />Session maximum lifetime: <strong>8 years</strong>.</p>
<p><strong>ja</strong> (I don't know kanjis/Japanese at all, sorry.)<br />Sore wa <strong>8-jikan</strong> mae ni okorimashita.<br />Sesshon no saidai yūkōkigen: <strong>8-Jikan</strong>.<br />Sore wa <strong>8-nen</strong> mae ni okorimashita.<br />Sesshon no saidai yūkōkigen: <strong>8-Nen</strong>.</p>
<p><strong>hu</strong><br /><strong>8 órával</strong> ezelőtt történt.<br />A munkamenet maximális élettartama: <strong>8 óra</strong>.<br /><strong>8 évvel</strong> ezelőtt történt.<br />A munkamenet maximális élettartama: <strong>8 év</strong>.</p>