forked from mozilla/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 2.18 KB
/
routine_l10n_obsolete.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Bimonthly l10n cleanup reminder
on:
schedule:
- cron: 0 09 14 */2 *
jobs:
create_issue:
name: Create l10n cleanup issue
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Open new issue (and close old if needed)
run: |
if [[ $CLOSE_PREVIOUS == true ]]; then
previous_issue_number=$(gh issue list \
--label "$LABELS" \
--author "github-actions[bot]" \
--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: "[bot] Remove obsolete l10n strings and ftl files"
ASSIGNEES:
LABELS: L10N,Frontend
BODY: |
### Remove obsolete strings
Search the code base for [strings marked `obsolete`](https://github.com/search?q=repo%3Amozilla%2Fbedrock+obsolete+language%3AFluent&type=code&l=Fluent) 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 and their fallback usage
### 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