mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 09:53:47 +01:00
lint: Add lint-qt-translation.py
This commit is contained in:
parent
294a018bf5
commit
856325fac1
23
test/lint/lint-qt-translation.py
Executable file
23
test/lint/lint-qt-translation.py
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (c) 2023-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
#
|
||||
# Check for leading whitespaces in the translatable strings.
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
tr_strings = subprocess.run(['git', 'grep', '-e', 'tr("[[:space:]]', '--', 'src/qt'], stdout=subprocess.PIPE, text=True).stdout
|
||||
|
||||
if tr_strings.strip():
|
||||
print("Avoid leading whitespaces in:")
|
||||
print(tr_strings)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue
Block a user