Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appwrite console internationalization : Typesafe-i18n #459

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
b8a2be4
getting started with i18n
goswamianshuman May 22, 2023
f9145de
made suggested changes
goswamianshuman May 23, 2023
5d33e68
updated library to i18next
goswamianshuman May 23, 2023
6da4889
removed unwanted packages
goswamianshuman May 23, 2023
78eda23
initiate typesafe-i18n
goswamianshuman Jun 3, 2023
6910551
typesafe-i18n attempt
goswamianshuman Jun 4, 2023
4be78df
updated package.json
goswamianshuman Jun 4, 2023
70f993c
finializing code for review
goswamianshuman Jun 4, 2023
14c3b54
updated languageSelector
goswamianshuman Jun 4, 2023
49c05b5
channged texts from js objects to json
goswamianshuman Jun 6, 2023
b019a14
renwed i18n and selector
goswamianshuman Jun 9, 2023
a672c2b
updated alias
goswamianshuman Jun 9, 2023
47004fb
update language selector
goswamianshuman Jun 10, 2023
6ac1324
updates in typesafe-i18n
goswamianshuman Jun 12, 2023
64866de
added typesafe to build
goswamianshuman Jun 14, 2023
61d4e3e
typesafe with build
goswamianshuman Jun 14, 2023
bc4e690
processed i18n files from src/lib/i18n to src/i18n
goswamianshuman Jun 14, 2023
713eebb
testing new json key structure
goswamianshuman Jun 22, 2023
2d51bcd
updated previous data (english only)
goswamianshuman Jun 26, 2023
3b94c69
updated other lang files
goswamianshuman Jun 28, 2023
e5340db
updated console/accounts (eng only)
goswamianshuman Jul 10, 2023
3493d6b
updated console/onboarding (eng only)
goswamianshuman Jul 10, 2023
2f78338
basic changes
goswamianshuman Jul 10, 2023
bec72ed
updated console/organization (eng only)
goswamianshuman Jul 12, 2023
4ad2d1f
basic updates
goswamianshuman Jul 12, 2023
d22bdd8
updating previous structure (eng only)
goswamianshuman Jul 15, 2023
2d311d2
modified data in console/project/auth (eng lang only)
goswamianshuman Jul 17, 2023
6280ba1
modified console/project/auth
goswamianshuman Jul 19, 2023
fd4872f
modified console/project/auth (eng lang only)
goswamianshuman Jul 20, 2023
f315071
modification in console/project/auth completed and databases started
goswamianshuman Jul 22, 2023
bc0b906
completed modification of data in console/project/databases
goswamianshuman Jul 27, 2023
9a82260
modification completed in settings
Jul 29, 2023
cbe3410
completed modification in console / overview
Jul 30, 2023
3bfa2c2
completed modification in console/functions
Jul 30, 2023
e0e4d20
modification complete in console/storage
Jul 30, 2023
b31f147
minor updates
Jul 31, 2023
20f2d13
updated en.json and de.json
Jul 31, 2023
f7619cc
modified english and italian json
Aug 1, 2023
44232bb
usage updated
Aug 1, 2023
0327063
updated collection
Aug 1, 2023
567743f
updated sidebar
Aug 1, 2023
b4286cf
modified components, layout and mock's data
Aug 4, 2023
94f561d
modified platform and its elements
Aug 6, 2023
2b665a4
minor updates
Aug 6, 2023
60f4683
updated keys dates and mainOauth
Aug 6, 2023
756882e
updated notifications
Aug 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ node_modules
node_modules/
dist/
.vercel
.github
goswamianshuman marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions .typesafe-i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"adapter": "svelte",
"$schema": "https://unpkg.com/typesafe-i18n@5.24.3/schema/typesafe-i18n.json"
}
102 changes: 101 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"node": ">=16"
},
"scripts": {
"dev": "vite dev",
"dev": "npm-run-all --parallel vite typesafe-i18n",
goswamianshuman marked this conversation as resolved.
Show resolved Hide resolved
"vite": "vite dev",
"build": "node build.js",
"preview": "vite preview",
"sync": "svelte-kit sync",
Expand All @@ -15,7 +16,8 @@
"test": "vitest run",
"test:ui": "vitest --ui",
"test:watch": "vitest watch",
"e2e": "playwright test tests/e2e"
"e2e": "playwright test tests/e2e",
"typesafe-i18n": "typesafe-i18n"
},
"dependencies": {
"@analytics/google-analytics": "^1.0.5",
Expand All @@ -28,9 +30,11 @@
"dotenv": "^16.0.3",
"echarts": "^5.4.1",
"logrocket": "^3.0.1",
"npm-run-all": "^4.1.5",
"pretty-bytes": "^6.1.0",
"prismjs": "^1.29.0",
"tippy.js": "^6.3.7",
"typesafe-i18n": "^5.24.3",
"web-vitals": "^3.1.1"
},
"devDependencies": {
Expand Down
63 changes: 63 additions & 0 deletions src/i18n/de/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"globals": {
"placeholders": {
"email": "E-Mail",
"password": "Passwort",
"enter_password": "Passwort eingeben",
"confirm_password": "Passwort bestätigen",
"your_name": "Ihr Name",
"your_email": "Ihre E-Mail-Adresse",
"your_password": "Ihr Passwort",
"your_code": "dein Code"
},
"update": "aktualisieren",
"recover": "genesen",
"accept": "akzeptieren",
"cancel": "stornieren"
},
"login": {
"title": "anmelden",
"field_inputs": {
"email": "E-Mail",
"password": "Passwort"
}
},
"sign_up": {
"title": "Anmeldung",
"field_inputs": {
"name": "Name",
"email": "E-Mail",
"password": "Passwort",
"code": "Code"
},
"already_registered": "Sie haben bereits ein Konto?"
},
"password_recovery": {
"title": "Passwort-Wiederherstellung",
"forgot_password": "Passwort vergessen",
"field_inputs": {
"email": "E-Mail",
"new_password": "Neues Kennwort",
"cnf_password": "Bestätige das Passwort"
}
},
"accept_invite": {
"title": "Einladung annehmen",
"invalid_invite": "Ungültige Einladung",
"invite": "einladen",
"sign_up": "Melden Sie sich bei Appwrite an",
"warning_alert": {
"title": "Der Einladungslink ist ungültig",
"sub_title": "Bitten Sie den Projektinhaber, Ihnen eine neue Einladung zu senden."
},
"success_alert": {
"title": "Sie wurden eingeladen, an einem Teamprojekt auf Appwrite teilzunehmen"
}
},
"privacy_and_policy": {
"main_text": "Indem Sie die Einladung annehmen, erklären Sie sich damit einverstanden",
"terms_and_condition": "Geschäftsbedingungen",
"and": "Und",
"privacy_policy": "Datenschutz und Richtlinien"
}
}
92 changes: 92 additions & 0 deletions src/i18n/de/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// import type { Translation } from '../i18n-types';

