Add collect_phrases pre-commit hook; run new collect phrases (#610)

This commit is contained in:
Reckless_Satoshi 2023-05-22 08:26:48 +00:00 committed by GitHub
parent 6a1c8c32ef
commit cdc5f3deef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 8588 additions and 8556 deletions

View File

@ -4,5 +4,4 @@ Fixes #<ISSUE_NUMBER>
This PR introduces/refactors/...
## Checklist before merging
- [ ] Install [pre-commit](https://pre-commit.com/#installation) and initialize it: `pip install pre-commit`, then `pre-commit install`. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.
- [ ] If I added new phrases to the user interface, I have ran `cd frontend/static/locales; python collect_phrases.py` to collect them for translation.
- [ ] Install [pre-commit](https://pre-commit.com/#installation) and initialize it: `pip install pre-commit`, then `pre-commit install`. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.

View File

@ -14,6 +14,7 @@ repos:
- '--fix=lf'
- id: trailing-whitespace
- id: pretty-format-json
exclude: ^frontend/
args:
- '--autofix'
- '--no-sort-keys'
@ -22,15 +23,15 @@ repos:
- id: check-docstring-first
- repo: local
hooks:
# - id: collect-phrases
# name: Collect i18n phrases
# stages:
# - commit
# - merge-commit
# language: system
# files: ^frontend/
# types_or: [javascript, jsx, ts, tsx] # uses https://github.com/pre-commit/identify
# entry: bash -c 'cd frontend/static/locales && python3 collect_phrases.py'
- id: collect-phrases
name: Collect i18n phrases
stages:
- commit
- merge-commit
language: system
files: ^frontend/src/
types_or: [javascript, jsx, ts, tsx] # uses https://github.com/pre-commit/identify
entry: bash -c 'cd frontend/static/locales && python3 collect_phrases.py'
- id: prettier-frontend
name: prettier-frontend
stages:
@ -72,4 +73,4 @@ repos:
- merge-commit
language: system
types: [python]
entry: flake8
entry: flake8

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff