Skip to content

Commit

Permalink
feat: support inlang (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
qinluhe authored Dec 18, 2024
1 parent 9651543 commit ff6805b
Show file tree
Hide file tree
Showing 32 changed files with 94 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 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: '20'
- uses: pnpm/action-setup@v4
with:
version: '8.5.0'
run_install: false
- name: Install dependencies
run: pnpm i
- name: Lint
run: pnpm run lint
21 changes: 21 additions & 0 deletions .github/workflows/ninja_i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Ninja i18n action

on: pull_request_target

# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
permissions:
pull-requests: write # Necessary to comment on PRs
issues: read # Necessary to read issue comments
contents: read # Necessary to access the repo content

jobs:
ninja-i18n:
name: Ninja i18n - GitHub Lint Action
runs-on: ubuntu-latest

steps:
- name: Run Ninja i18n
# @main ensures that the latest version of the action is used
uses: opral/ninja-i18n-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?

!project.inlang
48 changes: 48 additions & 0 deletions project.inlang/setting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"sourceLanguageTag": "en",
"languageTags": [
"en",
"ar-SA",
"ca-ES",
"ckb-KU",
"cs-CZ",
"de-DE",
"es-VE",
"eu-ES",
"fa",
"fr-CA",
"fr-FR",
"he",
"hu-HU",
"id-ID",
"it-IT",
"ja-JP",
"ko-KR",
"pl-PL",
"pt-BR",
"pt-PT",
"ru-RU",
"sv-SE",
"th-TH",
"tr-TR",
"uk-UA",
"vi",
"vi-VN",
"zh-CN",
"zh-TW"
],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@1/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-pattern@1/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@1/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@1/dist/index.js"
],
"plugin.inlang.json": {
"pathPattern": "./src/locales/{language}.json",
"variableReferencePattern": [
"{{",
"}}"
]
}
}
Empty file added src/locales/ar-SA.json
Empty file.
Empty file added src/locales/ca-ES.json
Empty file.
Empty file added src/locales/ckb-KU.json
Empty file.
Empty file added src/locales/cs-CZ.json
Empty file.
Empty file added src/locales/de-DE.json
Empty file.
Empty file added src/locales/es-VE.json
Empty file.
Empty file added src/locales/eu-ES.json
Empty file.
Empty file added src/locales/fa.json
Empty file.
Empty file added src/locales/fr-CA.json
Empty file.
Empty file added src/locales/fr-FR.json
Empty file.
Empty file added src/locales/he.json
Empty file.
Empty file added src/locales/hu-HU.json
Empty file.
Empty file added src/locales/id-ID.json
Empty file.
Empty file added src/locales/it-IT.json
Empty file.
Empty file added src/locales/ja-JP.json
Empty file.
Empty file added src/locales/ko-KR.json
Empty file.
Empty file added src/locales/pl-PL.json
Empty file.
Empty file added src/locales/pt-BR.json
Empty file.
Empty file added src/locales/pt-PT.json
Empty file.
Empty file added src/locales/ru-RU.json
Empty file.
Empty file added src/locales/sv-SE.json
Empty file.
Empty file added src/locales/th-TH.json
Empty file.
Empty file added src/locales/tr-TR.json
Empty file.
Empty file added src/locales/uk-UA.json
Empty file.
Empty file added src/locales/vi-VN.json
Empty file.
Empty file added src/locales/vi.json
Empty file.
Empty file added src/locales/zh-CN.json
Empty file.
Empty file added src/locales/zh-TW.json
Empty file.

0 comments on commit ff6805b

Please sign in to comment.