From 1d181b61a3b378226f78ec3d4da4c56f2af334a7 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Fri, 28 Feb 2020 16:59:14 -0600 Subject: [PATCH] Documentation_importer: Now blank lines will not be created at gettext translatable strings --- doc/documentation_importer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/documentation_importer.py b/doc/documentation_importer.py index bb180fa..591062a 100644 --- a/doc/documentation_importer.py +++ b/doc/documentation_importer.py @@ -13,8 +13,8 @@ def prepare_documentation_in_file(fileSource, fileDest): f2.write("# -*- coding: utf-8 -*-\n") f2.write("documentation = [\n") for i in lns: - if "\n" == i: - newvar = "\"\"," + if "\n" == i or i.splitlines()[0] == "": + newvar = "\"\",\n" elif "\n" == i[-1]: newvar = "_(u\"\"\"%s\"\"\"),\n" % (i.splitlines()[0]) else: