From 4b602d53f49ad664082aecc2a5c6a197e7dcb04c Mon Sep 17 00:00:00 2001 From: Ercode Techoglu Date: Sat, 28 Jan 2023 21:14:12 +0300 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=87=B9=F0=9F=87=B7=20=F0=9F=87=B9?= =?UTF-8?q?=F0=9F=87=B7=20=F0=9F=87=B9=F0=9F=87=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .typesafe-i18n.json | 8 ++-- CODE-OF-CONDUCT.md | 13 +++--- CONTRIBUTING.md | 11 +++-- DEVLOG.md | 49 ++++++++++----------- NOTES.md | 27 ++++++------ docker-compose.yml | 2 +- package-lock.json | 32 +++++++------- package.json | 4 +- src/app.html | 6 ++- src/app.postcss | 6 +-- src/hooks.server.ts | 14 +++--- src/lib/i18n/ar/index.ts | 6 +-- src/lib/i18n/de/index.ts | 6 +-- src/lib/i18n/en/index.ts | 11 ++--- src/lib/i18n/es/index.ts | 8 ++-- src/lib/i18n/formatters.ts | 11 +++-- src/lib/i18n/i18n-svelte.ts | 17 +++++--- src/lib/i18n/i18n-types.ts | 69 ++++++++++++++---------------- src/lib/i18n/i18n-util.async.ts | 25 +++++------ src/lib/i18n/i18n-util.sync.ts | 38 ++++++++-------- src/lib/i18n/i18n-util.ts | 45 +++++++++---------- src/lib/i18n/it/index.ts | 6 +-- src/lib/i18n/ru/index.ts | 6 +-- src/lib/i18n/tr/index.ts | 12 ++++++ src/lib/i18n/tr/listd.json | 5 +++ src/lib/i18n/tr/onboarding.json | 11 +++++ src/lib/i18n/uk/index.ts | 6 +-- src/routes/+layout.server.ts | 8 ++-- src/routes/+layout.ts | 12 +++--- src/routes/+page.svelte | 16 ++++--- src/routes/onboarding/+page.svelte | 46 ++++++++++---------- tailwind.config.cjs | 5 +-- 32 files changed, 287 insertions(+), 254 deletions(-) create mode 100644 src/lib/i18n/tr/index.ts create mode 100644 src/lib/i18n/tr/listd.json create mode 100644 src/lib/i18n/tr/onboarding.json diff --git a/.typesafe-i18n.json b/.typesafe-i18n.json index 64ee777..70769a9 100644 --- a/.typesafe-i18n.json +++ b/.typesafe-i18n.json @@ -1,5 +1,5 @@ { - "adapter": "svelte", - "outputPath": "./src/lib/i18n/", - "$schema": "https://unpkg.com/typesafe-i18n@5.20.0/schema/typesafe-i18n.json" -} \ No newline at end of file + "adapter": "svelte", + "outputPath": "./src/lib/i18n/", + "$schema": "https://unpkg.com/typesafe-i18n@5.20.0/schema/typesafe-i18n.json" +} diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md index 5aa8a31..a2d3c89 100644 --- a/CODE-OF-CONDUCT.md +++ b/CODE-OF-CONDUCT.md @@ -1,6 +1,5 @@ # Contributor Code of Conduct - ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. @@ -41,15 +40,15 @@ This Code of Conduct applies both within project spaces and in public spaces whe Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting us through: - * [DM on Twitter](https://twitter.com/coding_garden) - - * DM on Discord - w3cj#7953 - - +- [DM on Twitter](https://twitter.com/coding_garden) + +- DM on Discord - w3cj#7953 + + All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. If you are unsure whether an incident is a violation, or whether the space where the incident took place is covered by our Code of Conduct, **we encourage you to still report it**. We would prefer to have a few extra reports where we decide to take no action, than to leave an incident go unnoticed and unresolved that may result in an individual or group to feel like they can no longer participate in the community. Reports deemed as not a violation will also allow us to improve our Code of Conduct and processes surrounding it. If you witness a dangerous situation or someone in distress, we encourage you to report even if you are only an observer. -[This Code of Conduct was adapted from Auth0](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) \ No newline at end of file +[This Code of Conduct was adapted from Auth0](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 339153f..edb4a1e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,5 @@ - 105 lines (68 sloc) 4.27 KB +105 lines (68 sloc) 4.27 KB + # Contribution Guidelines When contributing to `listd`, whether on GitHub or in other community spaces: @@ -17,7 +18,6 @@ In an effort to respect your time, if you wanted to implement a change that has Fork the [Listd repository](https://github.com/CodingGarden/listd) to your own GitHub account and then clone it to your local device. - ```bash git clone git@github.com:YOUR_USER_NAME/listd.git ``` @@ -48,6 +48,7 @@ DB_PASSWORD=your_database_password DB_NAME=your_database_name DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} ``` + If you are using Docker, you can use the following values: ```bash @@ -59,7 +60,7 @@ DB_PORT=5432 DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} ``` -* DATABASE_URL: The full database connection URL. This is required and is used by prisma. +- DATABASE_URL: The full database connection URL. This is required and is used by prisma. #### Set up PostgreSQL by Docker Compose @@ -102,7 +103,7 @@ git push ``` Then, [create a pull request](https://github.com/CodingGarden/listd/pulls) - from your fork to the `main` branch of the `listd` repository. +from your fork to the `main` branch of the `listd` repository. ## Code Style @@ -115,5 +116,3 @@ This project uses [Prettier](https://prettier.io/) to format the code. You can r ## License By contributing, you agree that your contributions will be licensed under its MIT License. - - diff --git a/DEVLOG.md b/DEVLOG.md index ba02e19..a2bc4f5 100644 --- a/DEVLOG.md +++ b/DEVLOG.md @@ -1,28 +1,29 @@ # 2023-01-27 -* [x] Review PRs - * [x] Tailwind bug fix - * [x] Contributing Guide -* [x] Setup i18n - * [x] Research options - * [x] Install / setup - * [x] Use dictionaries on landing page +- [x] Review PRs + - [x] Tailwind bug fix + - [x] Contributing Guide +- [x] Setup i18n + - [x] Research options + - [x] Install / setup + - [x] Use dictionaries on landing page # 2023-02-03 -* [ ] Eslint / Airbnb / Prettier Setup... -* [ ] Setup Auth - * [ ] install / setup @auth/core -* [ ] Deploy??? - * [ ] Database??? - * Free Tier - * Serverless / Edge Function Support... - * Connection Pooling - * Fly.io - * Railway - * Supabase - * Render - * ElephantSQL - * Paid - * Heroku - * AWS RDS - * [ ] App?? - Vercel \ No newline at end of file + +- [ ] Eslint / Airbnb / Prettier Setup... +- [ ] Setup Auth + - [ ] install / setup @auth/core +- [ ] Deploy??? + - [ ] Database??? + - Free Tier + - Serverless / Edge Function Support... + - Connection Pooling + - Fly.io + - Railway + - Supabase + - Render + - ElephantSQL + - Paid + - Heroku + - AWS RDS + - [ ] App?? - Vercel diff --git a/NOTES.md b/NOTES.md index b492007..096cfb5 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,19 +1,18 @@ - Right now we only support YouTube channels. Eventually, we will support other types of items in the feed. For example: - * YouTube - Channel - * Instagram - Profile / Page - * TikTok - Profile - * Twitter - User - * Reddit - Subreddit - * Reddit User - Reddit User - * Blog - Author +- YouTube - Channel +- Instagram - Profile / Page +- TikTok - Profile +- Twitter - User +- Reddit - Subreddit +- Reddit User - Reddit User +- Blog - Author # UI Design -* Wireframing - * UX - * User Experience -* Mockup - * Higher Fidelity -* Prototype \ No newline at end of file +- Wireframing + - UX + - User Experience +- Mockup + - Higher Fidelity +- Prototype diff --git a/docker-compose.yml b/docker-compose.yml index 51cbcd4..20066a8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,4 +11,4 @@ services: ports: - ${DB_PORT}:5432 volumes: - - ./docker-data/db:/var/lib/postgresql/data \ No newline at end of file + - ./docker-data/db:/var/lib/postgresql/data diff --git a/package-lock.json b/package-lock.json index 1b005f4..6947b73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "@prisma/client": "^4.8.1" + "@prisma/client": "^4.9.0" }, "devDependencies": { "@playwright/test": "^1.28.1", @@ -28,7 +28,7 @@ "postcss-load-config": "^4.0.1", "prettier": "^2.8.0", "prettier-plugin-svelte": "^2.8.1", - "prisma": "^4.8.1", + "prisma": "^4.9.0", "svelte": "^3.54.0", "svelte-check": "^2.9.2", "svelte-preprocess": "^4.10.7", @@ -537,12 +537,12 @@ "dev": true }, "node_modules/@prisma/client": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.8.1.tgz", - "integrity": "sha512-d4xhZhETmeXK/yZ7K0KcVOzEfI5YKGGEr4F5SBV04/MU4ncN/HcE28sy3e4Yt8UFW0ZuImKFQJE+9rWt9WbGSQ==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.9.0.tgz", + "integrity": "sha512-bz6QARw54sWcbyR1lLnF2QHvRW5R/Jxnbbmwh3u+969vUKXtBkXgSgjDA85nji31ZBlf7+FrHDy5x+5ydGyQDg==", "hasInstallScript": true, "dependencies": { - "@prisma/engines-version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe" + "@prisma/engines-version": "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5" }, "engines": { "node": ">=14.17" @@ -557,16 +557,16 @@ } }, "node_modules/@prisma/engines": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.8.1.tgz", - "integrity": "sha512-93tctjNXcIS+i/e552IO6tqw17sX8liivv8WX9lDMCpEEe3ci+nT9F+1oHtAafqruXLepKF80i/D20Mm+ESlOw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.9.0.tgz", + "integrity": "sha512-t1pt0Gsp+HcgPJrHFc+d/ZSAaKKWar2G/iakrE07yeKPNavDP3iVKPpfXP22OTCHZUWf7OelwKJxQgKAm5hkgw==", "devOptional": true, "hasInstallScript": true }, "node_modules/@prisma/engines-version": { - "version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe.tgz", - "integrity": "sha512-MHSOSexomRMom8QN4t7bu87wPPD+pa+hW9+71JnVcF3DqyyO/ycCLhRL1we3EojRpZxKvuyGho2REQsMCvxcJw==" + "version": "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5.tgz", + "integrity": "sha512-M16aibbxi/FhW7z1sJCX8u+0DriyQYY5AyeTH7plQm9MLnURoiyn3CZBqAyIoQ+Z1pS77usCIibYJWSgleBMBA==" }, "node_modules/@skeletonlabs/skeleton": { "version": "0.92.2", @@ -3556,13 +3556,13 @@ } }, "node_modules/prisma": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.8.1.tgz", - "integrity": "sha512-ZMLnSjwulIeYfaU1O6/LF6PEJzxN5par5weykxMykS9Z6ara/j76JH3Yo2AH3bgJbPN4Z6NeCK9s5fDkzf33cg==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.9.0.tgz", + "integrity": "sha512-bS96oZ5oDFXYgoF2l7PJ3Mp1wWWfLOo8B/jAfbA2Pn0Wm5Z/owBHzaMQKS3i1CzVBDWWPVnOohmbJmjvkcHS5w==", "devOptional": true, "hasInstallScript": true, "dependencies": { - "@prisma/engines": "4.8.1" + "@prisma/engines": "4.9.0" }, "bin": { "prisma": "build/index.js", diff --git a/package.json b/package.json index 4dc599b..faae28c 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "postcss-load-config": "^4.0.1", "prettier": "^2.8.0", "prettier-plugin-svelte": "^2.8.1", - "prisma": "^4.8.1", + "prisma": "^4.9.0", "svelte": "^3.54.0", "svelte-check": "^2.9.2", "svelte-preprocess": "^4.10.7", @@ -46,7 +46,7 @@ }, "type": "module", "dependencies": { - "@prisma/client": "^4.8.1" + "@prisma/client": "^4.9.0" }, "license": "MIT", "engines": { diff --git a/src/app.html b/src/app.html index af2ffd1..8f4c546 100644 --- a/src/app.html +++ b/src/app.html @@ -6,7 +6,11 @@ %sveltekit.head% - +
%sveltekit.body%
diff --git a/src/app.postcss b/src/app.postcss index 35dbb87..0746b36 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -1,4 +1,4 @@ :root { - --theme-rounded-container: theme(borderRadius.sm); - --theme-rounded-base: theme(borderRadius.sm); -} \ No newline at end of file + --theme-rounded-container: theme(borderRadius.sm); + --theme-rounded-base: theme(borderRadius.sm); +} diff --git a/src/hooks.server.ts b/src/hooks.server.ts index d9789bd..2ca9a3a 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -1,10 +1,10 @@ import type { Handle } from '@sveltejs/kit'; import { initAcceptLanguageHeaderDetector } from 'typesafe-i18n/detectors'; - + export const handle = (async ({ event, resolve }) => { - // TODO: get lang from cookie / user setting - event.locals.lang = initAcceptLanguageHeaderDetector(event.request)(); - - // TODO: set lang attribute in HTML - return resolve(event); -}) satisfies Handle; \ No newline at end of file + // TODO: get lang from cookie / user setting + event.locals.lang = initAcceptLanguageHeaderDetector(event.request)(); + + // TODO: set lang attribute in HTML + return resolve(event); +}) satisfies Handle; diff --git a/src/lib/i18n/ar/index.ts b/src/lib/i18n/ar/index.ts index 7b06134..911ab2c 100644 --- a/src/lib/i18n/ar/index.ts +++ b/src/lib/i18n/ar/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types' +import type { Translation } from '../i18n-types'; import en from '../en'; const ar: Translation = { - ...en as Translation, - message: 'مرحبا بالعالم', + ...(en as Translation), + message: 'مرحبا بالعالم' }; export default ar; diff --git a/src/lib/i18n/de/index.ts b/src/lib/i18n/de/index.ts index 6eb0ecf..4d05397 100644 --- a/src/lib/i18n/de/index.ts +++ b/src/lib/i18n/de/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types' +import type { Translation } from '../i18n-types'; import en from '../en'; const de: Translation = { - ...en as Translation, - message: 'Hallo Welt', + ...(en as Translation), + message: 'Hallo Welt' }; export default de; diff --git a/src/lib/i18n/en/index.ts b/src/lib/i18n/en/index.ts index bf95667..43b5bfa 100644 --- a/src/lib/i18n/en/index.ts +++ b/src/lib/i18n/en/index.ts @@ -1,7 +1,8 @@ -import type { BaseTranslation } from '../i18n-types' +import type { BaseTranslation } from '../i18n-types'; const en: BaseTranslation = { - tagline: "Presenting the ultimate YouTube experience. Whether you're looking for new content to watch or want to share your own curated list with friends, our app has got you covered.", + tagline: + "Presenting the ultimate YouTube experience. Whether you're looking for new content to watch or want to share your own curated list with friends, our app has got you covered.", signUp: 'Sign up with YouTube', message: 'Hello World', onboarding: { @@ -10,11 +11,11 @@ const en: BaseTranslation = { uploadFile: 'Upload File' }, messages: { - main: 'Welcome to listd! Let\'s setup your profile.', + main: "Welcome to listd! Let's setup your profile.", avatar: 'Upload your avatar.', - final: 'That\'s all! Let\'s get started!' + final: "That's all! Let's get started!" } } }; -export default en +export default en; diff --git a/src/lib/i18n/es/index.ts b/src/lib/i18n/es/index.ts index 66256f5..cdfbd5a 100644 --- a/src/lib/i18n/es/index.ts +++ b/src/lib/i18n/es/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types' +import type { Translation } from '../i18n-types'; import en from '../en'; const es: Translation = { - ...en as Translation, - message: 'Hola Mundo', + ...(en as Translation), + message: 'Hola Mundo' }; -export default es +export default es; diff --git a/src/lib/i18n/formatters.ts b/src/lib/i18n/formatters.ts index 78734f9..25ba507 100644 --- a/src/lib/i18n/formatters.ts +++ b/src/lib/i18n/formatters.ts @@ -1,11 +1,10 @@ -import type { FormattersInitializer } from 'typesafe-i18n' -import type { Locales, Formatters } from './i18n-types' +import type { FormattersInitializer } from 'typesafe-i18n'; +import type { Locales, Formatters } from './i18n-types'; export const initFormatters: FormattersInitializer = (locale: Locales) => { - const formatters: Formatters = { // add your formatter functions here - } + }; - return formatters -} + return formatters; +}; diff --git a/src/lib/i18n/i18n-svelte.ts b/src/lib/i18n/i18n-svelte.ts index 6cdffb3..2d66bc9 100644 --- a/src/lib/i18n/i18n-svelte.ts +++ b/src/lib/i18n/i18n-svelte.ts @@ -1,12 +1,17 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import { initI18nSvelte } from 'typesafe-i18n/svelte' -import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types' -import { loadedFormatters, loadedLocales } from './i18n-util' +import { initI18nSvelte } from 'typesafe-i18n/svelte'; +import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types'; +import { loadedFormatters, loadedLocales } from './i18n-util'; -const { locale, LL, setLocale } = initI18nSvelte(loadedLocales, loadedFormatters) +const { locale, LL, setLocale } = initI18nSvelte< + Locales, + Translations, + TranslationFunctions, + Formatters +>(loadedLocales, loadedFormatters); -export { locale, LL, setLocale } +export { locale, LL, setLocale }; -export default LL +export default LL; diff --git a/src/lib/i18n/i18n-types.ts b/src/lib/i18n/i18n-types.ts index a54fe41..dacfd66 100644 --- a/src/lib/i18n/i18n-types.ts +++ b/src/lib/i18n/i18n-types.ts @@ -1,103 +1,96 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import type { BaseTranslation as BaseTranslationType, LocalizedString } from 'typesafe-i18n' +import type { BaseTranslation as BaseTranslationType, LocalizedString } from 'typesafe-i18n'; -export type BaseTranslation = BaseTranslationType -export type BaseLocale = 'en' +export type BaseTranslation = BaseTranslationType; +export type BaseLocale = 'en'; -export type Locales = - | 'ar' - | 'de' - | 'en' - | 'es' - | 'it' - | 'ru' - | 'uk' +export type Locales = 'ar' | 'de' | 'en' | 'es' | 'it' | 'ru' | 'tr' | 'uk'; -export type Translation = RootTranslation +export type Translation = RootTranslation; -export type Translations = RootTranslation +export type Translations = RootTranslation; type RootTranslation = { /** * P​r​e​s​e​n​t​i​n​g​ ​t​h​e​ ​u​l​t​i​m​a​t​e​ ​Y​o​u​T​u​b​e​ ​e​x​p​e​r​i​e​n​c​e​.​ ​W​h​e​t​h​e​r​ ​y​o​u​'​r​e​ ​l​o​o​k​i​n​g​ ​f​o​r​ ​n​e​w​ ​c​o​n​t​e​n​t​ ​t​o​ ​w​a​t​c​h​ ​o​r​ ​w​a​n​t​ ​t​o​ ​s​h​a​r​e​ ​y​o​u​r​ ​o​w​n​ ​c​u​r​a​t​e​d​ ​l​i​s​t​ ​w​i​t​h​ ​f​r​i​e​n​d​s​,​ ​o​u​r​ ​a​p​p​ ​h​a​s​ ​g​o​t​ ​y​o​u​ ​c​o​v​e​r​e​d​. */ - tagline: string + tagline: string; /** * S​i​g​n​ ​u​p​ ​w​i​t​h​ ​Y​o​u​T​u​b​e */ - signUp: string + signUp: string; /** * H​e​l​l​o​ ​W​o​r​l​d */ - message: string + message: string; onboarding: { labels: { /** * U​s​e​r​n​a​m​e */ - username: string + username: string; /** * U​p​l​o​a​d​ ​F​i​l​e */ - uploadFile: string - } + uploadFile: string; + }; messages: { /** * W​e​l​c​o​m​e​ ​t​o​ ​l​i​s​t​d​!​ ​L​e​t​'​s​ ​s​e​t​u​p​ ​y​o​u​r​ ​p​r​o​f​i​l​e​. */ - main: string + main: string; /** * U​p​l​o​a​d​ ​y​o​u​r​ ​a​v​a​t​a​r​. */ - avatar: string + avatar: string; /** * T​h​a​t​'​s​ ​a​l​l​!​ ​L​e​t​'​s​ ​g​e​t​ ​s​t​a​r​t​e​d​! */ - final: string - } - } -} + final: string; + }; + }; +}; export type TranslationFunctions = { /** * Presenting the ultimate YouTube experience. Whether you're looking for new content to watch or want to share your own curated list with friends, our app has got you covered. */ - tagline: () => LocalizedString + tagline: () => LocalizedString; /** * Sign up with YouTube */ - signUp: () => LocalizedString + signUp: () => LocalizedString; /** * Hello World */ - message: () => LocalizedString + message: () => LocalizedString; onboarding: { labels: { /** * Username */ - username: () => LocalizedString + username: () => LocalizedString; /** * Upload File */ - uploadFile: () => LocalizedString - } + uploadFile: () => LocalizedString; + }; messages: { /** * Welcome to listd! Let's setup your profile. */ - main: () => LocalizedString + main: () => LocalizedString; /** * Upload your avatar. */ - avatar: () => LocalizedString + avatar: () => LocalizedString; /** * That's all! Let's get started! */ - final: () => LocalizedString - } - } -} + final: () => LocalizedString; + }; + }; +}; -export type Formatters = {} +export type Formatters = {}; diff --git a/src/lib/i18n/i18n-util.async.ts b/src/lib/i18n/i18n-util.async.ts index 2da5cac..1ec92a1 100644 --- a/src/lib/i18n/i18n-util.async.ts +++ b/src/lib/i18n/i18n-util.async.ts @@ -1,9 +1,9 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import { initFormatters } from './formatters' -import type { Locales, Translations } from './i18n-types' -import { loadedFormatters, loadedLocales, locales } from './i18n-util' +import { initFormatters } from './formatters'; +import type { Locales, Translations } from './i18n-types'; +import { loadedFormatters, loadedLocales, locales } from './i18n-util'; const localeTranslationLoaders = { ar: () => import('./ar'), @@ -12,21 +12,22 @@ const localeTranslationLoaders = { es: () => import('./es'), it: () => import('./it'), ru: () => import('./ru'), - uk: () => import('./uk'), -} + tr: () => import('./tr'), + uk: () => import('./uk') +}; const updateDictionary = (locale: Locales, dictionary: Partial): Translations => - loadedLocales[locale] = { ...loadedLocales[locale], ...dictionary } + (loadedLocales[locale] = { ...loadedLocales[locale], ...dictionary }); export const importLocaleAsync = async (locale: Locales): Promise => - (await localeTranslationLoaders[locale]()).default as unknown as Translations + (await localeTranslationLoaders[locale]()).default as unknown as Translations; export const loadLocaleAsync = async (locale: Locales): Promise => { - updateDictionary(locale, await importLocaleAsync(locale)) - loadFormatters(locale) -} + updateDictionary(locale, await importLocaleAsync(locale)); + loadFormatters(locale); +}; -export const loadAllLocalesAsync = (): Promise => Promise.all(locales.map(loadLocaleAsync)) +export const loadAllLocalesAsync = (): Promise => Promise.all(locales.map(loadLocaleAsync)); export const loadFormatters = (locale: Locales): void => - void (loadedFormatters[locale] = initFormatters(locale)) + void (loadedFormatters[locale] = initFormatters(locale)); diff --git a/src/lib/i18n/i18n-util.sync.ts b/src/lib/i18n/i18n-util.sync.ts index b7108f3..b41be4e 100644 --- a/src/lib/i18n/i18n-util.sync.ts +++ b/src/lib/i18n/i18n-util.sync.ts @@ -1,17 +1,18 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import { initFormatters } from './formatters' -import type { Locales, Translations } from './i18n-types' -import { loadedFormatters, loadedLocales, locales } from './i18n-util' +import { initFormatters } from './formatters'; +import type { Locales, Translations } from './i18n-types'; +import { loadedFormatters, loadedLocales, locales } from './i18n-util'; -import ar from './ar' -import de from './de' -import en from './en' -import es from './es' -import it from './it' -import ru from './ru' -import uk from './uk' +import ar from './ar'; +import de from './de'; +import en from './en'; +import es from './es'; +import it from './it'; +import ru from './ru'; +import tr from './tr'; +import uk from './uk'; const localeTranslations = { ar, @@ -20,17 +21,18 @@ const localeTranslations = { es, it, ru, - uk, -} + tr, + uk +}; export const loadLocale = (locale: Locales): void => { - if (loadedLocales[locale]) return + if (loadedLocales[locale]) return; - loadedLocales[locale] = localeTranslations[locale] as unknown as Translations - loadFormatters(locale) -} + loadedLocales[locale] = localeTranslations[locale] as unknown as Translations; + loadFormatters(locale); +}; -export const loadAllLocales = (): void => locales.forEach(loadLocale) +export const loadAllLocales = (): void => locales.forEach(loadLocale); export const loadFormatters = (locale: Locales): void => - void (loadedFormatters[locale] = initFormatters(locale)) + void (loadedFormatters[locale] = initFormatters(locale)); diff --git a/src/lib/i18n/i18n-util.ts b/src/lib/i18n/i18n-util.ts index 604c441..93f2b1a 100644 --- a/src/lib/i18n/i18n-util.ts +++ b/src/lib/i18n/i18n-util.ts @@ -1,40 +1,41 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import { i18n as initI18n, i18nObject as initI18nObject, i18nString as initI18nString } from 'typesafe-i18n' -import type { LocaleDetector } from 'typesafe-i18n/detectors' -import type { LocaleTranslationFunctions, TranslateByString } from 'typesafe-i18n' -import { detectLocale as detectLocaleFn } from 'typesafe-i18n/detectors' -import type { Formatters, Locales, Translations, TranslationFunctions } from './i18n-types' +import { + i18n as initI18n, + i18nObject as initI18nObject, + i18nString as initI18nString +} from 'typesafe-i18n'; +import type { LocaleDetector } from 'typesafe-i18n/detectors'; +import type { LocaleTranslationFunctions, TranslateByString } from 'typesafe-i18n'; +import { detectLocale as detectLocaleFn } from 'typesafe-i18n/detectors'; +import type { Formatters, Locales, Translations, TranslationFunctions } from './i18n-types'; -export const baseLocale: Locales = 'en' +export const baseLocale: Locales = 'en'; -export const locales: Locales[] = [ - 'ar', - 'de', - 'en', - 'es', - 'it', - 'ru', - 'uk' -] +export const locales: Locales[] = ['ar', 'de', 'en', 'es', 'it', 'ru', 'tr', 'uk']; -export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales) +export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales); -export const loadedLocales: Record = {} as Record +export const loadedLocales: Record = {} as Record; -export const loadedFormatters: Record = {} as Record +export const loadedFormatters: Record = {} as Record; -export const i18nString = (locale: Locales): TranslateByString => initI18nString(locale, loadedFormatters[locale]) +export const i18nString = (locale: Locales): TranslateByString => + initI18nString(locale, loadedFormatters[locale]); export const i18nObject = (locale: Locales): TranslationFunctions => initI18nObject( locale, loadedLocales[locale], loadedFormatters[locale] - ) + ); export const i18n = (): LocaleTranslationFunctions => - initI18n(loadedLocales, loadedFormatters) + initI18n( + loadedLocales, + loadedFormatters + ); -export const detectLocale = (...detectors: LocaleDetector[]): Locales => detectLocaleFn(baseLocale, locales, ...detectors) +export const detectLocale = (...detectors: LocaleDetector[]): Locales => + detectLocaleFn(baseLocale, locales, ...detectors); diff --git a/src/lib/i18n/it/index.ts b/src/lib/i18n/it/index.ts index 32e9a7b..9f6b4ee 100644 --- a/src/lib/i18n/it/index.ts +++ b/src/lib/i18n/it/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types' +import type { Translation } from '../i18n-types'; import en from '../en'; const it: Translation = { - ...en as Translation, - message: 'Ciao Mondo', + ...(en as Translation), + message: 'Ciao Mondo' }; export default it; diff --git a/src/lib/i18n/ru/index.ts b/src/lib/i18n/ru/index.ts index af50b07..2f953b6 100644 --- a/src/lib/i18n/ru/index.ts +++ b/src/lib/i18n/ru/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types' +import type { Translation } from '../i18n-types'; import en from '../en'; const ru: Translation = { - ...en as Translation, - message: 'Привет Мир', + ...(en as Translation), + message: 'Привет Мир' }; export default ru; diff --git a/src/lib/i18n/tr/index.ts b/src/lib/i18n/tr/index.ts new file mode 100644 index 0000000..4289162 --- /dev/null +++ b/src/lib/i18n/tr/index.ts @@ -0,0 +1,12 @@ +import type { Translation } from '../i18n-types'; +import en from '../en'; +import listd from './listd.json'; +import onboarding from './onboarding.json'; + +const tr: Translation = { + ...(en as Translation), + ...listd, + onboarding +}; + +export default tr; diff --git a/src/lib/i18n/tr/listd.json b/src/lib/i18n/tr/listd.json new file mode 100644 index 0000000..56290fa --- /dev/null +++ b/src/lib/i18n/tr/listd.json @@ -0,0 +1,5 @@ +{ + "tagline": "Üst düzey YouTube deneyimi sunar. İster izlemek için yeni içerik arayın, isterseniz kendi yaptığınız listeyi arkadaşlarınızla paylaşın, uygulamamız size yardımcı olur.", + "signUp": "YouTube ile giriş yap", + "message": "Merhaba Dünya" +} diff --git a/src/lib/i18n/tr/onboarding.json b/src/lib/i18n/tr/onboarding.json new file mode 100644 index 0000000..1fdc6f2 --- /dev/null +++ b/src/lib/i18n/tr/onboarding.json @@ -0,0 +1,11 @@ +{ + "labels": { + "username": "Kullanıcı Adı", + "uploadFile": "Dosya Seç" + }, + "messages": { + "main": "Listd'e Hoş Geldin! Hadi profilini oluşturalım.", + "avatar": "Profil resminizi yükleyin.", + "final": "İşte bu kadar! Hadi başlayalım!" + } +} diff --git a/src/lib/i18n/uk/index.ts b/src/lib/i18n/uk/index.ts index 89b3cb9..e27d39c 100644 --- a/src/lib/i18n/uk/index.ts +++ b/src/lib/i18n/uk/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types' +import type { Translation } from '../i18n-types'; import en from '../en'; const uk: Translation = { - ...en as Translation, - message: 'Привіт світ', + ...(en as Translation), + message: 'Привіт світ' }; export default uk; diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index 06f2c0f..ebf732b 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -1,7 +1,7 @@ import type { LayoutServerLoad } from './$types'; export const load = (async ({ locals }) => { - return { - lang: locals.lang, - }; -}) satisfies LayoutServerLoad; \ No newline at end of file + return { + lang: locals.lang + }; +}) satisfies LayoutServerLoad; diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 8440258..f641f24 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -4,10 +4,10 @@ import { setLocale } from '$lib/i18n/i18n-svelte'; import { detectLocale } from '$lib/i18n/i18n-util'; export const load = (async (event) => { - // TODO: possibly use navigatorDetector as well - const locale = detectLocale(() => event.data.lang); - await loadLocaleAsync(locale); - setLocale(locale); + // TODO: possibly use navigatorDetector as well + const locale = detectLocale(() => event.data.lang); + await loadLocaleAsync(locale); + setLocale(locale); - return event.data; -}) satisfies LayoutLoad; \ No newline at end of file + return event.data; +}) satisfies LayoutLoad; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4545c1d..fe8f49a 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,11 +1,13 @@
-

{ $LL.tagline() }

- - { $LL.signUp() } - -
\ No newline at end of file + +

{$LL.tagline()}

+ + {$LL.signUp()} + + + diff --git a/src/routes/onboarding/+page.svelte b/src/routes/onboarding/+page.svelte index fc08407..a31a674 100644 --- a/src/routes/onboarding/+page.svelte +++ b/src/routes/onboarding/+page.svelte @@ -1,28 +1,30 @@ -

{ $LL.onboarding.messages.main() }

+

{$LL.onboarding.messages.main()}

{ - return async ({ result, update }) => {} - }} + class="pt-4" + method="POST" + use:enhance={({ form, data, action, cancel }) => { + return async ({ result, update }) => {}; + }} > - -

{ $LL.onboarding.messages.avatar() }

-
- { $LL.onboarding.labels.uploadFile() } -
-

{ $LL.onboarding.messages.final() }

-
- -
+ +

{$LL.onboarding.messages.avatar()}

+
+ {$LL.onboarding.labels.uploadFile()} +
+

{$LL.onboarding.messages.final()}

+
+ +
diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 05f6a89..a326b75 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -9,10 +9,7 @@ const config = { extend: {} }, - plugins: [ - require('@skeletonlabs/skeleton/tailwind/skeleton.cjs'), - require('@tailwindcss/forms'), - ] + plugins: [require('@skeletonlabs/skeleton/tailwind/skeleton.cjs'), require('@tailwindcss/forms')] }; module.exports = config; From 66e2b346388769247279fff7aaf24eff752a3562 Mon Sep 17 00:00:00 2001 From: Ercode Techoglu Date: Sat, 28 Jan 2023 21:54:24 +0300 Subject: [PATCH 2/5] =?UTF-8?q?Revert=20"=F0=9F=87=B9=F0=9F=87=B7=20?= =?UTF-8?q?=F0=9F=87=B9=F0=9F=87=B7=20=F0=9F=87=B9=F0=9F=87=B7"=20except?= =?UTF-8?q?=20actual=20i18n=20files.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 4b602d53f49ad664082aecc2a5c6a197e7dcb04c except actual i18n files. --- .typesafe-i18n.json | 8 ++-- CODE-OF-CONDUCT.md | 13 +++--- CONTRIBUTING.md | 11 ++--- DEVLOG.md | 49 +++++++++++---------- NOTES.md | 27 ++++++------ docker-compose.yml | 2 +- package-lock.json | 32 +++++++------- package.json | 4 +- src/app.html | 6 +-- src/app.postcss | 6 +-- src/hooks.server.ts | 14 +++--- src/lib/i18n/ar/index.ts | 6 +-- src/lib/i18n/de/index.ts | 6 +-- src/lib/i18n/en/index.ts | 11 +++-- src/lib/i18n/es/index.ts | 8 ++-- src/lib/i18n/formatters.ts | 11 ++--- src/lib/i18n/i18n-svelte.ts | 17 +++----- src/lib/i18n/i18n-types.ts | 69 ++++++++++++++++-------------- src/lib/i18n/i18n-util.async.ts | 25 ++++++----- src/lib/i18n/i18n-util.sync.ts | 38 ++++++++-------- src/lib/i18n/i18n-util.ts | 45 ++++++++++--------- src/lib/i18n/it/index.ts | 6 +-- src/lib/i18n/ru/index.ts | 6 +-- src/lib/i18n/uk/index.ts | 6 +-- src/routes/+layout.server.ts | 8 ++-- src/routes/+layout.ts | 12 +++--- src/routes/+page.svelte | 16 +++---- src/routes/onboarding/+page.svelte | 46 ++++++++++---------- tailwind.config.cjs | 5 ++- 29 files changed, 254 insertions(+), 259 deletions(-) diff --git a/.typesafe-i18n.json b/.typesafe-i18n.json index 70769a9..64ee777 100644 --- a/.typesafe-i18n.json +++ b/.typesafe-i18n.json @@ -1,5 +1,5 @@ { - "adapter": "svelte", - "outputPath": "./src/lib/i18n/", - "$schema": "https://unpkg.com/typesafe-i18n@5.20.0/schema/typesafe-i18n.json" -} + "adapter": "svelte", + "outputPath": "./src/lib/i18n/", + "$schema": "https://unpkg.com/typesafe-i18n@5.20.0/schema/typesafe-i18n.json" +} \ No newline at end of file diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md index a2d3c89..5aa8a31 100644 --- a/CODE-OF-CONDUCT.md +++ b/CODE-OF-CONDUCT.md @@ -1,5 +1,6 @@ # Contributor Code of Conduct + ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. @@ -40,15 +41,15 @@ This Code of Conduct applies both within project spaces and in public spaces whe Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting us through: -- [DM on Twitter](https://twitter.com/coding_garden) - -- DM on Discord - w3cj#7953 - - + * [DM on Twitter](https://twitter.com/coding_garden) + + * DM on Discord - w3cj#7953 + + All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. If you are unsure whether an incident is a violation, or whether the space where the incident took place is covered by our Code of Conduct, **we encourage you to still report it**. We would prefer to have a few extra reports where we decide to take no action, than to leave an incident go unnoticed and unresolved that may result in an individual or group to feel like they can no longer participate in the community. Reports deemed as not a violation will also allow us to improve our Code of Conduct and processes surrounding it. If you witness a dangerous situation or someone in distress, we encourage you to report even if you are only an observer. -[This Code of Conduct was adapted from Auth0](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) +[This Code of Conduct was adapted from Auth0](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index edb4a1e..339153f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,4 @@ -105 lines (68 sloc) 4.27 KB - + 105 lines (68 sloc) 4.27 KB # Contribution Guidelines When contributing to `listd`, whether on GitHub or in other community spaces: @@ -18,6 +17,7 @@ In an effort to respect your time, if you wanted to implement a change that has Fork the [Listd repository](https://github.com/CodingGarden/listd) to your own GitHub account and then clone it to your local device. + ```bash git clone git@github.com:YOUR_USER_NAME/listd.git ``` @@ -48,7 +48,6 @@ DB_PASSWORD=your_database_password DB_NAME=your_database_name DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} ``` - If you are using Docker, you can use the following values: ```bash @@ -60,7 +59,7 @@ DB_PORT=5432 DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} ``` -- DATABASE_URL: The full database connection URL. This is required and is used by prisma. +* DATABASE_URL: The full database connection URL. This is required and is used by prisma. #### Set up PostgreSQL by Docker Compose @@ -103,7 +102,7 @@ git push ``` Then, [create a pull request](https://github.com/CodingGarden/listd/pulls) -from your fork to the `main` branch of the `listd` repository. + from your fork to the `main` branch of the `listd` repository. ## Code Style @@ -116,3 +115,5 @@ This project uses [Prettier](https://prettier.io/) to format the code. You can r ## License By contributing, you agree that your contributions will be licensed under its MIT License. + + diff --git a/DEVLOG.md b/DEVLOG.md index a2bc4f5..ba02e19 100644 --- a/DEVLOG.md +++ b/DEVLOG.md @@ -1,29 +1,28 @@ # 2023-01-27 -- [x] Review PRs - - [x] Tailwind bug fix - - [x] Contributing Guide -- [x] Setup i18n - - [x] Research options - - [x] Install / setup - - [x] Use dictionaries on landing page +* [x] Review PRs + * [x] Tailwind bug fix + * [x] Contributing Guide +* [x] Setup i18n + * [x] Research options + * [x] Install / setup + * [x] Use dictionaries on landing page # 2023-02-03 - -- [ ] Eslint / Airbnb / Prettier Setup... -- [ ] Setup Auth - - [ ] install / setup @auth/core -- [ ] Deploy??? - - [ ] Database??? - - Free Tier - - Serverless / Edge Function Support... - - Connection Pooling - - Fly.io - - Railway - - Supabase - - Render - - ElephantSQL - - Paid - - Heroku - - AWS RDS - - [ ] App?? - Vercel +* [ ] Eslint / Airbnb / Prettier Setup... +* [ ] Setup Auth + * [ ] install / setup @auth/core +* [ ] Deploy??? + * [ ] Database??? + * Free Tier + * Serverless / Edge Function Support... + * Connection Pooling + * Fly.io + * Railway + * Supabase + * Render + * ElephantSQL + * Paid + * Heroku + * AWS RDS + * [ ] App?? - Vercel \ No newline at end of file diff --git a/NOTES.md b/NOTES.md index 096cfb5..b492007 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,18 +1,19 @@ + Right now we only support YouTube channels. Eventually, we will support other types of items in the feed. For example: + * YouTube - Channel + * Instagram - Profile / Page + * TikTok - Profile + * Twitter - User + * Reddit - Subreddit + * Reddit User - Reddit User + * Blog - Author -- YouTube - Channel -- Instagram - Profile / Page -- TikTok - Profile -- Twitter - User -- Reddit - Subreddit -- Reddit User - Reddit User -- Blog - Author # UI Design -- Wireframing - - UX - - User Experience -- Mockup - - Higher Fidelity -- Prototype +* Wireframing + * UX + * User Experience +* Mockup + * Higher Fidelity +* Prototype \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 20066a8..51cbcd4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,4 +11,4 @@ services: ports: - ${DB_PORT}:5432 volumes: - - ./docker-data/db:/var/lib/postgresql/data + - ./docker-data/db:/var/lib/postgresql/data \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6947b73..1b005f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "@prisma/client": "^4.9.0" + "@prisma/client": "^4.8.1" }, "devDependencies": { "@playwright/test": "^1.28.1", @@ -28,7 +28,7 @@ "postcss-load-config": "^4.0.1", "prettier": "^2.8.0", "prettier-plugin-svelte": "^2.8.1", - "prisma": "^4.9.0", + "prisma": "^4.8.1", "svelte": "^3.54.0", "svelte-check": "^2.9.2", "svelte-preprocess": "^4.10.7", @@ -537,12 +537,12 @@ "dev": true }, "node_modules/@prisma/client": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.9.0.tgz", - "integrity": "sha512-bz6QARw54sWcbyR1lLnF2QHvRW5R/Jxnbbmwh3u+969vUKXtBkXgSgjDA85nji31ZBlf7+FrHDy5x+5ydGyQDg==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.8.1.tgz", + "integrity": "sha512-d4xhZhETmeXK/yZ7K0KcVOzEfI5YKGGEr4F5SBV04/MU4ncN/HcE28sy3e4Yt8UFW0ZuImKFQJE+9rWt9WbGSQ==", "hasInstallScript": true, "dependencies": { - "@prisma/engines-version": "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5" + "@prisma/engines-version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe" }, "engines": { "node": ">=14.17" @@ -557,16 +557,16 @@ } }, "node_modules/@prisma/engines": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.9.0.tgz", - "integrity": "sha512-t1pt0Gsp+HcgPJrHFc+d/ZSAaKKWar2G/iakrE07yeKPNavDP3iVKPpfXP22OTCHZUWf7OelwKJxQgKAm5hkgw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.8.1.tgz", + "integrity": "sha512-93tctjNXcIS+i/e552IO6tqw17sX8liivv8WX9lDMCpEEe3ci+nT9F+1oHtAafqruXLepKF80i/D20Mm+ESlOw==", "devOptional": true, "hasInstallScript": true }, "node_modules/@prisma/engines-version": { - "version": "4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.9.0-42.ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5.tgz", - "integrity": "sha512-M16aibbxi/FhW7z1sJCX8u+0DriyQYY5AyeTH7plQm9MLnURoiyn3CZBqAyIoQ+Z1pS77usCIibYJWSgleBMBA==" + "version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe.tgz", + "integrity": "sha512-MHSOSexomRMom8QN4t7bu87wPPD+pa+hW9+71JnVcF3DqyyO/ycCLhRL1we3EojRpZxKvuyGho2REQsMCvxcJw==" }, "node_modules/@skeletonlabs/skeleton": { "version": "0.92.2", @@ -3556,13 +3556,13 @@ } }, "node_modules/prisma": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.9.0.tgz", - "integrity": "sha512-bS96oZ5oDFXYgoF2l7PJ3Mp1wWWfLOo8B/jAfbA2Pn0Wm5Z/owBHzaMQKS3i1CzVBDWWPVnOohmbJmjvkcHS5w==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.8.1.tgz", + "integrity": "sha512-ZMLnSjwulIeYfaU1O6/LF6PEJzxN5par5weykxMykS9Z6ara/j76JH3Yo2AH3bgJbPN4Z6NeCK9s5fDkzf33cg==", "devOptional": true, "hasInstallScript": true, "dependencies": { - "@prisma/engines": "4.9.0" + "@prisma/engines": "4.8.1" }, "bin": { "prisma": "build/index.js", diff --git a/package.json b/package.json index faae28c..4dc599b 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "postcss-load-config": "^4.0.1", "prettier": "^2.8.0", "prettier-plugin-svelte": "^2.8.1", - "prisma": "^4.9.0", + "prisma": "^4.8.1", "svelte": "^3.54.0", "svelte-check": "^2.9.2", "svelte-preprocess": "^4.10.7", @@ -46,7 +46,7 @@ }, "type": "module", "dependencies": { - "@prisma/client": "^4.9.0" + "@prisma/client": "^4.8.1" }, "license": "MIT", "engines": { diff --git a/src/app.html b/src/app.html index 8f4c546..af2ffd1 100644 --- a/src/app.html +++ b/src/app.html @@ -6,11 +6,7 @@ %sveltekit.head% - +
%sveltekit.body%
diff --git a/src/app.postcss b/src/app.postcss index 0746b36..35dbb87 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -1,4 +1,4 @@ :root { - --theme-rounded-container: theme(borderRadius.sm); - --theme-rounded-base: theme(borderRadius.sm); -} + --theme-rounded-container: theme(borderRadius.sm); + --theme-rounded-base: theme(borderRadius.sm); +} \ No newline at end of file diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 2ca9a3a..d9789bd 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -1,10 +1,10 @@ import type { Handle } from '@sveltejs/kit'; import { initAcceptLanguageHeaderDetector } from 'typesafe-i18n/detectors'; - + export const handle = (async ({ event, resolve }) => { - // TODO: get lang from cookie / user setting - event.locals.lang = initAcceptLanguageHeaderDetector(event.request)(); - - // TODO: set lang attribute in HTML - return resolve(event); -}) satisfies Handle; + // TODO: get lang from cookie / user setting + event.locals.lang = initAcceptLanguageHeaderDetector(event.request)(); + + // TODO: set lang attribute in HTML + return resolve(event); +}) satisfies Handle; \ No newline at end of file diff --git a/src/lib/i18n/ar/index.ts b/src/lib/i18n/ar/index.ts index 911ab2c..7b06134 100644 --- a/src/lib/i18n/ar/index.ts +++ b/src/lib/i18n/ar/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types'; +import type { Translation } from '../i18n-types' import en from '../en'; const ar: Translation = { - ...(en as Translation), - message: 'مرحبا بالعالم' + ...en as Translation, + message: 'مرحبا بالعالم', }; export default ar; diff --git a/src/lib/i18n/de/index.ts b/src/lib/i18n/de/index.ts index 4d05397..6eb0ecf 100644 --- a/src/lib/i18n/de/index.ts +++ b/src/lib/i18n/de/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types'; +import type { Translation } from '../i18n-types' import en from '../en'; const de: Translation = { - ...(en as Translation), - message: 'Hallo Welt' + ...en as Translation, + message: 'Hallo Welt', }; export default de; diff --git a/src/lib/i18n/en/index.ts b/src/lib/i18n/en/index.ts index 43b5bfa..bf95667 100644 --- a/src/lib/i18n/en/index.ts +++ b/src/lib/i18n/en/index.ts @@ -1,8 +1,7 @@ -import type { BaseTranslation } from '../i18n-types'; +import type { BaseTranslation } from '../i18n-types' const en: BaseTranslation = { - tagline: - "Presenting the ultimate YouTube experience. Whether you're looking for new content to watch or want to share your own curated list with friends, our app has got you covered.", + tagline: "Presenting the ultimate YouTube experience. Whether you're looking for new content to watch or want to share your own curated list with friends, our app has got you covered.", signUp: 'Sign up with YouTube', message: 'Hello World', onboarding: { @@ -11,11 +10,11 @@ const en: BaseTranslation = { uploadFile: 'Upload File' }, messages: { - main: "Welcome to listd! Let's setup your profile.", + main: 'Welcome to listd! Let\'s setup your profile.', avatar: 'Upload your avatar.', - final: "That's all! Let's get started!" + final: 'That\'s all! Let\'s get started!' } } }; -export default en; +export default en diff --git a/src/lib/i18n/es/index.ts b/src/lib/i18n/es/index.ts index cdfbd5a..66256f5 100644 --- a/src/lib/i18n/es/index.ts +++ b/src/lib/i18n/es/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types'; +import type { Translation } from '../i18n-types' import en from '../en'; const es: Translation = { - ...(en as Translation), - message: 'Hola Mundo' + ...en as Translation, + message: 'Hola Mundo', }; -export default es; +export default es diff --git a/src/lib/i18n/formatters.ts b/src/lib/i18n/formatters.ts index 25ba507..78734f9 100644 --- a/src/lib/i18n/formatters.ts +++ b/src/lib/i18n/formatters.ts @@ -1,10 +1,11 @@ -import type { FormattersInitializer } from 'typesafe-i18n'; -import type { Locales, Formatters } from './i18n-types'; +import type { FormattersInitializer } from 'typesafe-i18n' +import type { Locales, Formatters } from './i18n-types' export const initFormatters: FormattersInitializer = (locale: Locales) => { + const formatters: Formatters = { // add your formatter functions here - }; + } - return formatters; -}; + return formatters +} diff --git a/src/lib/i18n/i18n-svelte.ts b/src/lib/i18n/i18n-svelte.ts index 2d66bc9..6cdffb3 100644 --- a/src/lib/i18n/i18n-svelte.ts +++ b/src/lib/i18n/i18n-svelte.ts @@ -1,17 +1,12 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import { initI18nSvelte } from 'typesafe-i18n/svelte'; -import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types'; -import { loadedFormatters, loadedLocales } from './i18n-util'; +import { initI18nSvelte } from 'typesafe-i18n/svelte' +import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types' +import { loadedFormatters, loadedLocales } from './i18n-util' -const { locale, LL, setLocale } = initI18nSvelte< - Locales, - Translations, - TranslationFunctions, - Formatters ->(loadedLocales, loadedFormatters); +const { locale, LL, setLocale } = initI18nSvelte(loadedLocales, loadedFormatters) -export { locale, LL, setLocale }; +export { locale, LL, setLocale } -export default LL; +export default LL diff --git a/src/lib/i18n/i18n-types.ts b/src/lib/i18n/i18n-types.ts index dacfd66..a54fe41 100644 --- a/src/lib/i18n/i18n-types.ts +++ b/src/lib/i18n/i18n-types.ts @@ -1,96 +1,103 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import type { BaseTranslation as BaseTranslationType, LocalizedString } from 'typesafe-i18n'; +import type { BaseTranslation as BaseTranslationType, LocalizedString } from 'typesafe-i18n' -export type BaseTranslation = BaseTranslationType; -export type BaseLocale = 'en'; +export type BaseTranslation = BaseTranslationType +export type BaseLocale = 'en' -export type Locales = 'ar' | 'de' | 'en' | 'es' | 'it' | 'ru' | 'tr' | 'uk'; +export type Locales = + | 'ar' + | 'de' + | 'en' + | 'es' + | 'it' + | 'ru' + | 'uk' -export type Translation = RootTranslation; +export type Translation = RootTranslation -export type Translations = RootTranslation; +export type Translations = RootTranslation type RootTranslation = { /** * P​r​e​s​e​n​t​i​n​g​ ​t​h​e​ ​u​l​t​i​m​a​t​e​ ​Y​o​u​T​u​b​e​ ​e​x​p​e​r​i​e​n​c​e​.​ ​W​h​e​t​h​e​r​ ​y​o​u​'​r​e​ ​l​o​o​k​i​n​g​ ​f​o​r​ ​n​e​w​ ​c​o​n​t​e​n​t​ ​t​o​ ​w​a​t​c​h​ ​o​r​ ​w​a​n​t​ ​t​o​ ​s​h​a​r​e​ ​y​o​u​r​ ​o​w​n​ ​c​u​r​a​t​e​d​ ​l​i​s​t​ ​w​i​t​h​ ​f​r​i​e​n​d​s​,​ ​o​u​r​ ​a​p​p​ ​h​a​s​ ​g​o​t​ ​y​o​u​ ​c​o​v​e​r​e​d​. */ - tagline: string; + tagline: string /** * S​i​g​n​ ​u​p​ ​w​i​t​h​ ​Y​o​u​T​u​b​e */ - signUp: string; + signUp: string /** * H​e​l​l​o​ ​W​o​r​l​d */ - message: string; + message: string onboarding: { labels: { /** * U​s​e​r​n​a​m​e */ - username: string; + username: string /** * U​p​l​o​a​d​ ​F​i​l​e */ - uploadFile: string; - }; + uploadFile: string + } messages: { /** * W​e​l​c​o​m​e​ ​t​o​ ​l​i​s​t​d​!​ ​L​e​t​'​s​ ​s​e​t​u​p​ ​y​o​u​r​ ​p​r​o​f​i​l​e​. */ - main: string; + main: string /** * U​p​l​o​a​d​ ​y​o​u​r​ ​a​v​a​t​a​r​. */ - avatar: string; + avatar: string /** * T​h​a​t​'​s​ ​a​l​l​!​ ​L​e​t​'​s​ ​g​e​t​ ​s​t​a​r​t​e​d​! */ - final: string; - }; - }; -}; + final: string + } + } +} export type TranslationFunctions = { /** * Presenting the ultimate YouTube experience. Whether you're looking for new content to watch or want to share your own curated list with friends, our app has got you covered. */ - tagline: () => LocalizedString; + tagline: () => LocalizedString /** * Sign up with YouTube */ - signUp: () => LocalizedString; + signUp: () => LocalizedString /** * Hello World */ - message: () => LocalizedString; + message: () => LocalizedString onboarding: { labels: { /** * Username */ - username: () => LocalizedString; + username: () => LocalizedString /** * Upload File */ - uploadFile: () => LocalizedString; - }; + uploadFile: () => LocalizedString + } messages: { /** * Welcome to listd! Let's setup your profile. */ - main: () => LocalizedString; + main: () => LocalizedString /** * Upload your avatar. */ - avatar: () => LocalizedString; + avatar: () => LocalizedString /** * That's all! Let's get started! */ - final: () => LocalizedString; - }; - }; -}; + final: () => LocalizedString + } + } +} -export type Formatters = {}; +export type Formatters = {} diff --git a/src/lib/i18n/i18n-util.async.ts b/src/lib/i18n/i18n-util.async.ts index 1ec92a1..2da5cac 100644 --- a/src/lib/i18n/i18n-util.async.ts +++ b/src/lib/i18n/i18n-util.async.ts @@ -1,9 +1,9 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import { initFormatters } from './formatters'; -import type { Locales, Translations } from './i18n-types'; -import { loadedFormatters, loadedLocales, locales } from './i18n-util'; +import { initFormatters } from './formatters' +import type { Locales, Translations } from './i18n-types' +import { loadedFormatters, loadedLocales, locales } from './i18n-util' const localeTranslationLoaders = { ar: () => import('./ar'), @@ -12,22 +12,21 @@ const localeTranslationLoaders = { es: () => import('./es'), it: () => import('./it'), ru: () => import('./ru'), - tr: () => import('./tr'), - uk: () => import('./uk') -}; + uk: () => import('./uk'), +} const updateDictionary = (locale: Locales, dictionary: Partial): Translations => - (loadedLocales[locale] = { ...loadedLocales[locale], ...dictionary }); + loadedLocales[locale] = { ...loadedLocales[locale], ...dictionary } export const importLocaleAsync = async (locale: Locales): Promise => - (await localeTranslationLoaders[locale]()).default as unknown as Translations; + (await localeTranslationLoaders[locale]()).default as unknown as Translations export const loadLocaleAsync = async (locale: Locales): Promise => { - updateDictionary(locale, await importLocaleAsync(locale)); - loadFormatters(locale); -}; + updateDictionary(locale, await importLocaleAsync(locale)) + loadFormatters(locale) +} -export const loadAllLocalesAsync = (): Promise => Promise.all(locales.map(loadLocaleAsync)); +export const loadAllLocalesAsync = (): Promise => Promise.all(locales.map(loadLocaleAsync)) export const loadFormatters = (locale: Locales): void => - void (loadedFormatters[locale] = initFormatters(locale)); + void (loadedFormatters[locale] = initFormatters(locale)) diff --git a/src/lib/i18n/i18n-util.sync.ts b/src/lib/i18n/i18n-util.sync.ts index b41be4e..b7108f3 100644 --- a/src/lib/i18n/i18n-util.sync.ts +++ b/src/lib/i18n/i18n-util.sync.ts @@ -1,18 +1,17 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import { initFormatters } from './formatters'; -import type { Locales, Translations } from './i18n-types'; -import { loadedFormatters, loadedLocales, locales } from './i18n-util'; +import { initFormatters } from './formatters' +import type { Locales, Translations } from './i18n-types' +import { loadedFormatters, loadedLocales, locales } from './i18n-util' -import ar from './ar'; -import de from './de'; -import en from './en'; -import es from './es'; -import it from './it'; -import ru from './ru'; -import tr from './tr'; -import uk from './uk'; +import ar from './ar' +import de from './de' +import en from './en' +import es from './es' +import it from './it' +import ru from './ru' +import uk from './uk' const localeTranslations = { ar, @@ -21,18 +20,17 @@ const localeTranslations = { es, it, ru, - tr, - uk -}; + uk, +} export const loadLocale = (locale: Locales): void => { - if (loadedLocales[locale]) return; + if (loadedLocales[locale]) return - loadedLocales[locale] = localeTranslations[locale] as unknown as Translations; - loadFormatters(locale); -}; + loadedLocales[locale] = localeTranslations[locale] as unknown as Translations + loadFormatters(locale) +} -export const loadAllLocales = (): void => locales.forEach(loadLocale); +export const loadAllLocales = (): void => locales.forEach(loadLocale) export const loadFormatters = (locale: Locales): void => - void (loadedFormatters[locale] = initFormatters(locale)); + void (loadedFormatters[locale] = initFormatters(locale)) diff --git a/src/lib/i18n/i18n-util.ts b/src/lib/i18n/i18n-util.ts index 93f2b1a..604c441 100644 --- a/src/lib/i18n/i18n-util.ts +++ b/src/lib/i18n/i18n-util.ts @@ -1,41 +1,40 @@ // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. /* eslint-disable */ -import { - i18n as initI18n, - i18nObject as initI18nObject, - i18nString as initI18nString -} from 'typesafe-i18n'; -import type { LocaleDetector } from 'typesafe-i18n/detectors'; -import type { LocaleTranslationFunctions, TranslateByString } from 'typesafe-i18n'; -import { detectLocale as detectLocaleFn } from 'typesafe-i18n/detectors'; -import type { Formatters, Locales, Translations, TranslationFunctions } from './i18n-types'; +import { i18n as initI18n, i18nObject as initI18nObject, i18nString as initI18nString } from 'typesafe-i18n' +import type { LocaleDetector } from 'typesafe-i18n/detectors' +import type { LocaleTranslationFunctions, TranslateByString } from 'typesafe-i18n' +import { detectLocale as detectLocaleFn } from 'typesafe-i18n/detectors' +import type { Formatters, Locales, Translations, TranslationFunctions } from './i18n-types' -export const baseLocale: Locales = 'en'; +export const baseLocale: Locales = 'en' -export const locales: Locales[] = ['ar', 'de', 'en', 'es', 'it', 'ru', 'tr', 'uk']; +export const locales: Locales[] = [ + 'ar', + 'de', + 'en', + 'es', + 'it', + 'ru', + 'uk' +] -export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales); +export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales) -export const loadedLocales: Record = {} as Record; +export const loadedLocales: Record = {} as Record -export const loadedFormatters: Record = {} as Record; +export const loadedFormatters: Record = {} as Record -export const i18nString = (locale: Locales): TranslateByString => - initI18nString(locale, loadedFormatters[locale]); +export const i18nString = (locale: Locales): TranslateByString => initI18nString(locale, loadedFormatters[locale]) export const i18nObject = (locale: Locales): TranslationFunctions => initI18nObject( locale, loadedLocales[locale], loadedFormatters[locale] - ); + ) export const i18n = (): LocaleTranslationFunctions => - initI18n( - loadedLocales, - loadedFormatters - ); + initI18n(loadedLocales, loadedFormatters) -export const detectLocale = (...detectors: LocaleDetector[]): Locales => - detectLocaleFn(baseLocale, locales, ...detectors); +export const detectLocale = (...detectors: LocaleDetector[]): Locales => detectLocaleFn(baseLocale, locales, ...detectors) diff --git a/src/lib/i18n/it/index.ts b/src/lib/i18n/it/index.ts index 9f6b4ee..32e9a7b 100644 --- a/src/lib/i18n/it/index.ts +++ b/src/lib/i18n/it/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types'; +import type { Translation } from '../i18n-types' import en from '../en'; const it: Translation = { - ...(en as Translation), - message: 'Ciao Mondo' + ...en as Translation, + message: 'Ciao Mondo', }; export default it; diff --git a/src/lib/i18n/ru/index.ts b/src/lib/i18n/ru/index.ts index 2f953b6..af50b07 100644 --- a/src/lib/i18n/ru/index.ts +++ b/src/lib/i18n/ru/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types'; +import type { Translation } from '../i18n-types' import en from '../en'; const ru: Translation = { - ...(en as Translation), - message: 'Привет Мир' + ...en as Translation, + message: 'Привет Мир', }; export default ru; diff --git a/src/lib/i18n/uk/index.ts b/src/lib/i18n/uk/index.ts index e27d39c..89b3cb9 100644 --- a/src/lib/i18n/uk/index.ts +++ b/src/lib/i18n/uk/index.ts @@ -1,9 +1,9 @@ -import type { Translation } from '../i18n-types'; +import type { Translation } from '../i18n-types' import en from '../en'; const uk: Translation = { - ...(en as Translation), - message: 'Привіт світ' + ...en as Translation, + message: 'Привіт світ', }; export default uk; diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index ebf732b..06f2c0f 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -1,7 +1,7 @@ import type { LayoutServerLoad } from './$types'; export const load = (async ({ locals }) => { - return { - lang: locals.lang - }; -}) satisfies LayoutServerLoad; + return { + lang: locals.lang, + }; +}) satisfies LayoutServerLoad; \ No newline at end of file diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index f641f24..8440258 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -4,10 +4,10 @@ import { setLocale } from '$lib/i18n/i18n-svelte'; import { detectLocale } from '$lib/i18n/i18n-util'; export const load = (async (event) => { - // TODO: possibly use navigatorDetector as well - const locale = detectLocale(() => event.data.lang); - await loadLocaleAsync(locale); - setLocale(locale); + // TODO: possibly use navigatorDetector as well + const locale = detectLocale(() => event.data.lang); + await loadLocaleAsync(locale); + setLocale(locale); - return event.data; -}) satisfies LayoutLoad; + return event.data; +}) satisfies LayoutLoad; \ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index fe8f49a..4545c1d 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,13 +1,11 @@
- -

{$LL.tagline()}

- - {$LL.signUp()} - - -
+

{ $LL.tagline() }

+ + { $LL.signUp() } + + \ No newline at end of file diff --git a/src/routes/onboarding/+page.svelte b/src/routes/onboarding/+page.svelte index a31a674..fc08407 100644 --- a/src/routes/onboarding/+page.svelte +++ b/src/routes/onboarding/+page.svelte @@ -1,30 +1,28 @@ -

{$LL.onboarding.messages.main()}

+

{ $LL.onboarding.messages.main() }

{ - return async ({ result, update }) => {}; - }} + class="pt-4" + method="POST" + use:enhance={({ form, data, action, cancel }) => { + return async ({ result, update }) => {} + }} > - -

{$LL.onboarding.messages.avatar()}

-
- {$LL.onboarding.labels.uploadFile()} -
-

{$LL.onboarding.messages.final()}

-
- -
+ +

{ $LL.onboarding.messages.avatar() }

+
+ { $LL.onboarding.labels.uploadFile() } +
+

{ $LL.onboarding.messages.final() }

+
+ +
diff --git a/tailwind.config.cjs b/tailwind.config.cjs index a326b75..05f6a89 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -9,7 +9,10 @@ const config = { extend: {} }, - plugins: [require('@skeletonlabs/skeleton/tailwind/skeleton.cjs'), require('@tailwindcss/forms')] + plugins: [ + require('@skeletonlabs/skeleton/tailwind/skeleton.cjs'), + require('@tailwindcss/forms'), + ] }; module.exports = config; From 5e461cf4db7d17ebe9e5d688db57b2e1fb8a4d17 Mon Sep 17 00:00:00 2001 From: Ercode Techoglu Date: Sat, 28 Jan 2023 22:18:32 +0300 Subject: [PATCH 3/5] types --- src/lib/i18n/i18n-types.ts | 1 + src/lib/i18n/i18n-util.async.ts | 1 + src/lib/i18n/i18n-util.sync.ts | 2 ++ src/lib/i18n/i18n-util.ts | 1 + 4 files changed, 5 insertions(+) diff --git a/src/lib/i18n/i18n-types.ts b/src/lib/i18n/i18n-types.ts index a54fe41..9958760 100644 --- a/src/lib/i18n/i18n-types.ts +++ b/src/lib/i18n/i18n-types.ts @@ -12,6 +12,7 @@ export type Locales = | 'es' | 'it' | 'ru' + | 'tr' | 'uk' export type Translation = RootTranslation diff --git a/src/lib/i18n/i18n-util.async.ts b/src/lib/i18n/i18n-util.async.ts index 2da5cac..84a685b 100644 --- a/src/lib/i18n/i18n-util.async.ts +++ b/src/lib/i18n/i18n-util.async.ts @@ -12,6 +12,7 @@ const localeTranslationLoaders = { es: () => import('./es'), it: () => import('./it'), ru: () => import('./ru'), + tr: () => import('./tr'), uk: () => import('./uk'), } diff --git a/src/lib/i18n/i18n-util.sync.ts b/src/lib/i18n/i18n-util.sync.ts index b7108f3..86e0db0 100644 --- a/src/lib/i18n/i18n-util.sync.ts +++ b/src/lib/i18n/i18n-util.sync.ts @@ -11,6 +11,7 @@ import en from './en' import es from './es' import it from './it' import ru from './ru' +import tr from './tr' import uk from './uk' const localeTranslations = { @@ -20,6 +21,7 @@ const localeTranslations = { es, it, ru, + tr, uk, } diff --git a/src/lib/i18n/i18n-util.ts b/src/lib/i18n/i18n-util.ts index 604c441..4993db5 100644 --- a/src/lib/i18n/i18n-util.ts +++ b/src/lib/i18n/i18n-util.ts @@ -16,6 +16,7 @@ export const locales: Locales[] = [ 'es', 'it', 'ru', + 'tr', 'uk' ] From 786cb2f0b17ff242fdfaf69826ad149c02799b50 Mon Sep 17 00:00:00 2001 From: Ercode Techoglu Date: Wed, 22 Feb 2023 21:37:24 +0300 Subject: [PATCH 4/5] Linting --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 6 ++-- .github/workflows/lint.yaml | 40 ++++++++++----------- .typesafe-i18n.json | 8 ++--- CONTRIBUTING.md | 14 ++++---- package-lock.json | 35 +++++++++++------- src/lib/i18n/tr/index.ts | 2 +- 8 files changed, 61 insertions(+), 48 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 140cf2e..36cb4c9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -46,4 +46,4 @@ body: description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/CodingGarden/listd/blob/main/CODE-OF-CONDUCT.md) options: - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 089cadc..9540969 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -35,4 +35,4 @@ body: description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/CodingGarden/listd/blob/main/CODE-OF-CONDUCT.md) options: - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1b0cd12..6f73adf 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,14 +1,15 @@ - ## What type of Pull Request is this? + **Delete all options except for the one that applies** + - Bug fix - Feature - Code style update (formatting, renaming) - Refactoring (no functional changes, no API changes) - Build related changes -- Other (please describe): +- Other (please describe): ## What is the current behavior? @@ -27,4 +28,3 @@ Issue Number: N/A ## Other information - diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6270921..4e8491b 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,20 +1,20 @@ -name: Run Lint -on: - pull_request: - branches: - - main - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '16' - - run: npm ci - - run: cp .env.example .env - - run: npx svelte-kit sync - - run: npm run typecheck - - run: npm run lint - # - run: npm test +name: Run Lint +on: + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + - run: npm ci + - run: cp .env.example .env + - run: npx svelte-kit sync + - run: npm run typecheck + - run: npm run lint + # - run: npm test diff --git a/.typesafe-i18n.json b/.typesafe-i18n.json index d7af25d..f1e5f90 100644 --- a/.typesafe-i18n.json +++ b/.typesafe-i18n.json @@ -1,5 +1,5 @@ { - "adapter": "svelte", - "outputPath": "./src/lib/i18n/", - "$schema": "https://unpkg.com/typesafe-i18n@5.24.0/schema/typesafe-i18n.json" -} \ No newline at end of file + "adapter": "svelte", + "outputPath": "./src/lib/i18n/", + "$schema": "https://unpkg.com/typesafe-i18n@5.24.0/schema/typesafe-i18n.json" +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 56957a8..e1a224f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,6 +37,7 @@ The project has a `docker-compose.yml` file ready to use if you have [Docker](ht You can also install Postgres on your local machine [directly](https://www.prisma.io/dataguide/postgresql/setting-up-a-local-postgresql-database) or use a cloud service. move `.env.example` to `.env` + ```bash mv .env.example .env ``` @@ -81,16 +82,16 @@ Use the following command to generate the Prisma client: npx prisma migrate dev ``` -### Getting Google OAuth API Credentials +### Getting Google OAuth API Credentials 1. Visit the [Google Cloud Console](https://console.developers.google.com/apis/credentials) 2. Go to the OAuth consent screen tab, fill first step leaving the rest blank and click Save. This will create a project for you 3. Now Publish your OAuth consent screen App. 4. Go to the [Credentials tab](https://console.cloud.google.com/apis/credentials) and click Create Credentials -> OAuth Client ID - * Choose Web Application - * Add `http://localhost:5173` to the Authorized JavaScript origins - * Add `http://localhost:5173/auth/callback/google` to the Authorized redirect URIs. - * Click Create. + - Choose Web Application + - Add `http://localhost:5173` to the Authorized JavaScript origins + - Add `http://localhost:5173/auth/callback/google` to the Authorized redirect URIs. + - Click Create. 5. Copy the Client ID and Client Secret and paste them into the `.env` file. ```bash @@ -137,6 +138,7 @@ This project uses `ESLint` as our linter tool. To configure your VSCode workspac To further improve your development experience while working on `listd`, this project also includes a list of suggested VSCode extensions in the file `.vscode/extensions.json`. ### Formatter + This project uses [Prettier](https://prettier.io/) to format the code. You can run `npm run format:fix` to format the code before committing. @@ -145,4 +147,4 @@ This project uses [Prettier](https://prettier.io/) to format the code. You can r ## License -By contributing, you agree that your contributions will be licensed under its MIT License. \ No newline at end of file +By contributing, you agree that your contributions will be licensed under its MIT License. diff --git a/package-lock.json b/package-lock.json index 2bc6ef5..a811a60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1340,24 +1340,24 @@ } }, "node_modules/@sveltejs/kit": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.5.5.tgz", - "integrity": "sha512-NJry1mvcIBITVe9WyAGu39Cf33z8wRKzut/Oug4zqMVUpX+i7fG17+GyvLCh9GXdmIkqwSeSMROHDKRODvd6BA==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.8.3.tgz", + "integrity": "sha512-32tiLy5PPpt2lquK2p53/5wR+ghAXw0HymIBEezmwmwtzx7Xf36xw3RG3fDYQ9gyzon89T+JRweXgAv/qhhvSQ==", "hasInstallScript": true, "dependencies": { "@sveltejs/vite-plugin-svelte": "^2.0.0", "@types/cookie": "^0.5.1", "cookie": "^0.5.0", - "devalue": "^4.2.3", + "devalue": "^4.3.0", "esm-env": "^1.0.0", "kleur": "^4.1.5", - "magic-string": "^0.27.0", + "magic-string": "^0.29.0", "mime": "^3.0.0", "sade": "^1.8.1", "set-cookie-parser": "^2.5.1", "sirv": "^2.0.2", "tiny-glob": "^0.2.9", - "undici": "5.18.0" + "undici": "5.20.0" }, "bin": { "svelte-kit": "svelte-kit.js" @@ -1370,6 +1370,17 @@ "vite": "^4.0.0" } }, + "node_modules/@sveltejs/kit/node_modules/magic-string": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.29.0.tgz", + "integrity": "sha512-WcfidHrDjMY+eLjlU+8OvwREqHwpgCeKVBUpQ3OhYYuvfaYCUgcbuBzappNzZvg/v8onU3oQj+BYpkOJe9Iw4Q==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@sveltejs/vite-plugin-svelte": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.0.2.tgz", @@ -2574,9 +2585,9 @@ } }, "node_modules/devalue": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.2.3.tgz", - "integrity": "sha512-JG6Q248aN0pgFL57e3zqTVeFraBe+5W2ugvv1mLXsJP6YYIYJhRZhAl7QP8haJrqob6X10F9NEkuCvNILZTPeQ==" + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.0.tgz", + "integrity": "sha512-n94yQo4LI3w7erwf84mhRUkUJfhLoCZiLyoOZ/QFsDbcWNZePrLwbQpvZBUG2TNxwV3VjCKPxkiiQA6pe3TrTA==" }, "node_modules/didyoumean": { "version": "1.2.2", @@ -6424,9 +6435,9 @@ } }, "node_modules/undici": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.18.0.tgz", - "integrity": "sha512-1iVwbhonhFytNdg0P4PqyIAXbdlVZVebtPDvuM36m66mRw4OGrCm2MYynJv/UENFLdP13J1nPVQzVE2zTs1OeA==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.20.0.tgz", + "integrity": "sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==", "dependencies": { "busboy": "^1.6.0" }, diff --git a/src/lib/i18n/tr/index.ts b/src/lib/i18n/tr/index.ts index 4289162..7faf27d 100644 --- a/src/lib/i18n/tr/index.ts +++ b/src/lib/i18n/tr/index.ts @@ -6,7 +6,7 @@ import onboarding from './onboarding.json'; const tr: Translation = { ...(en as Translation), ...listd, - onboarding + onboarding, }; export default tr; From 4ce8b245ddbad6b2dff5ee1be999de81f6be9313 Mon Sep 17 00:00:00 2001 From: Ercode Techoglu Date: Wed, 1 Mar 2023 02:22:47 +0300 Subject: [PATCH 5/5] another linting --- .github/workflows/checks.yaml | 42 ++++++++-------- .typesafe-i18n.json | 8 +-- prisma/ERD.md | 94 +++++++++++++++++------------------ 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 7d39253..49334ed 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -1,21 +1,21 @@ -name: Run Checks -on: - pull_request: - branches: - - main - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '16' - - run: npm ci - - run: cp .env.example .env - - run: npx svelte-kit sync - - run: npm run typecheck - - run: npm run lint - - run: npx playwright install - - run: npm test +name: Run Checks +on: + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + - run: npm ci + - run: cp .env.example .env + - run: npx svelte-kit sync + - run: npm run typecheck + - run: npm run lint + - run: npx playwright install + - run: npm test diff --git a/.typesafe-i18n.json b/.typesafe-i18n.json index 84c0154..80e0b78 100644 --- a/.typesafe-i18n.json +++ b/.typesafe-i18n.json @@ -1,5 +1,5 @@ { - "adapter": "svelte", - "outputPath": "./src/lib/i18n/", - "$schema": "https://unpkg.com/typesafe-i18n@5.24.1/schema/typesafe-i18n.json" -} \ No newline at end of file + "adapter": "svelte", + "outputPath": "./src/lib/i18n/", + "$schema": "https://unpkg.com/typesafe-i18n@5.24.1/schema/typesafe-i18n.json" +} diff --git a/prisma/ERD.md b/prisma/ERD.md index 4776163..1fa5695 100644 --- a/prisma/ERD.md +++ b/prisma/ERD.md @@ -6,7 +6,7 @@ erDiagram Dark Dark Light Light } - + Visiblity { @@ -14,47 +14,47 @@ Light Light Unlisted Unlisted Private Private } - + ListItemType { YouTubeChannel YouTubeChannel } - + User { - String id PK - DateTime createdAt - DateTime updatedAt + String id PK + DateTime createdAt + DateTime updatedAt String name "nullable" String email "nullable" DateTime emailVerified "nullable" String image "nullable" } - + UserSettings { - String id PK - Boolean onboarded - ColorScheme colorScheme + String id PK + Boolean onboarded + ColorScheme colorScheme } - + Locale { - String id - String languageCode + String id + String languageCode String countryCode "nullable" String script "nullable" - String formalName - String nativeName + String formalName + String nativeName String commonName "nullable" } - + Account { - String id PK - String tokenType - String provider - String providerAccountId + String id PK + String tokenType + String provider + String providerAccountId String refreshToken "nullable" String accessToken "nullable" Int expiresIn "nullable" @@ -63,50 +63,50 @@ Private Private String idToken "nullable" String sessionState "nullable" } - + Session { - String id PK - String sessionToken - DateTime expires + String id PK + String sessionToken + DateTime expires } - + VerificationToken { - String identifier - String token - DateTime expires + String identifier + String token + DateTime expires } - + List { - String id PK - String name + String id PK + String name String description "nullable" - Visiblity visibility - DateTime createdAt - DateTime updatedAt + Visiblity visibility + DateTime createdAt + DateTime updatedAt } - + ListItem { - Int id PK - String name + Int id PK + String name String description "nullable" - DateTime createdAt - DateTime updatedAt + DateTime createdAt + DateTime updatedAt } - + ListItemMeta { - String id PK - String name - String originId - ListItemType type - DateTime createdAt - DateTime updatedAt + String id PK + String name + String originId + ListItemType type + DateTime createdAt + DateTime updatedAt } - + UserSettings o|--|| ColorScheme : "enum:colorScheme" UserSettings o|--|| User : "user" UserSettings o{--|| Locale : "locale"