From 31a47339f8a1f3e40ebf4024eae43c8a255ead7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 18 Oct 2019 23:25:27 +0200 Subject: [PATCH] Update translations --- gds-render-gui.c | 17 ++--- main.c | 30 ++++----- translations/generate-mo.sh | 5 +- translations/pot/gds-render-gui.pot | 50 ++++++++++++++ translations/pot/main.pot | 71 +++++++++++++++++++- translations/pot/po/de/.gitignore | 1 + translations/pot/po/de/gds-render-gui.po | 50 ++++++++++++++ translations/pot/po/de/main.po | 83 ++++++++++++++++++++++-- translations/pot/prepare_language.sh | 1 + 9 files changed, 277 insertions(+), 31 deletions(-) create mode 100644 translations/pot/gds-render-gui.pot create mode 100644 translations/pot/po/de/.gitignore create mode 100644 translations/pot/po/de/gds-render-gui.po diff --git a/gds-render-gui.c b/gds-render-gui.c index 62bcfc5..8017d23 100644 --- a/gds-render-gui.c +++ b/gds-render-gui.c @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -259,17 +260,17 @@ int gds_render_gui_setup_cell_selector(GdsRenderGui *self) render_cell = lib_cell_renderer_new(); render_lib = lib_cell_renderer_new(); - column = gtk_tree_view_column_new_with_attributes("Library", render_lib, "gds-lib", CELL_SEL_LIBRARY, NULL); + column = gtk_tree_view_column_new_with_attributes(_("Library"), render_lib, "gds-lib", CELL_SEL_LIBRARY, NULL); gtk_tree_view_append_column(self->cell_tree_view, column); - column = gtk_tree_view_column_new_with_attributes("Cell", render_cell, "gds-cell", CELL_SEL_CELL, + column = gtk_tree_view_column_new_with_attributes(_("Cell"), render_cell, "gds-cell", CELL_SEL_CELL, "error-level", CELL_SEL_CELL_ERROR_STATE, NULL); gtk_tree_view_append_column(self->cell_tree_view, column); - column = gtk_tree_view_column_new_with_attributes("Mod. Date", render_dates, "text", CELL_SEL_MODDATE, NULL); + column = gtk_tree_view_column_new_with_attributes(_("Mod. Date"), render_dates, "text", CELL_SEL_MODDATE, NULL); gtk_tree_view_append_column(self->cell_tree_view, column); - column = gtk_tree_view_column_new_with_attributes("Acc. Date", render_dates, "text", CELL_SEL_ACCESSDATE, NULL); + column = gtk_tree_view_column_new_with_attributes(_("Acc. Date"), render_dates, "text", CELL_SEL_ACCESSDATE, NULL); gtk_tree_view_append_column(self->cell_tree_view, column); /* Callback for selection @@ -308,17 +309,17 @@ static void on_load_gds(gpointer button, gpointer user) if (!self) return; - open_dialog = gtk_file_chooser_dialog_new("Open GDSII File", self->main_window, + open_dialog = gtk_file_chooser_dialog_new(_("Open GDSII File"), self->main_window, GTK_FILE_CHOOSER_ACTION_OPEN, - "Cancel", GTK_RESPONSE_CANCEL, - "Open GDSII", GTK_RESPONSE_ACCEPT, + _("Cancel"), GTK_RESPONSE_CANCEL, + _("Open GDSII"), GTK_RESPONSE_ACCEPT, NULL); file_chooser = GTK_FILE_CHOOSER(open_dialog); /* Add GDS II Filter */ filter = gtk_file_filter_new(); gtk_file_filter_add_pattern(filter, "*.gds"); - gtk_file_filter_set_name(filter, "GDSII-Files"); + gtk_file_filter_set_name(filter, _("GDSII-Files")); gtk_file_chooser_add_filter(file_chooser, filter); dialog_result = gtk_dialog_run(GTK_DIALOG(open_dialog)); diff --git a/main.c b/main.c index d7f522d..c2f1458 100644 --- a/main.c +++ b/main.c @@ -219,8 +219,8 @@ static int start_gui(int argc, char **argv) menu = g_menu_new(); m_quit = g_menu_new(); m_about = g_menu_new(); - g_menu_append(m_quit, "Quit", "app.quit"); - g_menu_append(m_about, "About", "app.about"); + g_menu_append(m_quit, _("Quit"), "app.quit"); + g_menu_append(m_about, _("About"), "app.about"); g_menu_append_section(menu, NULL, G_MENU_MODEL(m_about)); g_menu_append_section(menu, NULL, G_MENU_MODEL(m_quit)); g_action_map_add_action_entries(G_ACTION_MAP(gapp), app_actions, @@ -244,7 +244,7 @@ static int start_gui(int argc, char **argv) */ static void print_version(void) { - printf("This is gds-render, version: %s\n\nFor a list of supported commands execute with --help option.\n", + printf(_("This is gds-render, version: %s\n\nFor a list of supported commands execute with --help option.\n"), _app_version_string); } @@ -274,24 +274,24 @@ int main(int argc, char **argv) textdomain(GETTEXT_PACKAGE); GOptionEntry entries[] = { - {"version", 'v', 0, G_OPTION_ARG_NONE, &version, "Print version", NULL}, - {"renderer", 'r', 0, G_OPTION_ARG_STRING_ARRAY, &renderer_args, "Renderer to use. Can be used multiple times.", "pdf|svg|tikz|ext"}, - {"scale", 's', 0, G_OPTION_ARG_INT, &scale, "Divide output coordinates by ", "" }, - {"output-file", 'o', 0, G_OPTION_ARG_FILENAME_ARRAY, &output_paths, "Output file path. Can be used multiple times.", "PATH" }, - {"mapping", 'm', 0, G_OPTION_ARG_FILENAME, &mappingname, "Path for Layer Mapping File", "PATH" }, - {"cell", 'c', 0, G_OPTION_ARG_STRING, &cellname, "Cell to render", "NAME" }, - {"tex-standalone", 'a', 0, G_OPTION_ARG_NONE, &pdf_standalone, "Create standalone PDF", NULL }, - {"tex-layers", 'l', 0, G_OPTION_ARG_NONE, &pdf_layers, "Create PDF Layers (OCG)", NULL }, + {"version", 'v', 0, G_OPTION_ARG_NONE, &version, _("Print version"), NULL}, + {"renderer", 'r', 0, G_OPTION_ARG_STRING_ARRAY, &renderer_args, _("Renderer to use. Can be used multiple times."), "pdf|svg|tikz|ext"}, + {"scale", 's', 0, G_OPTION_ARG_INT, &scale, _("Divide output coordinates by "), "" }, + {"output-file", 'o', 0, G_OPTION_ARG_FILENAME_ARRAY, &output_paths, _("Output file path. Can be used multiple times."), "PATH" }, + {"mapping", 'm', 0, G_OPTION_ARG_FILENAME, &mappingname, _("Path for Layer Mapping File"), "PATH" }, + {"cell", 'c', 0, G_OPTION_ARG_STRING, &cellname, _("Cell to render"), "NAME" }, + {"tex-standalone", 'a', 0, G_OPTION_ARG_NONE, &pdf_standalone, _("Create standalone TeX"), NULL }, + {"tex-layers", 'l', 0, G_OPTION_ARG_NONE, &pdf_layers, _("Create PDF Layers (OCG)"), NULL }, {"custom-render-lib", 'P', 0, G_OPTION_ARG_FILENAME, &custom_library_path, "Path to a custom shared object, that implements the " EXTERNAL_LIBRARY_FUNCTION " function", "PATH"}, {NULL} }; - context = g_option_context_new(" FILE - Convert GDS file to graphic"); + context = g_option_context_new(_(" FILE - Convert GDS file to graphic")); g_option_context_add_main_entries(context, entries, NULL); g_option_context_add_group(context, gtk_get_option_group(TRUE)); if (!g_option_context_parse(context, &argc, &argv, &error)) { - g_print("Option parsing failed: %s\n", error->message); + g_print(_("Option parsing failed: %s\n"), error->message); exit(1); } @@ -302,7 +302,7 @@ int main(int argc, char **argv) if (argc >= 2) { if (scale < 1) { - printf("Scale < 1 not allowed. Setting to 1\n"); + printf(_("Scale < 1 not allowed. Setting to 1\n")); scale = 1; } @@ -311,7 +311,7 @@ int main(int argc, char **argv) /* Print out additional arguments as ignored */ for (i = 2; i < argc; i++) { - printf("Ignored argument: %s", argv[i]); + printf(_("Ignored argument: %s"), argv[i]); } app_status = diff --git a/translations/generate-mo.sh b/translations/generate-mo.sh index 872e94c..16b6a44 100755 --- a/translations/generate-mo.sh +++ b/translations/generate-mo.sh @@ -18,6 +18,7 @@ for langdir in `find ./pot/po -mindepth 1 -maxdepth 1 -type d`; do lang=`basename "$langdir"` dest="$1/locale/$lang/LC_MESSAGES" mkdir -p "$dest" - pofiles=`find "$langdir" -name "*.po"` - msgfmt --output-file="$dest/gds-render.mo" "$pofiles" + pofiles=`find "$langdir" -name "*.po" | tr '\n' ' '` + comb=`msgcat $pofiles` + echo "$comb" | msgfmt --output-file="$dest/gds-render.mo" - done diff --git a/translations/pot/gds-render-gui.pot b/translations/pot/gds-render-gui.pot new file mode 100644 index 0000000..a0b152d --- /dev/null +++ b/translations/pot/gds-render-gui.pot @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-10-18 23:08+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gds-render-gui.c:272 +msgid "Acc. Date" +msgstr "" + +#: ../gds-render-gui.c:313 +msgid "Cancel" +msgstr "" + +#: ../gds-render-gui.c:265 +msgid "Cell" +msgstr "" + +#: ../gds-render-gui.c:321 +msgid "GDSII-Files" +msgstr "" + +#: ../gds-render-gui.c:262 +msgid "Library" +msgstr "" + +#: ../gds-render-gui.c:269 +msgid "Mod. Date" +msgstr "" + +#: ../gds-render-gui.c:314 +msgid "Open GDSII" +msgstr "" + +#: ../gds-render-gui.c:311 +msgid "Open GDSII File" +msgstr "" diff --git a/translations/pot/main.pot b/translations/pot/main.pot index a01a80a..252e5f7 100644 --- a/translations/pot/main.pot +++ b/translations/pot/main.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-18 20:50+0200\n" +"POT-Creation-Date: 2019-10-18 23:08+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -25,18 +25,85 @@ msgid "" "Full git commit: %s" msgstr "" +#: ../main.c:289 +msgid " FILE - Convert GDS file to graphic" +msgstr "" + +#: ../main.c:223 +msgid "About" +msgstr "" + +#: ../main.c:282 +msgid "Cell to render" +msgstr "" + +#: ../main.c:284 +msgid "Create PDF Layers (OCG)" +msgstr "" + +#: ../main.c:283 +msgid "Create standalone TeX" +msgstr "" + +#: ../main.c:279 +msgid "Divide output coordinates by " +msgstr "" + +#: ../main.c:314 +#, c-format +msgid "Ignored argument: %s" +msgstr "" + #: ../main.c:118 #, c-format msgid "Logo could not be displayed: %s\n" msgstr "" -#: ../main.c:219 +#: ../main.c:294 +#, c-format +msgid "Option parsing failed: %s\n" +msgstr "" + +#: ../main.c:280 +msgid "Output file path. Can be used multiple times." +msgstr "" + +#: ../main.c:281 +msgid "Path for Layer Mapping File" +msgstr "" + +#: ../main.c:277 +msgid "Print version" +msgstr "" + +#: ../main.c:222 +msgid "Quit" +msgstr "" + +#: ../main.c:278 +msgid "Renderer to use. Can be used multiple times." +msgstr "" + +#: ../main.c:305 +#, c-format +msgid "Scale < 1 not allowed. Setting to 1\n" +msgstr "" + +#: ../main.c:215 #, c-format msgid "" "There is already an open instance. Will open second window in that " "instance.\n" msgstr "" +#: ../main.c:247 +#, c-format +msgid "" +"This is gds-render, version: %s\n" +"\n" +"For a list of supported commands execute with --help option.\n" +msgstr "" + #: ../main.c:98 msgid "" "gds-render is a free tool for rendering GDS2 layout files into vector " diff --git a/translations/pot/po/de/.gitignore b/translations/pot/po/de/.gitignore new file mode 100644 index 0000000..4591c0f --- /dev/null +++ b/translations/pot/po/de/.gitignore @@ -0,0 +1 @@ +*.po~ diff --git a/translations/pot/po/de/gds-render-gui.po b/translations/pot/po/de/gds-render-gui.po new file mode 100644 index 0000000..394ded6 --- /dev/null +++ b/translations/pot/po/de/gds-render-gui.po @@ -0,0 +1,50 @@ +# German translations for PACKAGE package. +# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Mario Hüttel , 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: gds-render VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-10-18 23:08+0200\n" +"PO-Revision-Date: 2019-10-18 23:10+0200\n" +"Last-Translator: \n" +"Language-Team: German \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../gds-render-gui.c:272 +msgid "Acc. Date" +msgstr "Zugr. Datum" + +#: ../gds-render-gui.c:313 +msgid "Cancel" +msgstr "Abbruch" + +#: ../gds-render-gui.c:265 +msgid "Cell" +msgstr "Zelle" + +#: ../gds-render-gui.c:321 +msgid "GDSII-Files" +msgstr "GDSII-Dateiem" + +#: ../gds-render-gui.c:262 +msgid "Library" +msgstr "Bibliothek" + +#: ../gds-render-gui.c:269 +msgid "Mod. Date" +msgstr "Mod. Datum" + +#: ../gds-render-gui.c:314 +msgid "Open GDSII" +msgstr "GDSII öffnen" + +#: ../gds-render-gui.c:311 +msgid "Open GDSII File" +msgstr "GDSII Datei öffnen" diff --git a/translations/pot/po/de/main.po b/translations/pot/po/de/main.po index 63e3417..ec2d9a6 100644 --- a/translations/pot/po/de/main.po +++ b/translations/pot/po/de/main.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gds-render VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-18 20:32+0200\n" +"POT-Creation-Date: 2019-10-18 23:03+0200\n" "PO-Revision-Date: 2019-10-18 20:49+0200\n" "Last-Translator: \n" "Language-Team: German \n" @@ -28,20 +28,95 @@ msgstr "" "\n" "Vollständige git Commit-ID %s" +#: ../main.c:289 +msgid " FILE - Convert GDS file to graphic" +msgstr "Datei -- Konvertiere GDS Datei zu Vektorgrafik" + +#: ../main.c:223 +msgid "About" +msgstr "Über" + +#: ../main.c:282 +msgid "Cell to render" +msgstr "Zu konvertierende Zelle" + +#: ../main.c:284 +msgid "Create PDF Layers (OCG)" +msgstr "Generiere PDF Layer (OCG)" + +#: ../main.c:283 +msgid "Create standalone TeX" +msgstr "Generiere alleinstehendes TeX" + +#: ../main.c:279 +msgid "Divide output coordinates by " +msgstr "Skaliere Ausgabekoordinaten um Faktor herab" + +#: ../main.c:314 +#, c-format +msgid "Ignored argument: %s" +msgstr "Ignoriertes Argument: %s" + #: ../main.c:118 #, c-format msgid "Logo could not be displayed: %s\n" msgstr "Logo konnte nicht angezeigt werden: %s\n" -#: ../main.c:219 +#: ../main.c:294 +#, c-format +msgid "Option parsing failed: %s\n" +msgstr "Übergabeparameterkonvertierung fehlgeschlagen: %s\n" + +#: ../main.c:280 +msgid "Output file path. Can be used multiple times." +msgstr "Ausgabedatei. Kann mehrfach angegeben werden." + +#: ../main.c:281 +msgid "Path for Layer Mapping File" +msgstr "Pfad zur \"Layer Mapping\"-Datei" + +#: ../main.c:277 +msgid "Print version" +msgstr "Programmversion aufgeben" + +#: ../main.c:222 +msgid "Quit" +msgstr "Beenden" + +#: ../main.c:278 +msgid "Renderer to use. Can be used multiple times." +msgstr "Gewünschter Renderer. Kann mehrfach angegeben werden." + +#: ../main.c:305 +#, c-format +msgid "Scale < 1 not allowed. Setting to 1\n" +msgstr "Skalierung < 1 nicht erlaubt. Rückfallwert 1 benutzt.\n" + +#: ../main.c:215 #, c-format msgid "" "There is already an open instance. Will open second window in that " "instance.\n" -msgstr "Es is bereits eine Instanz dieses Programms geöffnet. Ein weiteres Fenster in dieser wird geöffnet.\n" +msgstr "" +"Es is bereits eine Instanz dieses Programms geöffnet. Ein weiteres Fenster " +"in dieser wird geöffnet.\n" + +#: ../main.c:247 +#, c-format +msgid "" +"This is gds-render, version: %s\n" +"\n" +"For a list of supported commands execute with --help option.\n" +msgstr "" +"gds-render, Version %s\n" +"\n" +"Um eine Liste der unterstützten Befehle zu erhalten, bitte mit der Option --" +"help ausführen.\n" #: ../main.c:98 msgid "" "gds-render is a free tool for rendering GDS2 layout files into vector " "graphics." -msgstr "gds-render is ein freies Werkzeug zum Wandeln von GDS2 Layouts in Vektorgrafiken." +msgstr "" +"gds-render is ein freies Werkzeug zum Wandeln von GDS2 Layouts in " +"Vektorgrafiken." diff --git a/translations/pot/prepare_language.sh b/translations/pot/prepare_language.sh index 94e30ab..162c631 100755 --- a/translations/pot/prepare_language.sh +++ b/translations/pot/prepare_language.sh @@ -11,6 +11,7 @@ cd "$DIR" if [ -z $1 ]; then echo "Please specify language code to generate/update" + exit -1 fi locale="$1"