1
0
forked from 0ad/0ad

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.
This commit is contained in:
leper 2014-11-19 23:10:51 +00:00
parent f90841cf78
commit 1abd5669c9

View File

@ -88,7 +88,9 @@ class Extractor(object):
if pathmatch(filemask, filename): if pathmatch(filemask, filename):
filepath = os.path.join(directoryAbsolutePath, filename) filepath = os.path.join(directoryAbsolutePath, filename)
for message, plural, context, breadcrumb, position, comments in self.extractFromFile(filepath): 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): def extractFromFile(self, filepath):