From 45fa52c47b38c0a1687447df6d6b42320078f690 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Fri, 21 Nov 2025 18:30:12 +0900 Subject: [PATCH] refactor(ci): improve issue template naming and title format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .github/ISSUE_TEMPLATE/------------.md | 23 ------------------- .github/ISSUE_TEMPLATE/{---.md => others.md} | 0 .../{----.md => translation-checkout.md} | 8 ++++++- .github/scripts/sync-untranslated-issue.mjs | 6 ++--- 4 files changed, 10 insertions(+), 27 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/------------.md rename .github/ISSUE_TEMPLATE/{---.md => others.md} (100%) rename .github/ISSUE_TEMPLATE/{----.md => translation-checkout.md} (66%) diff --git a/.github/ISSUE_TEMPLATE/------------.md b/.github/ISSUE_TEMPLATE/------------.md deleted file mode 100644 index f04f30f6a4..0000000000 --- a/.github/ISSUE_TEMPLATE/------------.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: 翻訳者募集 [管理者用] -about: 未翻訳ドキュメントの翻訳を募集するIssueのテンプレート -title: "[PR募集] {ファイル名} の翻訳" -labels: 'type: translation, 翻訳者募集中' -assignees: '' - ---- - -## 翻訳者募集 - -未翻訳ドキュメントを翻訳者を募集します。 -コントリビューションできる方はコメントで挙手してください! - -### 翻訳してほしいファイル (URL) - - - - -### 備考 - diff --git a/.github/ISSUE_TEMPLATE/---.md b/.github/ISSUE_TEMPLATE/others.md similarity index 100% rename from .github/ISSUE_TEMPLATE/---.md rename to .github/ISSUE_TEMPLATE/others.md diff --git a/.github/ISSUE_TEMPLATE/----.md b/.github/ISSUE_TEMPLATE/translation-checkout.md similarity index 66% rename from .github/ISSUE_TEMPLATE/----.md rename to .github/ISSUE_TEMPLATE/translation-checkout.md index f6de97811f..f4e0909122 100644 --- a/.github/ISSUE_TEMPLATE/----.md +++ b/.github/ISSUE_TEMPLATE/translation-checkout.md @@ -1,12 +1,18 @@ --- name: 翻訳宣言 about: 未翻訳ドキュメントの翻訳を宣言するためのIssueです -title: "{ファイル名} の翻訳" +title: "translate: " labels: 'type: Translation Checkout' assignees: '' --- + + ## 翻訳宣言 ### 翻訳するファイル diff --git a/.github/scripts/sync-untranslated-issue.mjs b/.github/scripts/sync-untranslated-issue.mjs index 2fc4e14a58..75f2db2a91 100644 --- a/.github/scripts/sync-untranslated-issue.mjs +++ b/.github/scripts/sync-untranslated-issue.mjs @@ -75,7 +75,7 @@ function generateLinks(filepath) { .replace('src/content/', '') .replace(/\.(md|ts|html|json)$/, ''); - const issueUrl = `https://github.com/angular/angular-ja/issues/new?template=----.md&title=${encodeURIComponent(title + ' の翻訳')}`; + const issueUrl = `https://github.com/angular/angular-ja/issues/new?template=translation-checkout.md&title=${encodeURIComponent('translate: ' + title)}`; // .mdファイルのみプレビューURL生成 let previewUrl = null; @@ -226,11 +226,11 @@ export default async ({github, context, core, filesData}) => { core.info(`Found ${checkoutIssues.length} Translation Checkout issues`); // Issueタイトルからファイルパスを抽出してマップを作成 - // タイトル形式: "{ファイルパス} の翻訳" + // タイトル形式: "translate: {ファイルパス}" // 前方一致でマッチング(ディレクトリ名での宣言に対応) const checkoutIssuesMap = new Map(); for (const issue of checkoutIssues) { - const match = issue.title.match(/^(.+)\s+の翻訳$/); + const match = issue.title.match(/^translate:\s*(.+)$/); if (match) { const declaredPath = `src/content/${match[1]}`; // 各未翻訳ファイルに対して前方一致チェック