2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

feat: 初步支持l10n

This commit is contained in:
2025-04-12 04:27:10 +08:00
parent 486a9fb58b
commit 3021f466f0
14 changed files with 260 additions and 31 deletions

28
.github/workflows/l10n.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: L10n
on:
push:
branches:
- main
pull_request:
jobs:
mockery:
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 web -pkg-tree ./cmd/web -out ./pkg/embed/locales
~/go/bin/xgotext -default cli -pkg-tree ./cmd/cli -out ./pkg/embed/locales
- uses: stefanzweifel/git-auto-commit-action@v5
name: Commit changes
with:
commit_message: "chore(l10n): update pot files"