js.py: Collect localized_appendices in nested LocalizedModules.

Previously, localized_appendices would be ignored in nested
LocalizedModules because the Module.build() step would just call
get_source() on the nested module.  This caused the plural forms
expression to not be properly appended to the reddit-init and
reddit-init-legacy modules since they nest the reddit-init-base module.
This commit is contained in:
Neil Williams
2015-03-24 15:55:26 -07:00
parent 9d455d0235
commit 3704a48da5

View File

@@ -342,6 +342,10 @@ class LocalizedModule(Module):
self.localized_appendices = kwargs.pop("localized_appendices", [])
Module.__init__(self, *args, **kwargs)
for source in self.sources:
if isinstance(source, LocalizedModule):
self.localized_appendices.extend(source.localized_appendices)
@staticmethod
def languagize_path(path, lang):
path_name, path_ext = os.path.splitext(path)