summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/linguist/shared/po.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/linguist/shared/po.cpp b/tools/linguist/shared/po.cpp
index bdd8c25..87b2a8a 100644
--- a/tools/linguist/shared/po.cpp
+++ b/tools/linguist/shared/po.cpp
@@ -692,6 +692,13 @@ bool savePO(const Translator &translator, QIODevice &dev, ConversionData &cd)
return ok;
}
+static bool savePOT(const Translator &translator, QIODevice &dev, ConversionData &cd)
+{
+ Translator ttor = translator;
+ ttor.dropTranslations();
+ return savePO(ttor, dev, cd);
+}
+
int initPO()
{
Translator::FileFormat format;
@@ -702,6 +709,13 @@ int initPO()
format.fileType = Translator::FileFormat::TranslationSource;
format.priority = 1;
Translator::registerFileFormat(format);
+ format.extension = QLatin1String("pot");
+ format.description = QObject::tr("GNU Gettext localization template files");
+ format.loader = &loadPO;
+ format.saver = &savePOT;
+ format.fileType = Translator::FileFormat::TranslationSource;
+ format.priority = -1;
+ Translator::registerFileFormat(format);
return 1;
}