mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-20 17:48:11 +09:00
670e13f57d
Refactoring of i18n
15 lines
281 B
TypeScript
15 lines
281 B
TypeScript
import { lang, locale } from './config';
|
|
|
|
export default function(scope?: string) {
|
|
const texts = scope ? locale[scope] || {} : {};
|
|
texts['@'] = locale['common'];
|
|
texts['@deck'] = locale['deck'];
|
|
return {
|
|
sync: false,
|
|
locale: lang,
|
|
messages: {
|
|
[lang]: texts
|
|
}
|
|
};
|
|
}
|