change default locale

This commit is contained in:
Leah 2025-01-19 00:15:26 +01:00
parent ed9b8fa023
commit 25f1a8abc0
5 changed files with 6 additions and 6 deletions

View file

@ -144,7 +144,7 @@ export class UrlPreviewService {
return summaly(url, {
followRedirects: false,
lang: lang ?? 'ja-JP',
lang: lang ?? 'en-US',
agent: agent,
userAgent: meta.urlPreviewUserAgent ?? undefined,
operationTimeout: meta.urlPreviewTimeout,
@ -157,7 +157,7 @@ export class UrlPreviewService {
const proxy = meta.urlPreviewSummaryProxyUrl!;
const queryStr = query({
url: url,
lang: lang ?? 'ja-JP',
lang: lang ?? 'en-US',
userAgent: meta.urlPreviewUserAgent ?? undefined,
operationTimeout: meta.urlPreviewTimeout,
contentLengthLimit: meta.urlPreviewMaximumContentLength,

View file

@ -8,6 +8,6 @@ import locales from '../../../locales/index.js';
await writeFile(
new URL('locale.ts', import.meta.url),
`export default ${JSON.stringify(locales['ja-JP'], undefined, 2)} as const;`,
`export default ${JSON.stringify(locales['en-US'], undefined, 2)} as const;`,
'utf8',
)

View file

@ -13,7 +13,7 @@ export const hostname = address.hostname;
export const url = address.origin;
export const apiUrl = location.origin + '/api';
export const wsOrigin = location.origin;
export const lang = miLocalStorage.getItem('lang') ?? 'ja-JP';
export const lang = miLocalStorage.getItem('lang') ?? 'en-US';
export const langs = _LANGS_;
const preParseLocale = miLocalStorage.getItem('locale');
export let locale = preParseLocale ? JSON.parse(preParseLocale) : null;

View file

@ -5,7 +5,7 @@
import { lang } from '@/config.js';
export const versatileLang = (lang ?? 'ja-JP').replace('ja-KS', 'ja-JP');
export const versatileLang = (lang ?? 'en-US').replace('ja-KS', 'ja-JP');
let _dateTimeFormat: Intl.DateTimeFormat;
try {

View file

@ -13,7 +13,7 @@ class SwLang {
public cacheName = `mk-cache-${_VERSION_}`;
public lang: Promise<string> = get('lang').then(async prelang => {
if (!prelang) return 'ja-JP';
if (!prelang) return 'en-US';
return prelang;
});