mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Merge branch 'wip/piotrdrag/i18n-fixes' into 'master'
Add translator comments and disambiguate a string See merge request GNOME/sysprof!7
This commit is contained in:
@ -55,7 +55,7 @@
|
|||||||
<child type="center">
|
<child type="center">
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="hexpand">true</property>
|
<property name="hexpand">true</property>
|
||||||
<property name="label" translatable="yes">Profile my _entire system</property>
|
<property name="label" translatable="yes" comments="Translators: This is the description for a switch.">Profile my _entire system</property>
|
||||||
<property name="use-underline">true</property>
|
<property name="use-underline">true</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
@ -92,7 +92,7 @@
|
|||||||
</style>
|
</style>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkEntry" id="process_filter_entry">
|
<object class="GtkEntry" id="process_filter_entry">
|
||||||
<property name="placeholder-text" translatable="yes">Search</property>
|
<property name="placeholder-text" translatable="yes" comments="Translators: This is the placeholder in a search entry.">Search</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@ -161,7 +161,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="inherit_environ">
|
<object class="GtkCheckButton" id="inherit_environ">
|
||||||
<property name="active">true</property>
|
<property name="active">true</property>
|
||||||
<property name="label" translatable="yes">Inherit current environment</property>
|
<property name="label" translatable="yes" comments="Translators: This is a check button.">Inherit current environment</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@ -272,6 +272,7 @@ handle_capture_results (GObject *object,
|
|||||||
if (state->has_cpu)
|
if (state->has_cpu)
|
||||||
{
|
{
|
||||||
GtkWidget *row = g_object_new (SP_TYPE_CPU_VISUALIZER_ROW,
|
GtkWidget *row = g_object_new (SP_TYPE_CPU_VISUALIZER_ROW,
|
||||||
|
/* Translators: CPU is the processor. */
|
||||||
"title", _("CPU"),
|
"title", _("CPU"),
|
||||||
"height-request", 50,
|
"height-request", 50,
|
||||||
"selectable", FALSE,
|
"selectable", FALSE,
|
||||||
@ -286,6 +287,7 @@ handle_capture_results (GObject *object,
|
|||||||
{
|
{
|
||||||
GdkRGBA rgba;
|
GdkRGBA rgba;
|
||||||
GtkWidget *row = g_object_new (SP_TYPE_LINE_VISUALIZER_ROW,
|
GtkWidget *row = g_object_new (SP_TYPE_LINE_VISUALIZER_ROW,
|
||||||
|
/* Translators: FPS is frames per second. */
|
||||||
"title", _("FPS"),
|
"title", _("FPS"),
|
||||||
"height-request", 35,
|
"height-request", 35,
|
||||||
"selectable", FALSE,
|
"selectable", FALSE,
|
||||||
|
|||||||
@ -134,11 +134,13 @@ sp_profiler_menu_button_update_label (SpProfilerMenuButton *self)
|
|||||||
|
|
||||||
if (n_pids == 1)
|
if (n_pids == 1)
|
||||||
{
|
{
|
||||||
|
/* Translators: %d is the PID of the process. */
|
||||||
str = g_strdup_printf (_("Process %d"), pids[0]);
|
str = g_strdup_printf (_("Process %d"), pids[0]);
|
||||||
gtk_label_set_label (priv->label, str);
|
gtk_label_set_label (priv->label, str);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Translators: %u is the number (amount) of processes. */
|
||||||
str = g_strdup_printf (ngettext("%u Process", "%u Processes", n_pids), n_pids);
|
str = g_strdup_printf (ngettext("%u Process", "%u Processes", n_pids), n_pids);
|
||||||
gtk_label_set_label (priv->label, str);
|
gtk_label_set_label (priv->label, str);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="record_button">
|
<object class="GtkButton" id="record_button">
|
||||||
<property name="label" translatable="yes">_Record</property>
|
<property name="label" translatable="yes" comments="Translators: This is a button.">_Record</property>
|
||||||
<property name="use-underline">true</property>
|
<property name="use-underline">true</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
<property name="width-request">100</property>
|
<property name="width-request">100</property>
|
||||||
@ -115,7 +115,7 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="close_info_button">
|
<object class="GtkButton" id="close_info_button">
|
||||||
<property name="label" translatable="yes">_Close</property>
|
<property name="label" translatable="yes" comments="Translators: This is a button.">_Close</property>
|
||||||
<property name="use-underline">true</property>
|
<property name="use-underline">true</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
<property name="width-request">100</property>
|
<property name="width-request">100</property>
|
||||||
@ -209,7 +209,7 @@
|
|||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="action-name">zoom.zoom-out</property>
|
<property name="action-name">zoom.zoom-out</property>
|
||||||
<property name="hexpand">true</property>
|
<property name="hexpand">true</property>
|
||||||
<property name="tooltip-text" translatable="yes">Zoom out (Ctrl+-)</property>
|
<property name="tooltip-text" translatable="yes" comments="Translators: This is a tooltip.">Zoom out (Ctrl+-)</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="image-button"/>
|
<class name="image-button"/>
|
||||||
@ -225,7 +225,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="action-name">zoom.zoom-one</property>
|
<property name="action-name">zoom.zoom-one</property>
|
||||||
<property name="tooltip-text" translatable="yes">Reset zoom level (Ctrl+0)</property>
|
<property name="tooltip-text" translatable="yes" comments="Translators: This is a tooltip.">Reset zoom level (Ctrl+0)</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="zoom_one_label">
|
<object class="GtkLabel" id="zoom_one_label">
|
||||||
@ -239,7 +239,7 @@
|
|||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="action-name">zoom.zoom-in</property>
|
<property name="action-name">zoom.zoom-in</property>
|
||||||
<property name="hexpand">true</property>
|
<property name="hexpand">true</property>
|
||||||
<property name="tooltip-text" translatable="yes">Zoom in (Ctrl++)</property>
|
<property name="tooltip-text" translatable="yes" comments="Translators: This is a tooltip.">Zoom in (Ctrl++)</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="image-button"/>
|
<class name="image-button"/>
|
||||||
@ -264,7 +264,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkModelButton">
|
<object class="GtkModelButton">
|
||||||
<property name="action-name">app.new-window</property>
|
<property name="action-name">app.new-window</property>
|
||||||
<property name="text" translatable="yes">New Window</property>
|
<property name="text" translatable="yes" comments="Translators: This is a menu label.">New Window</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@ -277,14 +277,14 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkModelButton">
|
<object class="GtkModelButton">
|
||||||
<property name="action-name">win.open-capture</property>
|
<property name="action-name">win.open-capture</property>
|
||||||
<property name="text" translatable="yes">Open Capture…</property>
|
<property name="text" translatable="yes" context="menu label" comments="Translators: This is a menu label.">Open Capture…</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkModelButton">
|
<object class="GtkModelButton">
|
||||||
<property name="action-name">win.save-capture</property>
|
<property name="action-name">win.save-capture</property>
|
||||||
<property name="text" translatable="yes">Save As…</property>
|
<property name="text" translatable="yes" comments="Translators: This is a menu label.">Save As…</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@ -297,7 +297,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkModelButton">
|
<object class="GtkModelButton">
|
||||||
<property name="action-name">win.screenshot</property>
|
<property name="action-name">win.screenshot</property>
|
||||||
<property name="text" translatable="yes">Screenshot</property>
|
<property name="text" translatable="yes" comments="Translators: This is a menu label.">Screenshot</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@ -310,7 +310,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkModelButton">
|
<object class="GtkModelButton">
|
||||||
<property name="action-name">win.close-capture</property>
|
<property name="action-name">win.close-capture</property>
|
||||||
<property name="text" translatable="yes">Close</property>
|
<property name="text" translatable="yes" comments="Translators: This is a menu label.">Close</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@ -146,6 +146,7 @@ sp_window_update_stats (gpointer data)
|
|||||||
sp_capture_writer_stat (writer, &stbuf);
|
sp_capture_writer_stat (writer, &stbuf);
|
||||||
|
|
||||||
count = stbuf.frame_count[SP_CAPTURE_FRAME_SAMPLE];
|
count = stbuf.frame_count[SP_CAPTURE_FRAME_SAMPLE];
|
||||||
|
/* Translators: %u is the number (amount) of samples. */
|
||||||
str = g_strdup_printf (_("Samples: %u"), count);
|
str = g_strdup_printf (_("Samples: %u"), count);
|
||||||
gtk_label_set_label (self->stat_label, str);
|
gtk_label_set_label (self->stat_label, str);
|
||||||
}
|
}
|
||||||
@ -192,6 +193,7 @@ sp_window_update_subtitle (SpWindow *self)
|
|||||||
dt = g_date_time_new_from_timeval_local (&tv);
|
dt = g_date_time_new_from_timeval_local (&tv);
|
||||||
str = g_date_time_format (dt, "%x %X");
|
str = g_date_time_format (dt, "%x %X");
|
||||||
|
|
||||||
|
/* Translators: The first %s is a file name, the second is the date and time. */
|
||||||
label = g_strdup_printf (_("%s — %s"), filename, str);
|
label = g_strdup_printf (_("%s — %s"), filename, str);
|
||||||
|
|
||||||
gtk_label_set_label (self->subtitle, label);
|
gtk_label_set_label (self->subtitle, label);
|
||||||
@ -303,6 +305,7 @@ sp_window_set_state (SpWindow *self,
|
|||||||
{
|
{
|
||||||
case SP_WINDOW_STATE_EMPTY:
|
case SP_WINDOW_STATE_EMPTY:
|
||||||
case SP_WINDOW_STATE_FAILED:
|
case SP_WINDOW_STATE_FAILED:
|
||||||
|
/* Translators: This is a button. */
|
||||||
gtk_button_set_label (self->record_button, _("Record"));
|
gtk_button_set_label (self->record_button, _("Record"));
|
||||||
gtk_widget_set_sensitive (GTK_WIDGET (self->record_button), TRUE);
|
gtk_widget_set_sensitive (GTK_WIDGET (self->record_button), TRUE);
|
||||||
add_class (self->record_button, "suggested-action");
|
add_class (self->record_button, "suggested-action");
|
||||||
@ -323,6 +326,7 @@ sp_window_set_state (SpWindow *self,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SP_WINDOW_STATE_RECORDING:
|
case SP_WINDOW_STATE_RECORDING:
|
||||||
|
/* Translators: This is a button. */
|
||||||
gtk_button_set_label (self->record_button, _("Stop"));
|
gtk_button_set_label (self->record_button, _("Stop"));
|
||||||
gtk_widget_set_sensitive (GTK_WIDGET (self->record_button), TRUE);
|
gtk_widget_set_sensitive (GTK_WIDGET (self->record_button), TRUE);
|
||||||
remove_class (self->record_button, "suggested-action");
|
remove_class (self->record_button, "suggested-action");
|
||||||
@ -347,6 +351,7 @@ sp_window_set_state (SpWindow *self,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SP_WINDOW_STATE_BROWSING:
|
case SP_WINDOW_STATE_BROWSING:
|
||||||
|
/* Translators: This is a button. */
|
||||||
gtk_button_set_label (self->record_button, _("Record"));
|
gtk_button_set_label (self->record_button, _("Record"));
|
||||||
gtk_widget_set_sensitive (GTK_WIDGET (self->record_button), TRUE);
|
gtk_widget_set_sensitive (GTK_WIDGET (self->record_button), TRUE);
|
||||||
add_class (self->record_button, "suggested-action");
|
add_class (self->record_button, "suggested-action");
|
||||||
@ -592,10 +597,13 @@ sp_window_save_capture (GSimpleAction *action,
|
|||||||
|
|
||||||
reader = sp_capture_reader_ref (self->reader);
|
reader = sp_capture_reader_ref (self->reader);
|
||||||
|
|
||||||
|
/* Translators: This is a window title. */
|
||||||
dialog = gtk_file_chooser_native_new (_("Save Capture As…"),
|
dialog = gtk_file_chooser_native_new (_("Save Capture As…"),
|
||||||
GTK_WINDOW (self),
|
GTK_WINDOW (self),
|
||||||
GTK_FILE_CHOOSER_ACTION_SAVE,
|
GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||||
|
/* Translators: This is a button. */
|
||||||
_("Save"),
|
_("Save"),
|
||||||
|
/* Translators: This is a button. */
|
||||||
_("Cancel"));
|
_("Cancel"));
|
||||||
|
|
||||||
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), TRUE);
|
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), TRUE);
|
||||||
@ -626,6 +634,7 @@ sp_window_save_capture (GSimpleAction *action,
|
|||||||
{
|
{
|
||||||
sp_window_notify_user (self,
|
sp_window_notify_user (self,
|
||||||
GTK_MESSAGE_ERROR,
|
GTK_MESSAGE_ERROR,
|
||||||
|
/* Translators: %s is the error message. */
|
||||||
_("An error occurred while attempting to save your capture: %s"),
|
_("An error occurred while attempting to save your capture: %s"),
|
||||||
error->message);
|
error->message);
|
||||||
goto failure;
|
goto failure;
|
||||||
@ -1005,10 +1014,13 @@ sp_window_open_from_dialog (SpWindow *self)
|
|||||||
|
|
||||||
g_assert (SP_IS_WINDOW (self));
|
g_assert (SP_IS_WINDOW (self));
|
||||||
|
|
||||||
|
/* Translators: This is a window title. */
|
||||||
dialog = gtk_file_chooser_native_new (_("Open Capture…"),
|
dialog = gtk_file_chooser_native_new (_("Open Capture…"),
|
||||||
GTK_WINDOW (self),
|
GTK_WINDOW (self),
|
||||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||||
|
/* Translators: This is a button. */
|
||||||
_("Open"),
|
_("Open"),
|
||||||
|
/* Translators: This is a button. */
|
||||||
_("Cancel"));
|
_("Cancel"));
|
||||||
|
|
||||||
filter = gtk_file_filter_new ();
|
filter = gtk_file_filter_new ();
|
||||||
|
|||||||
@ -162,6 +162,7 @@ main (gint argc,
|
|||||||
flags |= O_EXCL;
|
flags |= O_EXCL;
|
||||||
if (g_file_test (filename, G_FILE_TEST_EXISTS))
|
if (g_file_test (filename, G_FILE_TEST_EXISTS))
|
||||||
{
|
{
|
||||||
|
/* Translators: %s is a file name. */
|
||||||
g_printerr (_("%s exists. Use --force to overwrite\n"), filename);
|
g_printerr (_("%s exists. Use --force to overwrite\n"), filename);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user