From cbff8fcbd02b262860b3540a3dba7108237d2b46 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 8 Jul 2022 21:17:00 -0700 Subject: [PATCH] Nav: wrap strings (#25089) * Wrap nav strings and translate * Update QM * Update QM --- selfdrive/ui/qt/maps/map.cc | 22 ++++---- selfdrive/ui/translations/main_ko.qm | Bin 19449 -> 19997 bytes selfdrive/ui/translations/main_ko.ts | 64 +++++++++++++++++++++++ selfdrive/ui/translations/main_zh-CHS.qm | Bin 17919 -> 18457 bytes selfdrive/ui/translations/main_zh-CHS.ts | 64 +++++++++++++++++++++++ selfdrive/ui/translations/main_zh-CHT.qm | Bin 18031 -> 18569 bytes selfdrive/ui/translations/main_zh-CHT.ts | 64 +++++++++++++++++++++++ 7 files changed, 203 insertions(+), 11 deletions(-) diff --git a/selfdrive/ui/qt/maps/map.cc b/selfdrive/ui/qt/maps/map.cc index fd47f4188f2402..a486110a736d11 100644 --- a/selfdrive/ui/qt/maps/map.cc +++ b/selfdrive/ui/qt/maps/map.cc @@ -175,7 +175,7 @@ void MapWindow::updateState(const UIState &s) { loaded_once = loaded_once || m_map->isFullyLoaded(); if (!loaded_once) { - map_instructions->showError("Map Loading"); + map_instructions->showError(tr("Map Loading")); return; } @@ -192,7 +192,7 @@ void MapWindow::updateState(const UIState &s) { carPosSource["data"] = QVariant::fromValue(feature1); m_map->updateSource("carPosSource", carPosSource); } else { - map_instructions->showError("Waiting for GPS"); + map_instructions->showError(tr("Waiting for GPS")); } if (pan_counter == 0) { @@ -418,10 +418,10 @@ void MapInstructions::updateDistance(float d) { if (uiState()->scene.is_metric) { if (d > 500) { distance_str.setNum(d / 1000, 'f', 1); - distance_str += " km"; + distance_str += tr(" km"); } else { distance_str.setNum(50 * int(d / 50)); - distance_str += " m"; + distance_str += tr(" m"); } } else { float miles = d * METER_TO_MILE; @@ -429,10 +429,10 @@ void MapInstructions::updateDistance(float d) { if (feet > 500) { distance_str.setNum(miles, 'f', 1); - distance_str += " mi"; + distance_str += tr(" mi"); } else { distance_str.setNum(50 * int(feet / 50)); - distance_str += " ft"; + distance_str += tr(" ft"); } } @@ -615,7 +615,7 @@ void MapETA::updateETA(float s, float s_typical, float d) { auto eta_time = QDateTime::currentDateTime().addSecs(s).time(); if (params.getBool("NavSettingTime24h")) { eta->setText(eta_time.toString("HH:mm")); - eta_unit->setText("eta"); + eta_unit->setText(tr("eta")); } else { auto t = eta_time.toString("h:mm a").split(' '); eta->setText(t[0]); @@ -625,11 +625,11 @@ void MapETA::updateETA(float s, float s_typical, float d) { // Remaining time if (s < 3600) { time->setText(QString::number(int(s / 60))); - time_unit->setText("min"); + time_unit->setText(tr("min")); } else { int hours = int(s) / 3600; time->setText(QString::number(hours) + ":" + QString::number(int((s - hours * 3600) / 60)).rightJustified(2, '0')); - time_unit->setText("hr"); + time_unit->setText(tr("hr")); } QString color; @@ -649,10 +649,10 @@ void MapETA::updateETA(float s, float s_typical, float d) { float num = 0; if (uiState()->scene.is_metric) { num = d / 1000.0; - distance_unit->setText("km"); + distance_unit->setText(tr("km")); } else { num = d * METER_TO_MILE; - distance_unit->setText("mi"); + distance_unit->setText(tr("mi")); } distance_str.setNum(num, 'f', num < 100 ? 1 : 0); diff --git a/selfdrive/ui/translations/main_ko.qm b/selfdrive/ui/translations/main_ko.qm index f6e95b5038f984183d9d4273c581bb6ef6e4b91d..60966cdde587ebf4a43deb8ad255f374d32ca7c8 100644 GIT binary patch delta 2328 zcmZuxeNa@_9X73 zlxjOlH3{0N5N$=%0YN30pg}C87!z^g43b#Ds2LNJ*fds)?ZKT9C-IM+v+v$>?>+bY z&i(yok7{3q%02Z|j$hl|it_fr;U6wKaHcCB&?;uLn0qQ*BGGY;N8*vY@ z8W1^e$p)nHK=`M`DZuyu;(T&SJQ#c*(EI>+w{UNN;!R>S_tyb#Z4+Q_0E`!akwf|G z;6w^Aio`*05c`SkK;jm_ZUAO(TF zDB$9}pB?H_iHDDeSn@W2@8N#@M}5LGFfz`A)AvE#+Y6`^h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q^lqs7o1C}tKbCg=kZ;&I}h zW9ag!9%4byJY->~_;WGp&khu8-ys7Ny2Ly4?h#p8Y80>WE`}-e8gqa2wbx9IkL WBvzGk6d diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts index 91685383f77d9b..ad35a37fa12283 100644 --- a/selfdrive/ui/translations/main_ko.ts +++ b/selfdrive/ui/translations/main_ko.ts @@ -340,6 +340,57 @@ 파일갱신: + + MapETA + + + eta + 에타 + + + + min + + + + + hr + 시간 + + + + km + km + + + + mi + mi + + + + MapInstructions + + + km + km + + + + m + m + + + + mi + mi + + + + ft + ft + + MapPanel @@ -389,6 +440,19 @@ location set 최근 경로 없음 + + MapWindow + + + Map Loading + 지도 로딩 + + + + Waiting for GPS + GPS를 기다리는 중 + + MultiOptionDialog diff --git a/selfdrive/ui/translations/main_zh-CHS.qm b/selfdrive/ui/translations/main_zh-CHS.qm index 19eccddbc0e919fdadb32a5621f8f7474aded85a..b96acb89d99ed8207dd34740c51714706e771040 100644 GIT binary patch delta 2290 zcmZuxeNh6su&m3bEY$c`E+nrLX6ZtQX>7bVeC*}7}GBrp~nGj0r4ua6d0ip-zG)? zBJa&TfD{RYO(%{c)(~@OF3F5j-fJTPc63vGWL2Ubof%*Tm2n4K$ z^a@o99}Q{8Ho%kv-5x$}Dx-MWd?*6?FeYMZK$J?9T}WzOO8b5!_3Q>l-@qfr*-Xsk zMoLT-nJ}?ZN^-1&8&;H_R0ii)}URK&cHEewC`I;JgijP zxF-!z-_?HHNWaLh*DMzT+&*i>S=*ZU{+~r>GSyYP#3fzvfXyi`n@v8tQgNmDPlkyX z*Cp>~uMYE|<*WyNU-ID4da=6x7BI3(+EQWB@#NL-;f8mu*p;x0y*X2oW2pG}?UK22J_XE`CRswryIIPf#fpqMD;3BG*(ztG zxxrg0)G2B1KuZ~2#GCZLE-lGl%)HIg(r623WWH4SClWDk_F%vP4-Wm#g9-Db>acn@ zg=>_mUuR30MoINAms5$aq@AB$pg=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-EQCEX7S{C;T0x1oQ5e827fJ^T#%H@oB^0LsG6!9y{3nm6W@QRxtII@>Zt;PR`P?%e6qS zv(kkoDlMc+7j3s`rJYiB4GGzd(!-Prc6evU1Rh;TA@bo=1s}Gpx@smg%!@z zADjP>1V-x{#_y$soAmFhI&%nC>fb-7LfRwxk3;H#F7FMY-enxRjfO}qiCg9vX1)AK z!U2X23v#%hYS?v{@!D$)MUUONjx_4c)9B^yMt6Iz0qEOe9PuWB7iJhIL_MOE&c=x; zlyGR3aq<*O?*7RbUmgN@Rv95fPx2b)$bbmYBvrt%kTk!NSql`&MRgRA0L%Dg_=cEwh}4fk@TSMU;=<+>6U%3cp{ zQ6dAU0s|YBs1Pa;n4wI}WI*d!W!~6ULSHG{8u_I9Bq#-2IBd?-l#1O{tk)~$dNt8^ zrBYo^V&ZDEZodZ;jxqPP-Y1bk=0QzsIjk4WNBz0q&3@B-ViErg3^$j#9iSJi=CTl? z#~bt2AbLUWuR0yvPv!^JE@`Z|-3rz1LnxIwr3TjeGT|mQYCRQeSE?q3jO6(b>e}s` za<7Bxj{4zj=_mD29^?0WtDgCf9_Ui4-WYz1CJ(b1Uh!Rw*8gmA9KpHnf7#OUNi*M> zWJ~xX2J9VRnV;~O$_%t@u1aOkXIrvo&8I?*mUBORqC$C=nx{KC$A>JnVZU*0o&yZC Y77o_CIusUk$`iK6%bg4V=sMi@e-;zY9{>OV diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts index 1bcb30142c6b79..c3e1954f1e9479 100644 --- a/selfdrive/ui/translations/main_zh-CHS.ts +++ b/selfdrive/ui/translations/main_zh-CHS.ts @@ -340,6 +340,57 @@ 更新文件: + + MapETA + + + eta + 埃塔 + + + + min + 分钟 + + + + hr + 小时 + + + + km + km + + + + mi + mi + + + + MapInstructions + + + km + km + + + + m + m + + + + mi + mi + + + + ft + ft + + MapPanel @@ -389,6 +440,19 @@ location set 没有最近的目的地 + + MapWindow + + + Map Loading + 地图加载 + + + + Waiting for GPS + 等待 GPS + + MultiOptionDialog diff --git a/selfdrive/ui/translations/main_zh-CHT.qm b/selfdrive/ui/translations/main_zh-CHT.qm index e64aabecd68c5df555b350ade44bd61fb2ea5cd9..208f29c0ec9dd45424301c70cdaf64c2e9a901bc 100644 GIT binary patch delta 2307 zcmZuxdsLKl8h+-x%*^-A?8i3by};+e-a zz{z`GC&XgL)*peic@KbgxE}lwOWg;-JKY!^2x-@KKxc*2Jdpv1LTWuu%!G770{lOR zyoD-_ErWdc0ASh%ef?G9`xGyOi4tK5V>(G95#VH+;%CT(S}Bd+RF&Wz^yx4PYzcpjSQYZl-PhiueOy^p)4;tfhUnyndpUZ{!2H-p%_>#y1Wzo>!Uiy{=$>&r}Q+ZV3Mv zCD>JAd<}au7>?o zUQt~YSDseR|s_FlZF9)5KPE1jU8h>%GvM{UZbqdZ7$R{gnV8r5dsC=z-{?Ox(! zqOVQ5`WN|{51N8cp5~17m=<($D+I@yR(vW^$t=^xHQx05(RAi3wrFIS=`T-HDW4%` z?~}|s?oTdrU@b2~|85>PbsdN0j(J8Ldp*_1oH%6xd*)%D6-xykZ!pg-XTX4G&H1zY z2<4i0-c4tKjpo{Id~E)!%q>+^Ec~|luWdy8Zgbli5|e&!(bt49VVou0?=p!@wM6z7 z^Uhs4Mp0`?u zZD!?O7HiO*I4X3(I;Df_DEu|+tWqlHHQTx(b~=aIZY|!!*FNf!b??n-oQY}Hx2u_F zl45QA4`*R`llAXv=XN@-VIs=ZMpgD58s8F2t zyDLTP{Zj4qYzK*r)jnGO6A*PmYwxb)dp@dl%y^gI0eKvpq`FT15)W7Usf;wv7bk;1 zG26M=(D(o8#mlFs#pp!-m*#6ZvHcdp(v`n3z%t}NG+37ZOM`smJv7MA8(`pa=SbD> z7}9Sc=I1#Em^`r1!-gC;^>tm-!&$Vs%hN&Sj(8Vh9T z0sL(b`2UJ&pG34AP>N`C*Yf|yb0al5Aa*L^?qw`2bY71Am0 delta 1749 zcmX9;c~p&Q9DeS1zwa*J{qA?8g{Y?6f^=OWghDln%&6=$vd6X0bPkhk=1zxfS;k;& zAqrz`N60cNOQKAegOQVHEXg(vGe{<9o=*3l=f2 zY!mus0{XLnc?Fp_k{s%J{!V63xLEP9k1#k-|rt^CdFuQS_ zyY{7z(|QZy(yc(mScsb*0U8xzQ7Bi9fLL~tm<92g2zYx#TH#ANWsnZ;1x#z9%ezNB z1-}R+y?G9PsGmBt3dBv$eld~XgeQ8uJM3ZH6E{+!}&uRj~+HB;I~H8a(e&} z=&tFynuc`r(j*oK0sfsdTW;}t_gKxxJa?@3W1Lw zaNk`aMxIS#cZ4Jtc5J^OY`baX`UAp=l_VDOsZcP0rd#F;HxgObD_W>5iJ-H#%|ca{ zI|~+QyjL(F%?E7cVYp1*kI*B%MlhmJVO40y@-7 z=NqWBkRe^L{>~^>NfnhOWKEPFE-In(H<~aaU8-*&!48T}unuLXy>)7>oeFN#g+Gm< zg4Md%+M!uy+a*>xX*Pm*+J?9R<(K1)|0e~TH5)%yievNn_TyIU<{hx_!0 zXFVi=1byw`T`c@T|EAoN78U5C4M$@xF%D^Zp5LT}Y-@t<2o0OS@8VNa+jrAi~pis$O%gg3y9brkOi>-zJd=bB~7Qv_NY<7|MBHXAAR*RQ~CnWiImD!z@Iai=v2u zQRdQcWViy-4%77;Oc^0=w-s@0Li%0cGzB9)x z{U5Pl#}vyf$76bxX8EB!ot{szY@RfWglv|=um1yj)>$fRwzGrRma3RT9FLyLz^ppj XQ$NvV-R)TOQNeSCaP)2Kb+-QjngYwa diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts index 2aff3334d9ff99..f6e36081fac730 100644 --- a/selfdrive/ui/translations/main_zh-CHT.ts +++ b/selfdrive/ui/translations/main_zh-CHT.ts @@ -340,6 +340,57 @@ 更新檔案: + + MapETA + + + eta + 埃塔 + + + + min + 分鐘 + + + + hr + 小時 + + + + km + km + + + + mi + mi + + + + MapInstructions + + + km + km + + + + m + m + + + + mi + mi + + + + ft + ft + + MapPanel @@ -394,6 +445,19 @@ location set 沒有最近的導航記錄 + + MapWindow + + + Map Loading + 地圖加載 + + + + Waiting for GPS + 等待 GPS + + MultiOptionDialog