def METHOD_NAME(self) -> None:
    locale_path = f"{settings.DEPLOY_ROOT}/locale"
    output_path = f"{locale_path}/language_options.json"
    data: Dict[str, List[Dict[str, Any]]] = {"languages": []}
    try:
        locales = self.get_locales()
    except CalledProcessError:
        # In case we are not under a Git repo, fallback to getting the
        # locales using listdir().
        locales = os.listdir(locale_path)
        locales.append("en")
        locales = list(set(locales))
    for locale in sorted(locales):
        if locale == "en":
            data["languages"].append(
                {
                    "name": "English",
                    "name_local": "English",
                    "code": "en",
                    "locale": "en",
                }
            )
            continue
        lc_messages_path = os.path.join(locale_path, locale, "LC_MESSAGES")
        if not os.path.exists(lc_messages_path):
            # Not a locale.
            continue
        info: Dict[str, Any] = {}
        code = to_language(locale)
        percentage = self.get_translation_percentage(locale_path, locale)
        try:
            name = LANG_INFO[code]["name"]
            name_local = LANG_INFO[code]["name_local"]
        except KeyError:
            # Fallback to getting the name from PO file.
            filename = self.get_po_filename(locale_path, locale)
            name = self.get_name_from_po_file(filename, locale)
            with override_language(code):
                name_local = _(name)
        info["name"] = name
        info["name_local"] = name_local
        info["code"] = code
        info["locale"] = locale
        info["percent_translated"] = percentage
        data["languages"].append(info)
    with open(output_path, "w") as writer:
        json.dump(data, writer, indent=2, sort_keys=True)
        writer.write("\n")