From 6d5c8c9354d0291b64708878e71343d47166a260 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 17:01:59 +0000
Subject: [PATCH 01/13] Initial plan
From 311947de3e2bb35911fceca42b2a66961df7faf8 Mon Sep 17 00:00:00 2001
From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com>
Date: Thu, 26 Feb 2026 11:06:20 -0600
Subject: [PATCH 02/13] Restructure
---
.../administrator/language/overrides/en-GB.override.ini | 0
.../administrator/language/overrides/en-US.override.ini | 0
.../mokowaasbrand}/administrator/language/overrides/index.html | 0
src/{ => plugins/system/mokowaasbrand}/index.html | 0
src/{ => plugins/system/mokowaasbrand}/language/en-GB/index.html | 0
.../mokowaasbrand}/language/en-GB/plg_system_mokowaasbrand.ini | 0
.../language/en-GB/plg_system_mokowaasbrand.sys.ini | 0
.../system/mokowaasbrand}/language/overrides/en-GB.override.ini | 0
.../system/mokowaasbrand}/language/overrides/en-US.override.ini | 0
.../system/mokowaasbrand}/language/overrides/index.html | 0
src/{ => plugins/system/mokowaasbrand}/mokowaasbrand.xml | 0
src/{ => plugins/system/mokowaasbrand}/services/index.html | 0
src/{ => plugins/system/mokowaasbrand}/services/provider.php | 0
.../system/mokowaasbrand/src/Extension}/mokowaasbrand.php | 0
14 files changed, 0 insertions(+), 0 deletions(-)
rename src/{ => plugins/system/mokowaasbrand}/administrator/language/overrides/en-GB.override.ini (100%)
rename src/{ => plugins/system/mokowaasbrand}/administrator/language/overrides/en-US.override.ini (100%)
rename src/{ => plugins/system/mokowaasbrand}/administrator/language/overrides/index.html (100%)
rename src/{ => plugins/system/mokowaasbrand}/index.html (100%)
rename src/{ => plugins/system/mokowaasbrand}/language/en-GB/index.html (100%)
rename src/{ => plugins/system/mokowaasbrand}/language/en-GB/plg_system_mokowaasbrand.ini (100%)
rename src/{ => plugins/system/mokowaasbrand}/language/en-GB/plg_system_mokowaasbrand.sys.ini (100%)
rename src/{ => plugins/system/mokowaasbrand}/language/overrides/en-GB.override.ini (100%)
rename src/{ => plugins/system/mokowaasbrand}/language/overrides/en-US.override.ini (100%)
rename src/{ => plugins/system/mokowaasbrand}/language/overrides/index.html (100%)
rename src/{ => plugins/system/mokowaasbrand}/mokowaasbrand.xml (100%)
rename src/{ => plugins/system/mokowaasbrand}/services/index.html (100%)
rename src/{ => plugins/system/mokowaasbrand}/services/provider.php (100%)
rename src/{ => plugins/system/mokowaasbrand/src/Extension}/mokowaasbrand.php (100%)
diff --git a/src/administrator/language/overrides/en-GB.override.ini b/src/plugins/system/mokowaasbrand/administrator/language/overrides/en-GB.override.ini
similarity index 100%
rename from src/administrator/language/overrides/en-GB.override.ini
rename to src/plugins/system/mokowaasbrand/administrator/language/overrides/en-GB.override.ini
diff --git a/src/administrator/language/overrides/en-US.override.ini b/src/plugins/system/mokowaasbrand/administrator/language/overrides/en-US.override.ini
similarity index 100%
rename from src/administrator/language/overrides/en-US.override.ini
rename to src/plugins/system/mokowaasbrand/administrator/language/overrides/en-US.override.ini
diff --git a/src/administrator/language/overrides/index.html b/src/plugins/system/mokowaasbrand/administrator/language/overrides/index.html
similarity index 100%
rename from src/administrator/language/overrides/index.html
rename to src/plugins/system/mokowaasbrand/administrator/language/overrides/index.html
diff --git a/src/index.html b/src/plugins/system/mokowaasbrand/index.html
similarity index 100%
rename from src/index.html
rename to src/plugins/system/mokowaasbrand/index.html
diff --git a/src/language/en-GB/index.html b/src/plugins/system/mokowaasbrand/language/en-GB/index.html
similarity index 100%
rename from src/language/en-GB/index.html
rename to src/plugins/system/mokowaasbrand/language/en-GB/index.html
diff --git a/src/language/en-GB/plg_system_mokowaasbrand.ini b/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.ini
similarity index 100%
rename from src/language/en-GB/plg_system_mokowaasbrand.ini
rename to src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.ini
diff --git a/src/language/en-GB/plg_system_mokowaasbrand.sys.ini b/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
similarity index 100%
rename from src/language/en-GB/plg_system_mokowaasbrand.sys.ini
rename to src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
diff --git a/src/language/overrides/en-GB.override.ini b/src/plugins/system/mokowaasbrand/language/overrides/en-GB.override.ini
similarity index 100%
rename from src/language/overrides/en-GB.override.ini
rename to src/plugins/system/mokowaasbrand/language/overrides/en-GB.override.ini
diff --git a/src/language/overrides/en-US.override.ini b/src/plugins/system/mokowaasbrand/language/overrides/en-US.override.ini
similarity index 100%
rename from src/language/overrides/en-US.override.ini
rename to src/plugins/system/mokowaasbrand/language/overrides/en-US.override.ini
diff --git a/src/language/overrides/index.html b/src/plugins/system/mokowaasbrand/language/overrides/index.html
similarity index 100%
rename from src/language/overrides/index.html
rename to src/plugins/system/mokowaasbrand/language/overrides/index.html
diff --git a/src/mokowaasbrand.xml b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
similarity index 100%
rename from src/mokowaasbrand.xml
rename to src/plugins/system/mokowaasbrand/mokowaasbrand.xml
diff --git a/src/services/index.html b/src/plugins/system/mokowaasbrand/services/index.html
similarity index 100%
rename from src/services/index.html
rename to src/plugins/system/mokowaasbrand/services/index.html
diff --git a/src/services/provider.php b/src/plugins/system/mokowaasbrand/services/provider.php
similarity index 100%
rename from src/services/provider.php
rename to src/plugins/system/mokowaasbrand/services/provider.php
diff --git a/src/mokowaasbrand.php b/src/plugins/system/mokowaasbrand/src/Extension/mokowaasbrand.php
similarity index 100%
rename from src/mokowaasbrand.php
rename to src/plugins/system/mokowaasbrand/src/Extension/mokowaasbrand.php
From 28a41017b9384fc96d2f90ee29b4c6c69d78a175 Mon Sep 17 00:00:00 2001
From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com>
Date: Thu, 26 Feb 2026 11:08:20 -0600
Subject: [PATCH 03/13] Reset
---
.../en-GB/plg_system_mokowaasbrand.ini | 8 +++----
.../en-GB/plg_system_mokowaasbrand.sys.ini | 8 +++----
.../mokowaasbrand/language/en-US/index.html | 1 +
.../en-US/plg_system_mokowaasbrand.ini | 22 +++++++++++++++++++
.../en-US/plg_system_mokowaasbrand.sys.ini | 19 ++++++++++++++++
.../system/mokowaasbrand/mokowaasbrand.xml | 14 +++++++-----
6 files changed, 58 insertions(+), 14 deletions(-)
create mode 100644 src/plugins/system/mokowaasbrand/language/en-US/index.html
create mode 100644 src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.ini
create mode 100644 src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini
diff --git a/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.ini b/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.ini
index b087640c..074a95c8 100644
--- a/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.ini
+++ b/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.ini
@@ -6,11 +6,11 @@
; -----------------------------------------------------------------------------
; FILE INFORMATION
; Defgroup: Joomla Language
-; Ingroup: MokoWaaS-Brand
-; Version: 01.04.00
+; Ingroup: MokoWaaSBrand
+; Version: 01.05.00
; File: plg_system_mokowaasbrand.ini
-; Path: /src/language/en-GB/plg_system_mokowaasbrand.ini
-; Brief: English language strings for MokoWaaS-Brand system plugin
+; Path: /src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.ini
+; Brief: English language strings for MokoWaaSBrand system plugin
; Notes: Contains translatable strings for plugin functionality
; Variables: (none)
; -----------------------------------------------------------------------------
diff --git a/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini b/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
index 39abf5bc..6646bf8a 100644
--- a/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
+++ b/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
@@ -6,11 +6,11 @@
; -----------------------------------------------------------------------------
; FILE INFORMATION
; Defgroup: Joomla Language
-; Ingroup: MokoWaaS-Brand
-; Version: 01.04.00
+; Ingroup: MokoWaaSBrand
+; Version: 01.05.00
; File: plg_system_mokowaasbrand.sys.ini
-; Path: /src/language/en-GB/plg_system_mokowaasbrand.sys.ini
-; Brief: System language strings for MokoWaaS-Brand plugin installation
+; Path: /src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
+; Brief: System language strings for MokoWaaSBrand plugin installation
; Notes: Contains strings used during plugin installation and management
; Variables: (none)
; -----------------------------------------------------------------------------
diff --git a/src/plugins/system/mokowaasbrand/language/en-US/index.html b/src/plugins/system/mokowaasbrand/language/en-US/index.html
new file mode 100644
index 00000000..09b7ab1c
--- /dev/null
+++ b/src/plugins/system/mokowaasbrand/language/en-US/index.html
@@ -0,0 +1 @@
+
diff --git a/src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.ini b/src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.ini
new file mode 100644
index 00000000..634c49d9
--- /dev/null
+++ b/src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.ini
@@ -0,0 +1,22 @@
+; -----------------------------------------------------------------------------
+; Copyright (C) 2025 Moko Consulting
+; This file is part of a Moko Consulting project.
+; SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
+; REPO: https://github.com/mokoconsulting-tech/mokowaasbrand
+; -----------------------------------------------------------------------------
+; FILE INFORMATION
+; Defgroup: Joomla Language
+; Ingroup: MokoWaaSBrand
+; Version: 01.06.00
+; File: plg_system_mokowaasbrand.ini
+; Path: /src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.ini
+; Brief: US English language strings for MokoWaaSBrand system plugin
+; Notes: Contains translatable strings for plugin functionality
+; Variables: (none)
+; -----------------------------------------------------------------------------
+
+PLG_SYSTEM_MOKOWAASBRAND="System - MokoWaaS Brand"
+PLG_SYSTEM_MOKOWAASBRAND_XML_DESCRIPTION="This plugin rebrands the Joomla system interface with MokoWaaS identity. It applies language overrides and ensures consistent branding across the platform."
+
+PLG_SYSTEM_MOKOWAASBRAND_ENABLE_BRANDING_LABEL="Enable Branding"
+PLG_SYSTEM_MOKOWAASBRAND_ENABLE_BRANDING_DESC="Enable or disable the MokoWaaS branding across the system."
diff --git a/src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini b/src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini
new file mode 100644
index 00000000..e2620df8
--- /dev/null
+++ b/src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini
@@ -0,0 +1,19 @@
+; -----------------------------------------------------------------------------
+; Copyright (C) 2025 Moko Consulting
+; This file is part of a Moko Consulting project.
+; SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
+; REPO: https://github.com/mokoconsulting-tech/mokowaasbrand
+; -----------------------------------------------------------------------------
+; FILE INFORMATION
+; Defgroup: Joomla Language
+; Ingroup: MokoWaaSBrand
+; Version: 01.06.00
+; File: plg_system_mokowaasbrand.sys.ini
+; Path: /src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini
+; Brief: US English system language strings for MokoWaaSBrand plugin installation
+; Notes: Contains strings used during plugin installation and management
+; Variables: (none)
+; -----------------------------------------------------------------------------
+
+PLG_SYSTEM_MOKOWAASBRAND="System - MokoWaaS Brand"
+PLG_SYSTEM_MOKOWAASBRAND_XML_DESCRIPTION="This plugin rebrands the Joomla system interface with MokoWaaS identity. It applies language overrides and ensures consistent branding across the platform."
diff --git a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
index 1d691fb6..579c3afe 100644
--- a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
+++ b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
@@ -14,11 +14,11 @@
# FILE INFORMATION
DEFGROUP: Joomla.Plugin
- INGROUP: MokoWaaS-Brand
+ INGROUP: MokoWaaSBrand
REPO: https://github.com/mokoconsulting-tech/mokowaasbrand
- VERSION: 01.04.00
- PATH: /src/mokowaasbrand.xml
- BRIEF: Plugin manifest for MokoWaaS-Brand system plugin
+ VERSION: 01.06.00
+ PATH: /src/plugins/system/mokowaasbrand/mokowaasbrand.xml
+ BRIEF: Plugin manifest for MokoWaaSBrand system plugin
NOTE: Defines installation metadata, files, and configuration for Joomla
-->
@@ -29,12 +29,12 @@
GNU General Public License version 3 or later; see LICENSE.md
hello@mokoconsulting.tech
https://mokoconsulting.tech
- 01.04.00
+ 01.06.00
PLG_SYSTEM_MOKOWAASBRAND_XML_DESCRIPTION
Moko\Plugin\System\MokoWaaSBrand
- mokowaasbrand.php
+ src
services
language
@@ -42,6 +42,8 @@
en-GB/plg_system_mokowaasbrand.ini
en-GB/plg_system_mokowaasbrand.sys.ini
+ en-US/plg_system_mokowaasbrand.ini
+ en-US/plg_system_mokowaasbrand.sys.ini
From ba28f08b953bc78d6e7015af6d300515ea209801 Mon Sep 17 00:00:00 2001
From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com>
Date: Thu, 26 Feb 2026 11:14:38 -0600
Subject: [PATCH 04/13] admn
---
.../administrator/language/en-GB/index.html | 8 ++++++++
.../en-GB/plg_system_mokowaasbrand.sys.ini | 19 +++++++++++++++++++
.../administrator/language/en-US/index.html | 1 +
.../en-US/plg_system_mokowaasbrand.sys.ini | 19 +++++++++++++++++++
4 files changed, 47 insertions(+)
create mode 100644 src/plugins/system/mokowaasbrand/administrator/language/en-GB/index.html
create mode 100644 src/plugins/system/mokowaasbrand/administrator/language/en-GB/plg_system_mokowaasbrand.sys.ini
create mode 100644 src/plugins/system/mokowaasbrand/administrator/language/en-US/index.html
create mode 100644 src/plugins/system/mokowaasbrand/administrator/language/en-US/plg_system_mokowaasbrand.sys.ini
diff --git a/src/plugins/system/mokowaasbrand/administrator/language/en-GB/index.html b/src/plugins/system/mokowaasbrand/administrator/language/en-GB/index.html
new file mode 100644
index 00000000..71695153
--- /dev/null
+++ b/src/plugins/system/mokowaasbrand/administrator/language/en-GB/index.html
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/src/plugins/system/mokowaasbrand/administrator/language/en-GB/plg_system_mokowaasbrand.sys.ini b/src/plugins/system/mokowaasbrand/administrator/language/en-GB/plg_system_mokowaasbrand.sys.ini
new file mode 100644
index 00000000..6646bf8a
--- /dev/null
+++ b/src/plugins/system/mokowaasbrand/administrator/language/en-GB/plg_system_mokowaasbrand.sys.ini
@@ -0,0 +1,19 @@
+; -----------------------------------------------------------------------------
+; Copyright (C) 2025 Moko Consulting
+; This file is part of a Moko Consulting project.
+; SPDX-License-Identifier: GPL-3.0-or-later
+; REPO: https://github.com/mokoconsulting-tech/mokowaasbrand
+; -----------------------------------------------------------------------------
+; FILE INFORMATION
+; Defgroup: Joomla Language
+; Ingroup: MokoWaaSBrand
+; Version: 01.05.00
+; File: plg_system_mokowaasbrand.sys.ini
+; Path: /src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
+; Brief: System language strings for MokoWaaSBrand plugin installation
+; Notes: Contains strings used during plugin installation and management
+; Variables: (none)
+; -----------------------------------------------------------------------------
+
+PLG_SYSTEM_MOKOWAASBRAND="System - MokoWaaS Brand"
+PLG_SYSTEM_MOKOWAASBRAND_XML_DESCRIPTION="This plugin rebrands the Joomla system interface with MokoWaaS identity. It applies language overrides and ensures consistent branding across the platform."
diff --git a/src/plugins/system/mokowaasbrand/administrator/language/en-US/index.html b/src/plugins/system/mokowaasbrand/administrator/language/en-US/index.html
new file mode 100644
index 00000000..09b7ab1c
--- /dev/null
+++ b/src/plugins/system/mokowaasbrand/administrator/language/en-US/index.html
@@ -0,0 +1 @@
+
diff --git a/src/plugins/system/mokowaasbrand/administrator/language/en-US/plg_system_mokowaasbrand.sys.ini b/src/plugins/system/mokowaasbrand/administrator/language/en-US/plg_system_mokowaasbrand.sys.ini
new file mode 100644
index 00000000..e2620df8
--- /dev/null
+++ b/src/plugins/system/mokowaasbrand/administrator/language/en-US/plg_system_mokowaasbrand.sys.ini
@@ -0,0 +1,19 @@
+; -----------------------------------------------------------------------------
+; Copyright (C) 2025 Moko Consulting
+; This file is part of a Moko Consulting project.
+; SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
+; REPO: https://github.com/mokoconsulting-tech/mokowaasbrand
+; -----------------------------------------------------------------------------
+; FILE INFORMATION
+; Defgroup: Joomla Language
+; Ingroup: MokoWaaSBrand
+; Version: 01.06.00
+; File: plg_system_mokowaasbrand.sys.ini
+; Path: /src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini
+; Brief: US English system language strings for MokoWaaSBrand plugin installation
+; Notes: Contains strings used during plugin installation and management
+; Variables: (none)
+; -----------------------------------------------------------------------------
+
+PLG_SYSTEM_MOKOWAASBRAND="System - MokoWaaS Brand"
+PLG_SYSTEM_MOKOWAASBRAND_XML_DESCRIPTION="This plugin rebrands the Joomla system interface with MokoWaaS identity. It applies language overrides and ensures consistent branding across the platform."
From 0262451a85d1e7c434097fe112757ab9218cd89a Mon Sep 17 00:00:00 2001
From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com>
Date: Thu, 26 Feb 2026 13:43:25 -0600
Subject: [PATCH 05/13] Update mokowaasbrand.xml
---
src/plugins/system/mokowaasbrand/mokowaasbrand.xml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
index 579c3afe..d3e7f09e 100644
--- a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
+++ b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
@@ -37,13 +37,17 @@
src
services
language
+ administrator
- en-GB/plg_system_mokowaasbrand.ini
- en-GB/plg_system_mokowaasbrand.sys.ini
- en-US/plg_system_mokowaasbrand.ini
- en-US/plg_system_mokowaasbrand.sys.ini
+ en-GB/tpl_mokocassiopeia.ini
+ en-US/tpl_mokocassiopeia.ini
+
+
+
+ en-GB/tpl_mokocassiopeia.sys.ini
+ en-US/tpl_mokocassiopeia.sys.ini
From 96dd58da9e96e47c148663d2e6285eb056f25835 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 19:46:21 +0000
Subject: [PATCH 06/13] Fix language file references in mokowaasbrand.xml to
match actual file structure
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
---
src/plugins/system/mokowaasbrand/mokowaasbrand.xml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
index d3e7f09e..e65f6937 100644
--- a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
+++ b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
@@ -41,13 +41,15 @@
- en-GB/tpl_mokocassiopeia.ini
- en-US/tpl_mokocassiopeia.ini
+ en-GB/plg_system_mokowaasbrand.ini
+ en-GB/plg_system_mokowaasbrand.sys.ini
+ en-US/plg_system_mokowaasbrand.ini
+ en-US/plg_system_mokowaasbrand.sys.ini
- en-GB/tpl_mokocassiopeia.sys.ini
- en-US/tpl_mokocassiopeia.sys.ini
+ en-GB/plg_system_mokowaasbrand.sys.ini
+ en-US/plg_system_mokowaasbrand.sys.ini
From 869ff9839cd63b4e6e356dc4459b83ec2e0e10f8 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 19:50:16 +0000
Subject: [PATCH 07/13] Repair XML: Remove .sys.ini files from frontend
language section
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
---
src/plugins/system/mokowaasbrand/mokowaasbrand.xml | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
index e65f6937..cc5b0caa 100644
--- a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
+++ b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
@@ -42,9 +42,7 @@
en-GB/plg_system_mokowaasbrand.ini
- en-GB/plg_system_mokowaasbrand.sys.ini
en-US/plg_system_mokowaasbrand.ini
- en-US/plg_system_mokowaasbrand.sys.ini
From aa62e9207a4da479cf94012177afe22be6c3f8c8 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 19:58:06 +0000
Subject: [PATCH 08/13] Fix class not found error by adding proper namespace
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
---
src/plugins/system/mokowaasbrand/services/provider.php | 3 ++-
.../Extension/{mokowaasbrand.php => MokoWaaSBrand.php} | 8 +++++---
2 files changed, 7 insertions(+), 4 deletions(-)
rename src/plugins/system/mokowaasbrand/src/Extension/{mokowaasbrand.php => MokoWaaSBrand.php} (91%)
diff --git a/src/plugins/system/mokowaasbrand/services/provider.php b/src/plugins/system/mokowaasbrand/services/provider.php
index f2a9c834..481ab323 100644
--- a/src/plugins/system/mokowaasbrand/services/provider.php
+++ b/src/plugins/system/mokowaasbrand/services/provider.php
@@ -30,6 +30,7 @@ use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
+use Moko\Plugin\System\MokoWaaSBrand\Extension\MokoWaaSBrand;
return new class () implements ServiceProviderInterface {
/**
@@ -46,7 +47,7 @@ return new class () implements ServiceProviderInterface {
$container->set(
PluginInterface::class,
function (Container $container) {
- $plugin = new PlgSystemMokoWaaSBrand(
+ $plugin = new MokoWaaSBrand(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('system', 'mokowaasbrand')
);
diff --git a/src/plugins/system/mokowaasbrand/src/Extension/mokowaasbrand.php b/src/plugins/system/mokowaasbrand/src/Extension/MokoWaaSBrand.php
similarity index 91%
rename from src/plugins/system/mokowaasbrand/src/Extension/mokowaasbrand.php
rename to src/plugins/system/mokowaasbrand/src/Extension/MokoWaaSBrand.php
index 69b62652..f569cac4 100644
--- a/src/plugins/system/mokowaasbrand/src/Extension/mokowaasbrand.php
+++ b/src/plugins/system/mokowaasbrand/src/Extension/MokoWaaSBrand.php
@@ -17,11 +17,13 @@
* INGROUP: MokoWaaS-Brand
* REPO: https://github.com/mokoconsulting-tech/mokowaasbrand
* VERSION: 01.04.00
- * PATH: /src/mokowaasbrand.php
- * BRIEF: Main plugin file for MokoWaaS-Brand system plugin
+ * PATH: /src/plugins/system/mokowaasbrand/src/Extension/MokoWaaSBrand.php
+ * BRIEF: Main plugin class for MokoWaaS-Brand system plugin
* NOTE: Handles Joomla system events for rebranding functionality
*/
+namespace Moko\Plugin\System\MokoWaaSBrand\Extension;
+
defined('_JEXEC') or die;
use Joomla\CMS\Plugin\CMSPlugin;
@@ -34,7 +36,7 @@ use Joomla\CMS\Plugin\CMSPlugin;
*
* @since 01.04.00
*/
-class PlgSystemMokoWaaSBrand extends CMSPlugin
+class MokoWaaSBrand extends CMSPlugin
{
/**
* Load the language file on instantiation.
From 197a0b28d7005e014bc12e64014ab38690cd03c5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 20:04:00 +0000
Subject: [PATCH 09/13] Remove .sys.ini files from frontend language
directories
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
---
.../en-GB/plg_system_mokowaasbrand.sys.ini | 19 -------------------
.../en-US/plg_system_mokowaasbrand.sys.ini | 19 -------------------
2 files changed, 38 deletions(-)
delete mode 100644 src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
delete mode 100644 src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini
diff --git a/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini b/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
deleted file mode 100644
index 6646bf8a..00000000
--- a/src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-; -----------------------------------------------------------------------------
-; Copyright (C) 2025 Moko Consulting
-; This file is part of a Moko Consulting project.
-; SPDX-License-Identifier: GPL-3.0-or-later
-; REPO: https://github.com/mokoconsulting-tech/mokowaasbrand
-; -----------------------------------------------------------------------------
-; FILE INFORMATION
-; Defgroup: Joomla Language
-; Ingroup: MokoWaaSBrand
-; Version: 01.05.00
-; File: plg_system_mokowaasbrand.sys.ini
-; Path: /src/plugins/system/mokowaasbrand/language/en-GB/plg_system_mokowaasbrand.sys.ini
-; Brief: System language strings for MokoWaaSBrand plugin installation
-; Notes: Contains strings used during plugin installation and management
-; Variables: (none)
-; -----------------------------------------------------------------------------
-
-PLG_SYSTEM_MOKOWAASBRAND="System - MokoWaaS Brand"
-PLG_SYSTEM_MOKOWAASBRAND_XML_DESCRIPTION="This plugin rebrands the Joomla system interface with MokoWaaS identity. It applies language overrides and ensures consistent branding across the platform."
diff --git a/src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini b/src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini
deleted file mode 100644
index e2620df8..00000000
--- a/src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-; -----------------------------------------------------------------------------
-; Copyright (C) 2025 Moko Consulting
-; This file is part of a Moko Consulting project.
-; SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
-; REPO: https://github.com/mokoconsulting-tech/mokowaasbrand
-; -----------------------------------------------------------------------------
-; FILE INFORMATION
-; Defgroup: Joomla Language
-; Ingroup: MokoWaaSBrand
-; Version: 01.06.00
-; File: plg_system_mokowaasbrand.sys.ini
-; Path: /src/plugins/system/mokowaasbrand/language/en-US/plg_system_mokowaasbrand.sys.ini
-; Brief: US English system language strings for MokoWaaSBrand plugin installation
-; Notes: Contains strings used during plugin installation and management
-; Variables: (none)
-; -----------------------------------------------------------------------------
-
-PLG_SYSTEM_MOKOWAASBRAND="System - MokoWaaS Brand"
-PLG_SYSTEM_MOKOWAASBRAND_XML_DESCRIPTION="This plugin rebrands the Joomla system interface with MokoWaaS identity. It applies language overrides and ensures consistent branding across the platform."
From a444be870a520c7e0c0e59ec7c24053fc25ee50b Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 20:11:08 +0000
Subject: [PATCH 10/13] Add language override files to XML manifest
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
---
src/plugins/system/mokowaasbrand/mokowaasbrand.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
index cc5b0caa..d6d49e14 100644
--- a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
+++ b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
@@ -43,11 +43,15 @@
en-GB/plg_system_mokowaasbrand.ini
en-US/plg_system_mokowaasbrand.ini
+ overrides/en-GB.override.ini
+ overrides/en-US.override.ini
en-GB/plg_system_mokowaasbrand.sys.ini
en-US/plg_system_mokowaasbrand.sys.ini
+ overrides/en-GB.override.ini
+ overrides/en-US.override.ini
From bde5d17da13cb73d0ed48b755094a2d088f1d0e8 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 20:18:54 +0000
Subject: [PATCH 11/13] Fix language loading by implementing programmatic
override loading
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
---
.../system/mokowaasbrand/mokowaasbrand.xml | 4 -
.../src/Extension/MokoWaaSBrand.php | 101 +++++++++++++++++-
2 files changed, 97 insertions(+), 8 deletions(-)
diff --git a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
index d6d49e14..cc5b0caa 100644
--- a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
+++ b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
@@ -43,15 +43,11 @@
en-GB/plg_system_mokowaasbrand.ini
en-US/plg_system_mokowaasbrand.ini
- overrides/en-GB.override.ini
- overrides/en-US.override.ini
en-GB/plg_system_mokowaasbrand.sys.ini
en-US/plg_system_mokowaasbrand.sys.ini
- overrides/en-GB.override.ini
- overrides/en-US.override.ini
diff --git a/src/plugins/system/mokowaasbrand/src/Extension/MokoWaaSBrand.php b/src/plugins/system/mokowaasbrand/src/Extension/MokoWaaSBrand.php
index f569cac4..48f61929 100644
--- a/src/plugins/system/mokowaasbrand/src/Extension/MokoWaaSBrand.php
+++ b/src/plugins/system/mokowaasbrand/src/Extension/MokoWaaSBrand.php
@@ -27,6 +27,7 @@ namespace Moko\Plugin\System\MokoWaaSBrand\Extension;
defined('_JEXEC') or die;
use Joomla\CMS\Plugin\CMSPlugin;
+use Joomla\CMS\Language\Language;
/**
* MokoWaaS Brand System Plugin
@@ -57,8 +58,8 @@ class MokoWaaSBrand extends CMSPlugin
/**
* Event triggered after the framework has loaded and the application initialise method has been called.
*
- * This plugin relies on Joomla's native language override system. Language override files
- * placed in the standard Joomla override directories will be automatically loaded by Joomla.
+ * This method loads language override files from the plugin directory to rebrand Joomla
+ * with MokoWaaS identity. The override files replace core Joomla language strings.
*
* @return void
*
@@ -71,8 +72,100 @@ class MokoWaaSBrand extends CMSPlugin
return;
}
- // Language overrides are handled by Joomla's core system
- // Additional branding functionality can be added here if needed
+ // Load language overrides
+ $this->loadLanguageOverrides();
+ }
+
+ /**
+ * Load language override files from the plugin directory.
+ *
+ * This method loads the override files that replace core Joomla language strings
+ * with MokoWaaS branding.
+ *
+ * @return void
+ *
+ * @since 01.06.00
+ */
+ protected function loadLanguageOverrides()
+ {
+ $language = $this->app->getLanguage();
+ $tag = $language->getTag();
+
+ // Get the plugin path
+ $pluginPath = JPATH_PLUGINS . '/system/mokowaasbrand';
+
+ // Determine if we're in administrator or site
+ $isAdmin = $this->app->isClient('administrator');
+
+ // Load the appropriate override file
+ if ($isAdmin)
+ {
+ $overridePath = $pluginPath . '/administrator/language/overrides/' . $tag . '.override.ini';
+ }
+ else
+ {
+ $overridePath = $pluginPath . '/language/overrides/' . $tag . '.override.ini';
+ }
+
+ // Load the override file if it exists
+ if (file_exists($overridePath))
+ {
+ $language->load('', $pluginPath, $tag, true, false);
+
+ // Parse and load the override file manually
+ $strings = $this->parseLanguageFile($overridePath);
+
+ if (!empty($strings))
+ {
+ foreach ($strings as $key => $value)
+ {
+ $language->_strings[$key] = $value;
+ }
+ }
+ }
+ }
+
+ /**
+ * Parse a language INI file and return the strings.
+ *
+ * @param string $filePath The path to the language file
+ *
+ * @return array Array of language strings
+ *
+ * @since 01.06.00
+ */
+ protected function parseLanguageFile($filePath)
+ {
+ $strings = [];
+
+ if (!file_exists($filePath))
+ {
+ return $strings;
+ }
+
+ $content = file_get_contents($filePath);
+ $lines = explode("\n", $content);
+
+ foreach ($lines as $line)
+ {
+ $line = trim($line);
+
+ // Skip empty lines and comments
+ if (empty($line) || $line[0] === ';')
+ {
+ continue;
+ }
+
+ // Parse KEY="VALUE" format
+ if (preg_match('/^([A-Z0-9_]+)="(.+)"$/i', $line, $matches))
+ {
+ $key = strtoupper($matches[1]);
+ $value = $matches[2];
+ $strings[$key] = $value;
+ }
+ }
+
+ return $strings;
}
/**
From d217820518d0a78189e753130048391535128cf3 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 20:22:24 +0000
Subject: [PATCH 12/13] Add installation script to deploy language overrides
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
---
.../system/mokowaasbrand/mokowaasbrand.xml | 2 +
src/plugins/system/mokowaasbrand/script.php | 441 ++++++++++++++++++
2 files changed, 443 insertions(+)
create mode 100644 src/plugins/system/mokowaasbrand/script.php
diff --git a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
index cc5b0caa..386cbd24 100644
--- a/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
+++ b/src/plugins/system/mokowaasbrand/mokowaasbrand.xml
@@ -32,8 +32,10 @@
01.06.00
PLG_SYSTEM_MOKOWAASBRAND_XML_DESCRIPTION
Moko\Plugin\System\MokoWaaSBrand
+ script.php
+ script.php
src
services
language
diff --git a/src/plugins/system/mokowaasbrand/script.php b/src/plugins/system/mokowaasbrand/script.php
new file mode 100644
index 00000000..1a1d65ea
--- /dev/null
+++ b/src/plugins/system/mokowaasbrand/script.php
@@ -0,0 +1,441 @@
+
+ *
+ * This file is part of a Moko Consulting project.
+ *
+ * SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License (./LICENSE.md).
+ *
+ * FILE INFORMATION
+ * DEFGROUP: Joomla.Plugin
+ * INGROUP: MokoWaaSBrand
+ * REPO: https://github.com/mokoconsulting-tech/mokowaasbrand
+ * VERSION: 01.06.00
+ * PATH: /src/plugins/system/mokowaasbrand/script.php
+ * BRIEF: Installation script for MokoWaaSBrand plugin
+ * NOTE: Handles installation, update, and uninstallation tasks including language override deployment
+ */
+
+defined('_JEXEC') or die;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Installer\InstallerAdapter;
+use Joomla\CMS\Installer\InstallerScriptInterface;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Log\Log;
+use Joomla\Filesystem\File;
+use Joomla\Filesystem\Folder;
+
+/**
+ * Installation script for MokoWaaSBrand plugin
+ *
+ * This script handles the installation and uninstallation of language override files
+ * to Joomla's global language override directories.
+ *
+ * @since 01.06.00
+ */
+class plgSystemMokoWaaSBrandInstallerScript implements InstallerScriptInterface
+{
+ /**
+ * Minimum Joomla version required to install the extension.
+ *
+ * @var string
+ * @since 01.06.00
+ */
+ private $minimumJoomla = '5.0.0';
+
+ /**
+ * Minimum PHP version required to install the extension.
+ *
+ * @var string
+ * @since 01.06.00
+ */
+ private $minimumPhp = '8.1.0';
+
+ /**
+ * Language tags supported by this plugin.
+ *
+ * @var array
+ * @since 01.06.00
+ */
+ private $languageTags = ['en-GB', 'en-US'];
+
+ /**
+ * Called before any type of action.
+ *
+ * @param string $type Which action is happening (install|uninstall|discover_install|update)
+ * @param InstallerAdapter $adapter The object responsible for running this script
+ *
+ * @return boolean True on success
+ *
+ * @since 01.06.00
+ */
+ public function preflight($type, $adapter)
+ {
+ // Check minimum Joomla version
+ if (version_compare(JVERSION, $this->minimumJoomla, '<'))
+ {
+ Factory::getApplication()->enqueueMessage(
+ sprintf('This extension requires Joomla %s or later.', $this->minimumJoomla),
+ 'error'
+ );
+ return false;
+ }
+
+ // Check minimum PHP version
+ if (version_compare(PHP_VERSION, $this->minimumPhp, '<'))
+ {
+ Factory::getApplication()->enqueueMessage(
+ sprintf('This extension requires PHP %s or later.', $this->minimumPhp),
+ 'error'
+ );
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Called after any type of action.
+ *
+ * @param string $type Which action is happening (install|uninstall|discover_install|update)
+ * @param InstallerAdapter $adapter The object responsible for running this script
+ *
+ * @return boolean True on success
+ *
+ * @since 01.06.00
+ */
+ public function postflight($type, $adapter)
+ {
+ // Only install overrides on install or update
+ if ($type === 'install' || $type === 'update')
+ {
+ $this->installLanguageOverrides();
+ }
+
+ return true;
+ }
+
+ /**
+ * Called on installation.
+ *
+ * @param InstallerAdapter $adapter The object responsible for running this script
+ *
+ * @return boolean True on success
+ *
+ * @since 01.06.00
+ */
+ public function install(InstallerAdapter $adapter)
+ {
+ return true;
+ }
+
+ /**
+ * Called on update.
+ *
+ * @param InstallerAdapter $adapter The object responsible for running this script
+ *
+ * @return boolean True on success
+ *
+ * @since 01.06.00
+ */
+ public function update(InstallerAdapter $adapter)
+ {
+ return true;
+ }
+
+ /**
+ * Called on uninstallation.
+ *
+ * @param InstallerAdapter $adapter The object responsible for running this script
+ *
+ * @return boolean True on success
+ *
+ * @since 01.06.00
+ */
+ public function uninstall(InstallerAdapter $adapter)
+ {
+ // Remove language overrides on uninstall
+ $this->uninstallLanguageOverrides();
+
+ return true;
+ }
+
+ /**
+ * Install language override files to Joomla's global override directories.
+ *
+ * This method copies the plugin's language override files to Joomla's global
+ * language override directories where they will be automatically loaded by Joomla.
+ *
+ * @return void
+ *
+ * @since 01.06.00
+ */
+ private function installLanguageOverrides()
+ {
+ $app = Factory::getApplication();
+ $pluginPath = JPATH_PLUGINS . '/system/mokowaasbrand';
+
+ // Install frontend overrides
+ foreach ($this->languageTags as $tag)
+ {
+ $source = $pluginPath . '/language/overrides/' . $tag . '.override.ini';
+ $dest = JPATH_ROOT . '/language/overrides/' . $tag . '.override.ini';
+
+ if (file_exists($source))
+ {
+ // Ensure destination directory exists
+ $destDir = dirname($dest);
+ if (!is_dir($destDir))
+ {
+ Folder::create($destDir);
+ }
+
+ // Read existing overrides if they exist
+ $existingOverrides = [];
+ if (file_exists($dest))
+ {
+ $existingOverrides = $this->parseLanguageFile($dest);
+ }
+
+ // Read plugin overrides
+ $pluginOverrides = $this->parseLanguageFile($source);
+
+ // Merge overrides (plugin overrides take precedence)
+ $mergedOverrides = array_merge($existingOverrides, $pluginOverrides);
+
+ // Write merged overrides
+ if ($this->writeLanguageFile($dest, $mergedOverrides))
+ {
+ $app->enqueueMessage(
+ sprintf('Installed frontend language overrides for %s', $tag),
+ 'message'
+ );
+ }
+ else
+ {
+ $app->enqueueMessage(
+ sprintf('Failed to install frontend language overrides for %s', $tag),
+ 'warning'
+ );
+ }
+ }
+ }
+
+ // Install administrator overrides
+ foreach ($this->languageTags as $tag)
+ {
+ $source = $pluginPath . '/administrator/language/overrides/' . $tag . '.override.ini';
+ $dest = JPATH_ADMINISTRATOR . '/language/overrides/' . $tag . '.override.ini';
+
+ if (file_exists($source))
+ {
+ // Ensure destination directory exists
+ $destDir = dirname($dest);
+ if (!is_dir($destDir))
+ {
+ Folder::create($destDir);
+ }
+
+ // Read existing overrides if they exist
+ $existingOverrides = [];
+ if (file_exists($dest))
+ {
+ $existingOverrides = $this->parseLanguageFile($dest);
+ }
+
+ // Read plugin overrides
+ $pluginOverrides = $this->parseLanguageFile($source);
+
+ // Merge overrides (plugin overrides take precedence)
+ $mergedOverrides = array_merge($existingOverrides, $pluginOverrides);
+
+ // Write merged overrides
+ if ($this->writeLanguageFile($dest, $mergedOverrides))
+ {
+ $app->enqueueMessage(
+ sprintf('Installed administrator language overrides for %s', $tag),
+ 'message'
+ );
+ }
+ else
+ {
+ $app->enqueueMessage(
+ sprintf('Failed to install administrator language overrides for %s', $tag),
+ 'warning'
+ );
+ }
+ }
+ }
+ }
+
+ /**
+ * Remove language override files from Joomla's global override directories.
+ *
+ * This method removes the plugin's language overrides from Joomla's global
+ * language override directories on uninstallation.
+ *
+ * @return void
+ *
+ * @since 01.06.00
+ */
+ private function uninstallLanguageOverrides()
+ {
+ $app = Factory::getApplication();
+ $pluginPath = JPATH_PLUGINS . '/system/mokowaasbrand';
+
+ // Remove frontend overrides
+ foreach ($this->languageTags as $tag)
+ {
+ $source = $pluginPath . '/language/overrides/' . $tag . '.override.ini';
+ $dest = JPATH_ROOT . '/language/overrides/' . $tag . '.override.ini';
+
+ if (file_exists($source) && file_exists($dest))
+ {
+ // Read plugin overrides
+ $pluginOverrides = $this->parseLanguageFile($source);
+
+ // Read existing overrides
+ $existingOverrides = $this->parseLanguageFile($dest);
+
+ // Remove plugin overrides from existing
+ foreach (array_keys($pluginOverrides) as $key)
+ {
+ unset($existingOverrides[$key]);
+ }
+
+ // Write remaining overrides or delete file if empty
+ if (!empty($existingOverrides))
+ {
+ $this->writeLanguageFile($dest, $existingOverrides);
+ }
+ else
+ {
+ File::delete($dest);
+ }
+
+ $app->enqueueMessage(
+ sprintf('Removed frontend language overrides for %s', $tag),
+ 'message'
+ );
+ }
+ }
+
+ // Remove administrator overrides
+ foreach ($this->languageTags as $tag)
+ {
+ $source = $pluginPath . '/administrator/language/overrides/' . $tag . '.override.ini';
+ $dest = JPATH_ADMINISTRATOR . '/language/overrides/' . $tag . '.override.ini';
+
+ if (file_exists($source) && file_exists($dest))
+ {
+ // Read plugin overrides
+ $pluginOverrides = $this->parseLanguageFile($source);
+
+ // Read existing overrides
+ $existingOverrides = $this->parseLanguageFile($dest);
+
+ // Remove plugin overrides from existing
+ foreach (array_keys($pluginOverrides) as $key)
+ {
+ unset($existingOverrides[$key]);
+ }
+
+ // Write remaining overrides or delete file if empty
+ if (!empty($existingOverrides))
+ {
+ $this->writeLanguageFile($dest, $existingOverrides);
+ }
+ else
+ {
+ File::delete($dest);
+ }
+
+ $app->enqueueMessage(
+ sprintf('Removed administrator language overrides for %s', $tag),
+ 'message'
+ );
+ }
+ }
+ }
+
+ /**
+ * Parse a language INI file and return the strings as an associative array.
+ *
+ * @param string $filePath The path to the language file
+ *
+ * @return array Array of language strings (key => value)
+ *
+ * @since 01.06.00
+ */
+ private function parseLanguageFile($filePath)
+ {
+ $strings = [];
+
+ if (!file_exists($filePath))
+ {
+ return $strings;
+ }
+
+ $content = file_get_contents($filePath);
+ $lines = explode("\n", $content);
+
+ foreach ($lines as $line)
+ {
+ $line = trim($line);
+
+ // Skip empty lines and comments
+ if (empty($line) || $line[0] === ';')
+ {
+ continue;
+ }
+
+ // Parse KEY="VALUE" format
+ if (preg_match('/^([A-Z0-9_]+)="(.+)"$/i', $line, $matches))
+ {
+ $key = strtoupper($matches[1]);
+ $value = $matches[2];
+ $strings[$key] = $value;
+ }
+ }
+
+ return $strings;
+ }
+
+ /**
+ * Write language strings to an INI file.
+ *
+ * @param string $filePath The path to the language file
+ * @param array $strings Array of language strings (key => value)
+ *
+ * @return boolean True on success, false on failure
+ *
+ * @since 01.06.00
+ */
+ private function writeLanguageFile($filePath, $strings)
+ {
+ if (empty($strings))
+ {
+ return false;
+ }
+
+ $content = "; MokoWaaS Language Overrides\n";
+ $content .= "; Generated by MokoWaaSBrand Plugin\n";
+ $content .= "; Last updated: " . date('Y-m-d H:i:s') . "\n\n";
+
+ foreach ($strings as $key => $value)
+ {
+ // Escape quotes in value
+ $value = str_replace('"', '\"', $value);
+ $content .= strtoupper($key) . '="' . $value . '"' . "\n";
+ }
+
+ return File::write($filePath, $content);
+ }
+}
From 5f68d6ec8cf969c6275a3cfccf2fd33a3abd2874 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 20:29:03 +0000
Subject: [PATCH 13/13] Fix InstallerScriptInterface method return types to
bool
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
---
src/plugins/system/mokowaasbrand/script.php | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/plugins/system/mokowaasbrand/script.php b/src/plugins/system/mokowaasbrand/script.php
index 1a1d65ea..757ae516 100644
--- a/src/plugins/system/mokowaasbrand/script.php
+++ b/src/plugins/system/mokowaasbrand/script.php
@@ -76,7 +76,7 @@ class plgSystemMokoWaaSBrandInstallerScript implements InstallerScriptInterface
*
* @since 01.06.00
*/
- public function preflight($type, $adapter)
+ public function preflight($type, $adapter): bool
{
// Check minimum Joomla version
if (version_compare(JVERSION, $this->minimumJoomla, '<'))
@@ -111,7 +111,7 @@ class plgSystemMokoWaaSBrandInstallerScript implements InstallerScriptInterface
*
* @since 01.06.00
*/
- public function postflight($type, $adapter)
+ public function postflight($type, $adapter): bool
{
// Only install overrides on install or update
if ($type === 'install' || $type === 'update')
@@ -131,7 +131,7 @@ class plgSystemMokoWaaSBrandInstallerScript implements InstallerScriptInterface
*
* @since 01.06.00
*/
- public function install(InstallerAdapter $adapter)
+ public function install(InstallerAdapter $adapter): bool
{
return true;
}
@@ -145,7 +145,7 @@ class plgSystemMokoWaaSBrandInstallerScript implements InstallerScriptInterface
*
* @since 01.06.00
*/
- public function update(InstallerAdapter $adapter)
+ public function update(InstallerAdapter $adapter): bool
{
return true;
}
@@ -159,7 +159,7 @@ class plgSystemMokoWaaSBrandInstallerScript implements InstallerScriptInterface
*
* @since 01.06.00
*/
- public function uninstall(InstallerAdapter $adapter)
+ public function uninstall(InstallerAdapter $adapter): bool
{
// Remove language overrides on uninstall
$this->uninstallLanguageOverrides();