Skip to content

Commit 5418ea0

Browse files
authored
refactor(ci): improve issue template naming and title format (#1115)
- Rename issue templates to readable names: - `----.md` → `translation-checkout.md` - `---.md` → `others.md` - Remove unused `translation-request.md` template - Change translation checkout issue title format: - Old: `{filepath} の翻訳` - New: `translate: {filepath}` - Add HTML comment to template to prevent title format changes - Update sync-untranslated-issue.mjs to match new format
1 parent 6d2d753 commit 5418ea0

File tree

4 files changed

+10
-27
lines changed

4 files changed

+10
-27
lines changed

.github/ISSUE_TEMPLATE/------------.md

Lines changed: 0 additions & 23 deletions
This file was deleted.
File renamed without changes.

.github/ISSUE_TEMPLATE/----.md renamed to .github/ISSUE_TEMPLATE/translation-checkout.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
---
22
name: 翻訳宣言
33
about: 未翻訳ドキュメントの翻訳を宣言するためのIssueです
4-
title: "{ファイル名} の翻訳"
4+
title: "translate: "
55
labels: 'type: Translation Checkout'
66
assignees: ''
77

88
---
99

10+
<!--
11+
⚠️ タイトル形式を変更しないでください
12+
タイトルは必ず "translate: {ファイルパス}" の形式にしてください
13+
例: translate: guide/animations/complex-sequences
14+
-->
15+
1016
## 翻訳宣言
1117

1218
### 翻訳するファイル

.github/scripts/sync-untranslated-issue.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function generateLinks(filepath) {
7575
.replace('src/content/', '')
7676
.replace(/\.(md|ts|html|json)$/, '');
7777

78-
const issueUrl = `https://github.com/angular/angular-ja/issues/new?template=----.md&title=${encodeURIComponent(title + ' の翻訳')}`;
78+
const issueUrl = `https://github.com/angular/angular-ja/issues/new?template=translation-checkout.md&title=${encodeURIComponent('translate: ' + title)}`;
7979

8080
// .mdファイルのみプレビューURL生成
8181
let previewUrl = null;
@@ -226,11 +226,11 @@ export default async ({github, context, core, filesData}) => {
226226
core.info(`Found ${checkoutIssues.length} Translation Checkout issues`);
227227

228228
// Issueタイトルからファイルパスを抽出してマップを作成
229-
// タイトル形式: "{ファイルパス} の翻訳"
229+
// タイトル形式: "translate: {ファイルパス}"
230230
// 前方一致でマッチング(ディレクトリ名での宣言に対応)
231231
const checkoutIssuesMap = new Map();
232232
for (const issue of checkoutIssues) {
233-
const match = issue.title.match(/^(.+)\s+$/);
233+
const match = issue.title.match(/^translate:\s*(.+)$/);
234234
if (match) {
235235
const declaredPath = `src/content/${match[1]}`;
236236
// 各未翻訳ファイルに対して前方一致チェック

0 commit comments

Comments
 (0)