Implement translations
authorSoeren Apel <soeren@apelpie.net>
Sun, 10 Nov 2019 19:45:58 +0000 (20:45 +0100)
committerSoeren Apel <soeren@apelpie.net>
Mon, 13 Jan 2020 21:51:02 +0000 (22:51 +0100)
CMakeLists.txt
l10n/de.ts [new file with mode: 0644]
main.cpp
pv/application.cpp
pv/application.hpp
pv/globalsettings.cpp
pv/globalsettings.hpp
pv/mainwindow.cpp
pv/subwindows/decoder_selector/subwindow.cpp
translations.qrc [new file with mode: 0644]

index 3770f1e4d6eafc994930ab358fd58ce7ee46660c..885d91895413b6e6ceb13c3df442911f138ed0c5 100644 (file)
@@ -101,7 +101,7 @@ pkg_check_modules(PKGDEPS REQUIRED ${PKGDEPS})
 
 set(CMAKE_AUTOMOC TRUE)
 
-find_package(Qt5 5.3 COMPONENTS Core Gui Widgets Svg REQUIRED)
+find_package(Qt5 5.3 COMPONENTS Core Gui LinguistTools Widgets Svg REQUIRED)
 
 message(STATUS "Qt version: ${Qt5_VERSION}")
 
@@ -422,6 +422,18 @@ endif()
 
 qt5_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES})
 
