Skip to content

Commit

Permalink
refactor(i18n): convert file format from JS to TS
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon authored and ysfscream committed Oct 16, 2024
1 parent ba7a819 commit 467e576
Show file tree
Hide file tree
Showing 26 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ const lang: { [key: string]: any } = {
}

// Dynamically import all translation files
const modules = import.meta.glob('./i18n/*.js')
const modules = import.meta.glob('./i18n/*.ts')

// Process each module
Object.keys(modules).forEach((path) => {
const partKey = path.match(/\/(\w+)\.js$/)?.[1] // retrieve the filename as partial keys
const partKey = path.match(/\/(\w+)\.ts$/)?.[1] // retrieve the filename as partial keys
if (partKey) {
modules[path]().then((mod) => {
const tran = mod.default
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 467e576

Please sign in to comment.