From 4af2d266c590ce29cfd3c34b84ab7e760712e587 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Fri, 4 Jun 2021 21:03:00 -0700 Subject: [PATCH] Move locale folder --- data/{locales => locale}/babel.cfg | 0 data/{locales => locale}/en/LC_MESSAGES/tautulli.mo | Bin data/{locales => locale}/en/LC_MESSAGES/tautulli.po | 0 data/{locales => locale}/fr/LC_MESSAGES/tautulli.mo | Bin data/{locales => locale}/fr/LC_MESSAGES/tautulli.po | 10 +++++----- data/{locales => locale}/tautulli.pot | 0 data/locales/babel.bat | 1 - plexpy/__init__.py | 2 +- 8 files changed, 6 insertions(+), 7 deletions(-) rename data/{locales => locale}/babel.cfg (100%) rename data/{locales => locale}/en/LC_MESSAGES/tautulli.mo (100%) rename data/{locales => locale}/en/LC_MESSAGES/tautulli.po (100%) rename data/{locales => locale}/fr/LC_MESSAGES/tautulli.mo (100%) rename data/{locales => locale}/fr/LC_MESSAGES/tautulli.po (89%) rename data/{locales => locale}/tautulli.pot (100%) delete mode 100644 data/locales/babel.bat diff --git a/data/locales/babel.cfg b/data/locale/babel.cfg similarity index 100% rename from data/locales/babel.cfg rename to data/locale/babel.cfg diff --git a/data/locales/en/LC_MESSAGES/tautulli.mo b/data/locale/en/LC_MESSAGES/tautulli.mo similarity index 100% rename from data/locales/en/LC_MESSAGES/tautulli.mo rename to data/locale/en/LC_MESSAGES/tautulli.mo diff --git a/data/locales/en/LC_MESSAGES/tautulli.po b/data/locale/en/LC_MESSAGES/tautulli.po similarity index 100% rename from data/locales/en/LC_MESSAGES/tautulli.po rename to data/locale/en/LC_MESSAGES/tautulli.po diff --git a/data/locales/fr/LC_MESSAGES/tautulli.mo b/data/locale/fr/LC_MESSAGES/tautulli.mo similarity index 100% rename from data/locales/fr/LC_MESSAGES/tautulli.mo rename to data/locale/fr/LC_MESSAGES/tautulli.mo diff --git a/data/locales/fr/LC_MESSAGES/tautulli.po b/data/locale/fr/LC_MESSAGES/tautulli.po similarity index 89% rename from data/locales/fr/LC_MESSAGES/tautulli.po rename to data/locale/fr/LC_MESSAGES/tautulli.po index df8dbd35..bcacab82 100644 --- a/data/locales/fr/LC_MESSAGES/tautulli.po +++ b/data/locale/fr/LC_MESSAGES/tautulli.po @@ -16,25 +16,25 @@ msgstr "" #: ../../data/interfaces/default/base.html:107 #: ../../data/interfaces/default/base.html:109 -msgid "Libraries" +msgid "base.nav.libraries" msgstr "Bibliothèques" #: ../../data/interfaces/default/base.html:112 #: ../../data/interfaces/default/base.html:114 -msgid "Users" +msgid "base.nav.users" msgstr "Utilisateurs" #: ../../data/interfaces/default/base.html:117 #: ../../data/interfaces/default/base.html:119 -msgid "History" +msgid "base.nav.history" msgstr "Historique" #: ../../data/interfaces/default/base.html:122 #: ../../data/interfaces/default/base.html:124 -msgid "Graphs" +msgid "base.nav.graphs" msgstr "Graphiques" #: ../../data/interfaces/default/base.html:127 #: ../../data/interfaces/default/base.html:129 -msgid "Synced Items" +msgid "base.nav.synced_items" msgstr "Éléments synchronisés" diff --git a/data/locales/tautulli.pot b/data/locale/tautulli.pot similarity index 100% rename from data/locales/tautulli.pot rename to data/locale/tautulli.pot diff --git a/data/locales/babel.bat b/data/locales/babel.bat deleted file mode 100644 index 629003e2..00000000 --- a/data/locales/babel.bat +++ /dev/null @@ -1 +0,0 @@ -pybabel extract -F babel.cfg -o tautulli.pot ../.. \ No newline at end of file diff --git a/plexpy/__init__.py b/plexpy/__init__.py index ea5fe1d8..ab2ed002 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -2707,7 +2707,7 @@ def get_tautulli_info(): def set_locale(locale): logger.info("Setting locale to '%s'", locale) - locale_dir = os.path.join(PROG_DIR, 'data/locales/') + locale_dir = os.path.join(PROG_DIR, 'data/locale/') translation = gettext.translation('tautulli', localedir=locale_dir, languages=[locale, 'en'], fallback=True) translation.install()