-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
136 changed files
with
14,852 additions
and
15,419 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2022": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["react", "@typescript-eslint", "react-refresh"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"react-refresh/only-export-components": "warn", | ||
"react/function-component-definition": [ | ||
"warn", | ||
{ "namedComponents": "function-declaration" } | ||
], | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-no-literals": ["warn", { "allowedStrings": ["""] }], | ||
"@typescript-eslint/no-unused-vars": "warn" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
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,40 @@ | ||
# Contributing a new Translation/Language to Codex | ||
|
||
All translations for the app interface are defined in [packages/common/Locales.ts](../packages/common/Locales.ts) | ||
|
||
If you want to contribute your own translation/language, first fork the repository, and then edit `packages/common/Locales.ts`. | ||
|
||
The first object in the file is a `Locale` type which defines all of the text variables used in the app. You don't need to change this at all. | ||
|
||
You will need to add the locale name of your translation to `SupportedLocales`. For example if you were adding Spanish (Mexico) you would add ` | "es_MX";` to the end of the line: | ||
|
||
```ts | ||
export type SupportedLocales = "en_US"; | ||
``` | ||
|
||
to | ||
|
||
```ts | ||
export type SupportedLocales = "en_US" | "es_MX"; | ||
``` | ||
|
||
Then, the last object in the file is `export const locales`. Select the entire `en_US: { ... }` object and copy/paste it below: | ||
|
||
```ts | ||
export const locales: Record<SupportedLocales, Locale> = { | ||
en_US: { ... } | ||
}; | ||
``` | ||
|
||
to | ||
|
||
```ts | ||
export const locales: Record<SupportedLocales, Locale> = { | ||
en_US: { ... }, | ||
es_MX: { ... } | ||
}; | ||
``` | ||
|
||
Then you can go through the new object and change the strings to your own translation. | ||
|
||
Finally, create a pull request on the original repository with your new changes. |
This file was deleted.
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,51 +1,90 @@ | ||
name: build | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
|
||
- name: Install packages | ||
run: npm i | ||
|
||
- name: Create Windows cert File | ||
id: create_pfx | ||
if: matrix.os == 'windows-latest' | ||
uses: timheuer/base64-to-file@v1 | ||
with: | ||
filename: certificate.pfx | ||
encodedString: ${{ secrets.B6473 }} | ||
|
||
- name: Run Electron Builder | ||
run: npx electron-builder --publish=never | ||
env: | ||
CSC_LINK: ${{ steps.create_pfx.outputs.filePath }} | ||
CSC_KEY_PASSWORD: ${{ secrets.P7834 }} | ||
|
||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: binaries | ||
path: | | ||
dist | ||
!dist/*.blockmap | ||
!dist/*.yml | ||
!dist/win-unpacked | ||
!dist/linux-unpacked | ||
!dist/.icon-set | ||
!dist/mac | ||
!dist/.cache | ||
retention-days: 1 | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Create Windows cert File | ||
id: create_pfx | ||
if: matrix.os == 'windows-latest' | ||
uses: timheuer/base64-to-file@v1 | ||
with: | ||
filename: certificate.pfx | ||
encodedString: ${{ secrets.B64 }} | ||
|
||
- name: Create macOS cert File | ||
id: create_p12 | ||
if: matrix.os == 'macos-latest' | ||
uses: timheuer/base64-to-file@v1 | ||
with: | ||
filename: cert.p12 | ||
encodedString: ${{ secrets.MAC_CERT }} | ||
|
||
- name: Run Electron Builder (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: pnpm dist | ||
env: | ||
CSC_LINK: ${{ steps.create_pfx.outputs.filePath }} | ||
CSC_KEY_PASSWORD: ${{ secrets.PASS }} | ||
|
||
- name: Run Electron Builder (Linux) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: pnpm dist | ||
|
||
- name: Run Electron Builder (macOS) | ||
if: matrix.os == 'macos-latest' | ||
run: pnpm dist | ||
env: | ||
CSC_LINK: ${{ steps.create_p12.outputs.filePath }} | ||
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }} | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||
|
||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: binaries | ||
path: | | ||
dist/*.exe | ||
!dist/win_unpacked/* | ||
dist/*.zip | ||
dist/*.deb | ||
dist/*.tar.xz | ||
dist/*.dmg | ||
retention-days: 1 | ||
|
||
# - name: Release | ||
# uses: softprops/action-gh-release@v1 | ||
# with: | ||
# draft: true | ||
# files: | | ||
# dist/*.exe | ||
# !dist/win_unpacked/* | ||
# dist/*.zip | ||
# dist/*.deb | ||
# dist/*.tar.xz | ||
# dist/*.dmg |
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,3 +1,19 @@ | ||
node_modules/ | ||
dist/ | ||
.vs/ | ||
node_modules | ||
packages/renderer/node_modules | ||
.DS_Store | ||
*.local | ||
|
||
# build output | ||
.vite | ||
dist | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local |
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 @@ | ||
16 |
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,5 @@ | ||
{ | ||
"tabWidth": 4, | ||
"trailingComma": "none", | ||
"printWidth": 100 | ||
} |
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,3 @@ | ||
{ | ||
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"] | ||
} |
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,9 @@ | ||
{ | ||
"typescript.tsdk": "node_modules\\typescript\\lib", | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"files.exclude": { | ||
"**/node_modules": true, | ||
"node_modules": true, | ||
".vite": true | ||
} | ||
} |
Oops, something went wrong.