Skip to content
Snippets Groups Projects

Resolve "Proposition changement - Intitulés "Périodes""

Merged Olivier Maury requested to merge 96-proposition-changement-intitules-periodes into main
3 files
+ 31
8
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 25
0
@@ -219,6 +219,31 @@ END;
$BODY$
language plpgsql;
--
-- #96 : periods
--
CREATE OR REPLACE FUNCTION upgrade20250116() RETURNS boolean AS $BODY$
BEGIN
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_translation (
key VARCHAR,
locale VARCHAR,
translation VARCHAR
);
INSERT INTO tmp_translation (key, locale, translation) VALUES
('summer', 'en', 'Summer crop (01/04 − 15/10)'),
('summer', 'fr', 'Culture d’été (01/04 − 15/10)'),
('winter', 'en', 'Winter crop (31/10 − 31/8)'),
('winter', 'fr', 'Culture d’hiver (31/10 − 31/8)');
UPDATE i18n
SET translation=t.translation
FROM i18nkey AS k, locale AS l, tmp_translation AS t
WHERE i18n.i18nkey=k.id AND i18n.locale=l.id AND l.languagetag=t.locale AND k.string=t.key;
RETURN true;
END;
$BODY$
language plpgsql;
---
--
-- Keep this call at the end to apply migration functions.
Loading