P5-6282: use text tags for category translations (#150)

This commit is contained in:
Martin Carlsson
2021-01-05 11:04:15 +01:00
committed by GitHub
parent 3b711e25a7
commit dfd61ef06f
+16
View File
@@ -0,0 +1,16 @@
-- P5-6282: use text tags for category translations
insert into "i18n-texts" (name, category)
select slug, 'article_categories' from article_categories;
insert into "i18n-texts_data" (textid, text, locale_id)
select
(select textid from "i18n-texts" where name = article_categories.slug and category = 'article_categories'),
article_categories_translations.name,
(select locale_id from market_locales where market_id = article_categories_translations.market_id)
from article_categories_translations
join article_categories on article_categories_translations.category_id = article_categories.id;
drop table article_categories_translations;