Skip to content

Commit 861cf00

Browse files
committed
feat: i18n backend translations
1 parent c1a8b0e commit 861cf00

File tree

20 files changed

+367
-56
lines changed

20 files changed

+367
-56
lines changed

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"search.exclude": {
3+
"prisma/**/*": true
4+
}
5+
}

client/src/hooks/useAuth.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { DEFAULT_LANGUAGE } from '@fullstack-typescript-monorepo/core';
12
import React, { useCallback, useContext, useMemo, useState } from 'react';
23
import UserRoutes, { UserWithPerson } from '../api/UserRoutes';
34

@@ -12,6 +13,7 @@ interface AuthContextInterface {
1213
export const emptyUser: UserWithPerson = {
1314
id: 0,
1415
login: '',
16+
lang: DEFAULT_LANGUAGE,
1517
admin: false,
1618
active: true,
1719
connexionToken: '',

package-lock.json

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

prisma/index-browser.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,19 @@ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
154154

155155
exports.Prisma.UserScalarFieldEnum = makeEnum({
156156
id: 'id',
157+
lang: 'lang',
157158
login: 'login',
158159
admin: 'admin',
159160
password: 'password',
160161
active: 'active',
161162
connexionToken: 'connexionToken',
162163
personId: 'personId'
163164
});
165+
exports.Lang = makeEnum({
166+
en: 'en',
167+
fr: 'fr'
168+
});
169+
164170
exports.RecordAction = makeEnum({
165171
CREATE: 'CREATE',
166172
UPDATE: 'UPDATE',

0 commit comments

Comments
 (0)