def data(self): # In debug mode, always reload all translations if self._data is None or utils.is_debug_mode(): translations = glob.glob('coursedata/texts/*.yaml') self._data = {} for trans_file in translations: lang = path.splitext(path.basename(trans_file))[0] self._data[lang] = courses.load_yaml(trans_file) return self._data
def __init__(self): self.data = {} translations = glob.glob('coursedata/texts/*.yaml') for trans_file in translations: lang = path.splitext(path.basename(trans_file))[0] self.data[lang] = courses.load_yaml(trans_file)
def __init__(self): self.data = courses.load_yaml('coursedata/texts.yaml')