WIP: 4774-translationsVn #3138

Draft
carlossa wants to merge 9 commits from 4774-translationsVn into dev
10 changed files with 148 additions and 0 deletions
Showing only changes of commit 75abc3c865 - Show all commits

View File

@ -7,6 +7,10 @@
} }
}, },
"properties": { "properties": {
"id": {
"type": "number",
"id": true
},
"companyFk": { "companyFk": {
"type": "number", "type": "number",
"id": 1 "id": 1

View File

@ -7,6 +7,10 @@
} }
}, },
"properties": { "properties": {
"id": {
"type": "number",
"id": true
},
"inkFk": { "inkFk": {
"type": "number", "type": "number",
"id": 1 "id": 1

View File

@ -7,6 +7,10 @@
} }
}, },
"properties": { "properties": {
"id": {
"type": "number",
"id": true
},
"categoryFk": { "categoryFk": {
"type": "number", "type": "number",
"id": 1 "id": 1

View File

@ -7,6 +7,7 @@
} }
}, },
"properties": { "properties": {
"typeFk": { "typeFk": {
"type": "number", "type": "number",
"id": 1 "id": 1
@ -17,6 +18,10 @@
}, },
"name": { "name": {
"type": "string" "type": "string"
},
"id": {
"type": "number",
"id": true
} }
} }
} }

View File

