mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user