mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 17:25:16 +03:00
Remove underscore from _locales
This commit is contained in:
parent
dd56446241
commit
d7a6b7374f
3 changed files with 2 additions and 11 deletions
10
gulpfile.js
10
gulpfile.js
|
@ -287,7 +287,7 @@ function dist_yarn() {
|
||||||
|
|
||||||
function dist_locale() {
|
function dist_locale() {
|
||||||
return gulp.src('./locales/**/*', { base: 'locales'})
|
return gulp.src('./locales/**/*', { base: 'locales'})
|
||||||
.pipe(gulp.dest(`${DIST_DIR}_locales`));
|
.pipe(gulp.dest(`${DIST_DIR}locales`));
|
||||||
}
|
}
|
||||||
|
|
||||||
function dist_libraries() {
|
function dist_libraries() {
|
||||||
|
@ -826,7 +826,6 @@ function cordova_dist() {
|
||||||
if (platforms.indexOf('android') !== -1) {
|
if (platforms.indexOf('android') !== -1) {
|
||||||
distTasks.push(clean_cordova);
|
distTasks.push(clean_cordova);
|
||||||
distTasks.push(cordova_copy_www);
|
distTasks.push(cordova_copy_www);
|
||||||
distTasks.push(cordova_locales_www);
|
|
||||||
distTasks.push(cordova_resources);
|
distTasks.push(cordova_resources);
|
||||||
distTasks.push(cordova_include_www);
|
distTasks.push(cordova_include_www);
|
||||||
distTasks.push(cordova_copy_src);
|
distTasks.push(cordova_copy_src);
|
||||||
|
@ -873,13 +872,6 @@ function cordova_copy_www() {
|
||||||
return gulp.src(`${DIST_DIR}**`, { base: DIST_DIR })
|
return gulp.src(`${DIST_DIR}**`, { base: DIST_DIR })
|
||||||
.pipe(gulp.dest(`${CORDOVA_DIST_DIR}www/`));
|
.pipe(gulp.dest(`${CORDOVA_DIST_DIR}www/`));
|
||||||
}
|
}
|
||||||
function cordova_locales_www(cb) {
|
|
||||||
fs.renameSync(`${CORDOVA_DIST_DIR}www/_locales`, `${CORDOVA_DIST_DIR}www/i18n`);
|
|
||||||
gulp.src(`${CORDOVA_DIST_DIR}www/js/localization.js`)
|
|
||||||
.pipe(replace('/_locales', './i18n'))
|
|
||||||
.pipe(gulp.dest(`${CORDOVA_DIST_DIR}www/js`));
|
|
||||||
cb();
|
|
||||||
}
|
|
||||||
function cordova_resources() {
|
function cordova_resources() {
|
||||||
return gulp.src('assets/android/**')
|
return gulp.src('assets/android/**')
|
||||||
.pipe(gulp.dest(`${CORDOVA_DIST_DIR}resources/android/`));
|
.pipe(gulp.dest(`${CORDOVA_DIST_DIR}resources/android/`));
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
"version": "10.8.0",
|
"version": "10.8.0",
|
||||||
"main": "main.html",
|
"main": "main.html",
|
||||||
"chromium-args": "--disable-features=nw2",
|
"chromium-args": "--disable-features=nw2",
|
||||||
"default_locale": "en",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "run-script-os",
|
"start": "run-script-os",
|
||||||
"start:default": "NODE_ENV=development NW_PRE_ARGS=--load-extension='./node_modules/nw-vue-devtools-prebuilt/extension' gulp debug",
|
"start:default": "NODE_ENV=development NW_PRE_ARGS=--load-extension='./node_modules/nw-vue-devtools-prebuilt/extension' gulp debug",
|
||||||
|
|
|
@ -32,7 +32,7 @@ i18n.init = function(cb) {
|
||||||
defaultNS:['messages'],
|
defaultNS:['messages'],
|
||||||
fallbackLng: languageFallback,
|
fallbackLng: languageFallback,
|
||||||
backend: {
|
backend: {
|
||||||
loadPath: './_locales/{{lng}}/{{ns}}.json',
|
loadPath: './locales/{{lng}}/{{ns}}.json',
|
||||||
parse: i18n.parseInputFile,
|
parse: i18n.parseInputFile,
|
||||||
},
|
},
|
||||||
initImmediate: false,
|
initImmediate: false,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue