aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/colloquium.c8
-rw-r--r--src/debugger.c20
2 files changed, 19 insertions, 9 deletions
diff --git a/src/colloquium.c b/src/colloquium.c
index 2245306..ea81342 100644
--- a/src/colloquium.c
+++ b/src/colloquium.c
@@ -110,7 +110,7 @@ static void about_sig(GSimpleAction *action, GVariant *parameter, gpointer vp)
"© 2017-2018 Thomas White <taw@bitwiz.me.uk>");
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),
/* Description of the program */
- gettext("Narrative-based presentation system"));
+ _("Narrative-based presentation system"));
gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(window),
"© 2017-2018 Thomas White <taw@bitwiz.me.uk>\n"
"\n"
@@ -157,7 +157,7 @@ static GFile **gslist_to_array(GSList *item, int *n)
while ( item != NULL ) {
if ( i == len ) {
- fprintf(stderr, "WTF? Too many files\n");
+ fprintf(stderr, _("WTF? Too many files\n"));
break;
}
files[i++] = item->data;
@@ -263,7 +263,7 @@ static void create_config(const char *filename)
FILE *fh;
fh = fopen(filename, "w");
if ( fh == NULL ) {
- fprintf(stderr, "Failed to create config\n");
+ fprintf(stderr, _("Failed to create config\n"));
return;
}
@@ -355,7 +355,7 @@ static void colloquium_startup(GApplication *papp)
* desktop environment. All the entries are already in the
* normal menus, so don't let GTK create a fallback menu in the
* menu bar. */
- printf("Using app menu\n");
+ printf(_("Using app menu\n"));
builder = gtk_builder_new_from_resource("/uk/me/bitwiz/Colloquium/app-menu.ui");
GMenuModel *mmodel = G_MENU_MODEL(gtk_builder_get_object(builder, "app-menu"));
gtk_application_set_app_menu(GTK_APPLICATION(app), mmodel);
diff --git a/src/debugger.c b/src/debugger.c
index 07ea546..53c0596 100644
--- a/src/debugger.c
+++ b/src/debugger.c
@@ -29,11 +29,13 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include <libintl.h>
#include "presentation.h"
#include "narrative_window.h"
#include "render.h"
#include "frame.h"
+#include "utils.h"
#define MAX_DEBUG_RUNS (1024)
@@ -83,9 +85,15 @@ static void plot_text(cairo_t *cr, double *ypos, PangoFontDescription *fontdesc,
static const char *str_type(enum para_type t)
{
switch ( t ) {
- case PARA_TYPE_TEXT : return "text";
- case PARA_TYPE_CALLBACK : return "callback";
- default : return "unknown";
+
+ /* Text paragraph */
+ case PARA_TYPE_TEXT : return _("text");
+
+ /* Callback paragraph */
+ case PARA_TYPE_CALLBACK : return _("callback");
+
+ /* Unknown paragraph type */
+ default : return _("unknown");
}
}
@@ -96,14 +104,16 @@ static void debug_text_para(Paragraph *para, cairo_t *cr, double *ypos,
char tmp[256];
nrun = para_debug_num_runs(para);
- snprintf(tmp, 255, " %i runs", nrun);
+ /* How many text runs */
+ snprintf(tmp, 255, _(" %i runs"), nrun);
plot_text(cr, ypos, fontdesc, tmp);
for ( i=0; i<nrun; i++ ) {
SCBlock *scblock;
SCBlock *rscblock;
if ( para_debug_run_info(para, i, &scblock, &rscblock) ) {
- plot_text(cr, ypos, fontdesc, "Error");
+ /* Failed to get debug info for paragraph */
+ plot_text(cr, ypos, fontdesc, _("Error"));
} else {
if ( scblock != rscblock ) {