Skip to content

Commit 9704af9

Browse files
authored
Merge pull request #148 from luannguyenQV/feat/upgrade-i18n
Upgrade i18n
2 parents 2180875 + 2214edb commit 9704af9

File tree

7 files changed

+155
-91
lines changed

7 files changed

+155
-91
lines changed

apps/web/@/messages/fr.json

Lines changed: 131 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,36 @@
11
{
22
"common": {
3-
"home": "Maison",
4-
"tags": "Mots clés",
5-
"tag": "Balise",
6-
"categories": "Catégories",
7-
"category": "Catégorie",
8-
"posts": "Des postes",
9-
"post": "{total, plural, =0 {poste} =1 {poste} other {des postes}}",
3+
"home": "Home",
4+
"tags": "Tags",
5+
"tag": "Tag",
6+
"categories": "Categories",
7+
"category": "Category",
8+
"posts": "Posts",
9+
"total_post_plural": "Total {total} {total, plural, =0 {post} =1 {post} other {posts}}",
10+
"post_plural": "{total} {total, plural, =0 {post} =1 {post} other {posts}}",
11+
"post": "{total, plural, =0 {post} =1 {post} other {posts}}",
1012
"pages": "Pages",
1113
"page": "Page",
1214
"comments": "Comments",
1315
"comment": "Comment",
1416
"users": "Users",
1517
"user": "User",
16-
"settings": "Paramètres",
17-
"setting": "Paramètre",
18+
"settings": "Settings",
19+
"setting": "Setting",
1820
"general": "General",
1921
"advanced": "Advanced",
2022
"info": "Info",
2123
"help": "Help",
2224
"helpCenter": "Help Center",
23-
"about": "À propos",
25+
"about": "About",
2426
"contact": "Contact",
2527
"login": "Login",
2628
"logout": "Logout",
2729
"register": "Register",
28-
"profile": "Profil",
29-
"search": "Recherche",
30-
"searchPlaceholder": "Recherche...",
30+
"profile": "Profile",
31+
"search": "Search",
32+
"clear": "Clear",
33+
"searchPlaceholder": "Enter your search here...",
3134
"searchResults": "Search Results",
3235
"searchNoResults": "No results found",
3336
"searching": "Searching...",
@@ -61,18 +64,123 @@
6164
"fax": "Fax",
6265
"mobile": "Mobile",
6366
"website": "Website",
64-
"write": "écrire",
65-
"signIn": "S'identifier",
66-
"trending": "Tendance",
67-
"signOut": "Se déconnecter",
68-
"light": "Lumière",
69-
"dark": "Sombre",
70-
"system": "Système",
71-
"toggleTheme": "Changer de thème",
72-
"selectLocale": "Sélectionnez votre langue",
67+
"write": "Write",
68+
"signIn": "Sign In",
69+
"trending": "Trending",
70+
"signOut": "Logout",
71+
"light": "Light",
72+
"dark": "Dark",
73+
"system": "System",
74+
"toggleTheme": "Toggle Theme",
75+
"selectLocale": "Select Locale",
7376
"follow": "Follow",
7477
"unfollow": "Unfollow",
7578
"followers": "Followers",
76-
"following": "Following"
79+
"following": "Following",
80+
"update_profile": "Update profile",
81+
"like": "Like",
82+
"like_plural": "{count, plural, =0 {# like} =1 {# like} other {# likes}}",
83+
"unlike": "Unlike",
84+
"edit": "Edit",
85+
"delete": "Delete",
86+
"publish": "Publish",
87+
"draft": "Draft",
88+
"save": "Save",
89+
"cancel": "Cancel",
90+
"create": "Create",
91+
"update": "Update",
92+
"save_as_draft": "Save as draft",
93+
"preview": "Preview",
94+
"no_items_founded": "There are no items founded.",
95+
"english": "English",
96+
"french": "French",
97+
"created_at_asc": "Recently created",
98+
"created_at_desc": "Oldest created",
99+
"updated_at_asc": "Recently updated",
100+
"updated_at_desc": "Oldest updated",
101+
"total_like_asc": "Least liked",
102+
"total_like_desc": "Most liked",
103+
"total_comment_asc": "Least commented",
104+
"total_comment_desc": "Most commented",
105+
"likers": "Likers",
106+
"back": "Back",
107+
"next": "Next",
108+
"last_update_at": "Last update at",
109+
"title": "Title",
110+
"untitled": "Untitled",
111+
"filter": "Filter",
112+
"turn_draft": "Turn draft",
113+
"turn_publish": "Turn publish",
114+
"post_created": "Post created successfully",
115+
"post_updated": "Post updated successfully",
116+
"order_by": "Order by",
117+
"order_by_asc": "Ascending",
118+
"order_by_desc": "Descending",
119+
"order_by_created_at": "Created at",
120+
"order_by_name": "Name",
121+
"order_by_size": "Size",
122+
"order_by_type": "Type",
123+
"order_by_uploaded_at": "Uploaded at",
124+
"search_results_for": "Search results for"
125+
},
126+
"uploads": {
127+
"asset_management": "Asset Management",
128+
"upload_image": "Upload Image",
129+
"select": "Select",
130+
"upload": "Upload",
131+
"has_been_selected": "has been selected",
132+
"image_uploaded_successfully": "Image uploaded successfully",
133+
"error_uploading_image": "Error uploading image",
134+
"total_images": "{total, plural, =0 {No image found} =1 {Total 1 image} other {Total # images}}",
135+
"order_by": {
136+
"newest": "Newest",
137+
"oldest": "Oldest",
138+
"name_asc": "Name (A → Z)",
139+
"name_desc": "Name (Z → A)"
140+
}
141+
},
142+
"auth": {
143+
"email_label": "Email",
144+
"password_label": "Password",
145+
"confirm_password_label": "Confirm Password",
146+
"email_placeholder": "Enter your email",
147+
"password_placeholder": "Enter your password",
148+
"confirm_password_placeholder": "Enter your password again",
149+
"dont_have_an_account": "Don't have an account?",
150+
"or_continue_with": "Or continue with",
151+
"github": "GitHub",
152+
"google": "Google",
153+
"facebook": "Facebook",
154+
"twitter": "Twitter",
155+
"linkedin": "LinkedIn",
156+
"instagram": "Instagram",
157+
"youtube": "YouTube",
158+
"tiktok": "TikTok",
159+
"sign_in": {
160+
"title": "Sign In",
161+
"description": "Sign in to your account",
162+
"sign_in_with": "Sign in with {provider}",
163+
"sign_in_with_github": "Sign in with GitHub",
164+
"sign_in_with_google": "Sign in with Google",
165+
"sign_in_with_facebook": "Sign in with Facebook",
166+
"sign_in_with_twitter": "Sign in with Twitter",
167+
"sign_in_with_linkedin": "Sign in with LinkedIn",
168+
"sign_in_with_instagram": "Sign in with Instagram",
169+
"sign_in_with_youtube": "Sign in with YouTube",
170+
"sign_in_with_tiktok": "Sign in with TikTok",
171+
"sign_in_to_your_account_to_continue": "Sign in to your account to continue"
172+
},
173+
"sign_up": {
174+
"title": "Sign Up",
175+
"description": "Sign up for an account",
176+
"already_have_an_account": "Already have an account?",
177+
"sign_in": "Sign In"
178+
},
179+
"forgot_password": {
180+
"title": "Forgot Password",
181+
"description": "Forgot your password? Enter your email address and we will send you a link to reset your password.",
182+
"send_instructions": "Send Instructions",
183+
"cancel": "Cancel"
184+
}
77185
}
78186
}

