              if "Error unserializing data for type" in str(err):
                  # Some reports of corruption breaking menus
                  logger.warning("There was an error opening the recent files list so it has been "
                                 "reset.")
                  self.clear_recent_files(serializer, menu_file)
                  recent_files = []
  
          logger.debug("Loaded recent files: %s", recent_files)
          removed_files = []
          for recent_item in recent_files:
 
</s> remove             self.clear_recent_files(serializer, menu_file)
 </s> add             self._clear_recent_files(serializer, menu_file) </s> remove                 command=lambda kw=kwargs, fn=load_func: fn(**kw))
 </s> add                 command=lambda kw=kwargs, fn=load_func: fn(**kw))  # type:ignore </s> remove     def build_recent_menu(self):
 </s> add     @classmethod
    def _clear_recent_files(cls, serializer: Serializer, menu_file: str) -> None:
        """ Creates or clears recent file list

        Parameters
        ----------
        serializer: :class:`~lib.serializer.Serializer`
            The serializer to use for storing files
        menu_file: str
            The file name holding the recent files
        """
        logger.debug("clearing recent files list: '%s'", menu_file)
        serializer.save(menu_file, [])

    def _build_recent_menu(self) -> None: </s> remove     @staticmethod
    def clear_recent_files(serializer, menu_file):
        """ Creates or clears recent file list """
        logger.debug("clearing recent files list: '%s'", menu_file)
        serializer.save(menu_file, [])

    def refresh_recent_menu(self):
        """ Refresh recent menu on save/load of files """
        self.recent_menu.delete(0, "end")
        self.build_recent_menu()

 </s> add  </s> remove         str
 </s> add         str or ``None``
                self._clear_recent_files(serializer, menu_file)
              if "Error unserializing data for type" in str(err):
                  # Some reports of corruption breaking menus
                  logger.warning("There was an error opening the recent files list so it has been "
                                 "reset.")
                self._clear_recent_files(serializer, menu_file)
                  recent_files = []
  
          logger.debug("Loaded recent files: %s", recent_files)
          removed_files = []
          for recent_item in recent_files:
keep keep keep keep replace keep keep keep keep keep
 locales: Add GUI menu translations 
lib/gui/menu.py