File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Label translation PRs
2+
3+ on :
4+ pull_request_target :
5+ types : [opened, synchronize, reopened]
6+ paths :
7+ - " locales/**/*.po"
8+
9+ permissions :
10+ pull-requests : write
11+ contents : read
12+
13+ jobs :
14+ label :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Apply translation labels
18+ uses : actions/github-script@v7
19+ with :
20+ script : |
21+ const files = await github.paginate(github.rest.pulls.listFiles, {
22+ owner: context.repo.owner,
23+ repo: context.repo.repo,
24+ pull_number: context.payload.pull_request.number,
25+ per_page: 100,
26+ });
27+
28+ const languages = new Set();
29+ for (const file of files) {
30+ const match = file.filename.match(/^locales\/([^/]+)\/.*\.po$/);
31+ if (match) {
32+ languages.add(match[1].toUpperCase());
33+ }
34+ }
35+
36+ if (languages.size === 0) {
37+ core.info('No .po files under locales/ changed; nothing to label.');
38+ return;
39+ }
40+
41+ const labels = ['translations', ...[...languages].map(l => `lang-${l}`)];
42+ core.info(`Applying labels: ${labels.join(', ')}`);
43+
44+ await github.rest.issues.addLabels({
45+ owner: context.repo.owner,
46+ repo: context.repo.repo,
47+ issue_number: context.payload.pull_request.number,
48+ labels,
49+ });
Original file line number Diff line number Diff line change @@ -419,13 +419,13 @@ msgstr "ローカルに構築されたガイドを見るには、ブラウザで
419419
420420#: ../../CONTRIBUTING.md:191
421421msgid "`docs-linkcheck`: this session checks that links in documentation work"
422- msgstr ""
422+ msgstr "`docs-linkcheck`: このセッションでドキュメント内のリンクが正常に機能するか確認します。 "
423423
424424#: ../../CONTRIBUTING.md:195
425425msgid ""
426426"If the tests fail, you will see logs in the terminal and in "
427427"`_build/linkcheck_output/output.txt`."
428- msgstr ""
428+ msgstr "テストが失敗した場合はターミナル及び`_build/linkcheck_output/output.txt`.にログが表示されます "
429429
430430#: ../../CONTRIBUTING.md:197
431431msgid "`docs-test`: this session runs the tests for the guide."
You can’t perform that action at this time.
0 commit comments