apps/web/app/(public-fullwidth)/author/[authorId]/followers/page.tsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

apps/web/app/(public-fullwidth)/author/[authorId]/page.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

apps/web/i18n.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { getRequestConfig } from "next-intl/server"
55
// Can be imported from a shared config
66
export const locales = ["en", "fr"]
77

8-
export default getRequestConfig(async ({ locale }) => {
8+
export default getRequestConfig(async ({ requestLocale }) => {
9+
const locale = await requestLocale
910
// Validate that the incoming `locale` parameter is valid
1011
if (!locales.includes(locale as unknown as string)) notFound()
1112

apps/web/next.config.js renamed to apps/web/next.config.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// eslint-disable-next-line @typescript-eslint/no-var-requires
2-
const createNextIntlPlugin = require('next-intl/plugin');
1+
import createNextIntlPlugin from 'next-intl/plugin';
32

43
const withNextIntl = createNextIntlPlugin();
54

@@ -28,6 +27,5 @@ const nextConfig = {
2827
},
2928
};
3029

31-
module.exports =
32-
withNextIntl(nextConfig);
30+
export default withNextIntl(nextConfig);
3331

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"negotiator": "^0.6.3",
5050
"next": "15.0.4",
5151
"next-auth": "5.0.0-beta.25",
52-
"next-intl": "^3.10.0",
52+
"next-intl": "^3.26.0",
5353
"next-themes": "^0.2.1",
5454
"nodemailer": "^6.9.15",
5555
"novel": "^0.5.0",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)