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

List:       kde-i18n-doc
Subject:    branches/KDE/4.6/kdeutils/ark
From:       Raphael Kubo da Costa <kubito () gmail ! com>
Date:       2010-12-27 17:38:55
Message-ID: 20101227173855.5FE94AC8AD () svn ! kde ! org
[Download RAW message or body]

SVN commit 1209629 by rkcosta:

Fix semantic tags usage, we always need i18nc().

Fix the contexts and semantic tags introduced in r1192370, r1186944,
r1186943 and 1087412.

In some places, I added some tags such as "<filename></filename>", but
did not replace i18n() with i18nc().

Backport of r1209192, ack'ed on the kde-i18n-doc mailing list.

CCMAIL: kde-i18n-doc@kde.org



 M  +2 -2      kerfuffle/cliinterface.cpp  
 M  +4 -4      kerfuffle/extractiondialog.cpp  
 M  +1 -1      kerfuffle/queries.cpp  
 M  +8 -8      part/part.cpp  
 M  +6 -6      plugins/karchiveplugin/karchiveplugin.cpp  
 M  +8 -8      plugins/libarchive/libarchivehandler.cpp  
 M  +3 -3      plugins/libsinglefileplugin/singlefileplugin.cpp  


--- branches/KDE/4.6/kdeutils/ark/kerfuffle/cliinterface.cpp #1209628:1209629
@@ -529,12 +529,12 @@
     m_program = KStandardDirs::findExe(program);
 
     if (m_program.isEmpty()) {
-        error(i18n("Failed to locate program <filename>%1</filename> in PATH.", \
program)); +        error(i18nc("@info", "Failed to locate program \
<filename>%1</filename> in PATH.", program));  return false;
     }
 
     if (!createProcess()) {
-        error(i18n("Found program <filename>%1</filename>, but failed to initialize \
the process.", program)); +        error(i18nc("@info", "Found program \
<filename>%1</filename>, but failed to initialize the process.", program));  return \
false;  }
 
--- branches/KDE/4.6/kdeutils/ark/kerfuffle/extractiondialog.cpp #1209628:1209629
@@ -105,7 +105,7 @@
 
         if (KIO::NetAccess::exists(pathWithSubfolder, KIO::NetAccess::SourceSide, \
0)) {  if (QFileInfo(pathWithSubfolder).isDir()) {
-                int overwrite = KMessageBox::questionYesNo(0, i18n("The folder \
<filename>%1</filename> already exists. Are you sure you want to extract here?", \
pathWithSubfolder), i18n("Folder exists"), KGuiItem(i18n("Extract here")), \
KGuiItem(i18n("Cancel"))); +                int overwrite = \
KMessageBox::questionYesNo(0, i18nc("@info", "The folder <filename>%1</filename> \
already exists. Are you sure you want to extract here?", pathWithSubfolder), \
i18n("Folder exists"), KGuiItem(i18n("Extract here")), KGuiItem(i18n("Cancel")));  
                 if (overwrite == KMessageBox::No) {
                     //TODO: choosing retry should also be possible, so one does
@@ -114,13 +114,13 @@
                 }
             } else {
                 KMessageBox::detailedError(0,
-                                           i18n("The folder <filename>%1</filename> \
                could not be created.", subfolder()),
-                                           i18n("<filename>%1</filename> already \
exists, but is not a folder.", subfolder())); +                                       \
i18nc("@info", "The folder <filename>%1</filename> could not be created.", \
subfolder()), +                                           i18nc("@info", \
"<filename>%1</filename> already exists, but is not a folder.", subfolder()));  \
return;  }
         } else if (!KIO::NetAccess::mkdir(pathWithSubfolder, 0)) {
             KMessageBox::detailedError(0,
-                                       i18n("The folder <filename>%1</filename> \
could not be created.", subfolder()), +                                       \
i18nc("@info", "The folder <filename>%1</filename> could not be created.", \
                subfolder()),
                                        i18n("Please check your permissions to create \
it."));  return;
         }
--- branches/KDE/4.6/kdeutils/ark/kerfuffle/queries.cpp #1209628:1209629
@@ -175,7 +175,7 @@
     QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
 
     QWeakPointer<KPasswordDialog> dlg = new KPasswordDialog;
