PyDrocsid.translations ¶
Translations ¶
Container of multiple translation namespaces
Source code in PyDrocsid/translations.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
__getattr__ ¶
__getattr__(item: str) -> Any
Return a translation namespace
Source code in PyDrocsid/translations.py
170 171 172 173 |
|
register_namespace ¶
register_namespace(name: str, path: Path, prio: int = 0) -> None
Register a new source for a translation namespace.
Source code in PyDrocsid/translations.py
158 159 160 161 162 163 164 165 166 167 168 |
|
load_translations ¶
load_translations(path: Path, prio: int = 0) -> None
Recursively load all translations in a given directory and register the appropriate namespaces.
Source code in PyDrocsid/translations.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
merge ¶
merge(base: dict[Any, Any], src: dict[Any, Any]) -> None
Merge two dictionaries recursively by copying/merging the key-value pairs from src into base.
Parameters:
-
base
(
dict[Any, Any]
) –the base dictionary
-
src
(
dict[Any, Any]
) –the source dictionary to read from
Source code in PyDrocsid/translations.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|