Merge commit '866d36873a4adef0ef8505de25740c03ec92a2e0' into dev

This commit is contained in:
Mario Hüttel 2019-11-12 19:53:02 +01:00
commit 24d66e74fe
20 changed files with 737 additions and 48 deletions

View File

@ -1,7 +1,7 @@
# Maintainer: Mario Hüttel <mario (dot) huettel (!) gmx (dot) net>
pkgname=gds-render
pkgver=20180725.001
pkgver=20191020.403.448de30
pkgrel=1
pkgdesc="Conversion tool for converting GDS layout files into TikZ Code and PDF"
arch=('i686' 'x86_64')
@ -20,13 +20,14 @@ pkgver () {
}
build () {
cd "$srcdir/$pkgname-git"
cmake -DCMAKE_BUILD_TYPE=Release .
mkdir "$srcdir/$pkgname-git/build"
cd "$srcdir/$pkgname-git/build"
cmake -DCMAKE_BUILD_TYPE=Release ..
make
}
package () {
cd "$srcdir/$pkgname-git"
cd "$srcdir/$pkgname-git/build"
make DESTDIR="${pkgdir}" install
install -D -m664 "$srcdir/$pkgname-git/AUR/gds-render.desktop" \
"$pkgdir/usr/share/applications/gds-render.desktop"
@ -34,4 +35,6 @@ package () {
"$pkgdir/usr/share/icons/hicolor/scalable/apps/gds-render.svg"
install -D -m664 "$srcdir/$pkgname-git/icon/128x128/gds-render.png" \
"$pkgdir/usr/share/icons/hicolor/128x128/apps/gds-render.png"
(cd $srcdir/$pkgname-git/build/translations/output/ && tar cf - "locale" | (cd "$pkgdir/usr/share/" && tar xf -))
}

View File

@ -1,5 +1,29 @@
project(gds-render)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "/usr/" CACHE PATH "..." FORCE)
endif()
if(NOT WIN32)
string(ASCII 27 Esc)
set(ColorReset "${Esc}[m")
set(ColorBold "${Esc}[1m")
set(Red "${Esc}[31m")
set(Green "${Esc}[32m")
set(Yellow "${Esc}[33m")
set(Blue "${Esc}[34m")
set(Magenta "${Esc}[35m")
set(Cyan "${Esc}[36m")
set(White "${Esc}[37m")
set(BoldRed "${Esc}[1;31m")
set(BoldGreen "${Esc}[1;32m")
set(BoldYellow "${Esc}[1;33m")
set(BoldBlue "${Esc}[1;34m")
set(BoldMagenta "${Esc}[1;35m")
set(BoldCyan "${Esc}[1;36m")
set(BoldWhite "${Esc}[1;37m")
endif()
cmake_minimum_required(VERSION 2.8)
find_package(PkgConfig REQUIRED)
pkg_search_module(GLIB REQUIRED glib-2.0)
@ -8,8 +32,18 @@ pkg_check_modules(CAIRO REQUIRED cairo)
add_compile_options(-Wall -Wextra -Wold-style-declaration -Wuninitialized -Wmaybe-uninitialized -Wunused-parameter)
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("${Yellow}Debug mode for translations used!${ColorReset}")
add_definitions(-DGETTEXT_PACKAGE=\"gds-render\" -DLOCALEDATADIR=\"${CMAKE_CURRENT_BINARY_DIR}/translations/output\")
message("${BoldMagenta}${CMAKE_CURRENT_BINARY_DIR}/translations/output used as data dir${ColorReset}")
else(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("Global locale directory used. Make sure files in /usr/share/locale are available")
add_definitions(-DGETTEXT_PACKAGE=\"gds-render\" -DLOCALEDATADIR=\"/usr/share\")
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_subdirectory(resources)
add_subdirectory(doxygen)
add_subdirectory(translations)
add_subdirectory(version)
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
@ -37,8 +71,12 @@ set(SOURCE
add_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c)
add_dependencies(${PROJECT_NAME} glib-resources)
add_dependencies(${PROJECT_NAME} version)
add_dependencies(${PROJECT_NAME} translations)
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c PROPERTIES GENERATED 1)
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m version ${CMAKE_DL_LIBS})
install (TARGETS ${PROJECT_NAME} DESTINATION bin)
install (TARGETS ${PROJECT_NAME}
RUNTIME
DESTINATION bin
)
add_custom_target(documentation DEPENDS doxygen)

View File

@ -29,6 +29,7 @@
*/
#include <stdio.h>
#include <glib/gi18n.h>
#include <gds-render/command-line.h>
#include <gds-render/gds-utils/gds-parser.h>
@ -70,14 +71,14 @@ static int create_renderers(char **renderers,
return -1;
if (!renderers || !output_file_names) {
fprintf(stderr, "Please specify renderers and file names\n");
fprintf(stderr, _("Please specify renderers and file names\n"));
return -1;
}
count_render = string_array_count(renderers);
count_out = string_array_count(output_file_names);
if (count_render != count_out) {
fprintf(stderr, "Count of renderers %d does not match count of output file names %d\n",
fprintf(stderr, _("Count of renderers %d does not match count of output file names %d\n"),
count_render, count_out);
return -1;
}
@ -100,7 +101,7 @@ static int create_renderers(char **renderers,
output_renderer = GDS_RENDER_OUTPUT_RENDERER(cairo_renderer_new_svg());
} else if (!strcmp(current_renderer, "ext")) {
if (!so_path) {
fprintf(stderr, "Please specify shared object for external renderer. Will ignore this renderer.\n");
fprintf(stderr, _("Please specify shared object for external renderer. Will ignore this renderer.\n"));
continue;
}
output_renderer = GDS_RENDER_OUTPUT_RENDERER(external_renderer_new_with_so(so_path));
@ -154,7 +155,7 @@ int command_line_convert_gds(const char *gds_name,
/* Check if parameters are valid */
if (!gds_name || !cell_name || !output_file_names || !layer_file || !renderers) {
printf("Probably missing argument. Check --help option\n");
printf(_("Probably missing argument. Check --help option\n"));
return -2;
}
@ -180,7 +181,7 @@ int command_line_convert_gds(const char *gds_name,
first_lib = (struct gds_library *)libs->data;
if (!first_lib) {
fprintf(stderr, "No library in library list. This should not happen.\n");
fprintf(stderr, _("No library in library list. This should not happen.\n"));
/* This is safe. Library destruction can handle an empty list element */
goto ret_destroy_library_list;
}
@ -189,27 +190,27 @@ int command_line_convert_gds(const char *gds_name,
toplevel_cell = find_gds_cell_in_lib(first_lib, cell_name);
if (!toplevel_cell) {
printf("Couldn't find cell in first library!\n");
printf(_("Couldn't find cell in first library!\n"));
goto ret_destroy_library_list;
}
/* Check if cell passes vital checks */
res = gds_tree_check_reference_loops(toplevel_cell->parent_library);
if (res < 0) {
fprintf(stderr, "Checking library %s failed.\n", first_lib->name);
fprintf(stderr, _("Checking library %s failed.\n"), first_lib->name);
goto ret_destroy_library_list;
} else if (res > 0) {
fprintf(stderr, "%d reference loops found.\n", res);
fprintf(stderr, _("%d reference loops found.\n"), res);
/* do further checking if the specified cell and/or its subcells are affected */
if (toplevel_cell->checks.affected_by_reference_loop == 1) {
fprintf(stderr, "Cell is affected by reference loop. Abort!\n");
fprintf(stderr, _("Cell is affected by reference loop. Abort!\n"));
goto ret_destroy_library_list;
}
}
if (toplevel_cell->checks.affected_by_reference_loop == GDS_CELL_CHECK_NOT_RUN)
fprintf(stderr, "Cell was not checked. This should not happen. Please report this issue. Will continue either way.\n");
fprintf(stderr, _("Cell was not checked. This should not happen. Please report this issue. Will continue either way.\n"));
/* Note: unresolved references are not an abort condition.
* Deal with it.

View File

@ -29,6 +29,7 @@
#include <stdio.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gds-render/gds-render-gui.h>
#include <gds-render/gds-utils/gds-parser.h>
@ -261,17 +262,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
@ -312,17 +313,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));

50
main.c
View File

@ -23,9 +23,13 @@
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
#include <stdio.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <locale.h>
#include <gds-render/gds-render-gui.h>
#include <gds-render/command-line.h>
@ -91,8 +95,8 @@ static void app_about(GSimpleAction *action, GVariant *parameter, gpointer user_
(void)parameter;
GString *comment_text;
comment_text = g_string_new("gds-render is a free tool for rendering GDS2 layout files into vector graphics.");
g_string_append_printf(comment_text, "\n\nFull git commit: %s", _app_git_commit);
comment_text = g_string_new(_("gds-render is a free tool for rendering GDS2 layout files into vector graphics."));
g_string_append_printf(comment_text, _("\n\nFull git commit: %s"), _app_git_commit);
builder = gtk_builder_new_from_resource("/gui/about.glade");
dialog = GTK_DIALOG(gtk_builder_get_object(builder, "about-dialog"));
@ -111,7 +115,7 @@ static void app_about(GSimpleAction *action, GVariant *parameter, gpointer user_
/* Pixbuf is now owned by about dialog. Unref */
g_object_unref(logo_buf);
} else if (error) {
fprintf(stderr, "Logo could not be displayed: %s\n", error->message);
fprintf(stderr, _("Logo could not be displayed: %s\n"), error->message);
g_error_free(error);
}
@ -208,15 +212,15 @@ static int start_gui(int argc, char **argv)
if (g_application_get_is_remote(G_APPLICATION(gapp)) == TRUE) {
g_application_activate(G_APPLICATION(gapp));
printf("There is already an open instance. Will open second window in that instance.\n");
printf(_("There is already an open instance. Will open second window in that instance.\n"));
return 0;
}
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,
@ -240,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);
}
@ -265,28 +269,32 @@ int main(int argc, char **argv)
int scale = 1000;
int app_status = 0;
bindtextdomain(GETTEXT_PACKAGE, LOCALEDATADIR "/locale");
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
GOptionEntry entries[] = {
{"version", 'v', 0, G_OPTION_ARG_NONE, &version, "Print version", 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 <SCALE>", "<SCALE>" },
_("Renderer to use. Can be used multiple times."), "pdf|svg|tikz|ext"},
{"scale", 's', 0, G_OPTION_ARG_INT, &scale, _("Divide output coordinates by <SCALE>"), "<SCALE>" },
{"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 },
{"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"},
_("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 <FILE> to graphic");
context = g_option_context_new(_(" FILE - Convert GDS file <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);
}
@ -297,7 +305,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;
}
@ -306,7 +314,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 =
command_line_convert_gds(gds_name, cellname, renderer_args, output_paths, mappingname,

View File

@ -0,0 +1,4 @@
add_custom_target(translations ALL
COMMAND ./generate-mo.sh "${PROJECT_BINARY_DIR}/translations/output"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating translation locales")

24
translations/generate-mo.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )"
cd "$DIR"
if [ -z $1 ]; then
echo "Must supply an output name"
exit -2
fi
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" | tr '\n' ' '`
comb=`msgcat $pofiles`
echo "$comb" | msgfmt --output-file="$dest/gds-render.mo" -
done

View File

@ -0,0 +1,19 @@
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )"
cd "$DIR"
files=`find ../ -name "*.c"`
mkdir -p "pot"
for file in $files; do
pot="pot/"$(echo "${file#*/}" | sed -e "s/\//_/g")
pot="${pot%.c}.pot"
xgettext --keyword=_ --language=C --add-comments --sort-output -o "$pot" "$file"
done

View File

@ -0,0 +1,72 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-25 20:27+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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../command-line.c:203
#, c-format
msgid "%d reference loops found.\n"
msgstr ""
#: ../command-line.c:207
#, c-format
msgid "Cell is affected by reference loop. Abort!\n"
msgstr ""
#: ../command-line.c:213
#, c-format
msgid ""
"Cell was not checked. This should not happen. Please report this issue. Will "
"continue either way.\n"
msgstr ""
#: ../command-line.c:200
#, c-format
msgid "Checking library %s failed.\n"
msgstr ""
#: ../command-line.c:193
#, c-format
msgid "Couldn't find cell in first library!\n"
msgstr ""
#: ../command-line.c:81
#, c-format
msgid "Count of renderers %d does not match count of output file names %d\n"
msgstr ""
#: ../command-line.c:184
#, c-format
msgid "No library in library list. This should not happen.\n"
msgstr ""
#: ../command-line.c:74
#, c-format
msgid "Please specify renderers and file names\n"
msgstr ""
#: ../command-line.c:104
#, c-format
msgid ""
"Please specify shared object for external renderer. Will ignore this "
"renderer.\n"
msgstr ""
#: ../command-line.c:158
#, c-format
msgid "Probably missing argument. Check --help option\n"
msgstr ""

View File

@ -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 <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-25 20:27+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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../gds-render-gui.c:273
msgid "Acc. Date"
msgstr ""
#: ../gds-render-gui.c:314
msgid "Cancel"
msgstr ""
#: ../gds-render-gui.c:266
msgid "Cell"
msgstr ""
#: ../gds-render-gui.c:322
msgid "GDSII-Files"
msgstr ""
#: ../gds-render-gui.c:263
msgid "Library"
msgstr ""
#: ../gds-render-gui.c:270
msgid "Mod. Date"
msgstr ""
#: ../gds-render-gui.c:315
msgid "Open GDSII"
msgstr ""
#: ../gds-render-gui.c:312
msgid "Open GDSII File"
msgstr ""

111
translations/pot/main.pot Normal file
View File

@ -0,0 +1,111 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-25 20:27+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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../main.c:99
#, c-format
msgid ""
"\n"
"\n"
"Full git commit: %s"
msgstr ""
#: ../main.c:289
msgid " FILE - Convert GDS file <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 <SCALE>"
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: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 "
"graphics."
msgstr ""

1
translations/pot/po/de/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.po~

View File

@ -0,0 +1,73 @@
# German translations for gds-render package.
# Copyright (C) 2019 THE gds-render's COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Mario Hüttel <mario.huettel@gmx.net>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-22 23:02+0200\n"
"PO-Revision-Date: 2019-10-22 23:02+0200\n"
"Last-Translator: <mario.huettel@gmx.net>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\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"
#: ../command-line.c:203
#, c-format
msgid "%d reference loops found.\n"
msgstr "%d Referenzschleifen gefunden.\n"
#: ../command-line.c:207
#, c-format
msgid "Cell is affected by reference loop. Abort!\n"
msgstr "Zelle von Referenzschleife betroffen. Abbruch!\n"
#: ../command-line.c:213
#, c-format
msgid ""
"Cell was not checked. This should not happen. Please report this issue. Will "
"continue either way.\n"
msgstr "Zelle wurde nicht überprüft. Das sollte nicht passieren. Bitte melden Sie dieses Fehlverhalten. Es wird "
"dennoch fortgefahren.\n"
#: ../command-line.c:200
#, c-format
msgid "Checking library %s failed.\n"
msgstr "Überprüfen der Bibliothek %s fehlgeschlagen.\n"
#: ../command-line.c:193
#, c-format
msgid "Couldn't find cell in first library!\n"
msgstr "Konnte Zelle nicht in der ersten Bibliothek finden!\n"
#: ../command-line.c:81
#, c-format
msgid "Count of renderers %d does not match count of output file names %d\n"
msgstr "Anzahl der Renderer %d entspricht nicht der Anzahl der angegebenen Ausgabepfade %s\n"
#: ../command-line.c:184
#, c-format
msgid "No library in library list. This should not happen.\n"
msgstr "Keine Bilbiothek in Bibliotheksliste vorhanden. Dies sollte nicht passieren.\n"
#: ../command-line.c:74
#, c-format
msgid "Please specify renderers and file names\n"
msgstr "Bitte geben Sie Renderer und Dateinamen an\n"
#: ../command-line.c:104
#, c-format
msgid ""
"Please specify shared object for external renderer. Will ignore this "
"renderer.\n"
msgstr "Bitte geben Sie ein 'shared object' für den externen Renderer an. Renderer wird ignoriert.\n"
#: ../command-line.c:158
#, c-format
msgid "Probably missing argument. Check --help option\n"
msgstr "Vermutlich fehlendes Argument. Siehe --help Option für Hilfe\n"

View File

@ -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 <mario.huettel@gmx.net>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: gds-render VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-22 23:02+0200\n"
"PO-Revision-Date: 2019-10-18 23:10+0200\n"
"Last-Translator: <mario.huettel@gmx.net>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\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:273
msgid "Acc. Date"
msgstr "Zugr. Datum"
#: ../gds-render-gui.c:314
msgid "Cancel"
msgstr "Abbruch"
#: ../gds-render-gui.c:266
msgid "Cell"
msgstr "Zelle"
#: ../gds-render-gui.c:322
msgid "GDSII-Files"
msgstr "GDSII-Dateiem"
#: ../gds-render-gui.c:263
msgid "Library"
msgstr "Bibliothek"
#: ../gds-render-gui.c:270
msgid "Mod. Date"
msgstr "Mod. Datum"
#: ../gds-render-gui.c:315
msgid "Open GDSII"
msgstr "GDSII öffnen"
#: ../gds-render-gui.c:312
msgid "Open GDSII File"
msgstr "GDSII Datei öffnen"

View File

@ -0,0 +1,122 @@
# German translations for gds-render package.
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the gds-render package.
# Mario Hüttel <mario.huettel@gmx.net>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: gds-render VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-18 23:03+0200\n"
"PO-Revision-Date: 2019-10-18 20:49+0200\n"
"Last-Translator: <mario.huettel@gmx.net>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\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"
#: ../main.c:99
#, c-format
msgid ""
"\n"
"\n"
"Full git commit: %s"
msgstr ""
"\n"
"\n"
"Vollständige git Commit-ID %s"
#: ../main.c:289
msgid " FILE - Convert GDS file <FILE> to graphic"
msgstr "Datei -- Konvertiere GDS Datei <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 <SCALE>"
msgstr "Skaliere Ausgabekoordinaten um Faktor <SCALE> 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: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"
#: ../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."

View File

@ -0,0 +1,26 @@
# German translations for gds-render package.
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Mario Hüttel <mario.huettel@gmx.net>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-25 20:27+0200\n"
"PO-Revision-Date: 2019-10-25 20:27+0200\n"
"Last-Translator: <mario.huettel@gmx.net>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\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"
#: ../widgets/activity-bar.c:105
msgid "Ready"
msgstr "Bereit"
#: ../widgets/activity-bar.c:111
msgid "Working..."
msgstr "Berechnung aktiv..."

View File

@ -0,0 +1,34 @@
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )"
cd "$DIR"
if [ -z $1 ]; then
echo "Please specify language code to generate/update"
exit -1
fi
locale="$1"
podir="./po/$locale"
echo "Selected locale: $locale"
mkdir -p "$podir"
pots=`find . -name '*.pot'`
for pot in $pots; do
po=`echo "$podir/${pot%.pot}.po" | sed -e "s/\/.\//\//g"`
echo -n "$po: "
if [ -f "$po" ]; then
echo "update"
msgmerge --update "$po" "$pot"
else
echo "generate"
msginit --input="$pot" --locale="$locale" --output="$po"
fi
done

View File

@ -0,0 +1,26 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-25 20:27+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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../widgets/activity-bar.c:105
msgid "Ready"
msgstr ""
#: ../widgets/activity-bar.c:111
msgid "Working..."
msgstr ""

View File

@ -1,4 +1,25 @@
project(libversion)
if(NOT WIN32)
string(ASCII 27 Esc)
set(ColorReset "${Esc}[m")
set(ColorBold "${Esc}[1m")
set(Red "${Esc}[31m")
set(Green "${Esc}[32m")
set(Yellow "${Esc}[33m")
set(Blue "${Esc}[34m")
set(Magenta "${Esc}[35m")
set(Cyan "${Esc}[36m")
set(White "${Esc}[37m")
set(BoldRed "${Esc}[1;31m")
set(BoldGreen "${Esc}[1;32m")
set(BoldYellow "${Esc}[1;33m")
set(BoldBlue "${Esc}[1;34m")
set(BoldMagenta "${Esc}[1;35m")
set(BoldCyan "${Esc}[1;36m")
set(BoldWhite "${Esc}[1;37m")
endif()
add_library(version STATIC "version.c")
execute_process(COMMAND bash ./generate-version-string.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@ -6,6 +27,10 @@ execute_process(COMMAND bash ./generate-version-string.sh
execute_process(COMMAND bash ./generate-git-commit-string.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT)
message("Commit: ${GIT_COMMIT}")
message("Version: ${GIT_VER}")
message("${BoldGreen}Commit: ${GIT_COMMIT}")
message("Version: ${GIT_VER}${ColorReset}")
IF(GIT_VER MATCHES "-dirty")
message("${BoldRed}Build is dirty! Commit your changes before releasing this version!${ColorReset}")
ENDIF(GIT_VER MATCHES "-dirty")
target_compile_definitions(version PRIVATE PROJECT_GIT_VERSION=${GIT_VER} PROJECT_GIT_COMMIT=${GIT_COMMIT})

View File

@ -37,6 +37,7 @@
*/
#include <gds-render/widgets/activity-bar.h>
#include <glib/gi18n.h>
/** @brief Opaque ActivityBar object. Not viewable outside this source file. */
struct _ActivityBar {
@ -101,13 +102,13 @@ ActivityBar *activity_bar_new()
/* TODO: Complete this once the task list is fully implemented */
void activity_bar_set_ready(ActivityBar *bar)
{
gtk_label_set_text(GTK_LABEL(bar->label), "Ready");
gtk_label_set_text(GTK_LABEL(bar->label), _("Ready"));
gtk_spinner_stop(GTK_SPINNER(bar->spinner));
}
void activity_bar_set_busy(ActivityBar *bar, const char *text)
{
gtk_label_set_text(GTK_LABEL(bar->label), (text ? text : "Working..."));
gtk_label_set_text(GTK_LABEL(bar->label), (text ? text : _("Working...")));
gtk_spinner_start(GTK_SPINNER(bar->spinner));
}