Commit Graph

24 Commits

Author SHA1 Message Date
Adeeb Shihadeh 86b6103657 test_*.py files are no longer executable (#32610)
* test_*.py files are no longer executable

* cleanup empty lines

* update precommit

* fixme

* enable

* build
old-commit-hash: c59887c810
2024-06-03 15:48:56 -07:00
cl0cks4fe 639a634f7c Unittest to pytest (#32366)
* add pytest-asyncio

* switch common

* switch selfdrive

* switch system

* switch tools

* small fixes

* fix setUp and valgrind pytest

* switch to setup

* fix random

* switch mock

* switch test_lateral_limits

* revert test_ui

* fix poetry.lock

* add unittest to banned-api

* add inline ignores to remaining unittest imports

* revert test_models

* revert check_can_parser_performance

* one more skip

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dd9d5d4528
2024-05-17 11:01:44 -07:00
Cameron Clough 9bd90112d0 use pyupgrade to update to new typing syntax (#31580)
* add pyupgrade hook

* run pyupgrade (pre-commit run -a)

* ruff --fix

* Revert "add pyupgrade hook"

This reverts commit 56ec18bb6b.

* revert changes to third_party/

* manual type fixes

* explicit Optional wrapping capnp objects
old-commit-hash: 995250ae49
2024-02-24 16:41:23 -08:00
Shane Smiskol f9db24d9d4 pre-commit: speed up translation step (#30966)
* formatting

fix

* fix missing class attr warning

* add translation_files option, remove pluralonly, type hint

* updates

* update
old-commit-hash: bef6d7f0bb
2024-01-11 00:39:15 -08:00
royjr f82d7f453f multilang: parameterize unit tests (#30842)
* init

* fix indents

* remove import

* safer

* TemporaryDirectory

* much cleaner

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 9d7f618bc5
2024-01-01 14:54:16 -08:00
royjr b2112b81af multilang: bad language translation check (#30783)
* compare bad against list

* use web

* Update test_translations.py

* uncomment

* override

* wrap

* AssertionError

* better

* detent

* selfish

* check numerusforms

* already checked

* use name

* not again

* combined

* sets

* assume available

* fix assume

* check regardless of other tests

* assert not print

* raise for status

* better

* done

* useless

* happy ruff

* better set

* quiet

* clean

* obvious

* clearer

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* IGNORED_WORDS

* assert match

* direct assert

* show bad word

* fix numerous empty string checks

* fix IGNORED_WORDS

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: fd88990006
2023-12-31 10:58:15 -08:00
royjr ea3352af59 ui: better Arabic translations (#30004)
* initial

* fix additional tag

* fix missing semicolon

* fix missing semicolon

* fix missing whitespace/punctuation

* dont translate

* fix deleted source

* mark missing as unfinished

* needs to be fixed

* typo

* dont translate

* translate wifi

* dont translate sidebar

* missing space

* dont translate

* these are good

* missing

* fix unfinished

* more fixes

* fix typo

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* dont translate

* fix vanished translation

* add test_entities_error test

* fix entity

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* dont translate comma prime

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: e156ab41ad
2023-09-30 15:37:07 -07:00
Adeeb Shihadeh 16ec56398c add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b991.

* fix pm test
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Shane Smiskol 96c8511c37 Multilang: check format arguments are consistent (#29441)
* format args

* global
old-commit-hash: 103d39259f
2023-08-16 21:30:47 -07:00
Shane Smiskol 1097d3b53d Multilang: more translation sanity checks (#29439)
* tests

* test finished translations

* fix new test failure
old-commit-hash: 549a4e9a97
2023-08-16 21:10:25 -07:00
Justin Newberry a14f162bc7 Ruff: comprehensions conventions (#29317)
ignore c408
old-commit-hash: 4a9afd7554
2023-08-10 16:40:30 -07:00
Shane Smiskol c5f5a951dc translation badges: add number of unfinished translations (#26429)
* some clean up and add missing translations

* unfinished

* set proper width

* make this variable common
old-commit-hash: f540002e3f
2022-11-09 16:49:17 -08:00
Shane Smiskol 9b10593c8f translations: remove locations (#25826)
* Remove locations

* no line nos
old-commit-hash: 35f624c628
2022-09-17 15:51:49 -07:00
Shane Smiskol d7e92fecc2 translations tests: ignore line numbers (#25675)
* no line numbers

* remove locations

* test

* ignore line numbers

* revert

revert

* fix that

* use relative

* non bytes, global

* clean up
old-commit-hash: 719d5f7856
2022-09-06 13:23:41 -07:00
Shane Smiskol 50fb17775d Multilang: add plural translation test (#25491)
Add test for correct format specifier for plural translations
old-commit-hash: 844d4d2ece
2022-08-18 23:32:11 -07:00
AlexandreSato 14a6aa77d6 Multilang: add Portuguese (Brazil) translation (#25287)
* Add Portuguese-Brazil translations

* Fixing some Japanese I used as a base.

* Add pt_BR translation

* Add QM file

* multilang: Fix typo and missing pt_BR translation

* fix typos in calibration translation

* pt_BR new translations

* fix translations

* update qm

* add Thai translation tkx tape#7233

* fix pt_BR translation

* improve pt_BR translation

* connect means connection not connected

* update

* plurals and typo

* fix unitTest error

* Add pt badge

* Add test for missing plural translations

* Make sure this doesn't test for translation completeness, we skip that test

* fix missing plurals

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 42e4efe706
2022-08-15 12:14:29 -07:00
Shane Smiskol e441e42fc4 Multilang: test for vanished translations (#25342)
* Test for vanished translations

* this isn't needed anymore

* comment

* remove more unnecessary code since the great pluralization
old-commit-hash: eaf21e53e2
2022-08-05 14:49:21 -07:00
Shane Smiskol 9e06421bfe Multilang: handle localized plurals (#25337)
* Add localized plural handling

* Do another location with plurals

* fix test
old-commit-hash: ecba873208
2022-08-02 12:44:21 -07:00
Shane Smiskol 13a1c77051 multilanguage: compile QM in scons (#25217)
* All in scons

* delete all this

* delete the qm files

* No need to check QM files in test_translations.py anymore

* readme

* add lupdate to third party

* fix

* one line

* update files_common

* readme imp

* add j flag

* add to path

* duplicate scons!

* update readme

* fix path

fix path

fix path

* no path
old-commit-hash: c528decd17
2022-07-20 18:44:47 -07:00
Shane Smiskol 4a3dd13898 Multilanguage: readme improvements (#25214)
* catch2 needs to iterate through the whole function each time to test this (spams warnings)

* Update readme

* Add update the ui header

* build in scons

* release by default

* scons in another pr

Co-authored-by: Vincent Wright <vincentw@kmwperformance.com>
old-commit-hash: 464db126a5
2022-07-19 12:38:58 -07:00
Greg Hogan 5dd12e194b nav: toggle to show on left side of onroad ui (#25169)
* nav: show on left side of onroad ui

* add toggle

* capitalization

* update translations

* single params object

* skip unfinished translations test

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 93cd0285ac
2022-07-18 13:57:21 +02:00
Shane Smiskol 1137b56f4b Add Japanese translations (#25078)
* Add Japanese translations

* test japanese

* update tr file

* test for unfinished translation tags

* add compiled QM

add compiled QM

* mark as finished

* remove from tests, needs some design decisions

Co-authored-by: PONPC <fuzitanirenti@yahoo.co.jp>
old-commit-hash: 5b4e39990a
2022-07-08 00:41:17 -07:00
Shane Smiskol 79c27c0ec2 Add Chinese (traditional) translations (#25064)
* Add Chinese translations

* wrap these

* add to languages.json

* fix tests

* use tmp dir for tests (doesn't change translation files in git repo)

* defaultdict not used

* update main_zh.ts (test outdated QM file)

* test outdated QM file (prev commit tests missing)

* update qm file

* add sidebar translations

* no need for function
old-commit-hash: bd2ea15897
2022-07-07 14:19:30 -07:00
Shane Smiskol cb82e76c75 Multilang prerequisites (#24999)
* some supporting code for multilang

* for now just english

* test for missing language files

* test for checking if ts file is up to date

* Skip test if causes exception, other test catches this

Test test

Should also work

should now fail

revert

rmn

* add to files_common

* fix files_common

* newlines

* no need to not update

* comment

* only english

* double quotes

* switch around
old-commit-hash: 7178800d84
2022-06-30 11:02:53 +02:00