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.
Potentially problematic release.
This version of telegram_libs might be problematic. Click here for more details.
- telegram_libs/__init__.py +1 -1
- telegram_libs/translation.py +6 -2
- {telegram_libs-0.1.1.dist-info → telegram_libs-0.1.2.dist-info}/METADATA +1 -1
- telegram_libs-0.1.2.dist-info/RECORD +5 -0
- telegram_libs-0.1.1.dist-info/RECORD +0 -5
- {telegram_libs-0.1.1.dist-info → telegram_libs-0.1.2.dist-info}/WHEEL +0 -0
telegram_libs/__init__.py
CHANGED
telegram_libs/translation.py
CHANGED
@@ -3,10 +3,14 @@ import os
|
|
3
3
|
|
4
4
|
def load_translations():
|
5
5
|
translations = {}
|
6
|
-
#
|
7
|
-
project_root = os.path.abspath(os.
|
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]
|
@@ -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,,
|
File without changes
|