File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ All hardcoded text strings have been replaced with translation keys using both `
5454
5555The preferred approach for static text uses the ` data-i18n ` attribute with the ` v-i18n ` directive:
5656
57- ``` vue
57+ ``` js
5858< template>
5959 < label v- i18n data- i18n= " auth.username" > Username / E - Mail< / label>
6060 < button v- i18n data- i18n= " auth.login" > Login< / button>
@@ -73,7 +73,7 @@ The preferred approach for static text uses the `data-i18n` attribute with the `
7373
7474Use ` $t() ` for dynamic assignments, computed properties, and JavaScript code:
7575
76- ``` vue
76+ ``` js
7777< template>
7878 <!-- Dynamic error messages -->
7979 < span class = " error" > {{ errors .username }}< / span>
@@ -101,7 +101,7 @@ export default {
101101
102102For composition API contexts, use the provided helper:
103103
104- ``` vue
104+ ``` js
105105< script setup>
106106import { useTranslation } from ' @/utils/i18n-helpers'
107107
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ module.exports = async (options = {}) => {
438438 const path = require ( 'path' )
439439 const localesDir = path . join ( __dirname , '..' , 'locales' )
440440 const messages = { }
441-
441+
442442 // Load locale files
443443 const locales = [ 'en' ]
444444 for ( const locale of locales ) {
@@ -447,7 +447,7 @@ module.exports = async (options = {}) => {
447447 messages [ locale ] = JSON . parse ( fs . readFileSync ( localePath , 'utf8' ) )
448448 }
449449 }
450-
450+
451451 await server . register ( require ( 'fastify-i18n' ) , {
452452 messages,
453453 fallbackLocale : 'en' ,
You can’t perform that action at this time.
0 commit comments