diff --git a/plugins/impex/exr/exr_import.cc b/plugins/impex/exr/exr_import.cc index dace67bee2..baae10dbd5 100644 --- a/plugins/impex/exr/exr_import.cc +++ b/plugins/impex/exr/exr_import.cc @@ -1,83 +1,83 @@ /* * Copyright (c) 2010 Cyrille Berger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "exr_import.h" #include #include #include #include #include #include "exr_converter.h" K_PLUGIN_FACTORY_WITH_JSON(ImportFactory, "krita_exr_import.json", registerPlugin();) exrImport::exrImport(QObject *parent, const QVariantList &) : KisImportExportFilter(parent) { } exrImport::~exrImport() { } KisImportExportFilter::ConversionStatus exrImport::convert(KisDocument *document, QIODevice */*io*/, KisPropertiesConfigurationSP /*configuration*/) { EXRConverter ib(document, !batchMode()); switch (ib.buildImage(filename())) { case KisImageBuilder_RESULT_UNSUPPORTED: case KisImageBuilder_RESULT_UNSUPPORTED_COLORSPACE: - document->setErrorMessage(i18n("Krita does support this type of EXR file.")); + document->setErrorMessage(i18n("Krita does not support this type of EXR file.")); return KisImportExportFilter::NotImplemented; case KisImageBuilder_RESULT_INVALID_ARG: document->setErrorMessage(i18n("This is not an EXR file.")); return KisImportExportFilter::BadMimeType; case KisImageBuilder_RESULT_NO_URI: case KisImageBuilder_RESULT_NOT_LOCAL: document->setErrorMessage(i18n("The EXR file does not exist.")); return KisImportExportFilter::FileNotFound; case KisImageBuilder_RESULT_BAD_FETCH: case KisImageBuilder_RESULT_EMPTY: document->setErrorMessage(i18n("The EXR is corrupted.")); return KisImportExportFilter::ParsingError; case KisImageBuilder_RESULT_FAILURE: document->setErrorMessage(i18n("Krita could not create a new image.")); return KisImportExportFilter::InternalError; case KisImageBuilder_RESULT_OK: Q_ASSERT(ib.image()); document -> setCurrentImage(ib.image()); return KisImportExportFilter::OK; default: break; } return KisImportExportFilter::StorageCreationError; } #include diff --git a/plugins/impex/heif/HeifError.cpp b/plugins/impex/heif/HeifError.cpp index d6de7109ad..41a324a1ce 100644 --- a/plugins/impex/heif/HeifError.cpp +++ b/plugins/impex/heif/HeifError.cpp @@ -1,64 +1,64 @@ /* * Copyright (c) 2018 Dirk Farin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "HeifError.h" KisImportExportFilter::ConversionStatus setHeifError(KisDocument* document, heif::Error error) { switch (error.get_code()) { case heif_error_Ok: return KisImportExportFilter::OK; case heif_error_Input_does_not_exist: // this should never happen because we do not read from file names document->setErrorMessage(i18n("Internal error.")); return KisImportExportFilter::InternalError; case heif_error_Invalid_input: case heif_error_Decoder_plugin_error: document->setErrorMessage(i18n("The HEIF file is corrupted.")); return KisImportExportFilter::ParsingError; case heif_error_Unsupported_filetype: case heif_error_Unsupported_feature: - document->setErrorMessage(i18n("Krita does support this type of HEIF file.")); + document->setErrorMessage(i18n("Krita does not support this type of HEIF file.")); return KisImportExportFilter::NotImplemented; case heif_error_Usage_error: case heif_error_Encoder_plugin_error: // this should never happen if we use libheif in the correct way document->setErrorMessage(i18n("Internal libheif API error.")); return KisImportExportFilter::InternalError; case heif_error_Memory_allocation_error: document->setErrorMessage(i18n("Could not allocate memory.")); return KisImportExportFilter::StorageCreationError; case heif_error_Encoding_error: document->setErrorMessage(i18n("Could not encode or write image.")); return KisImportExportFilter::CreationError; default: // we only get here when we forgot to handle an error ID document->setErrorMessage(i18n("Unknown error.")); return KisImportExportFilter::InternalError; } }