From 563295118b2c87018f23dc7ce37e68f73fdae086 Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Fri, 9 May 2025 21:33:20 -0400 Subject: [PATCH 1/6] [Minor] One Day I Will Get Typing Down --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index cb716373..b690aead 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,7 +6,7 @@ This is the master changelog for Elite Dangerous Market Connector. Entries are in the source (not distributed with the Windows installer) for the currently used version. --- -Release 5.13.0-rc1 +Release 5.13.0 === This release contains a significant refactoring away from ctypes code for interacting with the Windows API, establishment of a Common Code file and plugin, adds a timestamp check to discovered events, and more! From a3f1c6f51fab6851b373ebddee90238234d45a8f Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Sat, 10 May 2025 12:44:54 -0400 Subject: [PATCH 2/6] [2431] Reimplement Ctypes LongLang Check --- L10n/tr.strings | 3 +-- l10n.py | 43 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/L10n/tr.strings b/L10n/tr.strings index ec416819..68b93b61 100644 --- a/L10n/tr.strings +++ b/L10n/tr.strings @@ -2,8 +2,7 @@ "Error: Frontier CAPI data out of sync" = "Frontier CAPI datası senkronize değil"; /* prefs.py: Appearance option for Windows "Disable Systray"; */ -"Disable Systray" = "Sistem tepsisi ikonunu devre dışı bırak -"; +"Disable Systray" = "Sistem tepsisi ikonunu devre dışı bırak"; /* edsm.py:Settings>EDSM - Label on checkbox for 'send data'; In files: edsm.py:316; */ "Send flight log and CMDR status to EDSM" = "Uçuş günlüğünü ve CMDR durumunu EDSM'e gönder"; diff --git a/l10n.py b/l10n.py index 67b467be..81faed21 100755 --- a/l10n.py +++ b/l10n.py @@ -37,7 +37,17 @@ LANGUAGE_ID = '!Language' LOCALISATION_DIR: pathlib.Path = pathlib.Path('L10n') if sys.platform == 'win32': - import win32api + import ctypes + from ctypes.wintypes import BOOL, DWORD, LPCVOID + + MUI_LANGUAGE_NAME = 0x8 # Use language names like "en-US" + + # Load function from kernel32 + GetUserPreferredUILanguages = ctypes.windll.kernel32.GetUserPreferredUILanguages + GetUserPreferredUILanguages.argtypes = [ + DWORD, ctypes.POINTER(ctypes.c_ulong), LPCVOID, ctypes.POINTER(ctypes.c_ulong) + ] + GetUserPreferredUILanguages.restype = BOOL class Translations: @@ -238,6 +248,17 @@ class Translations: return open(res_path, encoding='utf-8') +def _wszarray_to_list(array): + offset = 0 + while offset < len(array): + sz = ctypes.wstring_at(ctypes.addressof(array) + offset * 2) # type: ignore + if sz: + yield sz + offset += len(sz) + 1 + else: + break + + class _Locale: """Locale holds a few utility methods to convert data to and from localized versions.""" @@ -301,17 +322,29 @@ class _Locale: :return: The preferred language list """ languages: Iterable[str] - if sys.platform != 'win32': # POSIX lang = locale.getlocale()[0] + languages = [lang.replace('_', '-')] if lang else [] else: - current_locale = win32api.GetUserDefaultLangID() - lang = locale.windows_locale[current_locale] + num_langs = ctypes.c_ulong() + buffer_size = ctypes.c_ulong(0) + # First call to get buffer size + if not GetUserPreferredUILanguages( + MUI_LANGUAGE_NAME, ctypes.byref(num_langs), None, ctypes.byref(buffer_size) + ): + raise ctypes.WinError() + # Allocate buffer + buf = ctypes.create_unicode_buffer(buffer_size.value) + # Second call to get languages + if not GetUserPreferredUILanguages( + MUI_LANGUAGE_NAME, ctypes.byref(num_langs), buf, ctypes.byref(buffer_size) + ): + raise ctypes.WinError() + languages = _wszarray_to_list(buf) # HACK: | 2021-12-11: OneSky calls "Chinese Simplified" "zh-Hans" # in the name of the file, but that will be zh-CN in terms of # locale. So map zh-CN -> zh-Hans - languages = [lang.replace('_', '-')] if lang else [] languages = ['zh-Hans' if lang == 'zh-CN' else lang for lang in languages] return languages From 611c5ca13de90e8c8952868dd7d8fde55206cd20 Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Sun, 11 May 2025 12:57:25 -0400 Subject: [PATCH 3/6] [Minor] Add CobraV and Missing Module --- modules.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/modules.json b/modules.json index 459ee883..f736bcff 100644 --- a/modules.json +++ b/modules.json @@ -104,6 +104,21 @@ "cobramkiv_armour_reactive": { "mass": 27 }, + "cobramkv_armour_grade1": { + "mass": 0 + }, + "cobramkv_armour_grade2": { + "mass": 14 + }, + "cobramkv_armour_grade3": { + "mass": 27 + }, + "cobramkv_armour_mirrored": { + "mass": 27 + }, + "cobramkv_armour_reactive": { + "mass": 27 + }, "cutter_armour_grade1": { "mass": 0 }, @@ -605,6 +620,9 @@ "hpt_heatsinklauncher_turret_tiny": { "mass": 1.3 }, + "hpt_human_extraction_fixed_medium": { + "mass": 4 + }, "hpt_minelauncher_fixed_medium": { "mass": 4 }, @@ -3664,4 +3682,4 @@ "vulture_armour_reactive": { "mass": 35 } -} \ No newline at end of file +} From afa66cd07b7ff528b094f971b8bb83f2b6d73f4f Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Sun, 11 May 2025 13:05:17 -0400 Subject: [PATCH 4/6] [Minor] Add Cobra V --- ships.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ships.json b/ships.json index 363cd561..7b2fd62a 100644 --- a/ships.json +++ b/ships.json @@ -39,6 +39,10 @@ "hullMass": 210, "reserveFuelCapacity": 0.51 }, + "Cobra MkV": { + "hullMass": 150, + "reserveFuelCapacity": 0.49 + }, "Diamondback Explorer": { "hullMass": 260, "reserveFuelCapacity": 0.52 @@ -163,4 +167,4 @@ "hullMass": 230, "reserveFuelCapacity": 0.57 } -} \ No newline at end of file +} From 473cdd94256f7a9f72aca3d6bdf2db527405ff7e Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Mon, 12 May 2025 19:02:29 -0400 Subject: [PATCH 5/6] [Minor] Update Translation Files --- L10n/ja.strings | 21 +++++++++++++++++++++ L10n/pl.strings | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/L10n/ja.strings b/L10n/ja.strings index 20d0956f..b56413fb 100644 --- a/L10n/ja.strings +++ b/L10n/ja.strings @@ -1,3 +1,9 @@ +/* companion.py: Frontier CAPI data doesn't agree with latest Journal game location; In files: companion.py:245; */ +"Error: Frontier CAPI data out of sync" = "エラー: Frontier CAPIデータが同期していません"; + +/* prefs.py: Appearance option for Windows "Disable Systray"; */ +"Disable Systray" = "Systrayを無効にする"; + /* edsm.py:Settings>EDSM - Label on checkbox for 'send data'; In files: edsm.py:316; */ "Send flight log and CMDR status to EDSM" = "フライトログとCMDRステータスをEDSMへ送信する"; @@ -468,6 +474,12 @@ /* prefs.py: Label for location of third-party plugins folder; In files: prefs.py:908; */ "Plugins folder" = "プラグインフォルダ"; +/* prefs.py: Label on button used to open the Plugin Folder; */ +"Open Plugins Folder" = "プラグインフォルダを開く"; + +/* prefs.py: Selecting the Location of the Plugin Directory on the Filesystem; */ +"Plugin Directory Location" = "プラグインディレクトリの場所"; + /* prefs.py: Tip/label about how to disable plugins; In files: prefs.py:923; */ "Tip: You can disable a plugin by{CR}adding '{EXT}' to its folder name" = "ヒント: プラグインを無効にするには{CR}フォルダ名に '{EXT}' を追加してください"; @@ -804,8 +816,17 @@ /* EDMarketConnector.py: Inform User of Beta -> Stable Transition Risks; */ "Update track changed to Stable from Beta. You will no longer receive Beta updates. You will stay on your current Beta version until the next Stable release.\r\n\r\nYou can manually revert to the latest Stable version. To do so, you must download and install the latest Stable version manually. Note that this may introduce bugs or break completely if downgrading between major versions with significant changes.\r\n\r\nDo you want to open GitHub to download the latest release?" = "アップデートトラックをベータから安定版に変更しました。今後ベータ版のアップデートを受け取ることはありません。次の安定版がリリースされるまでこのベータ版をご利用いただけます。\n\n手動で最新の安定版に戻すことができます。そのためには、最新の安定版を手動でダウンロードしてインストールする必要があります。大きな変更を伴うメジャーバージョン間のダウングレードの場合、バグが発生したり、完全に壊れたりする可能性があることに注意してください。\n\nGitHubを開いて最新リリースをダウンロードしますか?"; +/* EDMarketConnector.py: Title of Notification Popup for EDMC Restart; */ +"Restart Required" = "再起動が必要"; + +/* EDMarketConnector.py: Text of Notification Popup for EDMC Restart; */ +"A restart of EDMC is required. EDMC will now restart." = "EDMCの再起動が必要です。EDMCが再起動します。"; + /* myNotebook.py: Can't Paste Images or Files in Text; */ "Cannot paste non-text content." = "テキストではない内容は貼り付けできません"; /* ttkHyperlinkLabel.py: Open Element In Selected Provider; */ "Open in {URL}" = "{URL} で開く"; + +/* ttkHyperlinkLabel.py: Copy the Inara SLEF Format of the active ship to the clipboard; */ +"Copy Inara SLEF" = "Inara SLEF形式でコピーする"; diff --git a/L10n/pl.strings b/L10n/pl.strings index 9d5bdb22..7d7daea1 100644 --- a/L10n/pl.strings +++ b/L10n/pl.strings @@ -1,3 +1,9 @@ +/* companion.py: Frontier CAPI data doesn't agree with latest Journal game location; In files: companion.py:245; */ +"Error: Frontier CAPI data out of sync" = "Błąd: Dane Frontier CAPI nie są zsynchronizowane"; + +/* prefs.py: Appearance option for Windows "Disable Systray"; */ +"Disable Systray" = "Wyłącz zasobnik systemowy"; + /* edsm.py:Settings>EDSM - Label on checkbox for 'send data'; In files: edsm.py:316; */ "Send flight log and CMDR status to EDSM" = "Wyślij flight log i status gracza do EDSM"; From faac1291fb601ed9a215628e5672f1b8eb1a20aa Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Mon, 12 May 2025 19:07:02 -0400 Subject: [PATCH 6/6] [RELEASE] 5.13.1 --- ChangeLog.md | 23 +++++++++++++++++++++++ config/__init__.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index b690aead..03d5a062 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,6 +6,29 @@ This is the master changelog for Elite Dangerous Market Connector. Entries are in the source (not distributed with the Windows installer) for the currently used version. --- +Release 5.13.1 +=== +This release fixes a bug with 5.13.0 that could cause the program to fail to launch if a non-English locale +and English language pack were selected on Windows. + +This release also includes information for Cobra Mk V armor and modules, as well as the Human Extraction module. + +**Changes and Enhancements** +* Adds Cobra Mk V information +* Updates Translations + +**Bug Fixes** +Fixes a widely reported bug with 5.13.0 that could cause English-Language non-English locales to crash on start. + +**Plugin Developers** +* nb.Entry is deprecated, and is slated for removal in 6.0 or later. Please migrate to nb.EntryMenu +* nb.ColoredButton is deprecated, and is slated for removal in 6.0 or later. Please migrate to tk.Button +* Calling internal translations with `_()` is deprecated, and is slated for removal in 6.0 or later. Please migrate to importing `translations` and calling `translations.translate` or `translations.tl` directly +* `Translations` as the translate system singleton is deprecated, and is slated for removal in 6.0 or later. Please migrate to the `translations` singleton +* `help_open_log_folder()` is deprecated, and is slated for removal in 6.0 or later. Please migrate to open_folder() +* `update_feed` is deprecated, and is slated for removal in 6.0 or later. Please migrate to `get_update_feed()` + + Release 5.13.0 === This release contains a significant refactoring away from ctypes code for interacting with the Windows API, diff --git a/config/__init__.py b/config/__init__.py index 580e68ec..68153322 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -52,7 +52,7 @@ appcmdname = 'EDMC' # # Major.Minor.Patch(-prerelease)(+buildmetadata) # NB: Do *not* import this, use the functions appversion() and appversion_nobuild() -_static_appversion = '5.13.0' +_static_appversion = '5.13.1' _cached_version: semantic_version.Version | None = None copyright = '© 2015-2019 Jonathan Harris, 2020-2024 EDCD'