class_docstr: Add ``translated`` or ``untranslated`` classes to indicate translation status.
class_docstr_tok: ["Add","``","translated","``","or","``","untranslated","``","classes","to","indicate","translation","status","."]
code: def apply(self, **kwargs: Any) -> None:
      from sphinx.builders.gettext import MessageCatalogBuilder
  
      if isinstance(self.app.builder, MessageCatalogBuilder):
          return
  
      if not self.config.translation_progress_classes:
          return
  
      if self.config.translation_progress_classes is True:
          add_translated = add_untranslated = True
      elif self.config.translation_progress_classes == "translated":
          add_translated = True
          add_untranslated = False
      elif self.config.translation_progress_classes == "untranslated":
          add_translated = False
          add_untranslated = True
      else:
          msg = (
              "translation_progress_classes must be "
              'True, False, "translated" or "untranslated"'
          )
          raise ConfigError(msg)
  
      for node in self.document.findall(
          NodeMatcher(translated=Any)
      ):  # type: nodes.Element
          if node["translated"]:
              if add_translated:
                  node.setdefault("classes", []).append("translated")
          else:
              if add_untranslated:
                  node.setdefault("classes", []).append("untranslated")
  
imports: from __future__ import annotations
  import contextlib
  from os import path
  from re import DOTALL, match
  from textwrap import indent
  from typing import TYPE_CHECKING, Any, TypeVar
  from docutils import nodes
  from docutils.io import StringInput
  from sphinx import addnodes
  from sphinx.domains.std import make_glossary_term, split_term_classifiers
  from sphinx.errors import ConfigError
  from sphinx.locale import __
  from sphinx.locale import init
  from sphinx.transforms import SphinxTransform
  from sphinx.util import get_filetype, logging
  from sphinx.util.i18n import docname_to_domain
  from sphinx.util.index_entries import split_index_msg
  from sphinx.util.nodes import IMAGE_TYPE_NODES, LITERAL_TYPE_NODES, NodeMatcher, extract_messages, traverse_translatable_index
label_desc: Use image node_id 1 for calling the AddTranslationClasses obj's underlying member method code with example usage: obj.apply() without return types