+ translations: add twosky config file

This commit is contained in:
Ildar Kamalov
2019-08-20 17:12:11 +03:00
parent 09a52436fb
commit 568a7a7334
6 changed files with 35 additions and 20 deletions

View File

@@ -1,24 +1,13 @@
const fs = require('fs');
const path = require('path');
const requestPromise = require('request-promise');
const twoskyConfig = require('../../.twosky.json')[0];
const { project_id: TWOSKY_PROJECT_ID, languages } = twoskyConfig;
const LOCALES_DIR = '../../client/src/__locales';
const LOCALES_LIST = [
'en',
'ru',
'vi',
'es',
'fr',
'ja',
'sv',
'pt-br',
'zh-tw',
'bg',
'zh-cn',
];
const LOCALES_LIST = Object.keys(languages);
const BASE_FILE = 'en.json';
const TWOSKY_URI = process.env.TWOSKY_URI;
const TWOSKY_PROJECT_ID = 'home';
/**
* Prepare params to get translations from twosky

View File

@@ -1,12 +1,12 @@
const path = require('path');
const fs = require('fs');
const request = require('request-promise');
const twoskyConfig = require('../../.twosky.json')[0];
const { project_id: TWOSKY_PROJECT_ID, base_locale: LANGUAGE } = twoskyConfig;
const LOCALES_DIR = '../../client/src/__locales';
const BASE_FILE = 'en.json';
const LANGUAGE = 'en';
const TWOSKY_URI = process.env.TWOSKY_URI;
const TWOSKY_PROJECT_ID = 'home';
/**
* Prepare post params