]> git.phdru.name Git - m_librarian.git/commitdiff
Fix(translations): Fix importing from `translations`
authorOleg Broytman <phd@phdru.name>
Thu, 24 Dec 2020 22:43:29 +0000 (01:43 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 24 Dec 2020 22:43:29 +0000 (01:43 +0300)
Rename `translations/` -> `translations_dir/` to avoid clashing
with `translations.py`.

m_librarian/translations.py
m_librarian/translations_dir/Makefile [moved from m_librarian/translations/Makefile with 100% similarity]
m_librarian/translations_dir/ru.mo [moved from m_librarian/translations/ru.mo with 100% similarity]
m_librarian/translations_dir/ru.po [moved from m_librarian/translations/ru.po with 100% similarity]
setup.py

index e3cbce455d5b6a739c50d0a6b35711e0a8a505d1..8542ffbe97b20d7562226d1370a430a105c0c206 100644 (file)
@@ -6,7 +6,7 @@ import os
 
 def get_translations(language):
     mo_filename = os.path.join(
-        os.path.dirname(__file__), 'translations', language + '.mo')
+        os.path.dirname(__file__), 'translations_dir', language + '.mo')
     if os.path.exists(mo_filename):
         mo_file = open(mo_filename, 'rb')
         translations = gettext.GNUTranslations(mo_file)
index 9ae03afa192aa1a59a015c102939ae10e34f860e..5eb04b5718fd4c0ce50e29efb414ab5a7e3d462f 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -60,7 +60,7 @@ setup(
     packages=['m_librarian', 'm_librarian.web'],
     package_data={'m_librarian': [
         'glst/*.txt', 'glst/genres_*.glst',
-        'translations/*.mo', 'translations/*.po',
+        'translations_dir/*.mo', 'translations_dir/*.po',
         'web/static/style.css', 'web/views/*.py', 'web/views/*.tmpl',
         ]
     },