-    dlg.data()->setPrompt(i18n("The archive <filename>%1</filename> is password \
protected. Please enter the password to extract the file.", \
m_data.value(QLatin1String( "archiveFilename" )).toString())); +    \
dlg.data()->setPrompt(i18nc("@info", "The archive <filename>%1</filename> is password \
protected. Please enter the password to extract the file.", \
m_data.value(QLatin1String( "archiveFilename" )).toString()));  
     if (m_data.value(QLatin1String("incorrectTryAgain")).toBool()) {
         dlg.data()->showErrorMessage(i18n("Incorrect password, please try again."), \
                KPasswordDialog::PasswordError);
--- branches/KDE/4.6/kdeutils/ark/part/part.cpp #1209628:1209629
@@ -378,7 +378,7 @@
 
     if (creatingNewArchive) {
         if (localFileInfo.exists()) {
-            int overwrite =  KMessageBox::questionYesNo(NULL, i18n("The archive \
<filename>%1</filename> already exists. Would you like to open it instead?", \
localFile), i18nc("@title:window", "File Exists"), KGuiItem(i18n("Open File")), \
KStandardGuiItem::cancel()); +            int overwrite =  \
KMessageBox::questionYesNo(NULL, i18nc("@info", "The archive <filename>%1</filename> \
already exists. Would you like to open it instead?", localFile), \
i18nc("@title:window", "File Exists"), KGuiItem(i18n("Open File")), \
KStandardGuiItem::cancel());  
             if (overwrite == KMessageBox::No) {
                 return false;
@@ -419,11 +419,11 @@
 
         if (creatingNewArchive) {
             item = KInputDialog::getItem(i18nc("@title:window", "Invalid Archive \
                Type"),
-                                         i18n("Ark cannot create archives of the \
type you have chosen.<nl/><nl/>Please choose another archive type below."), +         \
i18nc("@info", "Ark cannot create archives of the type you have \
chosen.<nl/><nl/>Please choose another archive type below."),  mimeComments, 0, \
false, &ok);  } else {
             item = KInputDialog::getItem(i18nc("@title:window", "Unable to Determine \
                Archive Type"),
-                                         i18n("Ark was unable to determine the \
archive type of the filename.<nl/><nl/>Please choose the correct archive type \
below."), +                                         i18nc("@info", "Ark was unable to \
determine the archive type of the filename.<nl/><nl/>Please choose the correct \
archive type below."),  mimeComments,
                                          0,
                                          false,
@@ -438,7 +438,7 @@
     }
 
     if (!archive) {
-        KMessageBox::sorry(NULL, i18n("Ark was not able to open the archive \
<filename>%1</filename>. No plugin capable of handling the file was found.", \
localFile), i18nc("@title:window", "Error Opening Archive")); +        \
KMessageBox::sorry(NULL, i18nc("@info", "Ark was not able to open the archive \
<filename>%1</filename>. No plugin capable of handling the file was found.", \
localFile), i18nc("@title:window", "Error Opening Archive"));  return false;
     }
 
@@ -474,7 +474,7 @@
 
     if (job->error()) {
         if (arguments().metaData()[QLatin1String( "createNewArchive" )] != \
                QLatin1String( "true" )) {
-            KMessageBox::sorry(NULL, i18n("Loading the archive \
<filename>%1</filename> failed with the following error: <message>%2</message>", \
localFilePath(), job->errorText()), i18nc("@title:window", "Error Opening Archive")); \
+            KMessageBox::sorry(NULL, i18nc("@info", "Loading the archive \
<filename>%1</filename> failed with the following error: <message>%2</message>", \
localFilePath(), job->errorText()), i18nc("@title:window", "Error Opening Archive")); \
}  }
 
@@ -826,7 +826,7 @@
     if ((saveUrl.isValid()) && (!saveUrl.isEmpty())) {
         if (KIO::NetAccess::exists(saveUrl, KIO::NetAccess::DestinationSide, \
widget())) {  int overwrite = KMessageBox::warningContinueCancel(widget(),
-                                                               i18n("An archive \
named <filename>%1</filename> already exists. Are you sure you want to overwrite \
it?", saveUrl.fileName()), +                                                          \
i18nc("@info", "An archive named <filename>%1</filename> already exists. Are you sure \
you want to overwrite it?", saveUrl.fileName()),  QString(),
                                                                \
KStandardGuiItem::overwrite());  
@@ -840,7 +840,7 @@
         if (!QFile::exists(localFilePath())) {
             if (url().isLocalFile()) {
                 KMessageBox::error(widget(),
-                                   i18n("The archive <filename>%1</filename> cannot \
be copied to the specified location. The archive does not exist anymore.", \
localFilePath())); +                                   i18nc("@info", "The archive \
<filename>%1</filename> cannot be copied to the specified location. The archive does \
not exist anymore.", localFilePath()));  
                 return;
             } else {
@@ -852,7 +852,7 @@
 
         if (!KIO::NetAccess::synchronousRun(copyJob, widget())) {
             KMessageBox::error(widget(),
-                               i18n("The archive could not be saved as \
<filename>%1</filename>. Try saving it to another location.", saveUrl.pathOrUrl())); \
+                               i18nc("@info", "The archive could not be saved as \
<filename>%1</filename>. Try saving it to another location.", saveUrl.pathOrUrl()));  \
}  }
 }
--- branches/KDE/4.6/kdeutils/ark/plugins/karchiveplugin/karchiveplugin.cpp \
#1209628:1209629 @@ -61,7 +61,7 @@
 {
     kDebug();
     if (!archive()->isOpen() && !archive()->open(QIODevice::ReadOnly)) {
-        error(i18n("Could not open the archive <filename>%1</filename> for reading", \
filename())); +        error(i18nc("@info", "Could not open the archive \
<filename>%1</filename> for reading", filename()));  return false;
     } else {
         return browseArchive(archive());
@@ -71,7 +71,7 @@
 bool KArchiveInterface::copyFiles(const QList<QVariant> & files, const QString & \
destinationDirectory, bool preservePaths)  {
     if (!archive()->isOpen() && !archive()->open(QIODevice::ReadOnly)) {
-        error(i18n("Could not open the archive <filename>%1</filename> for reading", \
filename())); +        error(i18nc("@info", "Could not open the archive \
<filename>%1</filename> for reading", filename()));  return false;
     }
 
@@ -79,7 +79,7 @@
         QString realDestination = destinationDirectory;
         const KArchiveEntry *archiveEntry = \
archive()->directory()->entry(file.toString());  if (!archiveEntry) {
-            error(i18n("File <filename>%1</filename> not found in the archive" , \
file.toString())); +            error(i18nc("@info", "File <filename>%1</filename> \
not found in the archive" , file.toString()));  return false;
         }
 
@@ -148,7 +148,7 @@
         archive()->close();
     }
     if (!archive()->open(QIODevice::ReadWrite)) {
-        error(i18n("Could not open the archive <filename>%1</filename> for \
writing.", filename())); +        error(i18nc("@info", "Could not open the archive \
<filename>%1</filename> for writing.", filename()));  return false;
     }
 
@@ -165,7 +165,7 @@
                 createEntryFor(entry, "");
                 processDir((KArchiveDirectory*) \
archive()->directory()->entry(fi.fileName()), fi.fileName());  } else {
-                error(i18n("Could not add the directory <filename>%1</filename> to \
the archive", path)); +                error(i18nc("@info", "Could not add the \
directory <filename>%1</filename> to the archive", path));  return false;
             }
         } else {
@@ -173,7 +173,7 @@
                 const KArchiveEntry *entry = \
archive()->directory()->entry(fi.fileName());  createEntryFor(entry, "");
             } else {
-                error(i18n("Could not add the file <filename>%1</filename> to the \
archive.", path)); +                error(i18nc("@info", "Could not add the file \
<filename>%1</filename> to the archive.", path));  return false;
             }
         }
--- branches/KDE/4.6/kdeutils/ark/plugins/libarchive/libarchivehandler.cpp \
#1209628:1209629 @@ -99,7 +99,7 @@
     }
 
     if (archive_read_open_filename(arch_reader.data(), \
                QFile::encodeName(filename()), 10240) != ARCHIVE_OK) {
-        error(i18n("Could not open the archive <filename>%1</filename>, libarchive \
cannot handle it.", +        error(i18nc("@info", "Could not open the archive \
<filename>%1</filename>, libarchive cannot handle it.",  filename()), QString());
         return false;
     }
@@ -122,7 +122,7 @@
     }
 
     if (result != ARCHIVE_EOF) {
-        error(i18n("The archive reading failed with the following error: \
<message>%1</message>", +        error(i18nc("@info", "The archive reading failed \
                with the following error: <message>%1</message>",
                    QLatin1String( archive_error_string(arch_reader.data()))) );
         return false;
     }
@@ -156,7 +156,7 @@
     }
 
     if (archive_read_open_filename(arch.data(), QFile::encodeName(filename()), \
                10240) != ARCHIVE_OK) {
-        error(i18n("Could not open the archive <filename>%1</filename>, libarchive \
cannot handle it.", +        error(i18nc("@info", "Could not open the archive \
<filename>%1</filename>, libarchive cannot handle it.",  filename()));
         return false;
     }
@@ -391,7 +391,7 @@
         }
 
         if (ret != ARCHIVE_OK) {
-            error(i18n("Setting the compression method failed with the following \
error: <message>%1</message>", +            error(i18nc("@info", "Setting the \
                compression method failed with the following error: \
                <message>%1</message>",
                        QLatin1String(archive_error_string(arch_writer.data()))));
 
             return false;
@@ -423,14 +423,14 @@
         }
 
         if (ret != ARCHIVE_OK) {
-            error(i18n("Setting the compression method failed with the following \
error: <message>%1</message>", \
QLatin1String(archive_error_string(arch_writer.data())))); +            \
error(i18nc("@info", "Setting the compression method failed with the following error: \
<message>%1</message>", QLatin1String(archive_error_string(arch_writer.data()))));  \
return false;  }
     }
 
     ret = archive_write_open_filename(arch_writer.data(), \
QFile::encodeName(tempFilename));  if (ret != ARCHIVE_OK) {
-        error(i18n("Opening the archive for writing failed with the following error: \
<message>%1</message>", QLatin1String(archive_error_string(arch_writer.data())))); +  \
error(i18nc("@info", "Opening the archive for writing failed with the following \
error: <message>%1</message>", \
QLatin1String(archive_error_string(arch_writer.data()))));  return false;
     }
 
@@ -568,13 +568,13 @@
     }
 
     if (ret != ARCHIVE_OK) {
-        error(i18n("Setting the compression method failed with the following error: \
<message>%1</message>", QLatin1String(archive_error_string(arch_writer.data())))); +  \
error(i18nc("@info", "Setting the compression method failed with the following error: \
<message>%1</message>", QLatin1String(archive_error_string(arch_writer.data()))));  \
return false;  }
 
     ret = archive_write_open_filename(arch_writer.data(), \
QFile::encodeName(tempFilename));  if (ret != ARCHIVE_OK) {
-        error(i18n("Opening the archive for writing failed with the following error: \
<message>%1</message>", QLatin1String(archive_error_string(arch_writer.data())))); +  \
error(i18nc("@info", "Opening the archive for writing failed with the following \
error: <message>%1</message>", \
QLatin1String(archive_error_string(arch_writer.data()))));  return false;
     }
 
--- branches/KDE/4.6/kdeutils/ark/plugins/libsinglefileplugin/singlefileplugin.cpp \
#1209628:1209629 @@ -66,7 +66,7 @@
     QFile outputFile(outputFileName);
     if (!outputFile.open(QIODevice::WriteOnly)) {
         kDebug() << "Failed to open output file" << outputFile.errorString();
-        error(i18n("Ark could not extract <filename>%1</filename>.", \
outputFile.fileName())); +        error(i18nc("@info", "Ark could not extract \
<filename>%1</filename>.", outputFile.fileName()));  
         return false;
     }
@@ -74,7 +74,7 @@
     QIODevice *device = KFilterDev::deviceForFile(filename(), m_mimeType, false);
     if (!device) {
         kDebug() << "Could not create KFilterDev";
-        error(i18n("Ark could not open <filename>%1</filename> for extraction.", \
filename())); +        error(i18nc("@info", "Ark could not open \
<filename>%1</filename> for extraction.", filename()));  
         return false;
     }
@@ -88,7 +88,7 @@
         bytesRead = device->read(dataChunk.data(), dataChunk.size());
 
         if (bytesRead == -1) {
-            error(i18n("There was an error while reading <filename>%1</filename> \
during extraction.", filename())); +            error(i18nc("@info", "There was an \
error while reading <filename>%1</filename> during extraction.", filename()));  \
break;  } else if (bytesRead == 0) {
             break;


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

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