          logger.info("Succesfully switched to '%s'. You may want to check for updates to make sure "
                      "that you have the latest code.", branch)
          logger.info("Please restart Faceswap to complete the switch.")
  
      def _build_recources_menu(self):
          """ Build resources menu """
          # pylint: disable=cell-var-from-loop
          logger.debug("Building Resources Files menu")
          for resource in _RESOURCES:
              self.recources_menu.add_command(
 
</s> remove                          stdout.decode(locale.getdefaultlocale(),
 </s> add                          stdout.decode(T.cast(str, locale.getdefaultlocale()), </s> remove                 command=lambda link=resource[1]: webbrowser.open_new(link))
 </s> add                 command=lambda link=resource[1]: webbrowser.open_new(link))  # type:ignore </s> remove         self.add_command(label="Configure Settings...",
 </s> add         self.add_command(label=_("Configure Settings..."), </s> remove     def build(self):
 </s> add     def _build(self) -> None: </s> remove     def build(self):
 </s> add     def _in_thread(self, action: str):
        """ Perform selected action inside a thread

        Parameters
        ----------
        action: str
            The action to be performed. The action corresponds to the function name to be called
        """
        logger.debug("Performing help action: %s", action)
        thread = MultiThread(getattr(self, action), thread_count=1)
        thread.start()
        logger.debug("Performed help action: %s", action)

    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="")

    @classmethod
    def _check_for_updates(cls, encoding: str, check: bool = False) -> bool:
        """ Check whether an update is required

        Parameters
        ----------
        encoding: str
            The encoding to use for decoding process returns
        check: bool
            ``True`` if we are just checking for updates ``False`` if a check and update is to be
            performed. Default: ``False``

        Returns
        -------
        bool
            ``True`` if 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

    def _check(self) -> None:
        """ 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="")

    @classmethod
    def _do_update(cls, encoding: str) -> bool:
        """ Update Faceswap

        Parameters
        ----------
        encoding: str
            The encoding to use for decoding process returns

        Returns
        -------
        bool
            ``True`` if update was successful
        """
        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:
                out = cmd.stdout
                output = "" if out is None else out.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

    def _update(self) -> None:
        """ 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="")

    def _build(self) -> None:
    def _build_recources_menu(self) -> None:
          logger.info("Succesfully switched to '%s'. You may want to check for updates to make sure "
                      "that you have the latest code.", branch)
          logger.info("Please restart Faceswap to complete the switch.")
  
    def _build_recources_menu(self) -> None:
          """ Build resources menu """
          # pylint: disable=cell-var-from-loop
          logger.debug("Building Resources Files menu")
          for resource in _RESOURCES:
              self.recources_menu.add_command(
keep keep keep keep replace keep keep keep keep keep
 locales: Add GUI menu translations 
lib/gui/menu.py