Skip to content

Commit ba4c54c

Browse files
committed
feat(i18n): add Lunaria for tracking
1 parent 1431d24 commit ba4c54c

7 files changed

Lines changed: 943 additions & 0 deletions

File tree

.github/workflows/lunaria.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Lunaria
2+
3+
on:
4+
# Trigger the workflow every time a pull request is opened or synchronized at the target `main` branch
5+
pull_request_target:
6+
types: [opened, synchronize]
7+
8+
# Automatically cancel in-progress actions on the same branch
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
11+
cancel-in-progress: true
12+
13+
# Allow this job to clone the repository and comment on the pull request
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
18+
jobs:
19+
lunaria-overview:
20+
name: Generate Lunaria Overview
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
with:
27+
# Necessary for Lunaria to work properly
28+
# Makes the action clone the entire git history
29+
fetch-depth: 0
30+
31+
- name: Install Tools & Dependencies
32+
uses: ./.github/actions/install
33+
34+
- name: Generate Lunaria Overview
35+
uses: lunariajs/action@v1-prerelease

lunaria.config.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { defineConfig } from '@lunariajs/core/config'
2+
3+
export default defineConfig({
4+
repository: {
5+
name: 'npmx-dev/npmx.dev',
6+
},
7+
sourceLocale: {
8+
label: 'English',
9+
lang: 'en',
10+
},
11+
locales: [
12+
{
13+
label: 'Français',
14+
lang: 'fr',
15+
},
16+
{
17+
label: 'Italiano',
18+
lang: 'it',
19+
},
20+
{
21+
label: '简体中文',
22+
lang: 'zh-CN',
23+
},
24+
],
25+
files: [
26+
{
27+
include: ['i18n/locales/en.json'],
28+
pattern: 'i18n/locales/@lang.json',
29+
type: 'dictionary',
30+
},
31+
],
32+
tracking: {
33+
ignoredKeywords: [
34+
'lunaria-ignore',
35+
'typo',
36+
'en-only',
37+
'broken link',
38+
'i18nReady',
39+
'i18nIgnore',
40+
],
41+
},
42+
})

0 commit comments

Comments
 (0)