From 8b77c87dab7ef222961118e616f5607233166b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Moreira?= Date: Thu, 9 Jan 2020 12:20:34 -0300 Subject: [PATCH] [fix] missing categories i18n --- CHANGELOG.md | 1 + bauh/view/resources/locale/de | 3 ++- bauh/view/resources/locale/en | 3 ++- bauh/view/resources/locale/it | 3 ++- bauh/view/util/translation.py | 5 ++++- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fecbd3a3..449942f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - not using HTTP sessions anymore to perform the searches. It seems to avoid URLs not being found after an internet drop event. ### Fixes +- missing categories i18n [48](https://github.com/vinifmor/bauh/issues/48) - not verifying if an icon path is a file - Web: - not handling HTTP connection issues diff --git a/bauh/view/resources/locale/de b/bauh/view/resources/locale/de index f4387ad2..d931929d 100644 --- a/bauh/view/resources/locale/de +++ b/bauh/view/resources/locale/de @@ -171,4 +171,5 @@ files=Dateien all_files=Alle Dateien file_chooser.title=Dateiauswahl message.file.not_exist=Datei existiert nicht -message.file.not_exist.body=Die Datei {} scheint nicht zu existieren \ No newline at end of file +message.file.not_exist.body=Die Datei {} scheint nicht zu existieren +development=Entwicklung \ No newline at end of file diff --git a/bauh/view/resources/locale/en b/bauh/view/resources/locale/en index baf28c65..079441d4 100644 --- a/bauh/view/resources/locale/en +++ b/bauh/view/resources/locale/en @@ -175,4 +175,5 @@ files=files all_files=all files file_chooser.title=File selector message.file.not_exist=File does not exist -message.file.not_exist.body=The file {} seems not to exist \ No newline at end of file +message.file.not_exist.body=The file {} seems not to exist +development=development \ No newline at end of file diff --git a/bauh/view/resources/locale/it b/bauh/view/resources/locale/it index f715f261..d9d9fed0 100644 --- a/bauh/view/resources/locale/it +++ b/bauh/view/resources/locale/it @@ -172,4 +172,5 @@ files=files all_files=tutti i files file_chooser.title=Selettore file message.file.not_exist=File non esiste -message.file.not_exist.body=Il file {} sembra non esistere \ No newline at end of file +message.file.not_exist.body=Il file {} sembra non esistere +development=sviluppo \ No newline at end of file diff --git a/bauh/view/util/translation.py b/bauh/view/util/translation.py index a76204a2..40c22685 100644 --- a/bauh/view/util/translation.py +++ b/bauh/view/util/translation.py @@ -19,7 +19,10 @@ class I18n(dict): return self.current.__getitem__(item) except KeyError: if self.default: - return self.default.__getitem__(item) + try: + return self.default.__getitem__(item) + except KeyError: + return item else: return item