Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations source copy check #13419

Open
wants to merge 10 commits into
base: 2.4
Choose a base branch
from
21 changes: 17 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# because it won't prevent catching other, unrelated issues.

# _anlz.h/_pdb.h: Header files generated by Kaitai Struct
exclude: ^(lib/|src/test/.*data/).*|res/controllers/lodash\.mixxx\.js|res/translations/.*\.ts|src/.*_(anlz|pdb)\.h$
exclude: ^(lib/|src/test/.*data/).*|res/controllers/lodash\.mixxx\.js|src/.*_(anlz|pdb)\.h$
minimum_pre_commit_version: 2.21.0
default_language_version:
python: python3
Expand All @@ -43,10 +43,10 @@ repos:
- id: check-yaml
exclude: ^\.clang-format$
- id: end-of-file-fixer
exclude: ^.*UTF-8-BOM.txt$
exclude: ^.*(UTF-8-BOM\.txt|\.ts)$
- id: mixed-line-ending
- id: trailing-whitespace
exclude: \.(c|cc|cxx|cpp|d.ts|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|mm|proto|vert)$
exclude: \.(c|cc|cxx|cpp|ts|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|mm|proto|tsv|vert)$
- id: no-commit-to-branch
# protect main and any branch that has a semver-like name
args: [-b, main, -p, '^\d+\.\d+(?:\.\d+)?$']
Expand All @@ -64,7 +64,7 @@ repos:
"\\W(?:m_p*(?=[A-Z])|m_(?=\\w)|pp*(?=[A-Z])|k(?=[A-Z])|s_(?=\\w))",
--write-changes,
]
exclude: ^(packaging/wix/LICENSE.rtf.in|src/dialog/dlgabout\.cpp|.*\.(?:pot?|(?<!d\.)ts|wxl|svg))$
exclude: ^(packaging\/wix\/LICENSE.rtf.in|src\/dialog\/dlgabout\.cpp|.*\.(?:pot?|(?<!\.d\.)ts|wxl|svg))$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.48.0
hooks:
Expand All @@ -81,6 +81,7 @@ repos:
- "@typescript-eslint/eslint-plugin"
- "@typescript-eslint/parser"
- eslint-plugin-diff@^2.0.3
exclude: ^.*\.(?<!\.d\.)ts$
- repo: local
hooks:
- id: clang-format
Expand Down Expand Up @@ -170,3 +171,15 @@ repos:
- Markdown==3.4.1
types: [text]
files: ^(CHANGELOG\.md|res/linux/org\.mixxx\.Mixxx\.metainfo.xml)$
- id: ts-source-copy
name: ts-source-copy
description: "Find translations literaly copied form the source language"
daschuer marked this conversation as resolved.
Show resolved Hide resolved
entry: python tools/ts_source_copy_check.py
stages:
- commit
- manual
require_serial: true
language: python
additional_dependencies:
- lxml==4.9.3
files: ^(res/translations/.*\.ts)$
Loading
Loading