[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: kolourpaint
From: Adriaan de Groot <adridg () cs ! kun ! nl>
Date: 2004-07-23 13:13:29
Message-ID: Pine.GSO.4.44.0407231509450.13551-200000 () odin ! cs ! kun ! nl
[Download RAW message or body]
On Fri, 23 Jul 2004, Erik K. Pedersen wrote:
> There is a string
> %1 the %2 to %3x%4
>
> I don't think something like that can be translated.
The attached patch splits up the constructed string into a bunch of
others, giving the translators actually hardly any _more_ strings to
translate, just longer ones with the relevant verbs already substituted
in. OK to commit (and break the freeze!?) ?
--
Adriaan de Groot adridg@cs.kun.nl Kamer A6020 024-3652272
GPG Key Fingerprint 934E 31AA 80A7 723F 54F9 50ED 76AC EE01 FEA2 A3FE
http://www.cs.kun.nl/~adridg/research/
["kolourpaint.diff" (TEXT/PLAIN)]
Index: ./tools/kptoolresizescale.cpp
===================================================================
RCS file: /home/kde/kdegraphics/kolourpaint/tools/kptoolresizescale.cpp,v
retrieving revision 1.27
diff -u -3 -p -r1.27 kptoolresizescale.cpp
--- ./tools/kptoolresizescale.cpp 19 Jul 2004 03:25:57 -0000 1.27
+++ ./tools/kptoolresizescale.cpp 23 Jul 2004 13:08:27 -0000
@@ -1069,74 +1069,117 @@ bool kpToolResizeScaleDialog::isNoOp ()
// private slot virtual [base KDialogBase]
void kpToolResizeScaleDialog::slotOk ()
{
- QString selOrImageLowerCase, selOrImageTitleCase;
+ enum { eText, eSelection, eImage } actionTarget = eText;
if (actOnSelection ())
{
if (selection ()->isText ())
{
- selOrImageLowerCase = i18n ("text box");
- selOrImageTitleCase = i18n ("Text Box");
+ actionTarget = eText;
}
else
{
- selOrImageLowerCase = i18n ("selection");
- selOrImageTitleCase = i18n ("Selection");
+ actionTarget = eSelection;
}
}
else
{
- selOrImageLowerCase = i18n ("image");
- selOrImageTitleCase = i18n ("Image");
+ actionTarget = eImage;
}
-
- QString operationIngTitleCase, operationLowerCase;
+ QString operation, question;
QString continueButtonText, caption;
switch (type ())
{
default:
case kpToolResizeScaleCommand::Resize:
- operationIngTitleCase = i18n ("Resizing");
- operationLowerCase = i18n ("resize");
- continueButtonText = i18n ("R&esize %1").arg (selOrImageTitleCase);
- caption = i18n ("Resize %1?").arg (selOrImageTitleCase);
+ switch(actionTarget)
+ {
+ case eText :
+ operation = i18n ("Resizing the text box to %1x%2");
+ continueButtonText = i18n ("R&esize Text Box");
+ caption = i18n ("Resize Text Box?");
+ question = i18n ("Are you sure you want to resize the text box?");
+ break;
+ case eImage :
+ operation = i18n("Resizing the image to %1x%2");
+ continueButtonText = i18n ("R&esize Image");
+ caption = i18n ("Resize Image?");
+ question = i18n ("Are you sure you want to resize the image?");
+ break;
+ case eSelection :
+ operation = i18n("Resizing the selection to %1x%2");
+ continueButtonText = i18n ("R&esize Selection");
+ caption = i18n ("Resize Selection?");
+ question = i18n ("Are you sure you want to resize the selection?");
+ break;
+ }
break;
case kpToolResizeScaleCommand::Scale:
- operationIngTitleCase = i18n ("Scaling");
- operationLowerCase = i18n ("scale");
- continueButtonText = i18n ("Scal&e %1").arg (selOrImageTitleCase);
- caption = i18n ("Scale %1?").arg (selOrImageTitleCase);
+ switch(actionTarget)
+ {
+ case eText :
+ operation = i18n ("Scaling the text box to %1x%2");
+ continueButtonText = i18n ("Scal&e Text Box");
+ caption = i18n ("Scale Text Box?");
+ question = i18n ("Are you sure you want to scale the text box?");
+ break;
+ case eImage :
+ operation = i18n("Scaling the image to %1x%2");
+ continueButtonText = i18n ("Scal&e Image");
+ caption = i18n ("Scale Image?");
+ question = i18n ("Are you sure you want to scale the image?");
+ break;
+ case eSelection :
+ operation = i18n("Scaling the selection to %1x%2");
+ continueButtonText = i18n ("Scal&e Selection");
+ caption = i18n ("Scale Selection?");
+ question = i18n ("Are you sure you want to scale the selection?");
+ break;
+ }
break;
case kpToolResizeScaleCommand::SmoothScale:
- operationIngTitleCase = i18n ("Smooth Scaling");
- operationLowerCase = i18n ("smooth scale");
- continueButtonText = i18n ("Smooth Scal&e %1").arg (selOrImageTitleCase);
- caption = i18n ("Smooth Scale %1?").arg (selOrImageTitleCase);
+ switch(actionTarget)
+ {
+ case eText :
+ operation = i18n ("Smooth Scaling the text box to %1x%2");
+ continueButtonText = i18n ("Smooth Scal&e Text Box");
+ caption = i18n ("Smooth Scale Text Box?");
+ question = i18n ("Are you sure you want to smooth scale the text box?");
+ break;
+ case eImage :
+ operation = i18n("Smooth Scaling the image to %1x%2");
+ continueButtonText = i18n ("Smooth Scal&e Image");
+ caption = i18n ("Smooth Scale Image?");
+ question = i18n ("Are you sure you want to smooth scale the image?");
+ break;
+ case eSelection :
+ operation = i18n("Smooth Scaling the selection to %1x%2");
+ continueButtonText = i18n ("Smooth Scal&e Selection");
+ caption = i18n ("Smooth Scale Selection?");
+ question = i18n ("Are you sure you want to smooth scale the selection?");
+ break;
+ }
break;
}
+ operation = operation.arg (imageWidth ()).arg (imageHeight ());
if (kpTool::warnIfBigImageSize (originalWidth (),
originalHeight (),
imageWidth (), imageHeight (),
- i18n ("<qt><p>%1 the %2 to"
- " %3x%4 may take a substantial amount of memory."
+ i18n ("<qt><p>%1."
+ " This may take a substantial amount of memory."
" This can reduce system"
" responsiveness and cause other application resource"
" problems.</p>"
- "<p>Are you sure want to %5 the"
- " %6?</p></qt>")
- .arg (operationIngTitleCase)
- .arg (selOrImageLowerCase)
- .arg (imageWidth ())
- .arg (imageHeight ())
- .arg (operationLowerCase)
- .arg (selOrImageLowerCase),
+ "<p>%2</p></qt>")
+ .arg(operation)
+ .arg(question),
caption,
continueButtonText,
this))
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic