  from .custom_widgets import Tooltip
  from .utils import get_config, get_images
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
  # LOCALES
  _LANG = gettext.translation("gui.menu", localedir="locales", fallback=True)
  _ = _LANG.gettext
 
</s> remove _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True)
 </s> add _LANG = gettext.translation("gui.menu", localedir="locales", fallback=True) </s> remove from lib.serializer import get_serializer
 </s> add from lib.serializer import get_serializer, Serializer </s> remove _RESOURCES = [(_("faceswap.dev - Guides and Forum"), "https://www.faceswap.dev"),
              (_("Patreon - Support this project"), "https://www.patreon.com/faceswap"),
              (_("Discord - The FaceSwap Discord server"), "https://discord.gg/VasFUAy"),
              (_("Github - Our Source Code"), "https://github.com/deepfakes/faceswap")]
 </s> add _RESOURCES: T.List[T.Tuple[str, str]] = [
    (_("faceswap.dev - Guides and Forum"), "https://www.faceswap.dev"),
    (_("Patreon - Support this project"), "https://www.patreon.com/faceswap"),
    (_("Discord - The FaceSwap Discord server"), "https://discord.gg/VasFUAy"),
    (_("Github - Our Source Code"), "https://github.com/deepfakes/faceswap")] </s> remove     def output_sysinfo(self):
        """ Output system information to console """
        logger.debug("Obtaining system information")
        self.root.config(cursor="watch")
        self.clear_console()
        try:
            from lib.sysinfo import sysinfo  # pylint:disable=import-outside-toplevel
            info = sysinfo
        except Exception as err:  # pylint:disable=broad-except
            info = f"Error obtaining system info: {str(err)}"
        self.clear_console()
        logger.debug("Obtained system information: %s", info)
        print(info)
        self.root.config(cursor="")

    def check(self):
        """ Check for updates and clone repository """
        logger.debug("Checking for updates...")
        self.root.config(cursor="watch")
        encoding = locale.getpreferredencoding()
        logger.debug("Encoding: %s", encoding)
        self.check_for_updates(encoding, check=True)
        self.root.config(cursor="")

    def update(self):
        """ Check for updates and clone repository """
        logger.debug("Updating Faceswap...")
        self.root.config(cursor="watch")
        encoding = locale.getpreferredencoding()
        logger.debug("Encoding: %s", encoding)
        success = False
        if self.check_for_updates(encoding):
            success = self.do_update(encoding)
        update_deps.main(is_gui=True)
        if success:
            logger.info("Please restart Faceswap to complete the update.")
        self.root.config(cursor="")

    @staticmethod
    def check_for_updates(encoding, check=False):
        """ Check whether an update is required """
        # Do the check
        logger.info("Checking for updates...")
        update = False
        msg = ""
        gitcmd = "git remote update && git status -uno"
        with Popen(gitcmd, shell=True, stdout=PIPE, stderr=STDOUT, cwd=_WORKING_DIR) as cmd:
            stdout, _ = cmd.communicate()
            retcode = cmd.poll()
        if retcode != 0:
            msg = ("Git is not installed or you are not running a cloned repo. "
                   "Unable to check for updates")
        else:
            chk = stdout.decode(encoding, errors="replace").splitlines()
            for line in chk:
                if line.lower().startswith("your branch is ahead"):
                    msg = "Your branch is ahead of the remote repo. Not updating"
                    break
                if line.lower().startswith("your branch is up to date"):
                    msg = "Faceswap is up to date."
                    break
                if line.lower().startswith("your branch is behind"):
                    msg = "There are updates available"
                    update = True
                    break
                if "have diverged" in line.lower():
                    msg = "Your branch has diverged from the remote repo. Not updating"
                    break
        if not update or check:
            logger.info(msg)
        logger.debug("Checked for update. Update required: %s", update)
        return update

    @staticmethod
    def do_update(encoding):
        """ Update Faceswap """
        logger.info("A new version is available. Updating...")
        gitcmd = "git pull"
        with Popen(gitcmd,
                   shell=True,
                   stdout=PIPE,
                   stderr=STDOUT,
                   bufsize=1,
                   cwd=_WORKING_DIR) as cmd:
            while True:
                output = cmd.stdout.readline().decode(encoding, errors="replace")
                if output == "" and cmd.poll() is not None:
                    break
                if output:
                    logger.debug("'%s' output: '%s'", gitcmd, output.strip())
                    print(output.strip())
            retcode = cmd.poll()
        logger.debug("'%s' returncode: %s", gitcmd, retcode)
        if retcode != 0:
            logger.info("An error occurred during update. return code: %s", retcode)
            retval = False
        else:
            retval = True
        return retval

 </s> add 
if T.TYPE_CHECKING:
    from scripts.gui import FaceswapGui

  from .custom_widgets import Tooltip
  from .utils import get_config, get_images
  
if T.TYPE_CHECKING:
    from scripts.gui import FaceswapGui

  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
  # LOCALES
  _LANG = gettext.translation("gui.menu", localedir="locales", fallback=True)
  _ = _LANG.gettext
keep keep add keep keep keep keep keep
 locales: Add GUI menu translations 
lib/gui/menu.py