def set_locale(self, locale): self.locale = Lang.check_locale(locale) if self.locale is None: try: self.locale = Lang.check_locale(self.owner.get_locale()) except: pass if self.locale is None: self.locale = Lang.guess_locale() print( f"**WARNING: bad locale type {locale} passed to Communicator. Reverting to {self.locale}" ) return self.locale
def set_locale(self, locale): self.locale = Lang.check_locale(locale) if self.locale is None: self.locale = Lang.find_substitute(locale) print( f"**WARNING: bad locale type passed to CommandLinePlayer: {locale}. Reverting to {self.locale}" ) return self.locale
def set_locale(self, locale): self.locale = Lang.check_locale(locale) if self.locale is None: self.locale = Lang.guess_locale() print( f"**WARNING: bad locale type {locale} passed to MusicSheetMaker. Reverting to {self.locale}" ) return self.locale