mirror of
https://github.com/libratbag/piper.git
synced 2026-04-26 09:19:03 -04:00
Add context where needed for translators
This commit is contained in:
committed by
Peter Hutterer
parent
b7dd69df53
commit
0d54a60df2
@@ -62,7 +62,7 @@
|
||||
<object class="GtkLabel" id="active_label">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">Active</property>
|
||||
<property name="label" translatable="yes" comments="Translators: this is used to indicate the active resolution.">Active</property>
|
||||
<property name="justify">right</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
</object>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">Report rate</property>
|
||||
<property name="label" translatable="yes" comments="Translators: the rate at which the device reports movement.">Report rate</property>
|
||||
<property name="justify">right</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
<style>
|
||||
@@ -122,7 +122,7 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Sensitivity</property>
|
||||
<property name="label" translatable="yes" comments="Translators: the sensitivity of the device's sensor.">Sensitivity</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
|
||||
@@ -140,6 +140,7 @@ class ButtonDialog(Gtk.Dialog):
|
||||
i = 0
|
||||
for button in buttons:
|
||||
key, name = self._get_button_name_and_description(button)
|
||||
# Translators: section header for mapping one button's click to another.
|
||||
row = ButtonRow(name, _("Button mapping"), RatbagdButton.ACTION_TYPE_BUTTON, button.index + 1)
|
||||
self.listbox.insert(row, i)
|
||||
if self._action_type == RatbagdButton.ACTION_TYPE_BUTTON and button.index + 1 == self._button.mapping:
|
||||
@@ -148,6 +149,7 @@ class ButtonDialog(Gtk.Dialog):
|
||||
for key, name in RatbagdButton.SPECIAL_DESCRIPTION.items():
|
||||
if name == "Unknown":
|
||||
continue
|
||||
# Translators: section header for assigning special functions to buttons.
|
||||
row = ButtonRow(_(name), _("Special mapping"), RatbagdButton.ACTION_TYPE_SPECIAL, key)
|
||||
self.listbox.insert(row, i)
|
||||
if self._action_type == RatbagdButton.ACTION_TYPE_SPECIAL and key == self._mapping:
|
||||
|
||||
@@ -85,8 +85,10 @@ class ButtonsPage(Gtk.Box):
|
||||
elif action_type == RatbagdButton.ACTION_TYPE_MACRO:
|
||||
label = _("Macro: {}").format(str(ratbagd_button.macro))
|
||||
elif action_type == RatbagdButton.ACTION_TYPE_NONE:
|
||||
# Translators: the button is turned disabled, e.g. off.
|
||||
label = _("Disabled")
|
||||
else:
|
||||
# Translators: the button has an unknown function.
|
||||
label = _("Unknown")
|
||||
optionbutton.set_label(label)
|
||||
|
||||
|
||||
@@ -755,6 +755,7 @@ class RatbagdMacro(GObject.Object):
|
||||
|
||||
def __str__(self):
|
||||
if not self._macro:
|
||||
# Translators: this is used when there is no macro to preview.
|
||||
return _("None")
|
||||
|
||||
keys = []
|
||||
@@ -828,9 +829,14 @@ class RatbagdLed(_RatbagdDBus):
|
||||
MODE_BREATHING = 3
|
||||
|
||||
LED_DESCRIPTION = {
|
||||
# Translators: the LED is off.
|
||||
MODE_OFF: N_("Off"),
|
||||
# Translators: the LED has a single, solid color.
|
||||
MODE_ON: N_("Solid"),
|
||||
# Translators: the LED is cycling between red, green and blue.
|
||||
MODE_CYCLE: N_("Cycle"),
|
||||
# Translators: the LED's is pulsating a single color on different
|
||||
# brightnesses.
|
||||
MODE_BREATHING: N_("Breathing"),
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ class Window(Gtk.ApplicationWindow):
|
||||
self._add_perspective(ErrorPerspective(), ratbag)
|
||||
if ratbag is None:
|
||||
self._present_error_perspective(_("Cannot connect to ratbagd"),
|
||||
# Translators: "it" here is ratbagd.
|
||||
_("Please make sure it is running"))
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user