

from .cls import Language

from .en import EN
from .fr import FR
from .it import IT
from .nl import NL


__all__ = ['Language', 'EN', 'FR', 'IT', 'NL']


# generate docstrings for the Language instances

for code, language_ref in Language.languages.items():
    language = language_ref()
    lines = []
    for string_collection in language.strings.values():
        lines.append("\n.. rubric:: {}\n"
                     .format(type(string_collection).__name__))
        for string in string_collection._strings:
            lines.append(":{}: {}".format(string.name,
                                            string_collection[string.name]))
    language.__doc__ = '\n'.join(lines)



from .cls import Language

from .en import EN
from .fr import FR
from .it import IT
from .nl import NL


__all__ = ['Language', 'EN', 'FR', 'IT', 'NL']


# generate docstrings for the Language instances

for code, language_ref in Language.languages.items():
    language = language_ref()
    lines = ['Localized strings for {}'.format(language.name)]
    for string_collection in language.strings.values():
        lines.append("\n.. rubric:: {}\n"
                     .format(type(string_collection).__name__))
        for string in string_collection._strings:
            lines.append(":{}: {}".format(string.name,
                                          string_collection[string.name]))
    language.__doc__ = '\n'.join(lines)

Fix the rendering of language instance docstrings
Fix the rendering of language instance docstrings

  
  
  from .cls import Language
  
  from .en import EN
  from .fr import FR
  from .it import IT
  from .nl import NL
  
  
  __all__ = ['Language', 'EN', 'FR', 'IT', 'NL']
  
  
  # generate docstrings for the Language instances
  
  for code, language_ref in Language.languages.items():
      language = language_ref()
-     lines = []
+     lines = ['Localized strings for {}'.format(language.name)]
      for string_collection in language.strings.values():
          lines.append("\n.. rubric:: {}\n"
                       .format(type(string_collection).__name__))
          for string in string_collection._strings:
              lines.append(":{}: {}".format(string.name,
-                                             string_collection[string.name]))
+                                           string_collection[string.name]))
      language.__doc__ = '\n'.join(lines)
  
Fix the rendering of language instance docstrings
## Code Before:


from .cls import Language

from .en import EN
from .fr import FR
from .it import IT
from .nl import NL


__all__ = ['Language', 'EN', 'FR', 'IT', 'NL']


# generate docstrings for the Language instances

for code, language_ref in Language.languages.items():
    language = language_ref()
    lines = []
    for string_collection in language.strings.values():
        lines.append("\n.. rubric:: {}\n"
                     .format(type(string_collection).__name__))
        for string in string_collection._strings:
            lines.append(":{}: {}".format(string.name,
                                            string_collection[string.name]))
    language.__doc__ = '\n'.join(lines)

## Instruction:
Fix the rendering of language instance docstrings
## Code After:


from .cls import Language

from .en import EN
from .fr import FR
from .it import IT
from .nl import NL


__all__ = ['Language', 'EN', 'FR', 'IT', 'NL']


# generate docstrings for the Language instances

for code, language_ref in Language.languages.items():
    language = language_ref()
    lines = ['Localized strings for {}'.format(language.name)]
    for string_collection in language.strings.values():
        lines.append("\n.. rubric:: {}\n"
                     .format(type(string_collection).__name__))
        for string in string_collection._strings:
            lines.append(":{}: {}".format(string.name,
                                          string_collection[string.name]))
    language.__doc__ = '\n'.join(lines)
