(word)
| 298 | |
| 299 | |
| 300 | def i8ln(word): |
| 301 | if config['LOCALE'] == "en": |
| 302 | return word |
| 303 | if not hasattr(i8ln, 'dictionary'): |
| 304 | file_path = os.path.join( |
| 305 | config['ROOT_PATH'], |
| 306 | config['LOCALES_DIR'], |
| 307 | '{}.min.json'.format(config['LOCALE'])) |
| 308 | if os.path.isfile(file_path): |
| 309 | with open(file_path, 'r') as f: |
| 310 | i8ln.dictionary = json.loads(f.read()) |
| 311 | else: |
| 312 | log.warning('Skipping translations - Unable to find locale file: %s', file_path) |
| 313 | return word |
| 314 | if word in i8ln.dictionary: |
| 315 | return i8ln.dictionary[word] |
| 316 | else: |
| 317 | log.debug('Unable to find translation for "%s" in locale %s!', word, config['LOCALE']) |
| 318 | return word |
| 319 | |
| 320 | |
| 321 | def get_pokemon_data(pokemon_id): |
no outgoing calls
no test coverage detected