Update messages
This commit is contained in:
parent
5ad0ef7141
commit
0d81b75bd2
|
@ -27,7 +27,7 @@
|
||||||
<signal name="hide" handler="on_image_menu_hide" swapped="no"/>
|
<signal name="hide" handler="on_image_menu_hide" swapped="no"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImageMenuItem" id="image_from_stock">
|
<object class="GtkImageMenuItem" id="image_from_stock">
|
||||||
<property name="label" translatable="yes">Select from stock...</property>
|
<property name="label" translatable="yes">Select from stock…</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="image">image1</property>
|
<property name="image">image1</property>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImageMenuItem" id="image_from_camera">
|
<object class="GtkImageMenuItem" id="image_from_camera">
|
||||||
<property name="label" translatable="yes">Capture from camera...</property>
|
<property name="label" translatable="yes">Capture from camera…</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="image">image2</property>
|
<property name="image">image2</property>
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImageMenuItem" id="image_from_browse">
|
<object class="GtkImageMenuItem" id="image_from_browse">
|
||||||
<property name="label" translatable="yes">Browse...</property>
|
<property name="label" translatable="yes">Browse…</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="image">image3</property>
|
<property name="image">image3</property>
|
||||||
|
|
|
@ -12,11 +12,14 @@ Package: mugshot
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: ${misc:Depends},
|
Depends: ${misc:Depends},
|
||||||
${python:Depends},
|
${python:Depends},
|
||||||
gir1.2-glib-2.0,
|
python-pexpect,
|
||||||
gir1.2-gtk-3.0,
|
gir1.2-gtk-3.0,
|
||||||
python-dbus,
|
python-dbus,
|
||||||
python-pexpect,
|
gir1.2-glib-2.0,
|
||||||
|
python-cairo,
|
||||||
|
gir1.2-gstreamer-1.0,
|
||||||
gir1.2-gdkpixbuf-2.0,
|
gir1.2-gdkpixbuf-2.0,
|
||||||
|
gir1.2-gst-plugins-base-1.0,
|
||||||
yelp
|
yelp
|
||||||
Description: UNKNOWN
|
Description: UNKNOWN
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
@ -58,7 +58,7 @@ class CameraMugshotDialog(CameraDialog):
|
||||||
devices = []
|
devices = []
|
||||||
for device in os.listdir('/dev/'):
|
for device in os.listdir('/dev/'):
|
||||||
if device.startswith('video'): devices.append(device)
|
if device.startswith('video'): devices.append(device)
|
||||||
logger.error('Camera failed to load. Devices: %s' % '; '.join(devices))
|
logger.error(_('Camera failed to load. Devices: %s') % '; '.join(devices))
|
||||||
self.draw_handler = self.video_window.connect('draw', self.on_failed_draw)
|
self.draw_handler = self.video_window.connect('draw', self.on_failed_draw)
|
||||||
self.realized = True
|
self.realized = True
|
||||||
|
|
||||||
|
@ -87,17 +87,18 @@ class CameraMugshotDialog(CameraDialog):
|
||||||
font_color = (255,255,255)
|
font_color = (255,255,255)
|
||||||
font_name = "Sans"
|
font_name = "Sans"
|
||||||
|
|
||||||
|
# Translators: Please include the newline, required to fit the message.
|
||||||
|
message = _("Sorry, but your camera\nfailed to initialize.")
|
||||||
|
|
||||||
# Draw the message to the drawing area.
|
# Draw the message to the drawing area.
|
||||||
ctx.set_source_rgb(*font_color)
|
ctx.set_source_rgb(*font_color)
|
||||||
ctx.select_font_face(font_name, cairo.FONT_SLANT_NORMAL,
|
ctx.select_font_face(font_name, cairo.FONT_SLANT_NORMAL,
|
||||||
cairo.FONT_WEIGHT_NORMAL)
|
cairo.FONT_WEIGHT_NORMAL)
|
||||||
ctx.set_font_size(font_size)
|
ctx.set_font_size(font_size)
|
||||||
ctx.move_to(10,(height-font_size)/2)
|
ctx.move_to(10,(height-font_size)/2)
|
||||||
# Translators: This string is split for use with cairo. The complete string is "Sorry, but your camera failed to initialize."
|
ctx.show_text(message.split('\n')[0])
|
||||||
ctx.show_text(_("Sorry, but your camera"))
|
|
||||||
ctx.move_to(10,(height-font_size)/2+font_size)
|
ctx.move_to(10,(height-font_size)/2+font_size)
|
||||||
# Translators: This string is split for use with cairo. The complete string is "Sorry, but your camera failed to initialize."
|
ctx.show_text(message.split('\n')[1])
|
||||||
ctx.show_text(_("failed to initialize."))
|
|
||||||
|
|
||||||
def on_draw(self, widget, ctx):
|
def on_draw(self, widget, ctx):
|
||||||
"""Display a message that the camera is initializing on first draw.
|
"""Display a message that the camera is initializing on first draw.
|
||||||
|
@ -112,17 +113,18 @@ class CameraMugshotDialog(CameraDialog):
|
||||||
font_color = (255,255,255)
|
font_color = (255,255,255)
|
||||||
font_name = "Sans"
|
font_name = "Sans"
|
||||||
|
|
||||||
|
# Translators: Please include the newline, required to fit the message.
|
||||||
|
message = _("Please wait while your\ncamera is initialized.")
|
||||||
|
|
||||||
# Draw the message to the drawing area.
|
# Draw the message to the drawing area.
|
||||||
ctx.set_source_rgb(*font_color)
|
ctx.set_source_rgb(*font_color)
|
||||||
ctx.select_font_face(font_name, cairo.FONT_SLANT_NORMAL,
|
ctx.select_font_face(font_name, cairo.FONT_SLANT_NORMAL,
|
||||||
cairo.FONT_WEIGHT_NORMAL)
|
cairo.FONT_WEIGHT_NORMAL)
|
||||||
ctx.set_font_size(font_size)
|
ctx.set_font_size(font_size)
|
||||||
ctx.move_to(10,(height-font_size)/2)
|
ctx.move_to(10,(height-font_size)/2)
|
||||||
# Translators: This string is split for use with cairo. The complete string is "Please wait while your camera is initialized."
|
ctx.show_text(message.split('\n')[0])
|
||||||
ctx.show_text(_("Please wait while your"))
|
|
||||||
ctx.move_to(10,(height-font_size)/2+font_size)
|
ctx.move_to(10,(height-font_size)/2+font_size)
|
||||||
# Translators: This string is split for use with cairo. The complete string is "Please wait while your camera is initialized."
|
ctx.show_text(message.split('\n')[1])
|
||||||
ctx.show_text(_("camera is initialized."))
|
|
||||||
|
|
||||||
# Redefine on_draw to blank the drawing area next time.
|
# Redefine on_draw to blank the drawing area next time.
|
||||||
def on_draw(self, widget, ctx):
|
def on_draw(self, widget, ctx):
|
||||||
|
@ -138,7 +140,7 @@ class CameraMugshotDialog(CameraDialog):
|
||||||
if not self.realized:
|
if not self.realized:
|
||||||
self._set_video_window_id()
|
self._set_video_window_id()
|
||||||
if not self.realized:
|
if not self.realized:
|
||||||
print _("Cannot display web cam output. Ignoring play command")
|
logger.error(_("Cannot display camera output. Ignoring play command"))
|
||||||
else:
|
else:
|
||||||
if self.camerabin:
|
if self.camerabin:
|
||||||
self.camerabin.set_state(Gst.State.PLAYING)
|
self.camerabin.set_state(Gst.State.PLAYING)
|
||||||
|
|
Loading…
Reference in New Issue