[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Review Request 118448: Use KCalendarSystem to get the list of the month and day names that shoul
From: "Albert Astals Cid" <aacid () kde ! org>
Date: 2014-08-17 20:24:38
Message-ID: 20140817202438.26013.53405 () probe ! kde ! org
[Download RAW message or body]
--===============9066215191462964109==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118448/#review64691
-----------------------------------------------------------
To me it looks reasonable. I'll let the final decision to Vishesh.
- Albert Astals Cid
On ago. 17, 2014, 11:34 a.m., Denis Steckelmacher wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118448/
> -----------------------------------------------------------
>
> (Updated ago. 17, 2014, 11:34 a.m.)
>
>
> Review request for Baloo, Localization and Translation (l10n) and Alexander \
> Potashev.
>
> Repository: baloo
>
>
> Description
> -------
>
> The query parser made the erroneous assumption that each language uses at most one \
> calendar system, and therefore used i18nc to translate the month and day names \
> recognized by the parser. This patches changes that and uses the KCalendarSystem of \
> the user to get the month and day names.
> I've written the code by looking at how the gregorian, hebrew and islamic calendars \
> work (these are the three that I somehow understand). The idea is to try to get as \
> many days and months as possible, by incrementing an index until the calendar \
> system returns NULL strings. This works well for days, but monthName() requires a \
> year, that is used by some calendar systems to rename/add months on leap years. I \
> pass the current year, as most of the users will look for dates not too far in the \
> future nor in the past. Is there a mean to get the complete list of month names and \
> their corresponding number, using KCalendarSystem or anything else?
>
> Diffs
> -----
>
> src/queryparser/pass_periodnames.h 1d7d522
> src/queryparser/pass_periodnames.cpp 14fa850
>
> Diff: https://git.reviewboard.kde.org/r/118448/diff/
>
>
> Testing
> -------
>
> The query parser testsuite still passes, and properly gets the name of Gregorian \
> months and days (the tests run using the C locale).
>
> Thanks,
>
> Denis Steckelmacher
>
>
--===============9066215191462964109==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/118448/">https://git.reviewboard.kde.org/r/118448/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">To me \
it looks reasonable. I'll let the final decision to Vishesh.</p></pre> <br />
<p>- Albert Astals Cid</p>
<br />
<p>On agost 17th, 2014, 11:34 a.m. UTC, Denis Steckelmacher wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for Baloo, Localization and Translation (l10n) and Alexander \
Potashev.</div> <div>By Denis Steckelmacher.</div>
<p style="color: grey;"><i>Updated ago. 17, 2014, 11:34 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
baloo
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The query parser made the erroneous assumption that \
each language uses at most one calendar system, and therefore used i18nc to translate \
the month and day names recognized by the parser. This patches changes that and uses \
the KCalendarSystem of the user to get the month and day names.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">I've written the code by looking at how the gregorian, hebrew and islamic \
calendars work (these are the three that I somehow understand). The idea is to try to \
get as many days and months as possible, by incrementing an index until the calendar \
system returns NULL strings. This works well for days, but monthName() requires a \
year, that is used by some calendar systems to rename/add months on leap years. I \
pass the current year, as most of the users will look for dates not too far in the \
future nor in the past. Is there a mean to get the complete list of month names and \
their corresponding number, using KCalendarSystem or anything else?</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The query parser testsuite still passes, and properly \
gets the name of Gregorian months and days (the tests run using the C \
locale).</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/queryparser/pass_periodnames.h <span style="color: \
grey">(1d7d522)</span></li>
<li>src/queryparser/pass_periodnames.cpp <span style="color: \
grey">(14fa850)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118448/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============9066215191462964109==--
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic