class_docstr: This extension adds gettext support to Jinja.
class_docstr_tok: ["This","extension","adds","gettext","support","to","Jinja","."]
docstr: Parse until the next block tag with a given name.
docstr_tok: ["Parse","until","the","next","block","tag","with","a","given","name","."]
code: def _parse_block(
      self, parser: "Parser", allow_pluralize: bool
  ) -> t.Tuple[t.List[str], str]:
      """Parse until the next block tag with a given name."""
      referenced = []
      buf = []
  
      while True:
          if parser.stream.current.type == "data":
              buf.append(parser.stream.current.value.replace("%", "%%"))
              next(parser.stream)
          elif parser.stream.current.type == "variable_begin":
              next(parser.stream)
              name = parser.stream.expect("name").value
              referenced.append(name)
              buf.append(f"%({name})s")
              parser.stream.expect("variable_end")
          elif parser.stream.current.type == "block_begin":
              next(parser.stream)
              if parser.stream.current.test("name:endtrans"):
                  break
              elif parser.stream.current.test("name:pluralize"):
                  if allow_pluralize:
                      break
                  parser.fail(
                      "a translatable section can have only one pluralize section"
                  )
              parser.fail(
                  "control structures in translatable sections are not allowed"
              )
          elif parser.stream.eos:
              parser.fail("unclosed translation block")
          else:
              raise RuntimeError("internal parser error")
  
      return referenced, concat(buf)
  
imports: import pprint
  import re
  import typing
  from markupsafe import Markup
  from .None import defaults
  from .None import nodes
  from .environment import Environment
  from .exceptions import TemplateAssertionError
  from .exceptions import TemplateSyntaxError
  from .runtime import concat
  from .runtime import Context
  from .runtime import Undefined
  from .utils import import_string
  from .utils import pass_context
label_desc: Use image node_id 9 for calling the InternationalizationExtension obj's underlying member method code with example usage: obj._parse_block(parser, allow_pluralize) and returns: referenced,  concat