From 235f299db5af6f82bf2b644dea768734c381d09f Mon Sep 17 00:00:00 2001 From: Ben Castricum Date: Tue, 25 Nov 2014 21:15:17 +0100 Subject: I18N: Fix missing translation entries The last translation entry of a .po file was not properly handled. --- devtools/create_translations/po_parser.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/devtools/create_translations/po_parser.cpp b/devtools/create_translations/po_parser.cpp index 7882502ca4..ecc3ba540c 100644 --- a/devtools/create_translations/po_parser.cpp +++ b/devtools/create_translations/po_parser.cpp @@ -332,6 +332,13 @@ PoMessageEntryList *parsePoFile(const char *file, PoMessageList& messages) { strcat(currentBuf, stripLine(line)); } } + if (currentBuf == msgstrBuf) { + // add last entry + if (*msgstrBuf != '\0' && !fuzzy) { + messages.insert(msgidBuf); + list->addMessageEntry(msgstrBuf, msgidBuf, msgctxtBuf); + } + } fclose(inFile); return list; -- cgit v1.2.3