-
Notifications
You must be signed in to change notification settings - Fork 8
Translations #135
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
base: main
Are you sure you want to change the base?
Translations #135
Changes from all commits
73f757f
53b9f5f
e00ebfe
e6026de
ba3bb7c
15cd321
73cce11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| -- AlterTable | ||
| ALTER TABLE "Goal" ADD COLUMN "translations" JSONB; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "Game" ADD COLUMN "translations" TEXT[] DEFAULT ARRAY[]::TEXT[]; | ||
|
|
||
| /* | ||
| Warnings: | ||
|
|
||
| - Made the column `translations` on table `Goal` required. This step will fail if there are existing NULL values in that column. | ||
|
|
||
| */ | ||
| -- AlterTable | ||
| ALTER TABLE "Game" ADD COLUMN "defaultLanguage" TEXT NOT NULL DEFAULT 'English'; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "Goal" ALTER COLUMN "translations" SET NOT NULL, | ||
| ALTER COLUMN "translations" SET DEFAULT '{}'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // This file must be a module, so we include an empty export. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if I would put this file in the @types folder. We only have it in order to override/augment types in the actual @types namespace, which this wouldn't fall under. In the variants branch i had it in a |
||
| export {}; | ||
|
|
||
| declare global { | ||
| // eslint-disable-next-line @typescript-eslint/no-namespace | ||
| namespace PrismaJson { | ||
| type GoalTranslations = { | ||
| [k: string]: string; | ||
| }; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These goals have translations, but the game doesn't have a language specified at the top level