branch:
details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgrepo/h/hu/hugin/hugin/rev/4d19644b2947
changeset: 4794:4d19644b2947
user: Yuval Levy <yuv@...>
date: Sun Jan 02 16:01:03 2011 -0500
description:
made strings inside src/hugin_base/nona translatable
diffstat:
src/hugin_base/nona/ImageRemapper.h | 9 +++++----
src/hugin_base/nona/RemappedPanoImage.h | 7 ++++---
src/hugin_base/nona/Stitcher.h | 23 ++++++++++++-----------
src/hugin_base/nona/Stitcher1.cpp | 2 +-
src/hugin_base/nona/Stitcher2.cpp | 2 +-
src/hugin_base/nona/Stitcher3.cpp | 2 +-
src/hugin_base/nona/Stitcher4.cpp | 2 +-
7 files changed, 25 insertions(+), 22 deletions(-)
diffs (230 lines):
diff -r a61b76929a1f -r 4d19644b2947 src/hugin_base/nona/ImageRemapper.h
--- a/src/hugin_base/nona/ImageRemapper.h Sun Jan 02 15:59:46 2011 -0500
+++ b/src/hugin_base/nona/ImageRemapper.h Sun Jan 02 16:01:03 2011 -0500
@@ -31,6 +31,7 @@
#include <panodata/PanoramaData.h>
#include <nona/RemappedPanoImage.h>
+#include <hugin_utils/utils.h>
namespace HuginBase {
namespace Nona {
@@ -209,7 +210,7 @@
SrcPanoImage src = pano.getSrcImage(imgNr);
// import the image
- progress.setMessage(std::string("loading ") + hugin_utils::stripPath(img.getFilename()));
+ progress.setMessage(std::string(_X("loading")) + std::string(" ") + hugin_utils::stripPath(img.getFilename()));
if (alpha) {
vigra::importImageAlpha(info, vigra::destImage(srcImg),
@@ -232,10 +233,10 @@
if (img.getVigCorrMode() & SrcPanoImage::VIGCORR_FLATFIELD) {
// load flatfield image.
vigra::ImageImportInfo ffInfo(img.getFlatfieldFilename().c_str());
- progress.setMessage(std::string("flatfield vignetting correction ") + hugin_utils::stripPath(img.getFilename()));
+ progress.setMessage(std::string(_X("flatfield vignetting correction")) + std::string(" ") + hugin_utils::stripPath(img.getFilename()));
vigra_precondition(( ffInfo.numBands() == 1),
- "flatfield vignetting correction: "
- "Only single channel flatfield images are supported\n");
+ std::string(_X("flatfield vignetting correction:")) + std::string(" ") +
+ std::string(_X("Only single channel flatfield images are supported")) + std::string("\n"));
ffImg.resize(ffInfo.width(), ffInfo.height());
vigra::importImage(ffInfo, vigra::destImage(ffImg));
}
diff -r a61b76929a1f -r 4d19644b2947 src/hugin_base/nona/RemappedPanoImage.h
--- a/src/hugin_base/nona/RemappedPanoImage.h Sun Jan 02 15:59:46 2011 -0500
+++ b/src/hugin_base/nona/RemappedPanoImage.h Sun Jan 02 16:01:03 2011 -0500
@@ -38,6 +38,7 @@
#include <panodata/PanoramaOptions.h>
#include <panotools/PanoToolsInterface.h>
+#include <hugin_utils/utils.h>
namespace HuginBase {
namespace Nona {
@@ -447,7 +448,7 @@
DEBUG_DEBUG("srcImgSize: " << srcImgSize << " m_srcImgSize: " << m_srcImg.getSize());
vigra_precondition(srcImgSize == expectedSize,
- "RemappedPanoImage<RemapImage,AlphaImage>::remapImage(): image sizes not consistent");
+ "RemappedPanoImage<RemapImage,AlphaImage>::remapImage(): " + std::string(_X("image sizes not consistent")));
typedef typename ImgAccessor::value_type input_value_type;
typedef typename vigra_ext::ValueTypeTraits<input_value_type>::value_type input_component_type;
@@ -623,7 +624,7 @@
}
vigra_precondition(srcImgSize == expectedSize,
- "RemappedPanoImage<RemapImage,AlphaImage>::remapImage(): image sizes not consistent");
+ "RemappedPanoImage<RemapImage,AlphaImage>::remapImage(): " + std::string(_X("image sizes not consistent")));
typedef typename ImgAccessor::value_type input_value_type;
typedef typename vigra_ext::ValueTypeTraits<input_value_type>::value_type input_component_type;
@@ -781,7 +782,7 @@
}
#endif
- progress.setMessage(std::string("remapping ") + hugin_utils::stripPath(src.getFilename()));
+ progress.setMessage(std::string(_X("remapping")) + std::string(" ") + hugin_utils::stripPath(src.getFilename()));
// set pano image
DEBUG_DEBUG("setting src image with size: " << src.getSize());
remapped.setPanoImage(src, dest, outputROI);
diff -r a61b76929a1f -r 4d19644b2947 src/hugin_base/nona/Stitcher.h
--- a/src/hugin_base/nona/Stitcher.h Sun Jan 02 15:59:46 2011 -0500
+++ b/src/hugin_base/nona/Stitcher.h Sun Jan 02 16:01:03 2011 -0500
@@ -52,6 +52,7 @@
#include <algorithms/nona/ComputeImageROI.h>
#include <nona/RemappedPanoImage.h>
#include <nona/ImageRemapper.h>
+#include <hugin_utils/utils.h>
// calculate distance image for multi file output
#define STITCHER_CALC_DIST_IMG 0
@@ -224,7 +225,7 @@
prepareOutputFile(opts);
unsigned int nImg = images.size();
- Base::m_progress.pushTask(AppBase::ProgressTask("Remapping", "", 1.0/(nImg)));
+ Base::m_progress.pushTask(AppBase::ProgressTask(_X("Remapping"), "", 1.0/(nImg)));
// remap each image and save
int i=0;
for (UIntSet::const_iterator it = images.begin();
@@ -290,7 +291,7 @@
}
// calculate real alpha for saving with the image
- Base::m_progress.setMessage("Calculating mask");
+ Base::m_progress.setMessage(_X("Calculating mask"));
remapped.calcAlpha();
}
@@ -332,7 +333,7 @@
filename << m_basename << std::setfill('0') << std::setw(4) << imgNr << "." + ext;
- Base::m_progress.setMessage(std::string("saving ") +
+ Base::m_progress.setMessage(std::string(_X("saving") + std::string(" ")) +
hugin_utils::stripPath(filename.str()));
vigra::ImageExportInfo exinfo(filename.str().c_str());
@@ -359,7 +360,7 @@
vigra::UInt16Image xImg;
vigra::UInt16Image yImg;
- Base::m_progress.setMessage("creating coordinate images");
+ Base::m_progress.setMessage(_X("creating coordinate images"));
remapped.calcSrcCoordImgs(xImg, yImg);
vigra::UInt16Image dist;
@@ -530,7 +531,7 @@
unsigned int nImg = images.size();
- Base::m_progress.pushTask(AppBase::ProgressTask("Stitching", "", 1.0/(nImg)));
+ Base::m_progress.pushTask(AppBase::ProgressTask(_X("Stitching"), "", 1.0/(nImg)));
// empty ROI
vigra::Rect2D panoROI;
@@ -544,7 +545,7 @@
RemappedPanoImage<ImageType, AlphaType> *
remapped = remapper.getRemapped(Base::m_pano, opts, *it,
Base::m_rois[i], Base::m_progress);
- Base::m_progress.setMessage("blending");
+ Base::m_progress.setMessage(_X("blending"));
// add image to pano and panoalpha, adjusts panoROI as well.
try {
vigra_ext::blend(*remapped, pano, alpha, panoROI,
@@ -587,7 +588,7 @@
std::string outputfile = basename + "." + ext;
// save the remapped image
- Base::m_progress.setMessage("saving result: " + hugin_utils::stripPath(outputfile));
+ Base::m_progress.setMessage(_X("saving result:") + std::string(" ") + hugin_utils::stripPath(outputfile));
DEBUG_DEBUG("Saving panorama: " << outputfile);
vigra::ImageExportInfo exinfo(outputfile.c_str());
exinfo.setXResolution(150);
@@ -778,7 +779,7 @@
typedef std::vector<RemappedPanoImage<ImageType, AlphaType> *> RemappedVector;
unsigned int nImg = imgSet.size();
- Base::m_progress.pushTask(AppBase::ProgressTask("Stitching", "", 1.0/(nImg)));
+ Base::m_progress.pushTask(AppBase::ProgressTask(_X("Stitching"), "", 1.0/(nImg)));
// empty ROI
// vigra::Rect2D panoROI;
// remap all images..
@@ -856,7 +857,7 @@
unsigned int nImg = imgSet.size();
- Base::m_progress.pushTask(AppBase::ProgressTask("Stitching", "", 1.0/(nImg)));
+ Base::m_progress.pushTask(AppBase::ProgressTask(_X("Stitching"), "", 1.0/(nImg)));
// empty ROI
vigra::Rect2D panoROI;
@@ -873,7 +874,7 @@
// try to extract icc profile.
iccProfile = remapped->m_ICCProfile;
}
- Base::m_progress.setMessage("blending");
+ Base::m_progress.setMessage(_X("blending"));
// add image to pano and panoalpha, adjusts panoROI as well.
try {
blend(*remapped, pano, alpha, panoROI);
@@ -915,7 +916,7 @@
}
std::string outputfile = basename + "." + ext;
- Base::m_progress.setMessage("saving result: " + hugin_utils::stripPath(outputfile));
+ Base::m_progress.setMessage(_X("saving result:") + std::string(" ") + hugin_utils::stripPath(outputfile));
DEBUG_DEBUG("Saving panorama: " << outputfile);
vigra::ImageExportInfo exinfo(outputfile.c_str());
exinfo.setXResolution(150);
diff -r a61b76929a1f -r 4d19644b2947 src/hugin_base/nona/Stitcher1.cpp
--- a/src/hugin_base/nona/Stitcher1.cpp Sun Jan 02 15:59:46 2011 -0500
+++ b/src/hugin_base/nona/Stitcher1.cpp Sun Jan 02 16:01:03 2011 -0500
@@ -44,7 +44,7 @@
} else if (strcmp(pixelType, "DOUBLE") == 0 ) {
stitchPanoIntern<DImage,BImage>(pano, opts, progress, basename, usedImgs);
} else {
- UTILS_THROW(std::runtime_error, "Unsupported pixel type: " << pixelType );
+ UTILS_THROW(std::runtime_error, _X("Unsupported pixel type:") + std::string(" ") << pixelType );
return;
}
}
diff -r a61b76929a1f -r 4d19644b2947 src/hugin_base/nona/Stitcher2.cpp
--- a/src/hugin_base/nona/Stitcher2.cpp Sun Jan 02 15:59:46 2011 -0500
+++ b/src/hugin_base/nona/Stitcher2.cpp Sun Jan 02 16:01:03 2011 -0500
@@ -42,7 +42,7 @@
} else if (strcmp(pixelType, "UINT16") == 0 ) {
stitchPanoIntern<UInt16Image,BImage>(pano, opts, progress, basename, usedImgs);
} else {
- UTILS_THROW(std::runtime_error, "Unsupported pixel type: " << pixelType );
+ UTILS_THROW(std::runtime_error, _X("Unsupported pixel type:") + std::string(" ") << pixelType );
return;
}
}
diff -r a61b76929a1f -r 4d19644b2947 src/hugin_base/nona/Stitcher3.cpp
--- a/src/hugin_base/nona/Stitcher3.cpp Sun Jan 02 15:59:46 2011 -0500
+++ b/src/hugin_base/nona/Stitcher3.cpp Sun Jan 02 16:01:03 2011 -0500
@@ -42,7 +42,7 @@
} else if (strcmp(pixelType, "UINT16") == 0 ) {
stitchPanoIntern<UInt16RGBImage, BImage>(pano, opts, progress, basename, usedImgs);
} else {
- UTILS_THROW(std::runtime_error, "Unsupported pixel type: " << pixelType );
+ UTILS_THROW(std::runtime_error, _X("Unsupported pixel type:") + std::string(" ") << pixelType );
return;
}
}
diff -r a61b76929a1f -r 4d19644b2947 src/hugin_base/nona/Stitcher4.cpp
--- a/src/hugin_base/nona/Stitcher4.cpp Sun Jan 02 15:59:46 2011 -0500
+++ b/src/hugin_base/nona/Stitcher4.cpp Sun Jan 02 16:01:03 2011 -0500
@@ -51,7 +51,7 @@
} else if (strcmp(pixelType, "DOUBLE") == 0 ) {
stitchPanoIntern<DRGBImage,BImage>(pano, opts, progress, basename, usedImgs);
} else {
- UTILS_THROW(std::runtime_error, "Unsupported pixel type: " << pixelType );
+ UTILS_THROW(std::runtime_error, _X("Unsupported pixel type:") + std::string(" ") << pixelType );
return;
}
}
|