Compare commits
4 Commits
japanese-t
...
translatio
Author | SHA1 | Date | |
---|---|---|---|
d7c0a34d7f | |||
de0e46394e | |||
f7ea1a4c7b | |||
e61d660ecc |
37
.github/workflows/cmake.yml
vendored
37
.github/workflows/cmake.yml
vendored
@@ -1,37 +0,0 @@
|
|||||||
name: CMake
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
# The CMake configure and build commands are platform agnostic and should work equally
|
|
||||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
|
||||||
# cross-platform coverage.
|
|
||||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get -y install libgtk-3-dev gettext
|
|
||||||
|
|
||||||
- name: Configure CMake
|
|
||||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
|
||||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
# Build your program with the given configuration
|
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
|
@@ -1,7 +1,5 @@
|
|||||||
# GDS-Render Readme
|
# GDS-Render Readme
|
||||||
|
|
||||||
[](https://github.com/0mhu/gds-render/actions/workflows/cmake.yml)
|
|
||||||
|
|
||||||
This software is a rendering programm for GDS2 layout files.
|
This software is a rendering programm for GDS2 layout files.
|
||||||
The GDS2 format is mainly used in integrated circuit development.
|
The GDS2 format is mainly used in integrated circuit development.
|
||||||
This program allows the conversion of a GDS file to a vector graphics file.
|
This program allows the conversion of a GDS file to a vector graphics file.
|
||||||
|
@@ -30,7 +30,7 @@ Development is done with the following library versions:
|
|||||||
|
|
||||||
| Cairographics | GLib2 | GTK3 |
|
| Cairographics | GLib2 | GTK3 |
|
||||||
| ------------- | ---------- | --------- |
|
| ------------- | ---------- | --------- |
|
||||||
| 1.17.2 | 2.64.2 | 3.24.18 |
|
| 1.17.3 | 2.60.6-1 | 3.24.10-1 |
|
||||||
|
|
||||||
@section comp-instr Compilation Instructions
|
@section comp-instr Compilation Instructions
|
||||||
@subsection linux-build General Linux Build Instruction
|
@subsection linux-build General Linux Build Instruction
|
||||||
@@ -47,7 +47,7 @@ Once cmake has finished, type
|
|||||||
make
|
make
|
||||||
@endcode
|
@endcode
|
||||||
to build the program and
|
to build the program and
|
||||||
|
|
||||||
@code
|
@code
|
||||||
make documentation
|
make documentation
|
||||||
@endcode
|
@endcode
|
||||||
@@ -59,7 +59,7 @@ The subfolder 'AUR' contains a PKGBUILD file to build an Archlinux/Pacman packag
|
|||||||
|
|
||||||
@subsection comp-warnings Compiler Warnings
|
@subsection comp-warnings Compiler Warnings
|
||||||
|
|
||||||
The compiler will throw the following warnings. Compiled with GCC 9.3.0.
|
The compiler will throw the following warnings. Compiled with GCC 8.2.1.
|
||||||
|
|
||||||
| Warning | Assessment |
|
| Warning | Assessment |
|
||||||
| ------- | ---------- |
|
| ------- | ---------- |
|
||||||
|
BIN
doxygen/images/translate-glade.png
Normal file
BIN
doxygen/images/translate-glade.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
53
doxygen/translation.dox
Normal file
53
doxygen/translation.dox
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
|
||||||
|
@page translation Translations / Internationalization
|
||||||
|
|
||||||
|
@section lang-available Available Languages
|
||||||
|
|
||||||
|
The development, documentation and default application language of gds-render is English.
|
||||||
|
Translations of GUI and console output exist for the following locales/languages
|
||||||
|
|
||||||
|
- de German (Deutsch)
|
||||||
|
- ja Japanese (日本語) (Work in progess)
|
||||||
|
|
||||||
|
On how to add new languages, see @ref lang-add
|
||||||
|
|
||||||
|
@section lang-internals Internals
|
||||||
|
This progamm uses gettext for translations.
|
||||||
|
|
||||||
|
@subsection lang-coding Make Strings Translatable in Code
|
||||||
|
Only strings, that are marked as translatable are actually available for translation and shown in the user's language.
|
||||||
|
All other text is displayed as written in the source files.
|
||||||
|
|
||||||
|
@subsubsection lang-add-glade Make GUI Elements in Glade Files Translatable
|
||||||
|
Text inside Glade's GUI files can be made translatable by checking the *translatable* option for the specific text property.
|
||||||
|
The following image shows the label property of a button. Notice the checked Translatable option.
|
||||||
|
@image html translate-glade.png
|
||||||
|
@image latex translate-glade.png
|
||||||
|
|
||||||
|
@subsubsection lang-add-c Make C Strings Translatable
|
||||||
|
In order to make strings in C code translatable, the following header has to be included:
|
||||||
|
@code
|
||||||
|
#inlcude <glib/gi18n.h>
|
||||||
|
@endcode
|
||||||
|
This header provides a few macros useful for translation. The most important one is the function-like macro
|
||||||
|
@code
|
||||||
|
_("Text here")
|
||||||
|
@endcode
|
||||||
|
which is just a underline character.
|
||||||
|
You can use this marco to encapsulate all static strings that shall be translated. The whole expression is still usable like any other string (except for compile time concatenation, like: "This is foo" " and this is bar")
|
||||||
|
|
||||||
|
Example:
|
||||||
|
@code
|
||||||
|
printf(_("The value of foo is %d\n"), foo);
|
||||||
|
@endcode
|
||||||
|
|
||||||
|
Text that must not be translated can be encapsulated inside a N_ macro like
|
||||||
|
@code
|
||||||
|
N_("This has to stay in English")
|
||||||
|
@endcode
|
||||||
|
The N_ macro is basically an empty macro and just for visualization.
|
||||||
|
|
||||||
|
@subsection lang-add Add a New Language
|
||||||
|
|
||||||
|
*/
|
@@ -187,8 +187,7 @@ static gboolean cell_store_filter_visible_func(GtkTreeModel *model, GtkTreeIter
|
|||||||
|
|
||||||
gtk_tree_model_get(model, iter, CELL_SEL_CELL, &cell, CELL_SEL_LIBRARY, &lib, -1);
|
gtk_tree_model_get(model, iter, CELL_SEL_CELL, &cell, CELL_SEL_LIBRARY, &lib, -1);
|
||||||
|
|
||||||
/* Show always, if this is a pure lib entry */
|
if (lib) {
|
||||||
if (lib && !cell) {
|
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
goto exit_filter;
|
goto exit_filter;
|
||||||
}
|
}
|
||||||
|
@@ -65,7 +65,7 @@ void vector_2d_rotate(struct vector_2d *vec, double angle)
|
|||||||
sin_val = sin(angle);
|
sin_val = sin(angle);
|
||||||
cos_val = cos(angle);
|
cos_val = cos(angle);
|
||||||
|
|
||||||
(void)vector_2d_copy(&temp, vec);
|
vector_2d_copy(&temp, vec);
|
||||||
|
|
||||||
/* Apply rotation matrix */
|
/* Apply rotation matrix */
|
||||||
vec->x = (cos_val * temp.x) - (sin_val * temp.y);
|
vec->x = (cos_val * temp.x) - (sin_val * temp.y);
|
||||||
|
@@ -35,17 +35,10 @@
|
|||||||
#include <gds-render/gds-utils/gds-types.h>
|
#include <gds-render/gds-utils/gds-types.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Calculate bounding box of a gds cell.
|
* @brief calculate_cell_bounding_box Calculate bounding box of gds cell
|
||||||
*
|
* @param box Resulting boundig box. Will be uüdated and not overwritten
|
||||||
* This function updates a given bounding box with the dimensions of a
|
|
||||||
* gds_cell. Please note that the handling of path miter points is not complete yet.
|
|
||||||
* If a path object is the outmost object of your cell at any edge,
|
|
||||||
* the resulting bounding box might be the wrong size. The devistion from the real size
|
|
||||||
* is guaranteed to be within the width of the path object.
|
|
||||||
*
|
|
||||||
* @param box Resulting boundig box. Will be updated and not overwritten
|
|
||||||
* @param cell Toplevel cell
|
* @param cell Toplevel cell
|
||||||
* @warning Handling of Path graphic objects not yet implemented correctly.
|
* @warning Path handling not yet implemented correctly.
|
||||||
*/
|
*/
|
||||||
void calculate_cell_bounding_box(union bounding_box *box, struct gds_cell *cell);
|
void calculate_cell_bounding_box(union bounding_box *box, struct gds_cell *cell);
|
||||||
|
|
||||||
|
@@ -238,7 +238,6 @@ static void color_palette_dispose(GObject *gobj)
|
|||||||
if (palette->color_array) {
|
if (palette->color_array) {
|
||||||
palette->color_array_length = 0;
|
palette->color_array_length = 0;
|
||||||
free(palette->color_array);
|
free(palette->color_array);
|
||||||
palette->color_array = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chain up to parent class */
|
/* Chain up to parent class */
|
||||||
|
Reference in New Issue
Block a user