Skip to content

Commit f9cfd32

Browse files
committed
Merge branch 'release/1.0.4'
2 parents 35e8ea1 + 27ce6bd commit f9cfd32

File tree

17 files changed

+125
-54
lines changed

17 files changed

+125
-54
lines changed

.github/stale.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ daysUntilStale: 60
44
daysUntilClose: 7
55
# Issues with these labels will never be considered stale
66
exemptLabels:
7-
- pinned
8-
- security
7+
- pinned
8+
- security
99
# Label to use when marking an issue as stale
1010
staleLabel: wontfix
1111
# Comment to post when marking an issue as stale. Set to `false` to disable
1212
markComment: >
13-
This issue has been automatically marked as stale because it has not had
14-
recent activity. It will be closed if no further activity occurs. Thank you
15-
for your contributions.
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs. Thank you
15+
for your contributions.
1616
# Comment to post when closing a stale issue. Set to `false` to disable
1717
closeComment: false

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
build: # Job named 'build'
3030
runs-on: ubuntu-latest # The type of machine to run the job on.
3131

32-
needs: [ guard ]
32+
needs: [guard]
3333

3434
strategy: # Allows you to create a matrix for job configuration.
3535
matrix:
36-
node-version: [ 18.x, 19.x, 20.x ] # Running tests across different environments.
36+
node-version: [18.x, 19.x, 20.x] # Running tests across different environments.
3737
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
3838

3939
steps: # The sequence of tasks that make up a job.

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.0.4] - 2023-07-28
6+
7+
### <!-- 01 -->Features
8+
9+
- Add Turkish language support to Lingui config
10+
11+
### <!-- 04 -->Refactor
12+
13+
- Update code formatting for readability
14+
- Update locale page to adhere to syntax standards
15+
- Add Turkish localization and translation
16+
- Simplify locale detection and broaden usability
17+
18+
### <!-- 08 -->Miscellaneous Tasks
19+
20+
- Add `@lingui/detect-locale` package
21+
522
## [1.0.3] - 2023-07-28
623

724
### <!-- 07 -->Continuous Integrations

lingui.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type {import('@lingui/conf').LinguiConfig} */
22
module.exports = {
3-
locales: ['ar', 'en', 'fa'],
3+
locales: ['ar', 'en', 'fa', 'tr'],
44
sourceLocale: 'en',
55
catalogs: [
66
{

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-lingui-template",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
@@ -17,6 +17,7 @@
1717
"@headlessui/react": "1.7.16",
1818
"@heroicons/react": "2.0.18",
1919
"@lingui/core": "4.3.0",
20+
"@lingui/detect-locale": "4.2.1",
2021
"@lingui/react": "4.3.0",
2122
"clsx": "2.0.0",
2223
"langs": "2.0.0",

pnpm-lock.yaml

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/locale-switcher.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {useLocaleSwitcher} from '@/hooks/use-locale-switcher'
2-
import {availableLocales, getLocaleName} from '@/utils/locales'
3-
import {Menu, Transition} from '@headlessui/react'
4-
import {LanguageIcon} from '@heroicons/react/24/outline'
5-
import {Trans} from '@lingui/macro'
1+
import { useLocaleSwitcher } from '@/hooks/use-locale-switcher'
2+
import { availableLocales, getLocaleName } from '@/utils/locales'
3+
import { Menu, Transition } from '@headlessui/react'
4+
import { LanguageIcon } from '@heroicons/react/24/outline'
5+
import { Trans } from '@lingui/macro'
66
import clsx from 'clsx'
7-
import {Fragment} from 'react'
7+
import { Fragment } from 'react'
88

99
export function LocaleSwitcher() {
1010
const { changeLocale } = useLocaleSwitcher()

src/hooks/use-language-and-direction.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {useLocale} from '@/hooks/use-locale'
2-
import {getLocaleDirection} from '@/utils/locales'
3-
import {useEffect} from 'react'
1+
import { useLocale } from '@/hooks/use-locale'
2+
import { getLocaleDirection } from '@/utils/locales'
3+
import { useEffect } from 'react'
44

55
const updateDocumentAttributes = (language: string, direction: string) => {
66
document.documentElement.lang = language

src/hooks/use-lingui-init.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {useLocale} from '@/hooks/use-locale'
2-
import {i18n, Messages} from '@lingui/core'
3-
import {useEffect} from 'react'
1+
import { useLocale } from '@/hooks/use-locale'
2+
import { i18n, Messages } from '@lingui/core'
3+
import { useEffect } from 'react'
44

55
export function useLinguiInit(messages: Messages) {
66
const locale = useLocale()

src/hooks/use-locale-switcher.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import {useLocale} from '@/hooks/use-locale'
2-
import {Locale} from '@/utils/locales'
3-
import {useRouter} from 'next/router'
4-
import {useCallback} from 'react'
1+
import { useLocale } from '@/hooks/use-locale'
2+
import { Locale } from '@/utils/locales'
3+
import { useRouter } from 'next/router'
4+
import { useCallback } from 'react'
55

66
export function useLocaleSwitcher() {
77
const router = useRouter()
@@ -22,8 +22,6 @@ export function useLocaleSwitcher() {
2222
pathName = pathName.replace(`[${k}]`, <string>router.query[k])
2323
})
2424

25-
// languageDetector.cache?.(nextLocale, ['cookie', 'localStorage'])
26-
2725
await router.replace(pathName)
2826
},
2927
[locale, router],

0 commit comments

Comments
 (0)