prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Document weblate migrate command
  ### Describe the problem
  
  `weblate migrate` command is mentioned in the docs, but not actually documented. 
  
  It is also used inconsistently:
  1. https://docs.weblate.org/en/latest/admin/languages.html#built-in-language-definitions
  2. https://docs.weblate.org/en/latest/admin/install.html#filling-up-the-database
  
  ### Describe the solution you'd like
  
  document the usage and link it in mentioned occurrences.
  
  ### Describe alternatives you've considered
  
  _No response_
  
  ### Screenshots
  
  _No response_
  
  ### Additional context
  
  _No response_
  
  </issue>
  <code>
  [start of docs/_ext/djangodocs.py]
  1 """Sphinx plugins for Weblate documentation."""
  2 import re
  3 
  4 from sphinx import addnodes
  5 from sphinx.domains.std import Cmdoption
  6 
  7 # RE for option descriptions without a '--' prefix
  8 simple_option_desc_re = re.compile(r"([-_a-zA-Z0-9]+)(\s*.*?)(?=,\s+(?:/|-|--)|$)")
  9 
  10 
  11 def setup(app):
  12     app.add_crossref_type(
  13         directivename="setting", rolename="setting", indextemplate="pair: %s; setting"
  14     )
  15     app.add_object_type(
  16         directivename="django-admin",
  17         rolename="djadmin",
  18         indextemplate="pair: %s; weblate admin command",
  19         parse_node=parse_django_admin_node,
  20     )
  21     app.add_directive("django-admin-option", Cmdoption)
  22 
  23 
  24 def parse_django_admin_node(env, sig, signode):
  25     command = sig.split(" ")[0]
  26     env.ref_context["std:program"] = command
  27     title = f"weblate {sig}"
  28     signode += addnodes.desc_name(title, title)
  29     return command
  30
  [end of docs/_ext/djangodocs.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
  --- a/docs/_ext/djangodocs.py
  +++ b/docs/_ext/djangodocs.py
  @@ -1,6 +1,7 @@
   """Sphinx plugins for Weblate documentation."""
   import re
   
  +from docutils.nodes import literal
   from sphinx import addnodes
   from sphinx.domains.std import Cmdoption
   
  @@ -8,22 +9,45 @@
   simple_option_desc_re = re.compile(r"([-_a-zA-Z0-9]+)(\s*.*?)(?=,\s+(?:/|-|--)|$)")
   
   
  +class WeblateCommandLiteral(literal):
  +    def __init__(self, rawsource="", text="", *children, **attributes):
  +        if not text:
  +            text = "weblate "
  +        super().__init__(rawsource, text, *children, **attributes)
  +
  +
   def setup(app):
       app.add_crossref_type(
           directivename="setting", rolename="setting", indextemplate="pair: %s; setting"
       )
  +    app.add_object_type(
  +        directivename="weblate-admin",
  +        rolename="wladmin",
  +        indextemplate="pair: %s; weblate admin command",
  +        parse_node=parse_weblate_admin_node,
  +        ref_nodeclass=WeblateCommandLiteral,
  +    )
  +    app.add_directive("weblate-admin-option", Cmdoption)
       app.add_object_type(
           directivename="django-admin",
           rolename="djadmin",
  -        indextemplate="pair: %s; weblate admin command",
  +        indextemplate="pair: %s; django-admin command",
           parse_node=parse_django_admin_node,
       )
  -    app.add_directive("django-admin-option", Cmdoption)
   
   
  -def parse_django_admin_node(env, sig, signode):
  +def parse_weblate_admin_node(env, sig, signode):
       command = sig.split(" ")[0]
  +    # Context for options
       env.ref_context["std:program"] = command
       title = f"weblate {sig}"
       signode += addnodes.desc_name(title, title)
       return command
  +
  +
  +def parse_django_admin_node(env, sig, signode):
  +    command = sig.split(" ")[0]
  +    env.ref_context["std:program"] = command
  +    title = "django-admin %s" % sig
  +    signode += addnodes.desc_name(title, title)
  +    return command
  
verification_info: {"golden_diff": "diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py\n--- a/docs/_ext/djangodocs.py\n+++ b/docs/_ext/djangodocs.py\n@@ -1,6 +1,7 @@\n \"\"\"Sphinx plugins for Weblate documentation.\"\"\"\n import re\n \n+from docutils.nodes import literal\n from sphinx import addnodes\n from sphinx.domains.std import Cmdoption\n \n@@ -8,22 +9,45 @@\n simple_option_desc_re = re.compile(r\"([-_a-zA-Z0-9]+)(\\s*.*?)(?=,\\s+(?:/|-|--)|$)\")\n \n \n+class WeblateCommandLiteral(literal):\n+    def __init__(self, rawsource=\"\", text=\"\", *children, **attributes):\n+        if not text:\n+            text = \"weblate \"\n+        super().__init__(rawsource, text, *children, **attributes)\n+\n+\n def setup(app):\n     app.add_crossref_type(\n         directivename=\"setting\", rolename=\"setting\", indextemplate=\"pair: %s; setting\"\n     )\n+    app.add_object_type(\n+        directivename=\"weblate-admin\",\n+        rolename=\"wladmin\",\n+        indextemplate=\"pair: %s; weblate admin command\",\n+        parse_node=parse_weblate_admin_node,\n+        ref_nodeclass=WeblateCommandLiteral,\n+    )\n+    app.add_directive(\"weblate-admin-option\", Cmdoption)\n     app.add_object_type(\n         directivename=\"django-admin\",\n         rolename=\"djadmin\",\n-        indextemplate=\"pair: %s; weblate admin command\",\n+        indextemplate=\"pair: %s; django-admin command\",\n         parse_node=parse_django_admin_node,\n     )\n-    app.add_directive(\"django-admin-option\", Cmdoption)\n \n \n-def parse_django_admin_node(env, sig, signode):\n+def parse_weblate_admin_node(env, sig, signode):\n     command = sig.split(\" \")[0]\n+    # Context for options\n     env.ref_context[\"std:program\"] = command\n     title = f\"weblate {sig}\"\n     signode += addnodes.desc_name(title, title)\n     return command\n+\n+\n+def parse_django_admin_node(env, sig, signode):\n+    command = sig.split(\" \")[0]\n+    env.ref_context[\"std:program\"] = command\n+    title = \"django-admin %s\" % sig\n+    signode += addnodes.desc_name(title, title)\n+    return command\n", "issue": "Document weblate migrate command\n### Describe the problem\n\n`weblate migrate` command is mentioned in the docs, but not actually documented. \r\n\r\nIt is also used inconsistently:\r\n1. https://docs.weblate.org/en/latest/admin/languages.html#built-in-language-definitions\r\n2. https://docs.weblate.org/en/latest/admin/install.html#filling-up-the-database\n\n### Describe the solution you'd like\n\ndocument the usage and link it in mentioned occurrences.\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Screenshots\n\n_No response_\n\n### Additional context\n\n_No response_\n", "before_files": [{"content": "\"\"\"Sphinx plugins for Weblate documentation.\"\"\"\nimport re\n\nfrom sphinx import addnodes\nfrom sphinx.domains.std import Cmdoption\n\n# RE for option descriptions without a '--' prefix\nsimple_option_desc_re = re.compile(r\"([-_a-zA-Z0-9]+)(\\s*.*?)(?=,\\s+(?:/|-|--)|$)\")\n\n\ndef setup(app):\n    app.add_crossref_type(\n        directivename=\"setting\", rolename=\"setting\", indextemplate=\"pair: %s; setting\"\n    )\n    app.add_object_type(\n        directivename=\"django-admin\",\n        rolename=\"djadmin\",\n        indextemplate=\"pair: %s; weblate admin command\",\n        parse_node=parse_django_admin_node,\n    )\n    app.add_directive(\"django-admin-option\", Cmdoption)\n\n\ndef parse_django_admin_node(env, sig, signode):\n    command = sig.split(\" \")[0]\n    env.ref_context[\"std:program\"] = command\n    title = f\"weblate {sig}\"\n    signode += addnodes.desc_name(title, title)\n    return command\n", "path": "docs/_ext/djangodocs.py"}]}