Translate new Design tab strings and auto-label localization (#16227)

This commit is contained in:
Ian Bassi
2026-10-06 16:26:08 -03:00
committed by GitHub
parent 3f36a86f39
commit af05a991ee
28 changed files with 11139 additions and 5493 deletions
+22 -22
View File
@@ -96,7 +96,7 @@ jobs:
issues: write
runs-on: ubuntu-latest
steps:
- name: Auto-label and remind about the localization glossary
- name: Auto-label localization changes and remind contributors about the glossary
uses: actions/github-script@v9
with:
script: |
@@ -106,37 +106,37 @@ jobs:
const pr = context.payload.pull_request;
// List changed files once (mirrors the `localization/**` paths filter in check_locale.yml)
// Mirrors the `localization/**` paths filter in check_locale.yml
const files = await github.paginate(github.rest.pulls.listFiles, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
per_page: 100
});
const touchesLocalization = files.some((file) => file.filename.startsWith('localization/'));
const onlyPoFiles = files.length > 0 && files.every((file) => file.filename.endsWith('.po'));
if (!files.some((file) => file.filename.startsWith('localization/'))) {
core.info('No localization changes detected; skipping Localization label.');
return;
}
// If the PR changes only .po files, automatically apply the Localization label
if (onlyPoFiles) {
try {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: ['Localization']
});
core.info('Applied Localization label (PR changes only .po files).');
} catch (error) {
if (isPermissionDenied(error)) {
core.warning('Cannot add Localization label because token cannot write.');
} else {
throw error;
}
try {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: ['Localization']
});
core.info('Applied Localization label.');
} catch (error) {
if (isPermissionDenied(error)) {
core.warning('Cannot add Localization label because token cannot write.');
} else {
throw error;
}
}
if (!touchesLocalization) {
core.info('No localization changes detected; skipping glossary reminder.');
// Collaborators know the glossary; only remind outside contributors
if (['COLLABORATOR', 'OWNER', 'MEMBER'].includes(pr.author_association)) {
core.info('Author is a collaborator; skipping glossary reminder.');
return;
}