From 1abd5669c940a5d0f915f0b4361cd70e7e601bda Mon Sep 17 00:00:00 2001 From: leper Date: Wed, 19 Nov 2014 23:10:51 +0000 Subject: [PATCH] Replace spaces in source file paths with non-breaking spaces. Refs #2539. This way our map file paths are not split due to word wrapping in the po files. This was SVN commit r15993. --- source/tools/i18n/extractors/extractors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/tools/i18n/extractors/extractors.py b/source/tools/i18n/extractors/extractors.py index 2b53f5712b..ead6405714 100644 --- a/source/tools/i18n/extractors/extractors.py +++ b/source/tools/i18n/extractors/extractors.py @@ -88,7 +88,9 @@ class Extractor(object): if pathmatch(filemask, filename): filepath = os.path.join(directoryAbsolutePath, filename) for message, plural, context, breadcrumb, position, comments in self.extractFromFile(filepath): - yield message, plural, context, (filename + (":"+breadcrumb if breadcrumb else ""), position), comments + # Replace spaces in filenames by non-breaking spaces so that word + # wrapping in po files does not split up our paths + yield message, plural, context, (filename.replace(' ', u"\xa0") + (":"+breadcrumb if breadcrumb else ""), position), comments def extractFromFile(self, filepath):