mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
fix: lang file name
This commit is contained in:
parent
4176a377ff
commit
d05dbeac28
@ -39,7 +39,7 @@ export class LangsHandler extends BaseHandler {
|
|||||||
async load(dir: string, instances?: { name: string; file: Record<string, any> }[]) {
|
async load(dir: string, instances?: { name: string; file: Record<string, any> }[]) {
|
||||||
const files = instances ?? (await this.loadFilesK<Record<string, any>>(await this.getFiles(dir)));
|
const files = instances ?? (await this.loadFilesK<Record<string, any>>(await this.getFiles(dir)));
|
||||||
for (const i of files) {
|
for (const i of files) {
|
||||||
const locale = i.name.split('.').slice(0, -1).join('.');
|
const locale = i.name.split('.').slice(0, -1).join('.') || i.name;
|
||||||
const result = this.callback(locale, i.file);
|
const result = this.callback(locale, i.file);
|
||||||
if (result) this.values[locale] = result;
|
if (result) this.values[locale] = result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user