//if(!strcmp(ext, "c"))
{
+ String symbolsDir = GetSymbolsDir();
+ // Only generating .pot files when building from release.* directory for now
+ bool outputPot = symbolsDir && SearchString(symbolsDir, 0, "release.", false, false);
Map<ContextStringPair, List<String> > intlStrings { };
MapIterator<ContextStringPair, List<String>> it { map = intlStrings };
}
WriteMain(output);
- if(intlStrings.count)
+ if(outputPot && intlStrings.count)
{
File potFile;
char potFileName[MAX_LOCATION];
potFile = FileOpen(potFileName, write);
if(potFile)
{
+ // Write header:
+ potFile.Puts("msgid \"\"\n");
+ potFile.Puts("msgstr \"\"\n");
+ potFile.Puts("\"Project-Id-Version: \\n\"\n");
+ potFile.Puts("\"POT-Creation-Date: \\n\"\n");
+ potFile.Puts("\"PO-Revision-Date: \\n\"\n");
+ potFile.Puts("\"Last-Translator: \\n\"\n");
+ potFile.Puts("\"Language-Team: \\n\"\n");
+ potFile.Puts("\"MIME-Version: 1.0\\n\"\n");
+ potFile.Puts("\"Content-Type: text/plain; charset=iso-8859-1\\n\"\n");
+ potFile.Puts("\"Content-Transfer-Encoding: 8bit\\n\"\n");
+ potFile.Puts("\"X-Poedit-Basepath: ../\\n\"\n");
+ potFile.Puts("\n");
+
for(i : intlStrings)
{
ContextStringPair pair = &i;
potFile.Puts("\n");
}
- potFile.Puts("msgid \""); potFile.Puts(pair.string); potFile.Puts("\"\n");
if(pair.context)
{
potFile.Puts("msgctxt \""); potFile.Puts(pair.context); potFile.Puts("\"\n");
}
+ potFile.Puts("msgid \""); potFile.Puts(pair.string); potFile.Puts("\"\n");
potFile.Puts("msgstr \""); potFile.Puts(pair.string); potFile.Puts("\"\n");
potFile.Puts("\n");
}