-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
3,590 additions
and
3,258 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,40 @@ | ||
{ | ||
"name": "okey-masasi-sveltekit", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"lint": "prettier --plugin-search-dir . --check . && eslint .", | ||
"format": "prettier --plugin-search-dir . --write ." | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^2.0.0", | ||
"@sveltejs/adapter-static": "^2.0.3", | ||
"@sveltejs/kit": "^1.20.4", | ||
"@types/uuid": "^9.0.2", | ||
"@typescript-eslint/eslint-plugin": "^5.45.0", | ||
"@typescript-eslint/parser": "^5.45.0", | ||
"eslint": "^8.28.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-svelte": "^2.30.0", | ||
"prettier": "^2.8.0", | ||
"prettier-plugin-svelte": "^2.10.1", | ||
"svelte": "^4.0.5", | ||
"svelte-check": "^3.4.3", | ||
"tslib": "^2.4.1", | ||
"typescript": "^5.0.0", | ||
"vite": "^4.4.2" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"@fortawesome/fontawesome-free": "^6.4.2", | ||
"bulma": "^0.9.4", | ||
"uuid": "^9.0.0" | ||
} | ||
"name": "okey-masasi-sveltekit", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"lint": "prettier --plugin-search-dir . --check . && eslint .", | ||
"format": "prettier --plugin-search-dir . --write .", | ||
"extract-messages": "svelte-i18n extract \"./src/**/*.svelte\" -s > ./src/lib/locales/en.json" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^2.0.0", | ||
"@sveltejs/adapter-static": "^2.0.3", | ||
"@sveltejs/kit": "^1.20.4", | ||
"@types/uuid": "^9.0.2", | ||
"@typescript-eslint/eslint-plugin": "^5.45.0", | ||
"@typescript-eslint/parser": "^5.45.0", | ||
"eslint": "^8.28.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-svelte": "^2.30.0", | ||
"prettier": "^2.8.0", | ||
"prettier-plugin-svelte": "^2.10.1", | ||
"svelte": "^4.0.5", | ||
"svelte-check": "^3.4.3", | ||
"tslib": "^2.4.1", | ||
"typescript": "^5.0.0", | ||
"vite": "^4.4.2" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"@fortawesome/fontawesome-free": "^6.4.2", | ||
"bulma": "^0.9.4", | ||
"svelte-i18n": "^3.7.0", | ||
"uuid": "^9.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script context="module"> | ||
import { defineMessages } from 'svelte-i18n' | ||
export const messages = defineMessages({ | ||
appTitle: { | ||
id: 'app.appTitle', | ||
default: 'Okey table', | ||
}, | ||
newGame: { | ||
id: 'app.newGame', | ||
default: 'New game', | ||
}, | ||
save: { | ||
id: 'app.save', | ||
default: 'Save', | ||
}, | ||
cancel: { | ||
id: 'app.cancel', | ||
default: 'Cancel', | ||
}, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script context="module"> | ||
import { defineMessages } from 'svelte-i18n' | ||
export const messages = defineMessages({ | ||
playerTitle: { | ||
id: 'gameForm.playerTitle', | ||
default: 'Player {number}', | ||
}, | ||
playerNamePlaceHolder: { | ||
id: 'gameForm.playerNamePlaceHolder', | ||
default: "Player {number}'s name", | ||
}, | ||
colourPointsLabel: { | ||
id: 'gameForm.colourPointsLabel', | ||
default: 'Colour points', | ||
}, | ||
indicatorPointLabel: { | ||
id: 'gameForm.indicatorPointLabel', | ||
default: 'Indicator points', | ||
}, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { init, getLocaleFromNavigator, register } from 'svelte-i18n' | ||
|
||
const supportedLanguages = ['en', 'tr', 'de'] as const | ||
|
||
supportedLanguages.forEach((locale) => { | ||
register(locale, () => import(`./locales/${locale}.json`)) | ||
}) | ||
|
||
init({ | ||
fallbackLocale: 'tr', | ||
initialLocale: getLocaleFromNavigator(), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"app.appTitle": "Okey-Tisch", | ||
"app.newGame": "Neues Spiel", | ||
"app.save": "Speichern", | ||
"app.cancel": "Abbrechen", | ||
"gameForm.playerTitle": "Spieler {number}", | ||
"gameForm.playerNamePlaceHolder": "Der Name von Spieler {number}", | ||
"gameForm.colourPointsLabel": "Farbpunkte", | ||
"gameForm.indicatorPointLabel": "Indikatorpunkte" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"app.appTitle": "Okey table", | ||
"app.newGame": "New game", | ||
"app.save": "Save", | ||
"app.cancel": "Cancel", | ||
"gameForm.playerTitle": "Player {number}", | ||
"gameForm.playerNamePlaceHolder": "Player {number}'s name", | ||
"gameForm.colourPointsLabel": "Colour points", | ||
"gameForm.indicatorPointLabel": "Indicator points" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"app.appTitle": "Okey masası", | ||
"app.newGame": "Yeni oyun", | ||
"app.save": "Kaydet", | ||
"app.cancel": "Vazgeç", | ||
"gameForm.playerTitle": "{number}. oyuncu", | ||
"gameForm.playerNamePlaceHolder": "{number}. oyuncu ismi", | ||
"gameForm.colourPointsLabel": "Renk puanları", | ||
"gameForm.indicatorPointLabel": "Gösterge puanı" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
<script> | ||
import 'bulma/css/bulma.css' | ||
import '@fortawesome/fontawesome-free/css/all.css' | ||
import '$lib/i18n' | ||
import { waitLocale } from 'svelte-i18n' | ||
export async function preload() { | ||
// awaits for the loading of the 'en-US' and 'en' dictionaries | ||
return waitLocale() | ||
} | ||
</script> | ||
|
||
<slot /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters