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

List:       kde-commits
Subject:    Re: koffice/libs/main
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2009-04-12 21:52:35
Message-ID: 200904122352.36326.tsdgeos () terra ! es
[Download RAW message or body]

A Sunday, 12 of April de 2009, Thomas Zander va escriure:
> On Sunday 12 April 2009 20:58:04 Albert Astals Cid wrote:
> > SVN commit 952881 by aacid:
> >
> > I18N_NOOP2 is evil and should be used with extreme care, otherwise you
> > end up with untranslatable messages CCMAIL: js@iidea.pl
> >
> >
> >  M  +31 -31    KoPageFormat.cpp
> >
> > --- trunk/koffice/libs/main/KoPageFormat.cpp #952880:952881
> > @@ -56,35 +56,35 @@
> >  // - the comments "should be..." indicates the exact values if the inch
> > sizes would be multiplied by 25.4 mm/inch
> >
> >  const PageFormatInfo pageFormatInfo[] = {
> > -    { KoPageFormat::IsoA3Size,       QPrinter::A3,        "A3",
> > I18N_NOOP("ISO A3"),       297.0,  420.0 }, -    {
> > KoPageFormat::IsoA4Size, QPrinter::A4,        "A4",        I18N_NOOP("ISO
> > A4"),       210.0, 297.0 },
> >+    { KoPageFormat::IsoA3Size,       QPrinter::A3,        "A3",
> > I18N_NOOP2("Page size", "ISO A3"),       297.0,  420.0 },
>
> The commit message doesn't really explain what the commit is about then ;) 
> It actually confused me since you introduce the noop2...

Well, if you are curious about why this is a fix read noop2 documentation [1], 
specifically the part that says

Warning:
You need to call i18nc(context, stringVar) later on, not just i18n(stringVar).

Previous code had 1 NOOP2 and the others were NOOP so then when using the 
NOOPed text it was doing i18n() and thus the NOOP2ed text was essentially 
untranslatable. Now all texts are NOOP2ed so now it correctly calls i18nc()

>
> This code has not been touched for many years (the cc is wrong), but to be
> honest I'm just curious whats the reason for this change. ;)

The CC is not wrong, jaroslaw is who introduced the noop2, so i'm ccing him.

[1] http://api.kde.org/4.x-api/kdelibs-
apidocs/kdecore/html/klocalizedstring_8h.html#d0232dcb6331dcfca1ad321374e3abae
[prev in list] [next in list] [prev in thread] [next in thread] 

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