-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove path alias for @shared, for better translation support
- Loading branch information
Showing
9 changed files
with
69 additions
and
71 deletions.
There are no files selected for viewing
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
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
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
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,10 +1,10 @@ | ||
import * as alt from "alt-server"; | ||
import * as alt from 'alt-server'; | ||
|
||
import "../translate/index.js"; | ||
import { useTranslate } from "@Shared/translate.js"; | ||
import '../translate/index.js'; | ||
import { useTranslate } from '../../../main/shared/translate.js'; | ||
|
||
const { t } = useTranslate("en"); | ||
const { t } = useTranslate('en'); | ||
|
||
alt.on("playerConnect", (player) => { | ||
alt.log(`${player.name}, ${t("example.joined-server")}`); | ||
alt.on('playerConnect', (player) => { | ||
alt.log(`${player.name}, ${t('example.joined-server')}`); | ||
}); |
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,9 +1,9 @@ | ||
import { useTranslate } from "@Shared/translate.js"; | ||
import { useTranslate } from '../../../main/shared/translate.js'; | ||
|
||
const { setBulk } = useTranslate(); | ||
|
||
setBulk({ | ||
en: { | ||
"example.joined-server": "has joined the server successfully.", | ||
}, | ||
en: { | ||
'example.joined-server': 'has joined the server successfully.', | ||
}, | ||
}); |
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,56 +1,55 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": "src", | ||
"paths": { | ||
"@Server/*": ["main/server/*"], | ||
"@Client/*": ["main/client/*"], | ||
"@Shared/*": ["main/shared/*"] | ||
"compilerOptions": { | ||
"baseUrl": "src", | ||
"paths": { | ||
"@Server/*": ["main/server/*"], | ||
"@Client/*": ["main/client/*"] | ||
}, | ||
"typeRoots": ["./node_modules/@types", "./node_modules/@altv"], | ||
"removeComments": true, | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"noImplicitReturns": true, | ||
"allowJs": true, | ||
"resolveJsonModule": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"moduleResolution": "NodeNext", | ||
"allowSyntheticDefaultImports": true, | ||
"composite": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": false, | ||
"module": "NodeNext", | ||
"target": "ES2022", | ||
"outDir": "athena-cache", | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": false | ||
}, | ||
"typeRoots": ["./node_modules/@types", "./node_modules/@altv"], | ||
"removeComments": true, | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"noImplicitReturns": true, | ||
"allowJs": true, | ||
"resolveJsonModule": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"moduleResolution": "NodeNext", | ||
"allowSyntheticDefaultImports": true, | ||
"composite": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": false, | ||
"module": "NodeNext", | ||
"target": "ES2022", | ||
"outDir": "athena-cache", | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": false | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src-webviews/**/*.ts", | ||
"src-webviews/**/*.d.ts", | ||
"src/**/*.ts", | ||
"src/**/*.d.ts", | ||
"src/**/*.tsx", | ||
"src/**/*.vue", | ||
"src/main/plugins/**/webview/**.ts", | ||
"src/main/plugins/**/webview/**.vue", | ||
"src/main/plugins/**/components/**.vue" | ||
], | ||
"exclude": [ | ||
"resources", | ||
"scripts", | ||
"altv-athena-cache", | ||
"athena-cache", | ||
"node_modules", | ||
"cache", | ||
"crashdumps", | ||
"data", | ||
"doc", | ||
"modules", | ||
"screenshots" | ||
] | ||
"include": [ | ||
"src/**/*.ts", | ||
"src-webviews/**/*.ts", | ||
"src-webviews/**/*.d.ts", | ||
"src/**/*.ts", | ||
"src/**/*.d.ts", | ||
"src/**/*.tsx", | ||
"src/**/*.vue", | ||
"src/main/plugins/**/webview/**.ts", | ||
"src/main/plugins/**/webview/**.vue", | ||
"src/main/plugins/**/components/**.vue" | ||
], | ||
"exclude": [ | ||
"resources", | ||
"scripts", | ||
"altv-athena-cache", | ||
"athena-cache", | ||
"node_modules", | ||
"cache", | ||
"crashdumps", | ||
"data", | ||
"doc", | ||
"modules", | ||
"screenshots" | ||
] | ||
} |