+#===============================================================================
+#= Translations
+#-------------------------------------------------------------------------------
+
+file(GLOB TS_FILES l10n/*.ts)
+set_property(SOURCE ${TS_FILES} PROPERTY OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/l10n)
+
+qt5_add_translation(QM_FILES ${TS_FILES})
+qt5_create_translation(QM_FILES ${pulseview_SOURCES} ${TS_FILES})
+
+qt5_add_resources(pulseview_RESOURCES_RCC translations.qrc)
+
 #===============================================================================
 #= Global Definitions
 #-------------------------------------------------------------------------------
@@ -513,9 +525,9 @@ if(ANDROID)
 endif()
 
 if(ANDROID)
-       add_library(${PROJECT_NAME} SHARED ${pulseview_SOURCES} ${pulseview_RESOURCES_RCC})
+       add_library(${PROJECT_NAME} SHARED ${pulseview_SOURCES} ${pulseview_RESOURCES_RCC} ${QM_FILES})
 else()
-       add_executable(${PROJECT_NAME} ${pulseview_SOURCES} ${pulseview_RESOURCES_RCC})
+       add_executable(${PROJECT_NAME} ${pulseview_SOURCES} ${pulseview_RESOURCES_RCC} ${QM_FILES})
 endif()
 
 target_link_libraries(${PROJECT_NAME} ${PULSEVIEW_LINK_LIBS})
diff --git a/l10n/de.ts b/l10n/de.ts
new file mode 100644 (file)
index 0000000..02585b3
--- /dev/null
@@ -0,0 +1,1403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="de_DE">
+<context>
+    <name>QApplication</name>
+    <message>
+        <source>Select a decoder to see its description here.</source>
+        <translation type="vanished">Wähle einen Dekoder, um dessen Beschreibung hier lesen zu können.</translation>
+    </message>
+    <message>
+        <source>Session %1</source>
+        <translation type="obsolete">Analysesitzung %1</translation>
+    </message>
+    <message>
+        <location filename="../pv/devices/device.cpp" line="70"/>
+        <source>Querying config key %1 is not allowed</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/devices/device.cpp" line="79"/>
+        <source>Querying config key %1 resulted in %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/devices/device.cpp" line="93"/>
+        <source>Unknown type supplied when attempting to query %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/devicemanager.cpp" line="274"/>
+        <source>Error when scanning device driver &apos;%1&apos;: %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <location filename="../pv/devicemanager.cpp" line="65"/>
+        <source>Cancel</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/devicemanager.cpp" line="96"/>
+        <source>Scanning for %1...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../main.cpp" line="113"/>
+        <source>Stack trace of previous crash:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../main.cpp" line="127"/>
+        <source>Don&apos;t show this message again</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../main.cpp" line="130"/>
+        <source>When %1 last crashed, it created a stack trace.
+A human-readable form has been saved to disk and was written to the log. You may access it from the settings dialog.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>SubWindow</name>
+    <message>
+        <source>&lt;p align=&apos;right&apos;&gt;Tags: %1&lt;/p&gt;</source>
+        <translation type="vanished">&lt;p align=&apos;right&apos;&gt;Stichworte: %1&lt;/p&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>pv::MainWindow</name>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="72"/>
+        <source>PulseView</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="276"/>
+        <source>Decoder Selector</source>
+        <translation>Protokolldekoder</translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="326"/>
+        <source>Session %1</source>
+        <translation>Analysesitzung %1</translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="535"/>
+        <source>Create New Session</source>
+        <translation>Neue Analysesitzung</translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="541"/>
+        <source>Start/Stop Acquisition</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="549"/>
+        <source>Settings</source>
+        <translation>Einstellungen</translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="652"/>
+        <location filename="../pv/mainwindow.cpp" line="836"/>
+        <location filename="../pv/mainwindow.cpp" line="862"/>
+        <source>Confirmation</source>
+        <translation>Bestätigung</translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="653"/>
+        <source>There is unsaved data. Close anyway?</source>
+        <translation>Es gibt noch ungespeicherte Daten. Trotzdem beenden?</translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="797"/>
+        <source>Run</source>
+        <translation>Starten</translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="797"/>
+        <source>Stop</source>
+        <translation>Anhalten</translation>
+    </message>
+    <message>
+        <location filename="../pv/mainwindow.cpp" line="837"/>
+        <location filename="../pv/mainwindow.cpp" line="863"/>
+        <source>This session contains unsaved data. Close it anyway?</source>
+        <translation>Die Daten dieser Analysesitzung wurden nicht gespeichert. Trotzdem schließen?</translation>
+    </message>
+</context>
+<context>
+    <name>pv::Session</name>
+    <message>
+        <location filename="../pv/session.cpp" line="404"/>
+        <source>Failed to select device</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/session.cpp" line="453"/>
+        <source>Failed to open device</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/session.cpp" line="544"/>
+        <source>Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/session.cpp" line="545"/>
+        <source>Unexpected input format: %s</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/session.cpp" line="580"/>
+        <source>Failed to load </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/session.cpp" line="615"/>
+        <source>No active device set, can&apos;t start acquisition.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/session.cpp" line="628"/>
+        <source>No channels enabled.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/session.cpp" line="1080"/>
+        <source>Out of memory, acquisition stopped.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/session.cpp" line="1286"/>
+        <source>Can&apos;t handle more than 64 logic channels.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::StoreSession</name>
+    <message>
+        <location filename="../pv/storesession.cpp" line="115"/>
+        <source>Can&apos;t save logic channel without data.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/storesession.cpp" line="131"/>
+        <source>Can&apos;t save analog channel without data.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/storesession.cpp" line="143"/>
+        <source>No channels enabled.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/storesession.cpp" line="168"/>
+        <source>Can&apos;t save range without sample data.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/storesession.cpp" line="189"/>
+        <location filename="../pv/storesession.cpp" line="297"/>
+        <source>Error while saving: </source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::data::DecodeSignal</name>
+    <message>
+        <location filename="../pv/data/decodesignal.cpp" line="194"/>
+        <source>No decoders</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/decodesignal.cpp" line="201"/>
+        <source>There are no channels assigned to this decoder</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/decodesignal.cpp" line="215"/>
+        <source>One or more required channels have not been specified</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/decodesignal.cpp" line="255"/>
+        <source>No input data</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/decodesignal.cpp" line="1001"/>
+        <source>Decoder reported an error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/decodesignal.cpp" line="1137"/>
+        <source>Failed to create decoder instance</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::data::SignalBase</name>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="409"/>
+        <source>Signal average</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="410"/>
+        <source>0.9V (for 1.8V CMOS)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="411"/>
+        <source>1.8V (for 3.3V CMOS)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="412"/>
+        <source>2.5V (for 5.0V CMOS)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="413"/>
+        <source>1.5V (for TTL)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="418"/>
+        <source>Signal average +/- 15%</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="419"/>
+        <source>0.3V/1.2V (for 1.8V CMOS)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="420"/>
+        <source>0.7V/2.5V (for 3.3V CMOS)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="421"/>
+        <source>1.3V/3.7V (for 5.0V CMOS)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/data/signalbase.cpp" line="422"/>
+        <source>0.8V/2.0V (for TTL)</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::dialogs::Connect</name>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="58"/>
+        <source>&amp;Scan for devices using driver above</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="63"/>
+        <source>Connect to Device</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="75"/>
+        <source>Step 1: Choose the driver</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="79"/>
+        <source>&amp;USB</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="80"/>
+        <source>Serial &amp;Port</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="81"/>
+        <source>&amp;TCP/IP</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="116"/>
+        <source>Protocol:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="134"/>
+        <source>Step 2: Choose the interface</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="140"/>
+        <source>Step 3: Scan for devices</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/connect.cpp" line="146"/>
+        <source>Step 4: Select the device</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::dialogs::Settings</name>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="134"/>
+        <location filename="../pv/dialogs/settings.cpp" line="213"/>
+        <source>General</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="143"/>
+        <source>Views</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="153"/>
+        <location filename="../pv/dialogs/settings.cpp" line="375"/>
+        <source>Decoders</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="163"/>
+        <source>About</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="172"/>
+        <source>Logging</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="227"/>
+        <source>User interface theme</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="229"/>
+        <source>(You may need to restart PulseView for all UI elements to update)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="234"/>
+        <source>System Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="247"/>
+        <source>Qt widget style</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="249"/>
+        <source>(Dark themes look best with the Fusion style)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="255"/>
+        <source>Save session &amp;setup along with .sr file</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="269"/>
+        <source>Trace View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="277"/>
+        <source>Use colored trace &amp;background</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="281"/>
+        <source>Constantly perform &amp;zoom-to-fit during acquisition</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="285"/>
+        <source>Perform a zoom-to-&amp;fit when acquisition stops</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="289"/>
+        <source>Show time zero at the trigger</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="293"/>
+        <source>Always keep &amp;newest samples at the right edge during capture</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="297"/>
+        <source>Show data &amp;sampling points</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="301"/>
+        <source>Fill high areas of logic signals</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="308"/>
+        <source>Color to fill high areas of logic signals with</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="312"/>
+        <source>Show analog minor grid in addition to div grid</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="316"/>
+        <source>Highlight mouse cursor using a vertical marker line</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="320"/>
+        <location filename="../pv/dialogs/settings.cpp" line="346"/>
+        <location filename="../pv/dialogs/settings.cpp" line="355"/>
+        <source> pixels</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="325"/>
+        <source>Maximum distance from edges before cursors snap to them</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="332"/>
+        <source>Color to fill cursor area with</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="335"/>
+        <source>None</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="336"/>
+        <source>Background</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="337"/>
+        <source>Dots</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="342"/>
+        <source>Conversion threshold display mode (analog traces only)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="351"/>
+        <source>Default analog trace div height</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="360"/>
+        <source>Default logic trace height</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="383"/>
+        <source>Allow configuration of &amp;initial signal state</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="387"/>
+        <source>Always show all &amp;rows, even if no annotation is visible</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="395"/>
+        <source>Annotation export format</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="396"/>
+        <source>%s = sample range; %d: decoder name; %c: row name; %q: use quotations marks</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="399"/>
+        <source>%1: longest annotation text; %a: all annotation texts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="419"/>
+        <source>%1&lt;br /&gt;&lt;a href=&quot;http://%2&quot;&gt;%2&lt;/a&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="420"/>
+        <source>GNU GPL, version 3 or later</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="431"/>
+        <source>Versions, libraries and features:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="438"/>
+        <source>Firmware search paths:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="445"/>
+        <source>Protocol decoder search paths:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="452"/>
+        <source>Supported hardware drivers:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="459"/>
+        <source>Supported input formats:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="466"/>
+        <source>Supported output formats:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="474"/>
+        <source>Supported protocol decoders:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="515"/>
+        <source>Log level:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="520"/>
+        <source> lines</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="529"/>
+        <source>Length of background buffer:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="535"/>
+        <source>&amp;Save to File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="542"/>
+        <source>&amp;Pop out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="597"/>
+        <source>You selected a dark theme.
+Should I set the user-adjustable colors to better suit your choice?
+
+Please keep in mind that PulseView may need a restart to display correctly.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="603"/>
+        <source>You selected a bright theme.
+Should I set the user-adjustable colors to better suit your choice?
+
+Please keep in mind that PulseView may need a restart to display correctly.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="756"/>
+        <source>Save Log</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="756"/>
+        <source>Log Files (*.txt *.log);;All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="768"/>
+        <source>Success</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="768"/>
+        <source>Log saved to %1.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="778"/>
+        <source>Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="778"/>
+        <source>File %1 could not be written to.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/settings.cpp" line="792"/>
+        <source>%1 Log</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::dialogs::StoreProgress</name>
+    <message>
+        <location filename="../pv/dialogs/storeprogress.cpp" line="44"/>
+        <source>Saving...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/storeprogress.cpp" line="44"/>
+        <source>Cancel</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/dialogs/storeprogress.cpp" line="85"/>
+        <source>Failed to save session.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::popups::Channels</name>
+    <message>
+        <location filename="../pv/popups/channels.cpp" line="61"/>
+        <location filename="../pv/popups/channels.cpp" line="62"/>
+        <source>All</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/popups/channels.cpp" line="63"/>
+        <location filename="../pv/popups/channels.cpp" line="64"/>
+        <source>Logic</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/popups/channels.cpp" line="65"/>
+        <location filename="../pv/popups/channels.cpp" line="66"/>
+        <source>Analog</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/popups/channels.cpp" line="67"/>
+        <source>Named</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/popups/channels.cpp" line="68"/>
+        <source>Unnamed</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/popups/channels.cpp" line="69"/>
+        <source>Changing</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/popups/channels.cpp" line="70"/>
+        <source>Non-changing</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/popups/channels.cpp" line="140"/>
+        <source>Disable: </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/popups/channels.cpp" line="148"/>
+        <source>Enable: </source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::prop::Bool</name>
+    <message>
+        <location filename="../pv/prop/bool.cpp" line="51"/>
+        <location filename="../pv/prop/bool.cpp" line="82"/>
+        <source>Querying config key %1 resulted in %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::prop::Double</name>
+    <message>
+        <location filename="../pv/prop/double.cpp" line="65"/>
+        <location filename="../pv/prop/double.cpp" line="96"/>
+        <source>Querying config key %1 resulted in %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::prop::Enum</name>
+    <message>
+        <location filename="../pv/prop/enum.cpp" line="113"/>
+        <location filename="../pv/prop/enum.cpp" line="176"/>
+        <source>Querying config key %1 resulted in %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::prop::Int</name>
+    <message>
+        <location filename="../pv/prop/int.cpp" line="65"/>
+        <location filename="../pv/prop/int.cpp" line="128"/>
+        <source>Querying config key %1 resulted in %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::prop::String</name>
+    <message>
+        <location filename="../pv/prop/string.cpp" line="59"/>
+        <location filename="../pv/prop/string.cpp" line="84"/>
+        <source>Querying config key %1 resulted in %2</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::subwindows::decoder_selector::DecoderCollectionModel</name>
+    <message>
+        <location filename="../pv/subwindows/decoder_selector/model.cpp" line="36"/>
+        <source>Decoder</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/subwindows/decoder_selector/model.cpp" line="37"/>
+        <source>Name</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/subwindows/decoder_selector/model.cpp" line="38"/>
+        <source>ID</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/subwindows/decoder_selector/model.cpp" line="45"/>
+        <source>All Decoders</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::subwindows::decoder_selector::SubWindow</name>
+    <message>
+        <location filename="../pv/subwindows/decoder_selector/subwindow.cpp" line="45"/>
+        <source>Select a decoder to see its description here.</source>
+        <translation>Wähle einen Dekoder, um dessen Beschreibung hier lesen zu können.</translation>
+    </message>
+    <message>
+        <location filename="../pv/subwindows/decoder_selector/subwindow.cpp" line="234"/>
+        <source>, %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/subwindows/decoder_selector/subwindow.cpp" line="241"/>
+        <source>&lt;p align=&apos;right&apos;&gt;Tags: %1&lt;/p&gt;</source>
+        <translation>&lt;p align=&apos;right&apos;&gt;Stichworte: %1&lt;/p&gt;</translation>
+    </message>
+    <message>
+        <location filename="../pv/subwindows/decoder_selector/subwindow.cpp" line="286"/>
+        <source>Protocol decoder &lt;b&gt;%1&lt;/b&gt; requires input type &lt;b&gt;%2&lt;/b&gt; which several decoders provide.&lt;br&gt;Choose which one to use:&lt;br&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/subwindows/decoder_selector/subwindow.cpp" line="294"/>
+        <source>Choose Decoder</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::toolbars::MainBar</name>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="119"/>
+        <source>New &amp;View</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="125"/>
+        <source>&amp;Open...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="132"/>
+        <source>Restore Session Setu&amp;p...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="136"/>
+        <source>&amp;Save As...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="143"/>
+        <source>Save Selected &amp;Range As...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="150"/>
+        <source>Save Session Setu&amp;p...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="156"/>
+        <source>&amp;Export</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="162"/>
+        <source>&amp;Import</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="166"/>
+        <source>&amp;Connect to Device...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="213"/>
+        <source>Add protocol decoder</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="228"/>
+        <source>Configure Device</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="232"/>
+        <source>Configure Channels</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="341"/>
+        <source>Failed to get sample rate list:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="404"/>
+        <source>Failed to get sample rate:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="445"/>
+        <source>Failed to get sample limit list:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="535"/>
+        <source>Failed to configure samplerate:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="562"/>
+        <source>Failed to configure sample count:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="600"/>
+        <source>Missing Cursors</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="600"/>
+        <source>You need to set the cursors before you can save the data enclosed by them to a session file (e.g. using the Show Cursors button).</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="618"/>
+        <source>Invalid Range</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="618"/>
+        <source>The cursors don&apos;t define a valid range of samples.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="630"/>
+        <source>%1 files </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="638"/>
+        <location filename="../pv/toolbars/mainbar.cpp" line="683"/>
+        <source>All Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="642"/>
+        <location filename="../pv/toolbars/mainbar.cpp" line="797"/>
+        <source>Save File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="654"/>
+        <source>Export %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="680"/>
+        <source>%1 files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="691"/>
+        <source>Import File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="700"/>
+        <source>Import %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="769"/>
+        <location filename="../pv/toolbars/mainbar.cpp" line="814"/>
+        <source>Open File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="769"/>
+        <source>sigrok Sessions (*.sr);;All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="797"/>
+        <location filename="../pv/toolbars/mainbar.cpp" line="814"/>
+        <source>PulseView Session Setups (*.pvs);;All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/toolbars/mainbar.cpp" line="875"/>
+        <source>Total sampling time: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::AnalogSignal</name>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="978"/>
+        <source>Number of pos vertical divs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="985"/>
+        <source>Number of neg vertical divs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="990"/>
+        <source> pixels</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="994"/>
+        <source>Div height</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1011"/>
+        <source>V/div</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1015"/>
+        <source>Vertical resolution</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1024"/>
+        <source>Autoranging</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1029"/>
+        <source>none</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1031"/>
+        <source>to logic via threshold</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1033"/>
+        <source>to logic via schmitt-trigger</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1039"/>
+        <source>Conversion</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1048"/>
+        <source>Conversion threshold(s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1058"/>
+        <source>analog</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1059"/>
+        <source>converted</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1060"/>
+        <source>analog+converted</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/analogsignal.cpp" line="1065"/>
+        <source>Show traces for</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::Cursor</name>
+    <message>
+        <location filename="../pv/views/trace/cursor.cpp" line="97"/>
+        <source>Disable snapping</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::DecodeTrace</name>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="323"/>
+        <source>&lt;p&gt;&lt;i&gt;No decoders in the stack&lt;/i&gt;&lt;/p&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="334"/>
+        <source>&lt;i&gt;* Required channels&lt;/i&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="338"/>
+        <source>Stack Decoder</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="339"/>
+        <source>Stack a higher-level decoder on top of this one</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="353"/>
+        <source>Delete</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="396"/>
+        <source>Resume decoding</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="403"/>
+        <source>Pause decoding</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="411"/>
+        <source>Copy annotation text to clipboard</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="420"/>
+        <source>Export all annotations</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="427"/>
+        <source>Export all annotations for this row</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="436"/>
+        <source>Export all annotations, starting here</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="443"/>
+        <source>Export annotations for this row, starting here</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="452"/>
+        <source>Export all annotations within cursor range</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="459"/>
+        <source>Export annotations for this row within cursor range</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="919"/>
+        <source>%1:
+%2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="963"/>
+        <source>&lt;b&gt;%1&lt;/b&gt; (%2) %3</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="1035"/>
+        <source>Export annotations</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="1035"/>
+        <source>Text Files (*.txt);;All Files (*)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="1076"/>
+        <source>Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/decodetrace.cpp" line="1076"/>
+        <source>File %1 could not be written to.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::Flag</name>
+    <message>
+        <location filename="../pv/views/trace/flag.cpp" line="126"/>
+        <source>Text</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/flag.cpp" line="135"/>
+        <source>Delete</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/flag.cpp" line="140"/>
+        <source>Disable snapping</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::Header</name>
+    <message>
+        <location filename="../pv/views/trace/header.cpp" line="137"/>
+        <source>Group</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::LogicSignal</name>
+    <message>
+        <location filename="../pv/views/trace/logicsignal.cpp" line="446"/>
+        <source>No trigger</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/logicsignal.cpp" line="451"/>
+        <source>Trigger on rising edge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/logicsignal.cpp" line="456"/>
+        <source>Trigger on high level</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/logicsignal.cpp" line="461"/>
+        <source>Trigger on falling edge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/logicsignal.cpp" line="466"/>
+        <source>Trigger on low level</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/logicsignal.cpp" line="471"/>
+        <source>Trigger on rising or falling edge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/logicsignal.cpp" line="558"/>
+        <source> pixels</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/logicsignal.cpp" line="562"/>
+        <source>Trace height</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/logicsignal.cpp" line="586"/>
+        <source>Trigger</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::Ruler</name>
+    <message>
+        <location filename="../pv/views/trace/ruler.cpp" line="153"/>
+        <source>Create marker here</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/ruler.cpp" line="157"/>
+        <source>Set as zero point</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/ruler.cpp" line="169"/>
+        <source>Disable mouse hover marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/ruler.cpp" line="169"/>
+        <source>Enable mouse hover marker</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::Signal</name>
+    <message>
+        <location filename="../pv/views/trace/signal.cpp" line="128"/>
+        <source>Name</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/signal.cpp" line="139"/>
+        <source>Disable</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::StandardBar</name>
+    <message>
+        <location filename="../pv/views/trace/standardbar.cpp" line="54"/>
+        <source>Zoom &amp;In</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/standardbar.cpp" line="62"/>
+        <source>Zoom &amp;Out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/standardbar.cpp" line="70"/>
+        <source>Zoom to &amp;Fit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/standardbar.cpp" line="82"/>
+        <source>Show &amp;Cursors</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/standardbar.cpp" line="85"/>
+        <source>Display last segment only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/standardbar.cpp" line="90"/>
+        <source>Display last complete segment only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/standardbar.cpp" line="95"/>
+        <source>Display a single segment</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::TimeMarker</name>
+    <message>
+        <location filename="../pv/views/trace/timemarker.cpp" line="186"/>
+        <source>Time</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::Trace</name>
+    <message>
+        <location filename="../pv/views/trace/trace.cpp" line="206"/>
+        <source>Create marker here</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/trace.cpp" line="315"/>
+        <source>Color</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/views/trace/trace.cpp" line="380"/>
+        <source>Name</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::views::trace::TraceGroup</name>
+    <message>
+        <location filename="../pv/views/trace/tracegroup.cpp" line="140"/>
+        <source>Ungroup</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::widgets::DecoderGroupBox</name>
+    <message>
+        <location filename="../pv/widgets/decodergroupbox.cpp" line="48"/>
+        <source>Show/hide this decoder trace</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../pv/widgets/decodergroupbox.cpp" line="58"/>
+        <source>Delete this decoder trace</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::widgets::DeviceToolButton</name>
+    <message>
+        <location filename="../pv/widgets/devicetoolbutton.cpp" line="75"/>
+        <location filename="../pv/widgets/devicetoolbutton.cpp" line="82"/>
+        <source>&lt;No Device&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::widgets::ExportMenu</name>
+    <message>
+        <location filename="../pv/widgets/exportmenu.cpp" line="71"/>
+        <source>Export %1...</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>pv::widgets::ImportMenu</name>
+    <message>
+        <location filename="../pv/widgets/importmenu.cpp" line="68"/>
+        <source>Import %1...</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
index 4bbddcc644bdf4c5bbb7ebf6398ed8e58da75b16..da5fffcdb3af28d4ada2044e32e88c4a2cd7cd3b 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -279,8 +279,10 @@ int main(int argc, char *argv[])
 
        // Prepare the global settings since logging needs them early on
        pv::GlobalSettings settings;
+       settings.add_change_handler(&a);  // Only the application object can't register itself
        settings.save_internal_defaults();
        settings.set_defaults_where_needed();
+       settings.apply_language();
        settings.apply_theme();
 
        pv::logging.init();
index 5a6e28a1da996034aa24218df7ef2d66eb425543..e933f96214d94c72620a088f7e766e8a675b574b 100644 (file)
@@ -17,9 +17,6 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "application.hpp"
-#include "config.h"
-
 #include <iostream>
 #include <typeinfo>
 
 #include <libsigrokdecode/libsigrokdecode.h>
 #endif
 
+#include "application.hpp"
+#include "config.h"
+#include "globalsettings.hpp"
+
 using std::cout;
 using std::endl;
 using std::exception;
@@ -60,6 +61,34 @@ Application::Application(int &argc, char* argv[]) :
        setOrganizationDomain("sigrok.org");
 }
 
+void Application::switch_language(const QString& language)
+{
+       removeTranslator(&app_translator_);
+       removeTranslator(&qt_translator_);
+
+       if ((language != "C") && (language != "en")) {
+               // Application translations
+               QString resource = ":/l10n/" + language +".qm";
+               if (app_translator_.load(resource))
+                       installTranslator(&app_translator_);
+               else
+                       qWarning() << "Translation resource" << resource << "not found";
+
+               // Qt translations
+               resource = ":/l10n/qtbase_" + language +".qm";
+               if (qt_translator_.load(resource))
+                       installTranslator(&qt_translator_);
+               else
+                       qWarning() << "Translation resource" << resource << "not found";
+       }
+}
+
+void Application::on_setting_changed(const QString &key, const QVariant &value)
+{
+       if (key == pv::GlobalSettings::Key_General_Language)
+               switch_language(value.toString());
+}
+
 void Application::collect_version_info(shared_ptr<sigrok::Context> context)
 {
        // Library versions and features
index c618f80d9c1abeee91a1ee61e54d46d8d3c7b9b3..a653ab45c7d9e2c5a82050295480f6f0fe9d9f02 100644 (file)
 #include <vector>
 
 #include <QApplication>
+#include <QTranslator>
 
 #include <libsigrokcxx/libsigrokcxx.hpp>
 
+#include "globalsettings.hpp"
+
 using std::shared_ptr;
 using std::pair;
 using std::vector;
 
-class Application : public QApplication
+class Application : public QApplication, public pv::GlobalSettingsInterface
 {
        Q_OBJECT
 
 public:
        Application(int &argc, char* argv[]);
 
+       void switch_language(const QString& language);
+       void on_setting_changed(const QString &key, const QVariant &value);
+
        void collect_version_info(shared_ptr<sigrok::Context> context);
        void print_version_info();
 
@@ -58,6 +64,8 @@ private:
        vector< pair<QString, QString> > input_format_list_;
        vector< pair<QString, QString> > output_format_list_;
        vector< pair<QString, QString> > pd_list_;
+
+       QTranslator app_translator_, qt_translator_;
 };
 
 #endif // PULSEVIEW_PV_APPLICATION_HPP
index f7df48021f481eafd062bb0f5ad653fb6aaa83c8..1c23e04c39a85929ed17de14d4e23878caeaca58 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include "globalsettings.hpp"
+#include "application.hpp"
 
 #include <QApplication>
 #include <QColor>
@@ -42,6 +43,7 @@ const vector< pair<QString, QString> > Themes {
        {"DarkStyle", ":/themes/darkstyle/darkstyle.qss"}
 };
 
+const QString GlobalSettings::Key_General_Language = "General_Language";
 const QString GlobalSettings::Key_General_Theme = "General_Theme";
 const QString GlobalSettings::Key_General_Style = "General_Style";
 const QString GlobalSettings::Key_General_SaveWithSetup = "General_SaveWithSetup";
@@ -90,6 +92,14 @@ void GlobalSettings::save_internal_defaults()
 
 void GlobalSettings::set_defaults_where_needed()
 {
+       if (!contains(Key_General_Language)) {
+               // Determine and set default UI language
+               QString language = QLocale().uiLanguages().first();  // May return e.g. en-Latn-US
+               language = language.split("-").first();
+
+               setValue(Key_General_Language, language);
+       }
+
        // Use no theme by default
        if (!contains(Key_General_Theme))
                setValue(Key_General_Theme, 0);
@@ -231,6 +241,12 @@ void GlobalSettings::apply_theme()
        QPixmapCache::clear();
 }
 
+void GlobalSettings::apply_language()
+{
+       Application* a = qobject_cast<Application*>(QApplication::instance());
+       a->switch_language(value(Key_General_Language).toString());
+}
+
 void GlobalSettings::add_change_handler(GlobalSettingsInterface *cb)
 {
        callbacks_.push_back(cb);
index 6902a097406edb187c53c5effc7c550aa26e4165..56ca9632e45a3bdcbb757018bd72a177f493791a 100644 (file)
@@ -51,6 +51,7 @@ class GlobalSettings : public QSettings
        Q_OBJECT
 
 public:
+       static const QString Key_General_Language;
        static const QString Key_General_Theme;
        static const QString Key_General_Style;
        static const QString Key_General_SaveWithSetup;
@@ -92,6 +93,8 @@ public:
        static bool current_theme_is_dark();
        void apply_theme();
 
+       void apply_language();
+
        static void add_change_handler(GlobalSettingsInterface *cb);
        static void remove_change_handler(GlobalSettingsInterface *cb);
 
index d7f5c31a3e78e11857ee149473c3ff0f5f763d9b..1fb46e13ec483c9fc7da5fb83e544d669baf9046 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "mainwindow.hpp"
 
+#include "application.hpp"
 #include "devicemanager.hpp"
 #include "devices/hardwaredevice.hpp"
 #include "dialogs/settings.hpp"
index 20603ed2b958a7eed50a3d1d530cc3da67b1b8a8..94ed6f4b6da970e02a3191ba2a87dc7d951bd054 100644 (file)
@@ -33,6 +33,7 @@
 #include "pv/subwindows/decoder_selector/subwindow.hpp"
 
 #include <libsigrokdecode/libsigrokdecode.h>
+#include "subwindow.hpp"  // Required only for lupdate since above include isn't recognized
 
 #define DECODERS_HAVE_TAGS \
        ((SRD_PACKAGE_VERSION_MAJOR > 0) || \
@@ -46,7 +47,7 @@ namespace decoder_selector {
 
 const char *initial_notice =
        QT_TRANSLATE_NOOP("pv::subwindows::decoder_selector::SubWindow",
-               "Select a decoder to see its description here.");  // clazy:exclude=non-pod-global-static
+                       "Select a decoder to see its description here.");  // clazy:exclude=non-pod-global-static
 
 const int min_width_margin = 75;
 
diff --git a/translations.qrc b/translations.qrc
new file mode 100644 (file)
index 0000000..103fa35
--- /dev/null
@@ -0,0 +1,5 @@
+<RCC>
+       <qresource prefix="/">
+               <file>l10n/de.qm</file>
+       </qresource>
+</RCC>