mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
fix: Canonicalize locale codes
This commit is contained in:
parent
fc7863aaaf
commit
46f4d5c1f8
10 changed files with 35 additions and 9 deletions
|
@ -55,8 +55,8 @@ const LANGUAGES = [
|
|||
'ro-RO',
|
||||
'ru-RU',
|
||||
'sk-SK',
|
||||
'sr-Cyrl-CS',
|
||||
'sr-Latn-CS',
|
||||
'sr-Cyrl-RS',
|
||||
'sr-Latn-RS',
|
||||
'sv-SE',
|
||||
'tr-TR',
|
||||
'uk-UA',
|
||||
|
|
|
@ -18,7 +18,7 @@ exports.up = async (knex) => {
|
|||
FROM comment
|
||||
GROUP BY card_id
|
||||
) AS comments_total_by_card_id
|
||||
WHERE card.id = comments_total_by_card_id.card_id
|
||||
WHERE card.id = comments_total_by_card_id.card_id;
|
||||
`);
|
||||
|
||||
return knex.schema.alterTable('card', (table) => {
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
exports.up = (knex) =>
|
||||
knex.raw(`
|
||||
UPDATE user_account
|
||||
SET language =
|
||||
CASE
|
||||
WHEN language = 'sr-Cyrl-CS' THEN 'sr-Cyrl-RS'
|
||||
WHEN language = 'sr-Latn-CS' THEN 'sr-Latn-RS'
|
||||
END
|
||||
WHERE language IN ('sr-Cyrl-CS', 'sr-Latn-CS');
|
||||
`);
|
||||
|
||||
exports.down = (knex) =>
|
||||
knex.raw(`
|
||||
UPDATE user_account
|
||||
SET language =
|
||||
CASE
|
||||
WHEN language = 'sr-Cyrl-RS' THEN 'sr-Cyrl-CS'
|
||||
WHEN language = 'sr-Latn-RS' THEN 'sr-Latn-CS'
|
||||
END
|
||||
WHERE language IN ('sr-Cyrl-RS', 'sr-Latn-RS');
|
||||
`);
|
Loading…
Add table
Add a link
Reference in a new issue