forked from mozilla/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…lla#14328) * Schedule task to remove obsolete l10n strings Fix mozilla#14259
- Loading branch information
1 parent
849a7cf
commit e725c41
Showing
2 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Create l10n cleanup task | ||
on: | ||
schedule: | ||
- cron: 0 09 14 */2 * | ||
|
||
jobs: | ||
create_issue: | ||
name: Create l10n cleanup task | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Create l10n cleanup task | ||
run: | | ||
if [[ $CLOSE_PREVIOUS == true ]]; then | ||
previous_issue_number=$(gh issue list \ | ||
--label "$LABELS" \ | ||
--json number \ | ||
--jq '.[0].number') | ||
if [[ -n $previous_issue_number ]]; then | ||
gh issue close "$previous_issue_number" | ||
gh issue unpin "$previous_issue_number" | ||
fi | ||
fi | ||
new_issue_url=$(gh issue create \ | ||
--title "$TITLE" \ | ||
--assignee "$ASSIGNEES" \ | ||
--label "$LABELS" \ | ||
--body "$BODY") | ||
if [[ $PINNED == true ]]; then | ||
gh issue pin "$new_issue_url" | ||
fi | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REPO: ${{ github.repository }} | ||
TITLE: Remove obsolete l10n strings and ftl files | ||
ASSIGNEES: | ||
LABELS: L10N | ||
BODY: | | ||
### Remove obsolete strings | ||
Search the code base for strings marked `obsolete` that are more than 2 months old. | ||
If you find strings that have no date, either find the date by looking at git history | ||
or add an expiry date and leave it to be removed in 2 months. | ||
- [ ] Remove old obsolete strings | ||
### Remove obsolete ftl files | ||
Compare the files in /l10n/en-US/ to the /en/ folder in the www-l10n repo and remove | ||
files from www-l10n that no longer exist in bedrock. | ||
If you have both repos installed and up to date you can run this command: | ||
`diff -r www-l10n/en bedrock/l10n/en | grep ".ftl"` | ||
- [ ] Remove files | ||
- [ ] Remove references in www-l10n/configs/pontoon.toml | ||
PINNED: false | ||
CLOSE_PREVIOUS: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters