diff --git a/src/modules/i18n.ts b/src/modules/i18n.ts index 52b75dd..507223b 100644 --- a/src/modules/i18n.ts +++ b/src/modules/i18n.ts @@ -8,10 +8,7 @@ import { type UserModule } from '~/types' const messages = Object.fromEntries( Object.entries( import.meta.globEager('../../locales/*.y(a)?ml')) - .map(([key, value]) => { - const yaml = key.endsWith('.yaml') - return [key.slice(14, yaml ? -5 : -4), value.default] - }), + .map(([key, value]) => [key.split('/').at(-1)?.replace(/\.ya?ml$/, ''), value.default]), ) export const install: UserModule = ({ app }) => { diff --git a/unocss.config.ts b/unocss.config.ts index af0839e..dfd817e 100644 --- a/unocss.config.ts +++ b/unocss.config.ts @@ -12,7 +12,7 @@ import { export default defineConfig({ shortcuts: [ ['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'], - ['icon-btn', 'text-[0.9em] inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'], + ['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'], ], presets: [ presetUno(),