From cfda1021f1ac5e822848f3ec25980ff5a5b3d0e9 Mon Sep 17 00:00:00 2001 From: fredrikphotowall <35255659+fredrikphotowall@users.noreply.github.com> Date: Mon, 22 Mar 2021 14:54:49 +0100 Subject: [PATCH] P5-6817 Add ca-fr,ca-en stock product translations (#203) --- migrations/000.318.sql | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 migrations/000.318.sql diff --git a/migrations/000.318.sql b/migrations/000.318.sql new file mode 100644 index 0000000..bd7356f --- /dev/null +++ b/migrations/000.318.sql @@ -0,0 +1,34 @@ +-- P5-6817 Add Canadian stock product title translations +-- Stock product translations do not support fallback texts yet + +-- Add fr_CA using fr_FR +INSERT INTO "i18n-texts_data" (locale_id, textid, text) + select + (select id from locales where value = 'fr_CA'), + textid, + text + from + "i18n-texts_data" data + join "i18n-texts" texts using (textid) + join "product-products" products on texts.name = products.path + join "product-stockproducts" using (productid) + where + data.locale_id = (select id from locales where value = 'fr_FR') + and category = 'productTitles' + ; + +-- Add en_CA using en_US +INSERT INTO "i18n-texts_data" (locale_id, textid, text) + select + (select id from locales where value = 'en_CA'), + textid, + text + from + "i18n-texts_data" data + join "i18n-texts" texts using (textid) + join "product-products" products on texts.name = products.path + join "product-stockproducts" using (productid) + where + data.locale_id = (select id from locales where value = 'en_US') + and category = 'productTitles' + ;