Skip to content

Commit

Permalink
complete newline handling ref #14275
Browse files Browse the repository at this point in the history
Signed-off-by: m-kro <m.barthauer@t-online.de>
  • Loading branch information
m-kro committed Feb 1, 2024
1 parent 7a51dea commit 7dae0f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/build_config/updateMessageIDs.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ def updatePotFile(gettextPath, potFile, replaceRules, options):
for occurrence, lineNr in entry.occurrences:
if occurrence not in fileReplaceCommands:
fileReplaceCommands[occurrence] = []
fileReplaceCommands[occurrence].append((entry.msgid, entry.msgstr, int(lineNr)))
# newline conversion between polib and source code
fileReplaceCommands[occurrence].append((entry.msgid.replace(
"\n", "\\n"), entry.msgstr.replace("\n", "\\n"), int(lineNr)))
replaceIDs.append(entry)

# apply the changes to the source code
Expand Down

0 comments on commit 7dae0f0

Please sign in to comment.