Skip to content

Commit

Permalink
added missing charging translations, update tray icon on theme change
Browse files Browse the repository at this point in the history
  • Loading branch information
Odizinne committed Sep 17, 2024
1 parent 9b05907 commit 38eea31
Show file tree
Hide file tree
Showing 7 changed files with 225 additions and 147 deletions.
6 changes: 3 additions & 3 deletions src/HeadsetControlQt/headsetcontrolqt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ void HeadsetControlQt::updateUIWithHeadsetInfo(const QJsonObject &headsetInfo)

} else if (batteryStatus == "BATTERY_CHARGING") {
ui->batteryBar->setValue(0);
ui->batteryBar->setFormat("Charging");
trayIcon->setToolTip(QString("%1: Charging").arg(deviceName));
ui->batteryBar->setFormat(tr("Charging"));
trayIcon->setToolTip(QString(tr("%1: Charging")).arg(deviceName));

QString iconPath = getBatteryIconPath(batteryLevel, true, false, ui->themeComboBox->currentIndex());
trayIcon->setIcon(getBatteryIcon(iconPath));
Expand Down Expand Up @@ -436,7 +436,7 @@ void HeadsetControlQt::onSidetoneSliderSliderReleased()

void HeadsetControlQt::onThemeComboBoxCurrentIndexChanged()
{
//updateHeadsetInfo();
updateHeadsetInfo();
saveSettings();
}

Expand Down
61 changes: 37 additions & 24 deletions src/Resources/tr/HeadsetControl-Qt_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>HeadsetControlQt</name>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="26"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="533"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="490"/>
<source>HeadsetControl-Qt</source>
<translation>HeadsetControl-Qt</translation>
</message>
Expand All @@ -15,7 +15,7 @@
<translation>Kein unterstütztes Headset gefunden.</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="130"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="133"/>
<source>Run at startup</source>
<translation>Beim Start ausführen</translation>
</message>
Expand All @@ -25,7 +25,7 @@
<translation>Schwellenwert für niedrigen Batteriestand</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="143"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="146"/>
<source>Icon theme</source>
<translation>Symbolthema</translation>
</message>
Expand All @@ -34,104 +34,117 @@
<translation type="vanished">Gerät</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="185"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="188"/>
<source>Language</source>
<translation>Sprache</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="234"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="237"/>
<source>Settings</source>
<translation>Einstellungen</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="277"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="280"/>
<source>Battery</source>
<translation>Batterie</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="306"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="309"/>
<source>Sidetone</source>
<translation>Seitenklang</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="321"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="324"/>
<source>Lights</source>
<translation>Beleuchtung</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="356"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="359"/>
<source>Disable lights on low battery</source>
<translation>Beleuchtung bei niedrigem Batteriestand deaktivieren</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="385"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="388"/>
<source>Send notification on low battery</source>
<translation>Benachrichtigung bei niedrigem Batteriestand senden</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="414"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="417"/>
<source>Beep on low battery</source>
<translation>Piepston bei niedrigem Batteriestand</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="114"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="120"/>
<source>System</source>
<translation>System</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="115"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="121"/>
<source>Dark</source>
<translation>Dunkel</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="116"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="122"/>
<source>Light</source>
<translation>Hell</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="145"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="509"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="525"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="461"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="479"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="536"/>
<source>Show</source>
<translation>Anzeigen</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="148"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="146"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="538"/>
<source>Exit</source>
<translation>Beenden</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="293"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="298"/>
<source>Low battery</source>
<translation>Niedriger Batteriestand</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="293"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="298"/>
<source>%1 has %2% battery left.</source>
<translation>%1 hat noch %2% Batterieladung übrig.</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="389"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="360"/>
<source>Charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="361"/>
<source>%1: Charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="368"/>
<source>Off</source>
<translation>Aus</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="390"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="369"/>
<source>No headset connected</source>
<translation>Kein Headset verbunden</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="423"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="388"/>
<source>No Device Found</source>
<translation>Kein Gerät gefunden</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="512"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="464"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="534"/>
<source>Hide</source>
<translation>Verbergen</translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="533"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="490"/>
<source>The application is still running in the background.</source>
<translation>Die Anwendung läuft weiterhin im Hintergrund.</translation>
</message>
Expand Down
61 changes: 37 additions & 24 deletions src/Resources/tr/HeadsetControl-Qt_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,57 @@
<name>HeadsetControlQt</name>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="26"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="533"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="490"/>
<source>HeadsetControl-Qt</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="185"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="188"/>
<source>Language</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="277"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="280"/>
<source>Battery</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="306"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="309"/>
<source>Sidetone</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="321"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="324"/>
<source>Lights</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="356"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="359"/>
<source>Disable lights on low battery</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="385"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="388"/>
<source>Send notification on low battery</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="414"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="417"/>
<source>Beep on low battery</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="234"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="237"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="143"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="146"/>
<source>Icon theme</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="130"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.ui" line="133"/>
<source>Run at startup</source>
<translation></translation>
</message>
Expand All @@ -70,64 +70,77 @@
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="114"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="120"/>
<source>System</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="115"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="121"/>
<source>Dark</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="116"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="122"/>
<source>Light</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="145"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="509"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="525"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="461"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="479"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="536"/>
<source>Show</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="148"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="146"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="538"/>
<source>Exit</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="293"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="298"/>
<source>Low battery</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="293"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="298"/>
<source>%1 has %2% battery left.</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="389"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="360"/>
<source>Charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="361"/>
<source>%1: Charging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="368"/>
<source>Off</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="390"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="369"/>
<source>No headset connected</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="423"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="388"/>
<source>No Device Found</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="512"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="464"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="534"/>
<source>Hide</source>
<translation></translation>
</message>
<message>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="533"/>
<location filename="../../HeadsetControlQt/headsetcontrolqt.cpp" line="490"/>
<source>The application is still running in the background.</source>
<translation></translation>
</message>
Expand Down
Loading

0 comments on commit 38eea31

Please sign in to comment.