Commit Graph

38 Commits

Author SHA1 Message Date
Cameron Clough
15ac8c041b UI snapshot tool (#28356)
* UI: snapshot testing tool

* gitignore

* cleanup

* remove prime type arg

* rename

* add script

* commit snapshots

* use base setup

* updates

* always run base

* echo

* use imagemagick

* test_snapshots

* fixes

* update

* set language

* revert

* default arg

* just remove translations

* formatting

* output arg

* improved help

* fix assets

* change dir back before saving snapshot

* unused imports

* simpler

* add default to description

* use uiUpdate signal
2023-05-31 23:04:30 -07:00
Shane Smiskol
f540002e3f translation badges: add number of unfinished translations (#26429)
* some clean up and add missing translations

* unfinished

* set proper width

* make this variable common
2022-11-09 16:49:17 -08:00
Shane Smiskol
35f624c628 translations: remove locations (#25826)
* Remove locations

* no line nos
2022-09-17 15:51:49 -07:00
Adeeb Shihadeh
c4e63d14ab good updater experience (#25724)
* good updater experience

* set params on startup

* no fetch on first loop

* little type hinting

* little more

* update translations

* always set params with valid overlay

* wrap check

* use the param

* more wrapping

* vanish

* cleanup

* remove that
2022-09-15 15:12:36 -07:00
Shane Smiskol
719d5f7856 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
2022-09-06 13:23:41 -07:00
Shane Smiskol
844d4d2ece Multilang: add plural translation test (#25491)
Add test for correct format specifier for plural translations
2022-08-18 23:32:11 -07:00
AlexandreSato
42e4efe706 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>
2022-08-15 12:14:29 -07:00
Shane Smiskol
eaf21e53e2 Multilang: test for vanished translations (#25342)
* Test for vanished translations

* this isn't needed anymore

* comment

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

* Do another location with plurals

* fix test
2022-08-02 12:44:21 -07:00
Shane Smiskol
c528decd17 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
2022-07-20 18:44:47 -07:00
Shane Smiskol
464db126a5 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>
2022-07-19 12:38:58 -07:00
Greg Hogan
93cd0285ac 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>
2022-07-18 13:57:21 +02:00
Shane Smiskol
949de4d2b6 UI: Internationalization support (#21212)
* rough multiple language demo

* more wrappings

* stash

* add some bad translations

* updates

* map from french to spanish still has same problem of needing to call setText on everything

* add files

* restart UI

* use return code

* relative path

* more translations

* don't loop restart

* Toggle and prime translations

* try on device

* try QComboBox with readable style

* stash

* not yet scrollable

* stash

* dynamic translations (doesn't work for dynamic widget strings yet)

* clean up multiple option selector

* store languages in json

* try transparent

* Try transparent popup

* see how this looks

* tweaks

* clean up

* update names

* Add Chinese (Simplified) translations

* Do missing French translations

* unit tests caught that :)

* fix test

* fix other test (on PC)

* add entries to dialog to test

* add cancel button, clean up a bit

* just chinese

* some clean up

* use quotes

* clean up

* Just quit, set timeout to 0

* half a second

* use exitcode

* don't print if it's expected

* this comment is outdated

* update translations

* Update translations

* re-order input classes

* Update line numbers

* use enabled property for button style

* Get rid of ListWidget

* Update line numbers

* Log failed to load language

* Log failed to load language

* Move to utils and fix english logging

extra line

* Update translations

* spacing

* looks a bit better

* try this instead of exitcode

fixes

fix

* only one function

* comment

* Update line numbers

* fixup some japanese translations

* clean up multi option dialog

* Update line numbers
2022-07-08 20:25:54 -07:00
Shane Smiskol
5b4e39990a 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>
2022-07-08 00:41:17 -07:00
Shane Smiskol
bd2ea15897 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
2022-07-07 14:19:30 -07:00
Shane Smiskol
7178800d84 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
2022-06-30 11:02:53 +02:00
Shane Smiskol
879a7c3201 UI: wrap all text for translation (#24961)
* rough multiple language demo

* more wrappings

* stash

* add some bad translations

* updates

* map from french to spanish still has same problem of needing to call setText on everything

* add files

* restart UI

* use return code

* relative path

* more translations

* don't loop restart

* Toggle and prime translations

* try on device

* try QComboBox with readable style

* stash

* not yet scrollable

* stash

* dynamic translations (doesn't work for dynamic widget strings yet)

* clean up multiple option selector

* store languages in json

* try transparent

* Try transparent popup

* see how this looks

* tweaks

* clean up

* clean up

* clean up 2 and missing tr

* wrap more strings

* missing updater

* fixes

* add basic test to ensure all strings wrapped

* try in CI

* clean up

* test name

* fix test

* always install qt dev tools

* fix deps

* fast test

* add section so it prints multiple errors

* debug

* debug

get rid of those

* make any difference?

* comment

* oh...

* run with offscreen platform

* try out section

* clean up

* fix missing wrappings (it works!)

* move down

* space

* clear relevant params, set TICI=1
2022-06-29 14:47:46 -07:00
Adeeb Shihadeh
1139fe507b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh
043a309d67 ui: new notcar battery design (#24412)
* ui: new notcar battery design

* if charging

* cleanup

* remove that

* slower

* real colors

* relative from left

* fix that
2022-05-03 16:51:44 -07:00
Ewout ter Hoeven
332f568a82 Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default

Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>

Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
2021-12-24 11:18:39 -08:00
Adeeb Shihadeh
1501c2e376 whole new family (#23157)
* family two

* more volume

* repeating dm sound

* update tests
2021-12-07 13:45:49 -08:00
Comma Device
cc1699707f fix sound test 2021-12-05 13:33:12 -08:00
grekiki
6951b3271d Python: Replace more lists with generators (#23116)
* Replace lists with generators v2

* Replace set with {}

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

* Replace more set() with {}

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-12-03 22:57:19 -08:00
Adeeb Shihadeh
37e2de2244 soundd: fix test for repeating soundsgitt status (#23110)
Co-authored-by: Comma Device <device@comma.ai>
2021-12-02 19:55:19 -08:00
Adeeb Shihadeh
3b367e6872 Newer sounds (#23091)
* new prompt sound

* padding

* prompt distracted

* debug

* fix spelling

* lower min volume

* better volume at low speeds

* revert debug

* revert that

* fix tests

* update refs

Co-authored-by: Comma Device <device@comma.ai>
2021-12-02 00:28:25 -08:00
Adeeb Shihadeh
e679d05d9e New sounds (#22652)
* new engage/disengage + amp config

* first family

* cleanup audible alerts

* tici isn't special

* fix up debug cycle alerts

* these were better

* extend range

* use distracted sound

* log scaling

* getting closer

* slightly louder

* prompt

* update tests

* update refs

* fix c2 test

* resolve todo

* adjust tolerance

* revert for now

* should work

Co-authored-by: Comma Device <device@comma.ai>
2021-11-30 19:47:33 -08:00
Dean Lee
eb0724d7e3 soundd: fix test case (#23075)
* init sound_stats

* send deviceState msg
2021-11-30 11:31:46 -08:00
Adeeb Shihadeh
ed8e6f857c soundd: configure as persistent process (#22878)
* soundd: configure as persistent process

* update c2 test

* fix that

* little more

Co-authored-by: Comma Device <device@comma.ai>
2021-11-12 15:04:57 -08:00
Adeeb Shihadeh
445a5aaca4 soundd: don't loop controls unresponsive sound infinitely (#22839)
* soundd: don't loop controls unresponsive sound infinitely

* update tests

* actually fix
2021-11-09 16:58:21 -08:00
Dean Lee
797bb1acb0 soundd: misc cleanup + tests (#22796)
* pass AudibleAlert to setAlert

* apply reviews

* remove trailing underscore

* add current_alert_type

* common function get_alert

* same freq as ui

* small cleanup

* setvolumne on change

* static Alert::get

* test_sounds

* remove old test files

* loop twice

* assert loopsRemaining

* assert stop

* init to min_volumne

* Revert "remove old test files"

This reverts commit 12e8bfefae1ae7f8649d3eda1e4126ff8eb1fe17.

* move to ui/soundd

* move test to tests/test_sound.cc

* remove old tests

* cleanup

* lower volume

* Revert "remove old tests"

This reverts commit e6bb12abfa3d5cd0aa8986d2b8da0b1edc7ea31b.

* return Alert

* cleanup

* remove #include <optional>

* cleanup .gitignore

* revert to std::optional

* Revert "revert to std::optional"

This reverts commit a66291c51f3a846652837cc4a43d5d60dd81896b.

* cleanup

* remove volume check

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-09 14:18:29 -08:00
Adeeb Shihadeh
b5960b9dc8 move nose tests to unittest (#22665)
* move to unittest

* boardd loopback

* no more nose

* phone only

* fix panda decorator
2021-10-25 09:44:04 -07:00
Adeeb Shihadeh
4749815419 little sound tester 2021-10-22 17:50:15 -07:00
Adeeb Shihadeh
12948e661a soundd (#21619)
* refactor alerts

* doesn't go here anymore

* soudd

* handle controls unresponsive

* same check

* fix path

* update sound test

* nice

* fix c2

* add script

* update tests

Co-authored-by: Comma Device <device@comma.ai>
2021-07-16 17:30:00 -07:00
Willem Melching
ae094042ad add putBool/getBool wrappers to cython params class (#20611)
* add putBool/getBool wrappers to cython class

* use new API

* some more puts

* fix mockparams arguments

* add get_bool to MockParams

* typo
2021-04-07 15:36:37 +02:00
Adeeb Shihadeh
60a9443b61 fix SSL errors in Qt UI on NEOS (#20225)
Co-authored-by: Comma Device <device@comma.ai>
2021-03-02 20:46:46 -08:00
Adeeb Shihadeh
ec8b21c261 qt fixups (#20171)
* no outline

* disable on qcom for now

* fix qt 5.12.8

* cleanup drive stats

* widgets cleanup

* ssl test

* revert that

* disable by default

Co-authored-by: Comma Device <device@comma.ai>
2021-02-28 18:10:50 -08:00
Adeeb Shihadeh
ce48d3c91e offroad home style (#19593)
* make drive stats look nicer

* offroad alerts style

* rest of alerts

* move that

* fix up colors

Co-authored-by: Comma Device <device@comma.ai>
2020-12-25 01:02:47 -08:00
Adeeb Shihadeh
8320a153fb move offroad alerts to home screen (#2681)
* move offroad alerts to home screen

* offroad aletrs work, but sidebar doesn't look nice

* fix sidebar

* looks better

* cleanup

* little bigger

Co-authored-by: grekiki <gregor1234567890@gmail.com>
2020-12-04 15:21:55 -08:00