mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 12:32:06 +08:00
UI: translations cleanup (#25120)
* Make this one translation * Remote html from translations * getBrand as argument * some stuff * Forget Wi-Fi network * Update translations * Remove obsolete * compilation fixes * remove * Fix missing translation old-commit-hash: 3b4e939b9f88b70727e687613a912aef36178755
This commit is contained in:
@@ -84,7 +84,7 @@ void Networking::connectToNetwork(const Network &n) {
|
||||
} else if (n.security_type == SecurityType::OPEN) {
|
||||
wifi->connect(n);
|
||||
} else if (n.security_type == SecurityType::WPA) {
|
||||
QString pass = InputDialog::getText(tr("Enter password"), this, tr("for \"") + n.ssid + "\"", true, 8);
|
||||
QString pass = InputDialog::getText(tr("Enter password"), this, tr("for \"%1\"").arg(QString::fromUtf8(n.ssid)), true, 8);
|
||||
if (!pass.isEmpty()) {
|
||||
wifi->connect(n, pass);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ void Networking::connectToNetwork(const Network &n) {
|
||||
void Networking::wrongPassword(const QString &ssid) {
|
||||
if (wifi->seenNetworks.contains(ssid)) {
|
||||
const Network &n = wifi->seenNetworks.value(ssid);
|
||||
QString pass = InputDialog::getText(tr("Wrong password"), this, tr("for \"") + n.ssid +"\"", true, 8);
|
||||
QString pass = InputDialog::getText(tr("Wrong password"), this, tr("for \"%1\"").arg(QString::fromUtf8(n.ssid)), true, 8);
|
||||
if (!pass.isEmpty()) {
|
||||
wifi->connect(n, pass);
|
||||
}
|
||||
@@ -174,7 +174,7 @@ AdvancedNetworking::AdvancedNetworking(QWidget* parent, WifiManager* wifi): QWid
|
||||
list->addItem(editApnButton);
|
||||
|
||||
// Set initial config
|
||||
wifi->updateGsmSettings(roamingEnabled, QString::fromStdString(params.get("GsmApn")));
|
||||
wifi->updateGsmSettings(roamingEnabled, QString::fromStdString(params.get("GsmApn")));
|
||||
|
||||
main_layout->addWidget(new ScrollView(list, this));
|
||||
main_layout->addStretch(1);
|
||||
@@ -296,7 +296,7 @@ void WifiUI::refresh() {
|
||||
QPushButton *forgetBtn = new QPushButton(tr("FORGET"));
|
||||
forgetBtn->setObjectName("forgetBtn");
|
||||
QObject::connect(forgetBtn, &QPushButton::clicked, [=]() {
|
||||
if (ConfirmationDialog::confirm(tr("Forget Wi-Fi Network \"") + QString::fromUtf8(network.ssid) + "\"?", this)) {
|
||||
if (ConfirmationDialog::confirm(tr("Forget Wi-Fi Network \"%1\"?").arg(QString::fromUtf8(network.ssid)), this)) {
|
||||
wifi->forgetConnection(network.ssid);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -249,7 +249,7 @@ SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent) {
|
||||
});
|
||||
|
||||
|
||||
auto uninstallBtn = new ButtonControl(tr("Uninstall ") + getBrand(), tr("UNINSTALL"));
|
||||
auto uninstallBtn = new ButtonControl(tr("Uninstall %1").arg(getBrand()), tr("UNINSTALL"));
|
||||
connect(uninstallBtn, &ButtonControl::clicked, [&]() {
|
||||
if (ConfirmationDialog::confirm(tr("Are you sure you want to uninstall?"), this)) {
|
||||
params.putBool("DoUninstall", true);
|
||||
|
||||
@@ -165,7 +165,7 @@ void InputDialog::handleEnter() {
|
||||
done(QDialog::Accepted);
|
||||
emitText(line->text());
|
||||
} else {
|
||||
setMessage(tr("Need at least ") + QString::number(minLength) + tr(" characters!"), false);
|
||||
setMessage(tr("Need at least %1 characters!").arg(minLength), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,13 +88,16 @@ PairingPopup::PairingPopup(QWidget *parent) : QDialogBase(parent) {
|
||||
title->setWordWrap(true);
|
||||
vlayout->addWidget(title);
|
||||
|
||||
QLabel *instructions = new QLabel(tr(R"(
|
||||
QLabel *instructions = new QLabel(QString(R"(
|
||||
<ol type='1' style='margin-left: 15px;'>
|
||||
<li style='margin-bottom: 50px;'>Go to https://connect.comma.ai on your phone</li>
|
||||
<li style='margin-bottom: 50px;'>Click "add new device" and scan the QR code on the right</li>
|
||||
<li style='margin-bottom: 50px;'>Bookmark connect.comma.ai to your home screen to use it like an app</li>
|
||||
<li style='margin-bottom: 50px;'>%1</li>
|
||||
<li style='margin-bottom: 50px;'>%2</li>
|
||||
<li style='margin-bottom: 50px;'>%3</li>
|
||||
</ol>
|
||||
)"), this);
|
||||
)").arg(tr("Go to https://connect.comma.ai on your phone"))
|
||||
.arg(tr("Click \"add new device\" and scan the QR code on the right"))
|
||||
.arg(tr("Bookmark connect.comma.ai to your home screen to use it like an app")), this);
|
||||
|
||||
instructions->setStyleSheet("font-size: 47px; font-weight: bold; color: black;");
|
||||
instructions->setWordWrap(true);
|
||||
vlayout->addWidget(instructions);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4e2338f5e74f7be0ef00229b0f30e3129dcd1eaa3f06b0f9ede3c2dc89a743d1
|
||||
size 19981
|
||||
oid sha256:fb7e26c65d5dee24c17532f9810a00e6a278f6f8f851bdd06418e4ed13fed213
|
||||
size 19439
|
||||
|
||||
@@ -308,13 +308,8 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/input.cc" line="168"/>
|
||||
<source>Need at least </source>
|
||||
<translation>최소 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/input.cc" line="168"/>
|
||||
<source> characters!</source>
|
||||
<translation>자가 필요합니다!</translation>
|
||||
<source>Need at least %1 characters!</source>
|
||||
<translation>최소 %1 자가 필요합니다!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -481,8 +476,8 @@ location set</source>
|
||||
<message>
|
||||
<location filename="../qt/offroad/networking.cc" line="87"/>
|
||||
<location filename="../qt/offroad/networking.cc" line="97"/>
|
||||
<source>for "</source>
|
||||
<translation>하기위한 "</translation>
|
||||
<source>for "%1"</source>
|
||||
<translation>하기위한 "%1"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/networking.cc" line="97"/>
|
||||
@@ -547,52 +542,50 @@ location set</source>
|
||||
<translation>장치를 콤마 계정과 페어링합니다</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="91"/>
|
||||
<source>
|
||||
<ol type='1' style='margin-left: 15px;'>
|
||||
<li style='margin-bottom: 50px;'>Go to https://connect.comma.ai on your phone</li>
|
||||
<li style='margin-bottom: 50px;'>Click "add new device" and scan the QR code on the right</li>
|
||||
<li style='margin-bottom: 50px;'>Bookmark connect.comma.ai to your home screen to use it like an app</li>
|
||||
</ol>
|
||||
</source>
|
||||
<translation>
|
||||
<ol type='1' style='margin-left: 15px;'>
|
||||
<li style='margin-bottom: 50px;'>https://connect.comma.ai에 접속하세요</li>
|
||||
<li style='margin-bottom: 50px;'>"새 장치 추가"를 클릭하고 오른쪽 QR 코드를 검색합니다.</li>
|
||||
<li style='margin-bottom: 50px;'>connect.comma.ai을 앱처럼 사용하려면 홈 화면에 바로가기를 만드십시오.</li>
|
||||
</ol>
|
||||
</translation>
|
||||
<location filename="../qt/widgets/prime.cc" line="97"/>
|
||||
<source>Go to https://connect.comma.ai on your phone</source>
|
||||
<translation>https://connect.comma.ai에 접속하세요</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="98"/>
|
||||
<source>Click "add new device" and scan the QR code on the right</source>
|
||||
<translation>"새 장치 추가"를 클릭하고 오른쪽 QR 코드를 검색합니다</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="99"/>
|
||||
<source>Bookmark connect.comma.ai to your home screen to use it like an app</source>
|
||||
<translation>connect.comma.ai을 앱처럼 사용하려면 홈 화면에 바로가기를 만드십시오</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrimeAdWidget</name>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="184"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="187"/>
|
||||
<source>Upgrade Now</source>
|
||||
<translation>지금 업그레이드</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="189"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="192"/>
|
||||
<source>Become a comma prime member at connect.comma.ai</source>
|
||||
<translation>connect.comma.ai에서 comma prime에 가입합니다</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="196"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="199"/>
|
||||
<source>PRIME FEATURES:</source>
|
||||
<translation>PRIME 기능:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="201"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="204"/>
|
||||
<source>Remote access</source>
|
||||
<translation>원격 접속</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="201"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="204"/>
|
||||
<source>1 year of storage</source>
|
||||
<translation>1년간 저장</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="201"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="204"/>
|
||||
<source>Developer perks</source>
|
||||
<translation>개발자 혜택</translation>
|
||||
</message>
|
||||
@@ -600,22 +593,22 @@ location set</source>
|
||||
<context>
|
||||
<name>PrimeUserWidget</name>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="123"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="126"/>
|
||||
<source>✓ SUBSCRIBED</source>
|
||||
<translation>✓ 구독함</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="129"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="132"/>
|
||||
<source>comma prime</source>
|
||||
<translation>comma prime</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="135"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="138"/>
|
||||
<source>CONNECT.COMMA.AI</source>
|
||||
<translation>CONNECT.COMMA.AI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="148"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="151"/>
|
||||
<source>COMMA POINTS</source>
|
||||
<translation>COMMA POINTS</translation>
|
||||
</message>
|
||||
@@ -857,17 +850,17 @@ location set</source>
|
||||
<context>
|
||||
<name>SetupWidget</name>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="230"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="233"/>
|
||||
<source>Finish Setup</source>
|
||||
<translation>설정 완료</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="236"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="239"/>
|
||||
<source>Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer.</source>
|
||||
<translation>장치를 (connect.comma.ai)에서 페어링하고 comma prime 오퍼를 청구합니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="243"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="246"/>
|
||||
<source>Pair device</source>
|
||||
<translation>장치 페어링</translation>
|
||||
</message>
|
||||
@@ -1023,13 +1016,13 @@ location set</source>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/settings.cc" line="252"/>
|
||||
<source>Uninstall </source>
|
||||
<translation>제거 </translation>
|
||||
<source>UNINSTALL</source>
|
||||
<translation>제거</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/settings.cc" line="252"/>
|
||||
<source>UNINSTALL</source>
|
||||
<translation>제거</translation>
|
||||
<source>Uninstall %1</source>
|
||||
<translation>제거 %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/settings.cc" line="254"/>
|
||||
@@ -1274,8 +1267,8 @@ location set</source>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/networking.cc" line="299"/>
|
||||
<source>Forget Wi-Fi Network "</source>
|
||||
<translation>wifi 네트워크 저장안함 "</translation>
|
||||
<source>Forget Wi-Fi Network "%1"?</source>
|
||||
<translation>wifi 네트워크 저장안함 "%1"?</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6e042d706f1886874e0189b0542d4455050b59b6958e79ae03b563e35106e2be
|
||||
size 18469
|
||||
oid sha256:ddfc47a6fec5375c88f63275d02846cb7f4bf5431346cad895038a8705724ba3
|
||||
size 17931
|
||||
|
||||
@@ -308,13 +308,8 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/input.cc" line="168"/>
|
||||
<source>Need at least </source>
|
||||
<translation>至少需要 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/input.cc" line="168"/>
|
||||
<source> characters!</source>
|
||||
<translation> 个字符!</translation>
|
||||
<source>Need at least %1 characters!</source>
|
||||
<translation>至少需要 %1 个字符!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -479,8 +474,8 @@ location set</source>
|
||||
<message>
|
||||
<location filename="../qt/offroad/networking.cc" line="87"/>
|
||||
<location filename="../qt/offroad/networking.cc" line="97"/>
|
||||
<source>for "</source>
|
||||
<translation>网络名称:"</translation>
|
||||
<source>for "%1"</source>
|
||||
<translation>网络名称:"%1"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/networking.cc" line="97"/>
|
||||
@@ -545,52 +540,50 @@ location set</source>
|
||||
<translation>将您的设备与comma账号配对</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="91"/>
|
||||
<source>
|
||||
<ol type='1' style='margin-left: 15px;'>
|
||||
<li style='margin-bottom: 50px;'>Go to https://connect.comma.ai on your phone</li>
|
||||
<li style='margin-bottom: 50px;'>Click "add new device" and scan the QR code on the right</li>
|
||||
<li style='margin-bottom: 50px;'>Bookmark connect.comma.ai to your home screen to use it like an app</li>
|
||||
</ol>
|
||||
</source>
|
||||
<translation>
|
||||
<ol type='1' style='margin-left: 15px;'>
|
||||
<li style='margin-bottom: 50px;'>在手机上访问 https://connect.comma.ai</li>
|
||||
<li style='margin-bottom: 50px;'>点击“添加新设备”,扫描右侧二维码</li>
|
||||
<li style='margin-bottom: 50px;'>将 connect.comma.ai 收藏到您的主屏幕,以便像应用程序一样使用它</li>
|
||||
</ol>
|
||||
</translation>
|
||||
<location filename="../qt/widgets/prime.cc" line="97"/>
|
||||
<source>Go to https://connect.comma.ai on your phone</source>
|
||||
<translation>在手机上访问 https://connect.comma.ai</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="98"/>
|
||||
<source>Click "add new device" and scan the QR code on the right</source>
|
||||
<translation>点击“添加新设备”,扫描右侧二维码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="99"/>
|
||||
<source>Bookmark connect.comma.ai to your home screen to use it like an app</source>
|
||||
<translation>将 connect.comma.ai 收藏到您的主屏幕,以便像应用程序一样使用它</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrimeAdWidget</name>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="184"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="187"/>
|
||||
<source>Upgrade Now</source>
|
||||
<translation>现在升级</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="189"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="192"/>
|
||||
<source>Become a comma prime member at connect.comma.ai</source>
|
||||
<translation>打开connect.comma.ai以注册comma prime会员</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="196"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="199"/>
|
||||
<source>PRIME FEATURES:</source>
|
||||
<translation>comma prime特权:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="201"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="204"/>
|
||||
<source>Remote access</source>
|
||||
<translation>远程访问</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="201"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="204"/>
|
||||
<source>1 year of storage</source>
|
||||
<translation>1年数据存储</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="201"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="204"/>
|
||||
<source>Developer perks</source>
|
||||
<translation>开发者福利</translation>
|
||||
</message>
|
||||
@@ -598,22 +591,22 @@ location set</source>
|
||||
<context>
|
||||
<name>PrimeUserWidget</name>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="123"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="126"/>
|
||||
<source>✓ SUBSCRIBED</source>
|
||||
<translation>✓ 已订阅</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="129"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="132"/>
|
||||
<source>comma prime</source>
|
||||
<translation>comma prime</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="135"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="138"/>
|
||||
<source>CONNECT.COMMA.AI</source>
|
||||
<translation>CONNECT.COMMA.AI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="148"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="151"/>
|
||||
<source>COMMA POINTS</source>
|
||||
<translation>COMMA POINTS点数</translation>
|
||||
</message>
|
||||
@@ -855,17 +848,17 @@ location set</source>
|
||||
<context>
|
||||
<name>SetupWidget</name>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="230"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="233"/>
|
||||
<source>Finish Setup</source>
|
||||
<translation>完成设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="236"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="239"/>
|
||||
<source>Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer.</source>
|
||||
<translation>将您的设备与comma connect (connect.comma.ai)配对并领取您的comma prime优惠。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="243"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="246"/>
|
||||
<source>Pair device</source>
|
||||
<translation>配对设备</translation>
|
||||
</message>
|
||||
@@ -1021,13 +1014,13 @@ location set</source>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/settings.cc" line="252"/>
|
||||
<source>Uninstall </source>
|
||||
<translation>卸载 </translation>
|
||||
<source>UNINSTALL</source>
|
||||
<translation>卸载</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/settings.cc" line="252"/>
|
||||
<source>UNINSTALL</source>
|
||||
<translation>卸载</translation>
|
||||
<source>Uninstall %1</source>
|
||||
<translation>卸载 %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/settings.cc" line="254"/>
|
||||
@@ -1272,8 +1265,8 @@ location set</source>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/networking.cc" line="299"/>
|
||||
<source>Forget Wi-Fi Network "</source>
|
||||
<translation>忘记WiFi网络"</translation>
|
||||
<source>Forget Wi-Fi Network "%1"?</source>
|
||||
<translation>忘记WiFi网络 "%1"?</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:953e9b3373d9120e66da108eec0cb9689f7b2646229d4ea7c05e7b31392acbb2
|
||||
size 18509
|
||||
oid sha256:846dcae2af3d8071cdcfd1a20a65e06b7e7105cb128bae8b8244f2a29fe59dc4
|
||||
size 17969
|
||||
|
||||
@@ -308,13 +308,8 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/input.cc" line="168"/>
|
||||
<source>Need at least </source>
|
||||
<translation>需要至少 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/input.cc" line="168"/>
|
||||
<source> characters!</source>
|
||||
<translation> 個字元!</translation>
|
||||
<source>Need at least %1 characters!</source>
|
||||
<translation>需要至少 %1 個字元!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -481,8 +476,8 @@ location set</source>
|
||||
<message>
|
||||
<location filename="../qt/offroad/networking.cc" line="87"/>
|
||||
<location filename="../qt/offroad/networking.cc" line="97"/>
|
||||
<source>for "</source>
|
||||
<translation>給 "</translation>
|
||||
<source>for "%1"</source>
|
||||
<translation>給 "%1"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/networking.cc" line="97"/>
|
||||
@@ -547,52 +542,50 @@ location set</source>
|
||||
<translation>將設備與您的 comma 帳號配對</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="91"/>
|
||||
<source>
|
||||
<ol type='1' style='margin-left: 15px;'>
|
||||
<li style='margin-bottom: 50px;'>Go to https://connect.comma.ai on your phone</li>
|
||||
<li style='margin-bottom: 50px;'>Click "add new device" and scan the QR code on the right</li>
|
||||
<li style='margin-bottom: 50px;'>Bookmark connect.comma.ai to your home screen to use it like an app</li>
|
||||
</ol>
|
||||
</source>
|
||||
<translation>
|
||||
<ol type='1' style='margin-left: 15px;'>
|
||||
<li style='margin-bottom: 50px;'>用手機連至 https://connect.comma.ai</li>
|
||||
<li style='margin-bottom: 50px;'>點選 "add new device" 後掃描右邊的二維碼</li>
|
||||
<li style='margin-bottom: 50px;'>將 connect.comma.ai 加入您的主屏幕,以便像手機 App 一樣使用它</li>
|
||||
</ol>
|
||||
</translation>
|
||||
<location filename="../qt/widgets/prime.cc" line="97"/>
|
||||
<source>Go to https://connect.comma.ai on your phone</source>
|
||||
<translation>用手機連至 https://connect.comma.ai</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="98"/>
|
||||
<source>Click "add new device" and scan the QR code on the right</source>
|
||||
<translation>點選 "add new device" 後掃描右邊的二維碼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="99"/>
|
||||
<source>Bookmark connect.comma.ai to your home screen to use it like an app</source>
|
||||
<translation>將 connect.comma.ai 加入您的主屏幕,以便像手機 App 一樣使用它</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrimeAdWidget</name>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="184"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="187"/>
|
||||
<source>Upgrade Now</source>
|
||||
<translation>馬上升級</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="189"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="192"/>
|
||||
<source>Become a comma prime member at connect.comma.ai</source>
|
||||
<translation>成為 connect.comma.ai 的高級會員</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="196"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="199"/>
|
||||
<source>PRIME FEATURES:</source>
|
||||
<translation>高級會員特點:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="201"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="204"/>
|
||||
<source>Remote access</source>
|
||||
<translation>遠程訪問</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="201"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="204"/>
|
||||
<source>1 year of storage</source>
|
||||
<translation>一年的雲端行車記錄</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="201"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="204"/>
|
||||
<source>Developer perks</source>
|
||||
<translation>開發者福利</translation>
|
||||
</message>
|
||||
@@ -600,22 +593,22 @@ location set</source>
|
||||
<context>
|
||||
<name>PrimeUserWidget</name>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="123"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="126"/>
|
||||
<source>✓ SUBSCRIBED</source>
|
||||
<translation>✓ 已訂閱</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="129"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="132"/>
|
||||
<source>comma prime</source>
|
||||
<translation>comma 高級會員</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="135"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="138"/>
|
||||
<source>CONNECT.COMMA.AI</source>
|
||||
<translation>CONNECT.COMMA.AI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="148"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="151"/>
|
||||
<source>COMMA POINTS</source>
|
||||
<translation>COMMA 積分</translation>
|
||||
</message>
|
||||
@@ -860,17 +853,17 @@ location set</source>
|
||||
<context>
|
||||
<name>SetupWidget</name>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="230"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="233"/>
|
||||
<source>Finish Setup</source>
|
||||
<translation>完成設置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="236"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="239"/>
|
||||
<source>Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer.</source>
|
||||
<translation>將您的設備與 comma connect (connect.comma.ai) 配對並領取您的 comma 高級會員優惠。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/widgets/prime.cc" line="243"/>
|
||||
<location filename="../qt/widgets/prime.cc" line="246"/>
|
||||
<source>Pair device</source>
|
||||
<translation>配對設備</translation>
|
||||
</message>
|
||||
@@ -1026,13 +1019,13 @@ location set</source>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/settings.cc" line="252"/>
|
||||
<source>Uninstall </source>
|
||||
<translation>卸載 </translation>
|
||||
<source>UNINSTALL</source>
|
||||
<translation>卸載</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/settings.cc" line="252"/>
|
||||
<source>UNINSTALL</source>
|
||||
<translation>卸載</translation>
|
||||
<source>Uninstall %1</source>
|
||||
<translation>卸載 %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/settings.cc" line="254"/>
|
||||
@@ -1277,8 +1270,8 @@ location set</source>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qt/offroad/networking.cc" line="299"/>
|
||||
<source>Forget Wi-Fi Network "</source>
|
||||
<translation>清除 Wi-Fi 網路 "</translation>
|
||||
<source>Forget Wi-Fi Network "%1"?</source>
|
||||
<translation>清除 Wi-Fi 網路 "%1"?</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@@ -10,7 +10,7 @@ TRANSLATIONS_DIR = os.path.join(UI_DIR, "translations")
|
||||
LANGUAGES_FILE = os.path.join(TRANSLATIONS_DIR, "languages.json")
|
||||
|
||||
|
||||
def update_translations(release=False, translations_dir=TRANSLATIONS_DIR):
|
||||
def update_translations(release=False, vanish=False, translations_dir=TRANSLATIONS_DIR):
|
||||
with open(LANGUAGES_FILE, "r") as f:
|
||||
translation_files = json.load(f)
|
||||
|
||||
@@ -20,7 +20,10 @@ def update_translations(release=False, translations_dir=TRANSLATIONS_DIR):
|
||||
continue
|
||||
|
||||
tr_file = os.path.join(translations_dir, f"{file}.ts")
|
||||
ret = os.system(f"lupdate -recursive {UI_DIR} -ts {tr_file}")
|
||||
args = f"lupdate -recursive {UI_DIR} -ts {tr_file}"
|
||||
if vanish:
|
||||
args += " -no-obsolete"
|
||||
ret = os.system(args)
|
||||
assert ret == 0
|
||||
|
||||
if release:
|
||||
@@ -32,6 +35,7 @@ if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Update translation files for UI",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
parser.add_argument("--release", action="store_true", help="Create compiled QM translation files used by UI")
|
||||
parser.add_argument("--vanish", action="store_true", help="Remove translations with source text no longer found")
|
||||
args = parser.parse_args()
|
||||
|
||||
update_translations(args.release)
|
||||
update_translations(args.release, args.vanish)
|
||||
|
||||
Reference in New Issue
Block a user