Compare commits
7 Commits
translatio
...
3546c9a7f9
Author | SHA1 | Date | |
---|---|---|---|
3546c9a7f9 | |||
fd1eac7fda | |||
2c91956b32 | |||
232d025211 | |||
e461b0be1d | |||
8f54f92ac0 | |||
cba28b378e |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
@@ -1,53 +0,0 @@
|
|||||||
/**
|
|
||||||
|
|
||||||
@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
|
|
||||||
|
|
||||||
*/
|
|
@@ -35,10 +35,17 @@
|
|||||||
#include <gds-render/gds-utils/gds-types.h>
|
#include <gds-render/gds-utils/gds-types.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief calculate_cell_bounding_box Calculate bounding box of gds cell
|
* @brief Calculate bounding box of a 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 Path handling not yet implemented correctly.
|
* @warning Handling of Path graphic objects 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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user