mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 07:57:21 +08:00
ci: 优化l10n工作流
This commit is contained in:
38
.github/workflows/l10n.yml
vendored
38
.github/workflows/l10n.yml
vendored
@@ -4,32 +4,11 @@ on:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
xgotext:
|
||||
l10n:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: true
|
||||
go-version: 'stable'
|
||||
- name: Install xgotext
|
||||
run: |
|
||||
go install github.com/leonelquinteros/gotext/cli/xgotext@latest
|
||||
- name: Generate pot files
|
||||
run: |
|
||||
~/go/bin/xgotext -default backend -pkg-tree ./cmd/web -out ./pkg/embed/locales
|
||||
git pull
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
name: Commit changes
|
||||
with:
|
||||
commit_message: "chore(l10n): update backend pot files"
|
||||
vue3-gettext:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
@@ -42,12 +21,19 @@ jobs:
|
||||
node-version: 22
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: web/pnpm-lock.yaml
|
||||
- name: Generate pot files and merge po files
|
||||
working-directory: web
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: true
|
||||
go-version: 'stable'
|
||||
- name: Install xgotext
|
||||
run: |
|
||||
go install github.com/leonelquinteros/gotext/cli/xgotext@latest
|
||||
- name: Generate pot files
|
||||
run: |
|
||||
~/go/bin/xgotext -default backend -pkg-tree ./cmd/web -out ./pkg/embed/locales
|
||||
pnpm run gettext:extract
|
||||
git pull
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
name: Commit changes
|
||||
with:
|
||||
commit_message: "chore(l10n): update frontend pot files"
|
||||
commit_message: "chore(l10n): update pot files"
|
||||
|
||||
@@ -57,7 +57,7 @@ const columns: any = [
|
||||
{
|
||||
title: $gettext('Status'),
|
||||
key: 'status',
|
||||
width: 300,
|
||||
width: 250,
|
||||
resizable: true,
|
||||
ellipsis: { tooltip: true }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user