Skip to content

Commit e4c7338

Browse files
authored
fix(LabelTranslation): extend language column to support longer locale codes (#1048)
1 parent 0ad6e98 commit e4c7338

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [UNRELEASED]
99

10+
### Fixed
11+
12+
- Increased the maximum length of the language column to support longer locale codes
13+
1014
## [1.21.24] - 2025-10-10
1115

1216
### Fixed

inc/labeltranslation.class.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function installBaseData(Migration $migration, $version)
6161
`id` INT {$default_key_sign} NOT NULL auto_increment,
6262
`itemtype` VARCHAR(30) NOT NULL,
6363
`items_id` INT {$default_key_sign} NOT NULL,
64-
`language` VARCHAR(5) NOT NULL,
64+
`language` VARCHAR(10) NOT NULL,
6565
`label` VARCHAR(255) DEFAULT NULL,
6666
PRIMARY KEY (`id`),
6767
KEY `itemtype` (`itemtype`),
@@ -86,6 +86,10 @@ public static function installBaseData(Migration $migration, $version)
8686
$migration->addKey($table, 'items_id');
8787
}
8888

89+
if ($DB->fieldExists($table, 'language')) {
90+
$migration->changeField($table, 'language', 'language', "VARCHAR(10) NOT NULL");
91+
}
92+
8993
return true;
9094
}
9195

0 commit comments

Comments
 (0)