// const de: Translation = {
// globals: {
// placeholders: {
// email: 'E-Mail',
// password: 'Passwort',
// enter_password: 'Passwort eingeben',
// confirm_password: 'Passwort bestätigen',
// your_name: 'Ihr Name',
// your_email: 'Ihre E-Mail-Adresse',
// your_password: 'Ihr Passwort',
// your_code: 'dein Code'
// },
// update: 'aktualisieren',
// recover: 'genesen',
// accept: 'akzeptieren',
// cancel: 'stornieren'
// },
// login: {
// title: 'anmelden',
// field_inputs: {
// email: 'E-Mail',
// password: 'Passwort'
// }
// },
// sign_up: {
// title: 'Anmeldung',
// field_inputs: {
// name: 'Name',
// email: 'E-Mail',
// password: 'Passwort',
// code: 'Code'
// },
// already_registered: 'Sie haben bereits ein Konto?'
// },
// password_recovery: {
// title: 'Passwort-Wiederherstellung',
// forgot_password: 'Passwort vergessen',
// field_inputs: {
// email: 'E-Mail',
// new_password: 'Neues Kennwort',
// cnf_password: 'Bestätige das Passwort'
// }
// },
// accept_invite: {
// title: 'Einladung annehmen',
// invalid_invite: 'Ungültige Einladung',
// invite: 'einladen',
// sign_up: 'Melden Sie sich bei Appwrite an',
// warning_alert: {
// title: 'Der Einladungslink ist ungültig',
// sub_title: 'Bitten Sie den Projektinhaber, Ihnen eine neue Einladung zu senden.'
// },
// success_alert: {
// title: 'Sie wurden eingeladen, an einem Teamprojekt auf Appwrite teilzunehmen'
// }
// },
// privacy_and_policy: {
// main_text: 'Indem Sie die Einladung annehmen, erklären Sie sich damit einverstanden',
// terms_and_condition: 'Geschäftsbedingungen',
// and: 'Und',
// privacy_policy: 'Datenschutz und Richtlinien'
// },
// console: {
// onboarding: {
// header: 'Onboarding',
// title: "Let's create your first project"
// },
// basic_keywords: {
// project: 'Project',
// project_name: 'Project name',
// project_id: 'Project ID',
// create_project: 'Create Project'
// }
// },
// magicURL: {
// title: 'Missing Redirect URL',
// info: 'Your Magic URL login flow is missing a proper redirect URL. Please check the',
// magicDoc: 'Magic URL docs',
// subInfo: 'and send request for new session with a valid redirect URL.'
// }
// };

// export default de;

import type { Translation } from '../i18n-types';
import deJson from './de.json';

const de: Translation = deJson;

export default de;
Loading