mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 00:29:22 +09:00
✌️
This commit is contained in:
parent
a090d6e820
commit
5c38084af5
@ -20,6 +20,7 @@ import * as replace from 'gulp-replace';
|
||||
import * as htmlmin from 'gulp-htmlmin';
|
||||
const uglifyes = require('uglify-es');
|
||||
|
||||
import locales from './locales';
|
||||
import { fa } from './src/build/fa';
|
||||
const client = require('./built/client/meta.json');
|
||||
import config from './src/config';
|
||||
@ -122,6 +123,7 @@ gulp.task('build:client:script', () =>
|
||||
.pipe(replace('VERSION', JSON.stringify(client.version)))
|
||||
.pipe(replace('API', JSON.stringify(config.api_url)))
|
||||
.pipe(replace('ENV', JSON.stringify(env)))
|
||||
.pipe(replace('LANGS', JSON.stringify(Object.keys(locales))))
|
||||
.pipe(isProduction ? uglify({
|
||||
toplevel: true
|
||||
} as any) : gutil.noop())
|
||||
|
@ -11,6 +11,7 @@ const loadLang = lang => yaml.safeLoad(
|
||||
const native = loadLang('ja');
|
||||
|
||||
const langs = {
|
||||
'de': loadLang('de'),
|
||||
'en': loadLang('en'),
|
||||
'fr': loadLang('fr'),
|
||||
'ja': native,
|
||||
|
@ -32,7 +32,7 @@
|
||||
// Detect the user language
|
||||
// Note: The default language is Japanese
|
||||
let lang = navigator.language.split('-')[0];
|
||||
if (!/^(en|ja)$/.test(lang)) lang = 'ja';
|
||||
if (!LANGS.includes(lang)) lang = 'en';
|
||||
if (localStorage.getItem('lang')) lang = localStorage.getItem('lang');
|
||||
|
||||
// Detect the user agent
|
||||
|
@ -80,10 +80,11 @@
|
||||
<el-option label="自動" value=""/>
|
||||
</el-option-group>
|
||||
<el-option-group label="言語を指定">
|
||||
<el-option label="ja-JP" value="ja"/>
|
||||
<el-option label="en-US" value="en"/>
|
||||
<el-option label="ja" value="ja"/>
|
||||
<el-option label="en" value="en"/>
|
||||
<el-option label="fr" value="fr"/>
|
||||
<el-option label="pl" value="pl"/>
|
||||
<el-option label="de" value="de"/>
|
||||
</el-option-group>
|
||||
</el-select>
|
||||
<div class="none ui info">
|
||||
|
Loading…
Reference in New Issue
Block a user