10 Commits

Author SHA1 Message Date
gentlegiantJGC
106fd028b9 Reformatted 2024-03-18 13:26:44 +00:00
gentlegiantJGC
d7eedc1068 Fixed glob
Paths must be escaped first in case they contain special characters
2022-12-21 14:10:20 +00:00
gentlegiantJGC
f426b46371 Merge branch '0.10' into improv-logging 2022-07-29 10:42:56 +01:00
gentlegiantJGC
c0e3bbcbcc Improved logging
Switched to getLogger to get the logger instead of importing the object.
Added file handlers for the libraries.
Merged the file output into one file.
Made the file include the process id so that each process has its own log file.
2022-04-20 11:30:43 +01:00
gentlegiantJGC
30113c3368 Refactored lang.py to allow reloading
This rewrites the language module to allow switching the active language and reloading of the lang files.
It also adds some functions to make inspection possible.
2022-04-13 11:32:01 +01:00
ALTB0ne
200b8ba00e Add comment support to lang files (with leading spaces) 2021-05-22 18:59:01 +02:00
gentlegiantJGC
d3059df115 Fall back to default language if language is None
locale.getdefaultlanguage can return None if the language cannot be found.
2021-05-06 10:53:30 +01:00
gentlegiantJGC
f907972f30 Improved language support
The language system first loads en.lang then updates it with the lang file for the system's language prefix (eg de.lang) then if a lang file exists for the region then that will be loaded and merged.
This allows for multiple languages to share the same language file if they are similar enough with region modifications where required.
2021-03-03 10:43:01 +00:00
gentlegiantJGC
7b991afbc7 Reformatted 2021-02-14 12:24:39 +00:00
gentlegiantJGC
fa42432bfe Improved the localisaiton handling
Added a better loader which can handle stacking translations from different directories. This will make it easier for third party programs to add their own translations.
Made lang a module since it does not have to contain the actual language files.
Moved the translation files into amulet_map_editor/lang
added prefixes to each of the language entries so there are not conflicts
2021-01-19 13:33:38 +00:00