Bureaucrats, coding, Administrators
2,634
edits
m (→Implement {{tl|Dictionary}}: Enforce at least one whitespace character before translations) |
|||
Line 157: | Line 157: | ||
self.filterName = u'Your friendly neighborhood dictionary updater' | self.filterName = u'Your friendly neighborhood dictionary updater' | ||
self.commentsExtract = compileRegex(r'<!--([\S\s]+?)-->') | self.commentsExtract = compileRegex(r'<!--([\S\s]+?)-->') | ||
self.stringsExtract = compileRegex(r'(?:^[ \t]*#[ \t]*([^\r\n]*?)[ \t]*$\s*)?^[ \t]*([^\r\n]+?[ \t]*(?:\|[ \t]*[^\r\n]+?[ \t]*)*):[ \t]*( | self.stringsExtract = compileRegex(r'(?:^[ \t]*#[ \t]*([^\r\n]*?)[ \t]*$\s*)?^[ \t]*([^\r\n]+?[ \t]*(?:\|[ \t]*[^\r\n]+?[ \t]*)*):[ \t]*([^\r\n]+?[ \t]*$|\s*[\r\n]+(?:\s*[-\w]+[ \t]*:[ \t]*[^\r\n]+[ \t]*$)+)', re.IGNORECASE | re.MULTILINE) | ||
self.translationExtract = compileRegex(r'^[ \t] | self.translationExtract = compileRegex(r'^[ \t]+([-\w]+)[ \t]*:[ \t]*([^\r\n]+)[ \t]*$', re.IGNORECASE | re.MULTILINE) | ||
addWhitelistPage(self.dictionaries.keys()) | addWhitelistPage(self.dictionaries.keys()) | ||
def generateSubpage(self, keyName, data, currentDict, syncData): | def generateSubpage(self, keyName, data, currentDict, syncData): |