aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2018-04-11 17:27:19 +0200
committerThomas White <taw@bitwiz.org.uk>2018-04-11 17:27:49 +0200
commit55ae6cb963f3a312cedce56f3148340971ad7810 (patch)
tree632316b0455d5762a8b689dfe7b63c5e03934aad
parent2cfad324a0e0efa1701bc3873368d2e786a113ba (diff)
Add more translation labels and get rid of redundant en po file
-rw-r--r--po/LINGUAS2
-rw-r--r--po/POTFILES1
-rw-r--r--po/colloquium.pot47
-rw-r--r--po/de.po47
-rw-r--r--po/en.po80
-rw-r--r--src/colloquium.c8
-rw-r--r--src/debugger.c20
7 files changed, 113 insertions, 92 deletions
diff --git a/po/LINGUAS b/po/LINGUAS
index 3ae2b72..7673daa 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1 +1 @@
-en de
+de
diff --git a/po/POTFILES b/po/POTFILES
index 681214c..e5ad4bf 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -1 +1,2 @@
src/colloquium.c
+src/debugger.c
diff --git a/po/colloquium.pot b/po/colloquium.pot
index 7b3ce92..7cd57a0 100644
--- a/po/colloquium.pot
+++ b/po/colloquium.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: colloquium\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-04-11 14:47+0200\n"
+"POT-Creation-Date: 2018-04-11 15:08+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -22,6 +22,11 @@ msgstr ""
msgid "Narrative-based presentation system"
msgstr ""
+#: src/colloquium.c:160
+#, c-format
+msgid "WTF? Too many files\n"
+msgstr ""
+
#: src/colloquium.c:184
#, c-format
msgid "Failed to convert file list\n"
@@ -44,6 +49,11 @@ msgstr ""
msgid "Failed to load presentation '%s'\n"
msgstr ""
+#: src/colloquium.c:266
+#, c-format
+msgid "Failed to create config\n"
+msgstr ""
+
#: src/colloquium.c:290
#, c-format
msgid "Don't understand '%s', assuming false\n"
@@ -54,6 +64,15 @@ msgstr ""
msgid "Failed to open config %s\n"
msgstr ""
+#. Set the application menu only if it will be shown by the
+#. * desktop environment. All the entries are already in the
+#. * normal menus, so don't let GTK create a fallback menu in the
+#. * menu bar.
+#: src/colloquium.c:358
+#, c-format
+msgid "Using app menu\n"
+msgstr ""
+
#: src/colloquium.c:377
#, c-format
msgid "Failed to create config folder\n"
@@ -73,3 +92,29 @@ msgid ""
"\n"
" -h, --help Display this help message.\n"
msgstr ""
+
+#. Text paragraph
+#: src/debugger.c:90
+msgid "text"
+msgstr ""
+
+#. Callback paragraph
+#: src/debugger.c:93
+msgid "callback"
+msgstr ""
+
+#. Unknown paragraph type
+#: src/debugger.c:96
+msgid "unknown"
+msgstr ""
+
+#. How many text runs
+#: src/debugger.c:108
+#, c-format
+msgid " %i runs"
+msgstr ""
+
+#. Failed to get debug info for paragraph
+#: src/debugger.c:116
+msgid "Error"
+msgstr ""
diff --git a/po/de.po b/po/de.po
index 8506281..460fdc2 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: colloquium\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-04-11 14:47+0200\n"
+"POT-Creation-Date: 2018-04-11 15:08+0200\n"
"PO-Revision-Date: 2018-04-10 23:10+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -22,6 +22,11 @@ msgstr ""
msgid "Narrative-based presentation system"
msgstr "Erzählungsbasiertes Präsentationssystem"
+#: src/colloquium.c:160
+#, c-format
+msgid "WTF? Too many files\n"
+msgstr ""
+
#: src/colloquium.c:184
#, c-format
msgid "Failed to convert file list\n"
@@ -44,6 +49,11 @@ msgstr ""
msgid "Failed to load presentation '%s'\n"
msgstr ""
+#: src/colloquium.c:266
+#, c-format
+msgid "Failed to create config\n"
+msgstr ""
+
#: src/colloquium.c:290
#, c-format
msgid "Don't understand '%s', assuming false\n"
@@ -54,6 +64,15 @@ msgstr ""
msgid "Failed to open config %s\n"
msgstr ""
+#. Set the application menu only if it will be shown by the
+#. * desktop environment. All the entries are already in the
+#. * normal menus, so don't let GTK create a fallback menu in the
+#. * menu bar.
+#: src/colloquium.c:358
+#, c-format
+msgid "Using app menu\n"
+msgstr ""
+
#: src/colloquium.c:377
#, c-format
msgid "Failed to create config folder\n"
@@ -73,3 +92,29 @@ msgid ""
"\n"
" -h, --help Display this help message.\n"
msgstr ""
+
+#. Text paragraph
+#: src/debugger.c:90
+msgid "text"
+msgstr ""
+
+#. Callback paragraph
+#: src/debugger.c:93
+msgid "callback"
+msgstr ""
+
+#. Unknown paragraph type
+#: src/debugger.c:96
+msgid "unknown"
+msgstr ""
+
+#. How many text runs
+#: src/debugger.c:108
+#, c-format
+msgid " %i runs"
+msgstr ""
+
+#. Failed to get debug info for paragraph
+#: src/debugger.c:116
+msgid "Error"
+msgstr ""
diff --git a/po/en.po b/po/en.po
deleted file mode 100644
index e82c779..0000000
--- a/po/en.po
+++ /dev/null
@@ -1,80 +0,0 @@
-# English translations for colloquium package.
-# Copyright (C) 2018 THE colloquium'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the colloquium package.
-# Automatically generated, 2018.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: colloquium\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-04-11 14:47+0200\n"
-"PO-Revision-Date: 2018-04-11 14:26+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
-"Language: en\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ASCII\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. Description of the program
-#: src/colloquium.c:113
-msgid "Narrative-based presentation system"
-msgstr "Narrative-based presentation system"
-
-#: src/colloquium.c:184
-#, c-format
-msgid "Failed to convert file list\n"
-msgstr "Failed to convert file list\n"
-
-#: src/colloquium.c:207
-msgid "Open Presentation"
-msgstr "Open Presentation"
-
-#: src/colloquium.c:210
-msgid "_Cancel"
-msgstr "_Cancel"
-
-#: src/colloquium.c:211
-msgid "_Open"
-msgstr "_Open"
-
-#: src/colloquium.c:246
-#, c-format
-msgid "Failed to load presentation '%s'\n"
-msgstr "Failed to load presentation '%s'\n"
-
-#: src/colloquium.c:290
-#, c-format
-msgid "Don't understand '%s', assuming false\n"
-msgstr "Don't understand '%s', assuming false\n"
-
-#: src/colloquium.c:302
-#, c-format
-msgid "Failed to open config %s\n"
-msgstr "Failed to open config %s\n"
-
-#: src/colloquium.c:377
-#, c-format
-msgid "Failed to create config folder\n"
-msgstr "Failed to create config folder\n"
-
-#: src/colloquium.c:446
-#, c-format
-msgid ""
-"Syntax: %s [options] [<file.sc>]\n"
-"\n"
-msgstr ""
-"Syntax: %s [options] [<file.sc>]\n"
-"\n"
-
-#: src/colloquium.c:447
-#, c-format
-msgid ""
-"A tiny presentation program.\n"
-"\n"
-" -h, --help Display this help message.\n"
-msgstr ""
-"A tiny presentation program.\n"
-"\n"
-" -h, --help Display this help message.\n"
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 ) {