From 89d60fe79927d7cd4b37be9a90c963776df7a564 Mon Sep 17 00:00:00 2001 From: aussig Date: Thu, 26 Sep 2024 17:46:51 +0100 Subject: [PATCH 1/4] Add new section to CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8155ff..988a176 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## vx.x.x - xxxx-xx-xx + + + + ## v4.1.0 - 2024-09-26 ### New Features: From cd69701dc1766f4b8cd3bac5ab42a67d8c4054fe Mon Sep 17 00:00:00 2001 From: aussig Date: Thu, 26 Sep 2024 18:34:15 +0100 Subject: [PATCH 2/4] Update INF numbers in legend window to latest unicode versions. --- CHANGELOG.md | 2 ++ bgstally/windows/legend.py | 4 ++-- load.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 988a176..0570264 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ## vx.x.x - xxxx-xx-xx +### Bug Fixes: +* INF numbers in legend / help window weren't showing the new ones implemented in v4.1.0 ## v4.1.0 - 2024-09-26 diff --git a/bgstally/windows/legend.py b/bgstally/windows/legend.py index 1403f03..0a67e30 100644 --- a/bgstally/windows/legend.py +++ b/bgstally/windows/legend.py @@ -2,7 +2,7 @@ from os import path from tkinter import PhotoImage, ttk -from bgstally.constants import COLOUR_HEADING_1, FOLDER_ASSETS, FONT_HEADING_1 +from bgstally.constants import COLOUR_HEADING_1, FOLDER_ASSETS, FONT_HEADING_1, FONT_TEXT from bgstally.utils import _, __ @@ -72,7 +72,7 @@ def show(self): ttk.Label(frame_contents, text=" " + _("Primary INF. This is INF gained for the mission issuing faction.")).grid(row=current_row, column=1, sticky=tk.W); current_row += 1 # LANG: Label on legend window ttk.Label(frame_contents, text="🅢", font=("Helvetica", 24)).grid(row=current_row, column=0) ttk.Label(frame_contents, text=" " + _("Secondary INF. This is INF gained as a secondary effect of the mission, for example the destination faction for delivery missions.")).grid(row=current_row, column=1, sticky=tk.W); current_row += 1 # LANG: Label on legend window - ttk.Label(frame_contents, text="➊ ➋ ➌ ➍ ➎", font=("Helvetica", 14)).grid(row=current_row, column=0) + ttk.Label(frame_contents, text="1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣", font=FONT_TEXT).grid(row=current_row, column=0) ttk.Label(frame_contents, text=" " + _("Detailed INF split into + / ++ / +++ / ++++ / +++++ received from missions.")).grid(row=current_row, column=1, sticky=tk.W); current_row += 1 # LANG: Label on legend window ttk.Label(frame_contents, image=self.image_icon_bgs_cz).grid(row=current_row, column=0) ttk.Label(frame_contents, text=" " + _("On-ground Conflict Zone")).grid(row=current_row, column=1, sticky=tk.W); current_row += 1 # LANG: Label on legend window diff --git a/load.py b/load.py index 9b1297e..e20b900 100644 --- a/load.py +++ b/load.py @@ -9,7 +9,7 @@ from bgstally.debug import Debug PLUGIN_NAME = "BGS-Tally" -PLUGIN_VERSION = semantic_version.Version.coerce("4.1.0") +PLUGIN_VERSION = semantic_version.Version.coerce("4.2.0-dev") # Initialise the main plugin class bgstally.globals.this = this = BGSTally(PLUGIN_NAME, PLUGIN_VERSION) From ea62b67f5f56e39aa97d86c0d0e77bb0b713bfe0 Mon Sep 17 00:00:00 2001 From: aussig Date: Fri, 27 Sep 2024 08:32:10 +0100 Subject: [PATCH 3/4] Fixed empty Discord report if Discord lang not English. Fixes #272. --- CHANGELOG.md | 1 + bgstally/utils.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0570264..b44dff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Bug Fixes: +* The Discord report was blank if the Discord language was set to anything other than English * INF numbers in legend / help window weren't showing the new ones implemented in v4.1.0 diff --git a/bgstally/utils.py b/bgstally/utils.py index 683b68d..c5f364e 100644 --- a/bgstally/utils.py +++ b/bgstally/utils.py @@ -30,9 +30,13 @@ def __(string: str, lang: str) -> str: Returns: str: Translated string """ - l10n_path: str = join(bgstally.globals.this.plugin_dir, l10n.LOCALISATION_DIR) if lang == "" or lang is None: return _(string) + if appversion() < semantic_version.Version('5.12.0'): + l10n_path: str = join(bgstally.globals.this.plugin_dir, l10n.LOCALISATION_DIR) + else: + l10n_path: Path = Path(join(bgstally.globals.this.plugin_dir, l10n.LOCALISATION_DIR)) + contents: dict[str, str] = l10n.Translations.contents(lang=lang, plugin_path=l10n_path) if not contents: From 3445acd16fe732a0beced2d623398621f0581efc Mon Sep 17 00:00:00 2001 From: aussig Date: Fri, 27 Sep 2024 12:41:35 +0100 Subject: [PATCH 4/4] Update CHANGELOG and version for release --- CHANGELOG.md | 2 +- load.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b44dff6..6ebe819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## vx.x.x - xxxx-xx-xx +## v4.1.1 - 2024-09-27 ### Bug Fixes: diff --git a/load.py b/load.py index e20b900..0202f7d 100644 --- a/load.py +++ b/load.py @@ -9,7 +9,7 @@ from bgstally.debug import Debug PLUGIN_NAME = "BGS-Tally" -PLUGIN_VERSION = semantic_version.Version.coerce("4.2.0-dev") +PLUGIN_VERSION = semantic_version.Version.coerce("4.1.1") # Initialise the main plugin class bgstally.globals.this = this = BGSTally(PLUGIN_NAME, PLUGIN_VERSION)