Skip to content

Commit 373a552

Browse files
committed
Merge branch 'main' of github.com:devforth/adminforth into main
2 parents f387a2d + 85b7090 commit 373a552

File tree

1 file changed

+4
-4
lines changed
  • adminforth/documentation/docs/tutorial/05-Plugins

1 file changed

+4
-4
lines changed

adminforth/documentation/docs/tutorial/05-Plugins/10-i18n.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,18 +429,18 @@ For example in this app we will consider translating a Nuxt.js SEO-centric front
429429
430430
To do it you need to use 2 exposed methods from the plugin: `feedCategoryTranslations` and `getCategoryTranslations`.
431431
432-
First of all, at some step, e.g. CI pipeline you should get all translation strings from your external app and feed them ao an own rest API like `'/feed-nuxt-strings'`, this API might look like this
432+
First of all, at some step, e.g. CI pipeline you should get all translation strings from your external app and feed them an own rest API like `'/feed-nuxt-strings'`, this API might look like this
433433
434434
```ts title="./index.ts"
435-
app.get(`${ADMIN_BASE_URL}/feed-nuxt-strings`,
435+
app.post(`${ADMIN_BASE_URL}/feed-nuxt-strings`,
436436
async (req, res) => {
437437
// req.body will be an array of objects like:
438438
// [{
439439
// path: 'Login',
440440
// file: 'src/views/Login.vue:35',
441441
// }]
442442

443-
const messagesForFeed = req.body.map((mk: any) => {
443+
const messagesForFeed = req.body.missingKeys.map((mk: any) => {
444444
return {
445445
en_string: mk.path,
446446
source: mk.file,
@@ -483,7 +483,7 @@ Then in your Nuxt.js app you should call this API and store the strings in the s
483483
484484
Next part. When we will need translations on the nuxt instance, we should use [vue-i18n's lazy loading feature](https://vue-i18n.intlify.dev/guide/advanced/lazy):
485485
486-
```typescript title="./your-buxt-app-source-file.ts"
486+
```typescript title="./your-nuxt-app-source-file.ts"
487487
import { callAdminForthApi } from '@/utils';
488488

489489
export async function loadLocaleMessages(i18n, locale) {

0 commit comments

Comments
 (0)