mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-03-03 08:23:53 +08:00
Nav: wrap strings (#25089)
* Wrap nav strings and translate * Update QM * Update QM
This commit is contained in:
@@ -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<QMapbox::Feature>(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);
|
||||
|
||||
Binary file not shown.
@@ -340,6 +340,57 @@
|
||||
<translation>파일갱신: </translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapETA</name>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="618"/>
|
||||
<source>eta</source>
|
||||
<translation>에타</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="628"/>
|
||||
<source>min</source>
|
||||
<translation>분</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="632"/>
|
||||
<source>hr</source>
|
||||
<translation>시간</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="652"/>
|
||||
<source>km</source>
|
||||
<translation>km</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="655"/>
|
||||
<source>mi</source>
|
||||
<translation>mi</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapInstructions</name>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="421"/>
|
||||
<source> km</source>
|
||||
<translation> km</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="424"/>
|
||||
<source> m</source>
|
||||
<translation> m</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="432"/>
|
||||
<source> mi</source>
|
||||
<translation> mi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="435"/>
|
||||
<source> ft</source>
|
||||
<translation> ft</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapPanel</name>
|
||||
<message>
|
||||
@@ -389,6 +440,19 @@ location set</source>
|
||||
<translation>최근 경로 없음</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapWindow</name>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="178"/>
|
||||
<source>Map Loading</source>
|
||||
<translation>지도 로딩</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="195"/>
|
||||
<source>Waiting for GPS</source>
|
||||
<translation>GPS를 기다리는 중</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiOptionDialog</name>
|
||||
<message>
|
||||
|
||||
Binary file not shown.
@@ -340,6 +340,57 @@
|
||||
<translation>更新文件: </translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapETA</name>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="618"/>
|
||||
<source>eta</source>
|
||||
<translation>埃塔</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="628"/>
|
||||
<source>min</source>
|
||||
<translation>分钟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="632"/>
|
||||
<source>hr</source>
|
||||
<translation>小时</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="652"/>
|
||||
<source>km</source>
|
||||
<translation>km</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="655"/>
|
||||
<source>mi</source>
|
||||
<translation>mi</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapInstructions</name>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="421"/>
|
||||
<source> km</source>
|
||||
<translation> km</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="424"/>
|
||||
<source> m</source>
|
||||
<translation> m</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="432"/>
|
||||
<source> mi</source>
|
||||
<translation> mi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="435"/>
|
||||
<source> ft</source>
|
||||
<translation> ft</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapPanel</name>
|
||||
<message>
|
||||
@@ -389,6 +440,19 @@ location set</source>
|
||||
<translation>没有最近的目的地</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapWindow</name>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="178"/>
|
||||
<source>Map Loading</source>
|
||||
<translation>地图加载</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="195"/>
|
||||
<source>Waiting for GPS</source>
|
||||
<translation>等待 GPS</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiOptionDialog</name>
|
||||
<message>
|
||||
|
||||
Binary file not shown.
@@ -340,6 +340,57 @@
|
||||
<translation>更新檔案: </translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapETA</name>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="618"/>
|
||||
<source>eta</source>
|
||||
<translation>埃塔</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="628"/>
|
||||
<source>min</source>
|
||||
<translation>分鐘</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="632"/>
|
||||
<source>hr</source>
|
||||
<translation>小時</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="652"/>
|
||||
<source>km</source>
|
||||
<translation>km</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="655"/>
|
||||
<source>mi</source>
|
||||
<translation>mi</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapInstructions</name>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="421"/>
|
||||
<source> km</source>
|
||||
<translation> km</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="424"/>
|
||||
<source> m</source>
|
||||
<translation> m</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="432"/>
|
||||
<source> mi</source>
|
||||
<translation> mi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="435"/>
|
||||
<source> ft</source>
|
||||
<translation> ft</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapPanel</name>
|
||||
<message>
|
||||
@@ -394,6 +445,19 @@ location set</source>
|
||||
<translation>沒有最近的導航記錄</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapWindow</name>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="178"/>
|
||||
<source>Map Loading</source>
|
||||
<translation>地圖加載</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/maps/map.cc" line="195"/>
|
||||
<source>Waiting for GPS</source>
|
||||
<translation>等待 GPS</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiOptionDialog</name>
|
||||
<message>
|
||||
|
||||
Reference in New Issue
Block a user