File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 3
3
" next/babel"
4
4
],
5
5
"plugins" : [" @lingui/babel-plugin-lingui-macro" ]
6
- }
6
+ }
Original file line number Diff line number Diff line change 1
- const nextConfig = require ( " ./next.config" )
1
+ const nextConfig = require ( ' ./next.config' )
2
2
3
3
/** @type {import('@lingui/conf').LinguiConfig } */
4
4
module . exports = {
5
5
locales : nextConfig . i18n . locales ,
6
- pseudoLocale : " pseudo" ,
6
+ pseudoLocale : ' pseudo' ,
7
7
sourceLocale : nextConfig . i18n . defaultLocale ,
8
8
fallbackLocales : {
9
- default : "en" ,
9
+ default : 'en' ,
10
10
} ,
11
11
catalogs : [
12
12
{
13
- path : " src/locales/{locale}" ,
14
- include : [ " src/" ] ,
13
+ path : ' src/locales/{locale}' ,
14
+ include : [ ' src/' ] ,
15
15
} ,
16
16
] ,
17
- }
17
+ }
Original file line number Diff line number Diff line change 1
- import { i18n , Messages } from " @lingui/core"
2
- import { useRouter } from " next/router"
3
- import { useEffect } from " react"
1
+ import { i18n , Messages } from ' @lingui/core'
2
+ import { useRouter } from ' next/router'
3
+ import { useEffect } from ' react'
4
4
5
5
/**
6
6
* Load messages for requested locale and activate it.
@@ -15,7 +15,7 @@ export async function loadCatalog(locale: string) {
15
15
export function useLinguiInit ( messages : Messages ) {
16
16
const router = useRouter ( )
17
17
const locale = router . locale || router . defaultLocale !
18
- const isClient = typeof window !== " undefined"
18
+ const isClient = typeof window !== ' undefined'
19
19
20
20
if ( ! isClient && locale !== i18n . locale ) {
21
21
// there is single instance of i18n on the server
@@ -36,4 +36,4 @@ export function useLinguiInit(messages: Messages) {
36
36
} , [ locale ] )
37
37
38
38
return i18n
39
- }
39
+ }
You can’t perform that action at this time.
0 commit comments