Spaces:
Paused
Paused
0x07CB
commited on
Nettoyage des importations inutilisées dans configuration_ui_lang.py
Browse files- pages/configuration_ui_lang.py +11 -14
pages/configuration_ui_lang.py
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
# Standard libraries
|
| 2 |
-
import base64
|
| 3 |
-
import io
|
| 4 |
import json
|
| 5 |
-
import os
|
| 6 |
-
import re
|
| 7 |
-
import tempfile
|
| 8 |
-
import time
|
| 9 |
-
from os import getenv
|
| 10 |
from typing import Any
|
| 11 |
from typing import Dict
|
| 12 |
-
from typing import IO
|
| 13 |
-
from typing import List
|
| 14 |
from typing import Optional
|
| 15 |
-
from typing import Tuple
|
| 16 |
-
from typing import Union
|
| 17 |
|
| 18 |
# Third-party libraries
|
| 19 |
import streamlit as st
|
|
@@ -36,8 +36,6 @@ LANGUAGES_EMOJI = {
|
|
| 36 |
"Vietnamese": "🇻🇳", "Welsh": "🏴"
|
| 37 |
}
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
def load_ui_language(file_path: Optional[str] = "ui_lang_support.json") -> Dict[str, Any]:
|
| 42 |
"""
|
| 43 |
Charge les traductions de l'interface utilisateur à partir d'un fichier JSON.
|
|
@@ -61,7 +59,6 @@ def load_ui_language(file_path: Optional[str] = "ui_lang_support.json") -> Dict[
|
|
| 61 |
print(f"{get_translation('erreur_lecture_fichier')} {e}")
|
| 62 |
return {}
|
| 63 |
|
| 64 |
-
|
| 65 |
def get_translation(key: str) -> str:
|
| 66 |
"""
|
| 67 |
Obtient la traduction pour une clé donnée basée sur la langue d'interface sélectionnée.
|
|
|
|
| 1 |
# Standard libraries
|
| 2 |
+
#import base64
|
| 3 |
+
#import io
|
| 4 |
import json
|
| 5 |
+
#import os
|
| 6 |
+
#import re
|
| 7 |
+
#import tempfile
|
| 8 |
+
#import time
|
| 9 |
+
#from os import getenv
|
| 10 |
from typing import Any
|
| 11 |
from typing import Dict
|
| 12 |
+
#from typing import IO
|
| 13 |
+
#from typing import List
|
| 14 |
from typing import Optional
|
| 15 |
+
#from typing import Tuple
|
| 16 |
+
#from typing import Union
|
| 17 |
|
| 18 |
# Third-party libraries
|
| 19 |
import streamlit as st
|
|
|
|
| 36 |
"Vietnamese": "🇻🇳", "Welsh": "🏴"
|
| 37 |
}
|
| 38 |
|
|
|
|
|
|
|
| 39 |
def load_ui_language(file_path: Optional[str] = "ui_lang_support.json") -> Dict[str, Any]:
|
| 40 |
"""
|
| 41 |
Charge les traductions de l'interface utilisateur à partir d'un fichier JSON.
|
|
|
|
| 59 |
print(f"{get_translation('erreur_lecture_fichier')} {e}")
|
| 60 |
return {}
|
| 61 |
|
|
|
|
| 62 |
def get_translation(key: str) -> str:
|
| 63 |
"""
|
| 64 |
Obtient la traduction pour une clé donnée basée sur la langue d'interface sélectionnée.
|