From d52a1dbf67291f107b1a243d0019480188376d48 Mon Sep 17 00:00:00 2001 From: Stanislas Kita Date: Tue, 21 Oct 2025 09:30:59 +0200 Subject: [PATCH 1/3] fix(LabelTranslation): extend language column to support longer locale codes --- inc/labeltranslation.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/labeltranslation.class.php b/inc/labeltranslation.class.php index 9f4b48e6..e7ecf9e5 100644 --- a/inc/labeltranslation.class.php +++ b/inc/labeltranslation.class.php @@ -63,7 +63,7 @@ public static function installBaseData(Migration $migration, $version) `id` INT {$default_key_sign} NOT NULL auto_increment, `itemtype` VARCHAR(30) NOT NULL, `items_id` INT {$default_key_sign} NOT NULL, - `language` VARCHAR(5) NOT NULL, + `language` VARCHAR(10) NOT NULL, `label` VARCHAR(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `itemtype` (`itemtype`), @@ -90,6 +90,12 @@ public static function installBaseData(Migration $migration, $version) $migration->addKey($table, 'items_id'); } + if ($DB->fieldExists($table, 'language')) { + $migration->changeField($table, 'language', 'language', "VARCHAR(10) NOT NULL"); + } + + + return true; } From 2b8418d42e0478feaf5c3a9327fc577877f95b71 Mon Sep 17 00:00:00 2001 From: Stanislas Kita Date: Tue, 21 Oct 2025 09:31:52 +0200 Subject: [PATCH 2/3] adapt changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a16fa8cb..5070f048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## ['UNRELEASED'] +## [UNRELEASED] + +### Fixed + +- Increased the maximum length of the language column to support longer locale codes ## [1.22.1] - 2025-10-10 From 8b9c07aa1c0662e66cbebd97217d2613d9520b0f Mon Sep 17 00:00:00 2001 From: Stanislas Kita Date: Tue, 21 Oct 2025 09:34:36 +0200 Subject: [PATCH 3/3] remove useless empty lines --- inc/labeltranslation.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/inc/labeltranslation.class.php b/inc/labeltranslation.class.php index e7ecf9e5..4ea37984 100644 --- a/inc/labeltranslation.class.php +++ b/inc/labeltranslation.class.php @@ -94,8 +94,6 @@ public static function installBaseData(Migration $migration, $version) $migration->changeField($table, 'language', 'language', "VARCHAR(10) NOT NULL"); } - - return true; }