[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Parsing localized human-entered date-times
From:       Lasse Liehu <lasse.liehu () gmail ! com>
Date:       2013-05-01 21:41:28
Message-ID: CAJa6Ua5eGhsQWyoumz=f0XZ+nrPruehbdsDU++sZvdMj_6AMCA () mail ! gmail ! com
[Download RAW message or body]

I also like your idea, Denis.

On 1 May 2013 16:19, Marta Rybczynska <rybczynska@gmail.com> wrote:
> Let's adapt two of your examples: 1 day ago,  1 day, 2 days ago, in 2 days.
> In Polish that's: 1 dzień temu, po 1 dniu, 2 dni temu, po 2 dniach. The
> plural form is different, it is not just a matter of adding an 's' like in
> English or French.

As long as allowing to use a wrong form (for example "1 dniach temu")
is no problem, you can do something like (because the patterns are
regular expressions):

<period type="day">(dzień|dniu|dni|dniach)</period>
<rule pattern="$number$ %period% temu"><sub value="$1" /></rule>

Not sure how bad that is (in Finnish there probably wouldn't be any
confusion about the meaning). Would also appreciate a way to handle
different forms better.

By the way, I found the "period" attribute in "sub", "add" and "set"
tags useful. It allows to make rules like:

<rule pattern="last week"><sub value="1" period="week" /></rule>
<rule pattern="last month"><sub value="1" period="month" /></rule>

which is great in for example Finnish where different noun cases are
used for "week" and "month":
<rule pattern="viime viikolla"><sub value="1" period="week" /></rule>
<rule pattern="viime kuussa"><sub value="1" period="month" /></rule>
(nominative cases would be "viikko" and "kuu"; "viime" is for "last")

Cheers,
Lasse
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic