def checkInvalidFilename(str, dirsep=True): bad = invalidFilename(str, dirsep) if bad: showWarning(_("The following character can not be used: %s") % bad) return True return False
def profileNameOk(self, str): from anki.utils import invalidFilename, invalidFilenameChars if invalidFilename(str): showWarning( _("A profile name cannot contain these characters: %s") % " ".join(invalidFilenameChars)) return return True
def checkInvalidFilename(str, dirsep=True): bad = invalidFilename(str, dirsep) if bad: showWarning(tr(TR.QT_MISC_THE_FOLLOWING_CHARACTER_CAN_NOT_BE, val=bad)) return True return False
def checkInvalidFilename(str: str, dirsep: bool = True) -> bool: bad = invalidFilename(str, dirsep) if bad: showWarning(tr.qt_misc_the_following_character_can_not_be(val=bad)) return True return False