[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: Two problems in KPlato
From: Dag Andersen <danders () get2net ! dk>
Date: 2009-02-05 8:37:31
Message-ID: 200902050937.31359.danders () get2net ! dk
[Download RAW message or body]
On Søndag 01 februar 2009 17:05:02 Albert Astals Cid wrote:
> A Diumenge, 1 de febrer de 2009, Yukiko Bando va escriure:
> > Hello,
> >
> > There are two strings that are not displayed properly in KPlato's Work &
> > Vacation editor on my system (KDE 4.2.0 + KOffice 1.9.98.5).
> >
> > 1. kplatomodels.po
> > #: kptcalendarmodel.cpp:771 kptcalendarmodel.cpp:903
> > #, kde-format
> > msgctxt "1=time 2=The number of hours of work duration"
> > msgid "%1, %2 hour"
> > msgid_plural "%1, %2 hours"
> >
> > This string is displayed in tooltip for working days of the week, but
> > always with an error message and "hours" as unit. For exmaple:
> >
> > 10:00, 1 hours(I18N_PLURAL_ARGUMENT_MISSING)
> > 09:00, 7 hours(I18N_PLURAL_ARGUMENT_MISSING)
>
> Dag, this is for you, you are using
>
> i18ncp( "1=time 2=The number of hours of work duration",
> "%1, %2 hour",
> "%1, %2 hours",
> l->formatTime( i->startTime() ),
> l->formatNumber( i->hours() ) );
>
> But this is wrong, i18ncp needs an integer argument to know which plural
> form to call and there both arguments are strings. Changing
> l->formatNumber( i-
>
> >hours() ) to i->hours() won't help either because it's a double, not sure
> > if
>
> you want to have 3.5 hours there or not, if you are ok with integer hours
> consider using qRound( i->hours() ), else i think you have to go with i18nc
> and explain %2 is a non integer number of hours.
Done, and yes it can be fractions of an hour so I changed it to i18nc.
--
Mvh.
Dag Andersen
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" \
content="1" /><style type="text/css">p, li { white-space: pre-wrap; \
}</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; \
font-weight:400; font-style:normal;">On Søndag 01 februar 2009 17:05:02 Albert Astals \
Cid wrote:<br> > A Diumenge, 1 de febrer de 2009, Yukiko Bando va escriure:<br>
> > Hello,<br>
> ><br>
> > There are two strings that are not displayed properly in KPlato's Work \
&<br> > > Vacation editor on my system (KDE 4.2.0 + KOffice 1.9.98.5).<br>
> ><br>
> > 1. kplatomodels.po<br>
> > #: kptcalendarmodel.cpp:771 kptcalendarmodel.cpp:903<br>
> > #, kde-format<br>
> > msgctxt "1=time 2=The number of hours of work duration"<br>
> > msgid "%1, %2 hour"<br>
> > msgid_plural "%1, %2 hours"<br>
> ><br>
> > This string is displayed in tooltip for working days of the week, but<br>
> > always with an error message and "hours" as unit. For exmaple:<br>
> ><br>
> > 10:00, 1 hours(I18N_PLURAL_ARGUMENT_MISSING)<br>
> > 09:00, 7 hours(I18N_PLURAL_ARGUMENT_MISSING)<br>
><br>
> Dag, this is for you, you are using<br>
><br>
> i18ncp( "1=time 2=The number of hours of work duration",<br>
> "%1, %2 hour",<br>
> "%1, %2 hours",<br>
> l->formatTime( i->startTime() ),<br>
> l->formatNumber( i->hours() ) );<br>
><br>
> But this is wrong, i18ncp needs an integer argument to know which plural<br>
> form to call and there both arguments are strings. Changing<br>
> l->formatNumber( i-<br>
><br>
> >hours() ) to i->hours() won't help either because it's a double, not \
sure<br> > > if<br>
><br>
> you want to have 3.5 hours there or not, if you are ok with integer hours<br>
> consider using qRound( i->hours() ), else i think you have to go with \
i18nc<br> > and explain %2 is a non integer number of hours.<br>
Done, and yes it can be fractions of an hour so I changed it to i18nc.<br>
-- <br>
Mvh.<br>
Dag Andersen</p></body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic