telegram_libs 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: telegram_libs
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Common libraries for Telegram bots
5
5
  Author: Andrey Gritsaenko gricaenko.95a@gmail.com
6
6
  Requires-Python: >=3.11,<4.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "telegram_libs"
3
- version = "0.1.0"
3
+ version = "0.1.2"
4
4
  description = "Common libraries for Telegram bots"
5
5
  authors = ["Andrey Gritsaenko gricaenko.95a@gmail.com"]
6
6
  readme = "README.md"
@@ -2,4 +2,4 @@
2
2
  Telegram Libs - Common libraries for Telegram bots
3
3
  """
4
4
 
5
- __version__ = "0.1.0"
5
+ __version__ = "0.1.2"
@@ -3,7 +3,13 @@ import os
3
3
 
4
4
  def load_translations():
5
5
  translations = {}
6
- locales_dir = os.path.join(os.path.dirname(__file__), 'locales')
6
+ # Get the project's root directory (where the script is being run from)
7
+ project_root = os.path.abspath(os.getcwd())
8
+ locales_dir = os.path.join(project_root, 'locales')
9
+
10
+ if not os.path.exists(locales_dir):
11
+ print(f"Warning: No 'locales' directory found in {project_root}")
12
+ return translations
7
13
 
8
14
  for filename in os.listdir(locales_dir):
9
15
  if filename.endswith('.json'):
File without changes