telegram_libs 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

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.
telegram_libs/__init__.py CHANGED
@@ -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,10 +3,14 @@ import os
3
3
 
4
4
  def load_translations():
5
5
  translations = {}
6
- # Assume 'locales' is at the project root
7
- project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
6
+ # Get the project's root directory (where the script is being run from)
7
+ project_root = os.path.abspath(os.getcwd())
8
8
  locales_dir = os.path.join(project_root, 'locales')
9
9
 
10
+ if not os.path.exists(locales_dir):
11
+ print(f"Warning: No 'locales' directory found in {project_root}")
12
+ return translations
13
+
10
14
  for filename in os.listdir(locales_dir):
11
15
  if filename.endswith('.json'):
12
16
  lang = filename.split('.')[0]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: telegram_libs
3
- Version: 0.1.1
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
@@ -0,0 +1,5 @@
1
+ telegram_libs/__init__.py,sha256=F5vFbtaW8HkYEQoTFOdsKSwHMni2vOV17HqtfSKREaY,82
2
+ telegram_libs/translation.py,sha256=LCJLzKzAfd-65pAvSpW7MFr8o34nsdfWuVWonHI7SQU,1270
3
+ telegram_libs-0.1.2.dist-info/METADATA,sha256=a4aXMtr0kn5qYO2ITz2PCm4wUMualDySEVfQ9_5Uz5c,594
4
+ telegram_libs-0.1.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
5
+ telegram_libs-0.1.2.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- telegram_libs/__init__.py,sha256=DA8kwbn0D6y5hd3skhhP_mQJg54ar3iK-b3c5SAfE4o,82
2
- telegram_libs/translation.py,sha256=IKr0P0w8s9GOYxC85XBqNZzTVj9j3IBPYydIDpfGdKE,1133
3
- telegram_libs-0.1.1.dist-info/METADATA,sha256=Ti4SVa17ll_IbpVN9PYmsitc_uvLMVD6MLC-0pKNMok,594
4
- telegram_libs-0.1.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
5
- telegram_libs-0.1.1.dist-info/RECORD,,