Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update localization files (backport #2945) #2948

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions app/actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int Print::run(const std::string& path) {

int Print::printSummary() {
if (!Exiv2::fileExists(path_)) {
std::cerr << path_ << ": " << _("Failed to open the file\n");
std::cerr << path_ << ": " << _("Failed to open the file") << "\n";
return -1;
}

Expand All @@ -260,7 +260,7 @@ int Print::printSummary() {
std::cout << image->pixelWidth() << " x " << image->pixelHeight() << std::endl;

if (exifData.empty()) {
std::cerr << path_ << ": " << _("No Exif data found in the file\n");
std::cerr << path_ << ": " << _("No Exif data found in the file") << "\n";
return -3;
}

Expand Down Expand Up @@ -353,7 +353,7 @@ int Print::printTag(const Exiv2::ExifData& exifData, EasyAccessFct easyAccessFct

int Print::printList() {
if (!Exiv2::fileExists(path_)) {
std::cerr << path_ << ": " << _("Failed to open the file\n");
std::cerr << path_ << ": " << _("Failed to open the file") << "\n";
return -1;
}

Expand Down Expand Up @@ -404,11 +404,11 @@ int Print::printMetadata(const Exiv2::Image* image) {
// With -v, inform about the absence of any (requested) type of metadata
if (Params::instance().verbose_) {
if (noExif)
std::cerr << path_ << ": " << _("No Exif data found in the file\n");
std::cerr << path_ << ": " << _("No Exif data found in the file") << "\n";
if (noIptc)
std::cerr << path_ << ": " << _("No IPTC data found in the file\n");
std::cerr << path_ << ": " << _("No IPTC data found in the file") << "\n";
if (noXmp)
std::cerr << path_ << ": " << _("No XMP data found in the file\n");
std::cerr << path_ << ": " << _("No XMP data found in the file") << "\n";
}

// With -g or -K, return -3 if no matching tags were found
Expand Down Expand Up @@ -565,7 +565,7 @@ bool Print::printMetadatum(const Exiv2::Metadatum& md, const Exiv2::Image* pImag

int Print::printComment() {
if (!Exiv2::fileExists(path_)) {
std::cerr << path_ << ": " << _("Failed to open the file\n");
std::cerr << path_ << ": " << _("Failed to open the file") << "\n";
return -1;
}

Expand All @@ -580,7 +580,7 @@ int Print::printComment() {

int Print::printPreviewList() {
if (!Exiv2::fileExists(path_)) {
std::cerr << path_ << ": " << _("Failed to open the file\n");
std::cerr << path_ << ": " << _("Failed to open the file") << "\n";
return -1;
}

Expand Down Expand Up @@ -610,7 +610,7 @@ Task::UniquePtr Print::clone() const {
int Rename::run(const std::string& path) {
try {
if (!Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
return -1;
}
Timestamp ts;
Expand All @@ -621,7 +621,7 @@ int Rename::run(const std::string& path) {
image->readMetadata();
Exiv2::ExifData& exifData = image->exifData();
if (exifData.empty()) {
std::cerr << path << ": " << _("No Exif data found in the file\n");
std::cerr << path << ": " << _("No Exif data found in the file") << "\n";
return -3;
}
auto md = exifData.findKey(Exiv2::ExifKey("Exif.Photo.DateTimeOriginal"));
Expand Down Expand Up @@ -676,7 +676,7 @@ int Erase::run(const std::string& path) {
path_ = path;

if (!Exiv2::fileExists(path_)) {
std::cerr << path_ << ": " << _("Failed to open the file\n");
std::cerr << path_ << ": " << _("Failed to open the file") << "\n";
return -1;
}
Timestamp ts;
Expand Down Expand Up @@ -822,21 +822,21 @@ int Extract::run(const std::string& path) {

int Extract::writeThumbnail() const {
if (!Exiv2::fileExists(path_)) {
std::cerr << path_ << ": " << _("Failed to open the file\n");
std::cerr << path_ << ": " << _("Failed to open the file") << "\n";
return -1;
}
auto image = Exiv2::ImageFactory::open(path_);
image->readMetadata();
Exiv2::ExifData& exifData = image->exifData();
if (exifData.empty()) {
std::cerr << path_ << ": " << _("No Exif data found in the file\n");
std::cerr << path_ << ": " << _("No Exif data found in the file") << "\n";
return -3;
}
int rc = 0;
Exiv2::ExifThumb exifThumb(exifData);
std::string thumbExt = exifThumb.extension();
if (thumbExt.empty()) {
std::cerr << path_ << ": " << _("Image does not contain an Exif thumbnail\n");
std::cerr << path_ << ": " << _("Image does not contain an Exif thumbnail") << "\n";
} else {
if ((Params::instance().target_ & Params::ctStdInOut) != 0) {
Exiv2::DataBuf buf = exifThumb.copy();
Expand All @@ -857,15 +857,15 @@ int Extract::writeThumbnail() const {
}
rc = static_cast<int>(exifThumb.writeFile(thumb));
if (rc == 0) {
std::cerr << path_ << ": " << _("Exif data doesn't contain a thumbnail\n");
std::cerr << path_ << ": " << _("Exif data doesn't contain a thumbnail") << "\n";
}
}
return rc;
} // Extract::writeThumbnail

int Extract::writePreviews() const {
if (!Exiv2::fileExists(path_)) {
std::cerr << path_ << ": " << _("Failed to open the file\n");
std::cerr << path_ << ": " << _("Failed to open the file") << "\n";
return -1;
}

Expand Down Expand Up @@ -898,7 +898,7 @@ int Extract::writePreviews() const {
int Extract::writeIccProfile(const std::string& target) const {
int rc = 0;
if (!Exiv2::fileExists(path_)) {
std::cerr << path_ << ": " << _("Failed to open the file\n");
std::cerr << path_ << ": " << _("Failed to open the file") << "\n";
rc = -1;
}

Expand Down Expand Up @@ -954,7 +954,7 @@ int Insert::run(const std::string& path) try {
bool bStdin = (Params::instance().target_ & Params::ctStdInOut) != 0;

if (!Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
return -1;
}

Expand Down Expand Up @@ -1006,11 +1006,11 @@ int Insert::insertXmpPacket(const std::string& path, const std::string& xmpPath)
rc = insertXmpPacket(path, xmpBlob, true);
} else {
if (!Exiv2::fileExists(xmpPath)) {
std::cerr << xmpPath << ": " << _("Failed to open the file\n");
std::cerr << xmpPath << ": " << _("Failed to open the file") << "\n";
rc = -1;
}
if (rc == 0 && !Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
rc = -1;
}
if (rc == 0) {
Expand Down Expand Up @@ -1047,7 +1047,7 @@ int Insert::insertIccProfile(const std::string& path, const std::string& iccPath
rc = insertIccProfile(path, std::move(iccProfile));
} else {
if (!Exiv2::fileExists(iccProfilePath)) {
std::cerr << iccProfilePath << ": " << _("Failed to open the file\n");
std::cerr << iccProfilePath << ": " << _("Failed to open the file") << "\n";
rc = -1;
} else {
Exiv2::DataBuf iccProfile = Exiv2::readFile(iccPath);
Expand All @@ -1061,7 +1061,7 @@ int Insert::insertIccProfile(const std::string& path, Exiv2::DataBuf&& iccProfil
int rc = 0;
// test path exists
if (!Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
rc = -1;
}

Expand All @@ -1083,11 +1083,11 @@ int Insert::insertIccProfile(const std::string& path, Exiv2::DataBuf&& iccProfil
int Insert::insertThumbnail(const std::string& path) {
std::string thumbPath = newFilePath(path, "-thumb.jpg");
if (!Exiv2::fileExists(thumbPath)) {
std::cerr << thumbPath << ": " << _("Failed to open the file\n");
std::cerr << thumbPath << ": " << _("Failed to open the file") << "\n";
return -1;
}
if (!Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
return -1;
}
auto image = Exiv2::ImageFactory::open(path);
Expand All @@ -1106,7 +1106,7 @@ Task::UniquePtr Insert::clone() const {
int Modify::run(const std::string& path) {
try {
if (!Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
return -1;
}
Timestamp ts;
Expand Down Expand Up @@ -1315,7 +1315,7 @@ int Adjust::run(const std::string& path) try {
dayAdjustment_ = Params::instance().yodAdjust_[Params::yodDay].adjustment_;

if (!Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
return -1;
}
Timestamp ts;
Expand All @@ -1326,7 +1326,7 @@ int Adjust::run(const std::string& path) try {
image->readMetadata();
Exiv2::ExifData& exifData = image->exifData();
if (exifData.empty()) {
std::cerr << path << ": " << _("No Exif data found in the file\n");
std::cerr << path << ": " << _("No Exif data found in the file") << "\n";
return -3;
}
int rc = adjustDateTime(exifData, "Exif.Image.DateTime", path);
Expand Down Expand Up @@ -1358,7 +1358,7 @@ int Adjust::adjustDateTime(Exiv2::ExifData& exifData, const std::string& key, co
}
std::string timeStr = md->toString();
if (timeStr.empty() || timeStr[0] == ' ') {
std::cerr << path << ": " << _("Timestamp of metadatum with key") << " `" << ek << "' " << _("not set\n");
std::cerr << path << ": " << _("Timestamp of metadatum with key") << " `" << ek << "' " << _("not set") << "\n";
return 1;
}
if (Params::instance().verbose_) {
Expand Down Expand Up @@ -1462,7 +1462,7 @@ int Adjust::adjustDateTime(Exiv2::ExifData& exifData, const std::string& key, co
int FixIso::run(const std::string& path) {
try {
if (!Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
return -1;
}
Timestamp ts;
Expand All @@ -1473,14 +1473,14 @@ int FixIso::run(const std::string& path) {
image->readMetadata();
Exiv2::ExifData& exifData = image->exifData();
if (exifData.empty()) {
std::cerr << path << ": " << _("No Exif data found in the file\n");
std::cerr << path << ": " << _("No Exif data found in the file") << "\n";
return -3;
}
auto md = Exiv2::isoSpeed(exifData);
if (md != exifData.end()) {
if (md->key() == "Exif.Photo.ISOSpeedRatings") {
if (Params::instance().verbose_) {
std::cout << _("Standard Exif ISO tag exists; not modified\n");
std::cout << _("Standard Exif ISO tag exists; not modified") << "\n";
}
return 0;
}
Expand Down Expand Up @@ -1510,7 +1510,7 @@ Task::UniquePtr FixIso::clone() const {
int FixCom::run(const std::string& path) {
try {
if (!Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
return -1;
}
Timestamp ts;
Expand All @@ -1521,7 +1521,7 @@ int FixCom::run(const std::string& path) {
image->readMetadata();
Exiv2::ExifData& exifData = image->exifData();
if (exifData.empty()) {
std::cerr << path << ": " << _("No Exif data found in the file\n");
std::cerr << path << ": " << _("No Exif data found in the file") << "\n";
return -3;
}
auto pos = exifData.findKey(Exiv2::ExifKey("Exif.Photo.UserComment"));
Expand Down Expand Up @@ -1695,7 +1695,7 @@ int metacopy(const std::string& source, const std::string& tgt, Exiv2::ImageType
// read the source metadata
int rc = -1;
if (!Exiv2::fileExists(source)) {
std::cerr << source << ": " << _("Failed to open the file\n");
std::cerr << source << ": " << _("Failed to open the file") << "\n";
return rc;
}

Expand Down Expand Up @@ -1940,7 +1940,7 @@ std::ostream& operator<<(std::ostream& os, const std::pair<std::string, int>& st

int printStructure(std::ostream& out, Exiv2::PrintStructureOption option, const std::string& path) {
if (!Exiv2::fileExists(path)) {
std::cerr << path << ": " << _("Failed to open the file\n");
std::cerr << path << ": " << _("Failed to open the file") << "\n";
return -1;
}
Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(path);
Expand Down
3 changes: 2 additions & 1 deletion po/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ find_package(Gettext REQUIRED)

set(PO_SOURCES
bs.po
de.po
ca.po
da.po
de.po
es.po
fi.po
fr.po
Expand Down
19 changes: 18 additions & 1 deletion po/LINGUAS
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# Set of available languages.
bs de es fi fr gl ms pl pt ru sk sv ug uk vi
bs
ca
da
de
es
fi
fr
gl
ms
nl
pl
pt
ru
sk
sv
ug
uk
vi
7 changes: 4 additions & 3 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# List of source files with translatable strings, generated with
# $ grep -l '[N ]_(' src/*.cpp src/*.hpp | sort
# $ grep -l '[N ]_(' app/*.cpp src/*.cpp src/*.hpp | sort
# Note: Please run 'make update-pot' after changing this list

src/actions.cpp
app/actions.cpp
app/exiv2.cpp
src/canonmn_int.cpp
src/casiomn_int.cpp
src/crwimage_int.cpp
src/datasets.cpp
src/error.cpp
src/exiv2.cpp
src/fujimn_int.cpp
src/jpgimage.cpp
src/minoltamn_int.cpp
src/nikonmn_int.cpp
src/olympusmn_int.cpp
Expand Down