@ -7,6 +7,10 @@
} }
}, },
"properties": { "properties": {
"id": {
"type": "number",
"id": true
},
"originFk": { "originFk": {
"type": "number", "type": "number",
"id": 1 "id": 1

View File

@ -7,6 +7,10 @@
} }
}, },
"properties": { "properties": {
"id": {
"type": "number",
"id": true
},
"stateFk": { "stateFk": {
"type": "number", "type": "number",
"id": 1 "id": 1

View File

@ -7,6 +7,10 @@
} }
}, },
"properties": { "properties": {
"id": {
"type": "number",
"id": true
},
"tagFk": { "tagFk": {
"type": "number", "type": "number",
"id": 1 "id": 1

View File

@ -4056,3 +4056,101 @@ VALUES
(9, 'en', 'Santa Dorotea Chrysanthemum'), (9, 'en', 'Santa Dorotea Chrysanthemum'),
(9, 'fr', 'Chrysanthème Santa Dorotea'), (9, 'fr', 'Chrysanthème Santa Dorotea'),
(9, 'pt', 'Crisântemo Santa Dorotea'); (9, 'pt', 'Crisântemo Santa Dorotea');
INSERT INTO vn.inkI18n (inkFk, lang, name)
VALUES
('?', 'ca', 'Sense especificar'),
('?', 'en', 'Unspecified'),
('?', 'fr', 'Indéterminé'),
('?', 'mn', 'тодорхойгүй'),
('?', 'pt', 'Não especificado'),
('2C', 'ca', '2 Colors'),
('2C', 'en', '2 Colour'),
('2C', 'fr', '2 Couleur'),
('2C', 'mn', '2 Өнгө'),
('2C', 'pt', '2 Cor'),
('A/M', 'ca', 'Groc / Marró'),
('A/M', 'en', 'Yellow / Brown'),
('A/M', 'fr', 'Yellow / Brown'),
('A/M', 'mn', 'Шар / Браун'),
('A/M', 'pt', 'Yellow / Brown'),
('A/N', 'ca', 'Groc / Taronja'),
('A/N', 'en', 'Yellow orange'),
('A/N', 'fr', 'Jaune / Orange'),
('A/N', 'mn', 'Шар / Улбар шар'),
('A/N', 'pt', 'Amarelo / Laranja');
INSERT INTO vn.itemCategoryI18n (categoryFk, lang, name)
VALUES
(1, 'ca', 'Flor'),
(1, 'en', 'Flower'),
(1, 'fr', 'Fleur'),
(1, 'mn', 'цэцэг'),
(1, 'pt', 'Flores'),
(2, 'ca', 'Planta'),
(2, 'en', 'Plant'),
(2, 'fr', 'Plante'),
(2, 'mn', 'станц'),
(2, 'pt', 'Plantas'),
(3, 'ca', 'Complements'),
(3, 'en', 'Accessories'),
(3, 'fr', 'Accessoires'),
(3, 'mn', 'Дагалдах хэрэгсэл'),
(3, 'pt', 'Acessórios'),
(4, 'ca', 'Artificial'),
(4, 'en', 'Artificial'),
(4, 'fr', 'Artificielle'),
(4, 'mn', 'Хиймэл'),
(4, 'pt', 'Artificial'),
(5, 'ca', 'Verds'),
(5, 'en', 'Green'),
(5, 'fr', 'Vert'),
(5, 'mn', 'ногоон'),
(5, 'pt', 'Verdes');
INSERT INTO vn.originI18n (originFk, lang, name)
VALUES
(1, 'ca', 'Chollolandia'),
(1, 'en', 'Chollolandia'),
(1, 'fr', 'Chollolandia'),
(1, 'mn', 'Chollolandia'),
(1, 'pt', 'Chollolandia'),
(2, 'ca', 'Alemanya'),
(2, 'en', 'Germany'),
(2, 'fr', 'Allemagne'),
(2, 'mn', 'Герман'),
(2, 'pt', 'Alemanha'),
(3, 'ca', 'Almeria'),
(3, 'en', 'Almeria'),
(3, 'fr', 'Almeria'),
(3, 'mn', 'Зугаа'),
(3, 'pt', 'Almeria'),
(4, 'ca', 'Austràlia'),
(4, 'en', 'Australia'),
(4, 'fr', 'Australie'),
(4, 'mn', 'Австрали'),
(4, 'pt', 'Austrália'),
(5, 'ca', 'canada'),
(5, 'en', 'Canada'),
(5, 'fr', 'Canada'),
(5, 'mn', 'Канад'),
(5, 'pt', 'Canadá');
INSERT INTO vn.stateI18n (stateFk, lang, name)
VALUES
(1, 'en', 'Fix'),
(1, 'es', 'Arreglar'),
(2, 'en', 'Free'),
(2, 'es', 'Libre'),
(3, 'en', 'OK'),
(3, 'es', 'OK'),
(4, 'en', 'Printed'),
(4, 'es', 'Impreso'),
(5, 'en', 'Preparation'),
(5, 'es', 'Preparación'),
(6, 'en', 'In Review'),
(6, 'es', 'En Revisión'),
(7, 'en', 'Unfinished'),
(7, 'es', 'Sin Acabar');

View File

@ -10,4 +10,23 @@ INSERT INTO salix.ACL (model,property,accessType,permission,principalType,princi
('itemCategoryI18n','*','*','ALLOW','ROLE','employee'); ('itemCategoryI18n','*','*','ALLOW','ROLE','employee');
ALTER TABLE vn.companyI18n
ADD id INT AUTO_INCREMENT UNIQUE;
ALTER TABLE vn.inkI18n
ADD id INT AUTO_INCREMENT UNIQUE;
ALTER TABLE vn.itemCategoryI18n
ADD id INT AUTO_INCREMENT UNIQUE;
ALTER TABLE vn.itemTypeI18n
ADD id INT AUTO_INCREMENT UNIQUE;
ALTER TABLE vn.originI18n
ADD id INT AUTO_INCREMENT UNIQUE;
ALTER TABLE vn.stateI18n
ADD id INT AUTO_INCREMENT UNIQUE;
ALTER TABLE vn.tagI18n
ADD id INT AUTO_INCREMENT UNIQUE;

View File

@ -20,6 +20,7 @@ module.exports = Self => {
WHERE WHERE
c.table_name LIKE '%i18n' c.table_name LIKE '%i18n'
AND c.COLUMN_KEY = 'PRI' AND c.COLUMN_KEY = 'PRI'
AND c.column_name <> 'id'
AND c.COLUMN_NAME <> 'lang'`); AND c.COLUMN_NAME <> 'lang'`);
const columns = await Self.rawSql(` const columns = await Self.rawSql(`
@ -28,6 +29,7 @@ module.exports = Self => {
WHERE WHERE
c.table_name LIKE '%i18n' c.table_name LIKE '%i18n'
AND c.COLUMN_KEY <> 'PRI' AND c.COLUMN_KEY <> 'PRI'
AND c.column_name <> 'id'
`); `);
for (const column of columns) for (const column of columns)