les traductions sont dans le thème

This commit is contained in:
max/sooulix 2024-08-15 02:20:59 +02:00
parent d17a987aa3
commit d29d569578
1 changed files with 0 additions and 3 deletions

View File

@ -25,11 +25,8 @@ class JSONResumeReader(readers.RstReader):
content, metadata = super().read(filename) content, metadata = super().read(filename)
if not('jsonresume' in metadata and os.path.isfile(metadata['jsonresume'])): if not('jsonresume' in metadata and os.path.isfile(metadata['jsonresume'])):
raise Exception('please give a jsonresume metadata field for this type') raise Exception('please give a jsonresume metadata field for this type')
if not(f'jsonresume_{self._language_code}' in metadata and os.path.isfile(metadata[f'jsonresume_{self._language_code}'])):
raise Exception('please give a jsonresume_languagecode metadata field for this type')
metadata['resume'] = json.load(open(metadata['jsonresume'])) metadata['resume'] = json.load(open(metadata['jsonresume']))
metadata['language'] = json.load(open(metadata[f'jsonresume_{self._language_code}']))
metadata['locale'] = self.settings.get('LOCALE', [self.settings.get('DEFAULT_LOCALE', None)]) metadata['locale'] = self.settings.get('LOCALE', [self.settings.get('DEFAULT_LOCALE', None)])
countryname = lambda code: 'langue' countryname = lambda code: 'langue'