Group :: Graphics
RPM: imagination
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: Add-translation-support-to-some-files.patch
Download
Download
From 95098e7de4086283580020bbe57b7e7b26c1b664 Mon Sep 17 00:00:00 2001
From: Pavel Moseev <mars@altlinux.org>
Date: Thu, 30 Jan 2020 15:58:39 +0300
Subject: [PATCH] Add translation support to some files
---
po/POTFILES.in | 16 +++++++++
src/audio.c | 2 +-
src/callbacks.c | 12 +++----
src/export.c | 10 +++---
src/support.c | 4 +--
transitions/Makefile.am | 30 ++++++++---------
transitions/bar_wipe.c | 11 +++---
transitions/barn_door_wipe.c | 11 +++---
transitions/bow_tie_wipe.c | 7 ++--
transitions/box_wipe.c | 19 ++++++-----
transitions/clock_wipe.c | 19 ++++++-----
transitions/diagonal_wipe.c | 11 +++---
transitions/ellipse_wipe.c | 15 +++++----
transitions/four_box_wipe.c | 7 ++--
transitions/ima_transl.h | 35 ++++++++++++++++++++
transitions/insert.c | 17 +++++-----
transitions/misc.c | 7 ++--
transitions/misc_diagonal_wipe.c | 7 ++--
transitions/misc_shape_wipe.c | 11 +++---
transitions/push_wipe.c | 11 +++---
transitions/rochade.c | 11 +++---
transitions/wave.c | 19 ++++++-----
22 files changed, 179 insertions(+), 113 deletions(-)
create mode 100644 transitions/ima_transl.h
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 185940c..9abaea3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,3 +10,19 @@ src/slideshow_project.c
src/support.c
src/subtitles.c
src/export.c
+src/video_formats.c
+transitions/barn_door_wipe.c
+transitions/bow_tie_wipe.c
+transitions/clock_wipe.c
+transitions/ellipse_wipe.c
+transitions/misc_diagonal_wipe.c
+transitions/push_wipe.c
+transitions/wave.c
+transitions/bar_wipe.c
+transitions/box_wipe.c
+transitions/diagonal_wipe.c
+transitions/four_box_wipe.c
+transitions/misc.c
+transitions/misc_shape_wipe.c
+transitions/rochade.c
+transitions/insert.c
diff --git a/src/audio.c b/src/audio.c
index 52ecb90..134535b 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -112,7 +112,7 @@ void img_play_stop_selected_file(GtkButton *button, img_window_struct *img)
}
else
{
- img_message(img, TRUE, "Unable to run '%s': %s\n", cmd_line, error->message);
+ img_message(img, TRUE, _("Unable to run '%s': %s\n"), cmd_line, error->message);
g_error_free (error);
}
g_free(cmd_line);
diff --git a/src/callbacks.c b/src/callbacks.c
index dcd7f72..978d451 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -834,7 +834,7 @@ void img_show_about_dialog (GtkMenuItem *item,img_window_struct *img_struct)
{
static GtkWidget *about = NULL;
static gchar version[] = VERSION "-" REVISION;
- const char *authors[] = {"\nDevelopers:\nGiuseppe Torelli <colossus73@gmail.com>\nTadej Borovšak <tadeboro@gmail.com>\n",NULL};
+ const char *authors[] = {_("\nDevelopers:\nGiuseppe Torelli <colossus73@gmail.com>\nTadej Borovšak <tadeboro@gmail.com>\n"),NULL};
if (about == NULL)
{
@@ -846,14 +846,14 @@ void img_show_about_dialog (GtkMenuItem *item,img_window_struct *img_struct)
g_object_set (about,
"name", "Imagination",
"version", strcmp(REVISION, "-1") == 0 ? VERSION : version,
- "copyright","Copyright \xC2\xA9 2009-2018 Giuseppe Torelli",
- "comments","A simple and lightweight slideshow maker",
+ "copyright",_("Copyright \xC2\xA9 2009-2018 Giuseppe Torelli"),
+ "comments",_("A simple and lightweight slideshow maker"),
"authors",authors,
"documenters",NULL,
"translator_credits",_("translator-credits"),
"logo_icon_name","imagination",
"website","http://imagination.sf.net",
- "license","Copyright \xC2\xA9 2009-2018 Giuseppe Torelli - Colossus <colossus73@gmail.com>\n\n"
+ "license",_("Copyright \xC2\xA9 2009-2018 Giuseppe Torelli - Colossus <colossus73@gmail.com>\n\n"
"This is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU Library General Public License as\n"
"published by the Free Software Foundation; either version 2 of the\n"
@@ -867,7 +867,7 @@ void img_show_about_dialog (GtkMenuItem *item,img_window_struct *img_struct)
"You should have received a copy of the GNU Library General Public\n"
"License along with the Gnome Library; see the file COPYING.LIB. If not,\n"
"write to the Free Software Foundation,Inc.,59 Temple Place - Suite 330,\n"
- "Boston,MA 02111-1307,USA.\n",
+ "Boston,MA 02111-1307,USA.\n"),
NULL);
}
gtk_dialog_run ( GTK_DIALOG(about));
@@ -2411,7 +2411,7 @@ void img_clipboard_get (GtkClipboard *clipboard, GtkSelectionData *selection_dat
void img_clipboard_clear (GtkClipboard *clipboard, img_window_struct *img)
{
- img_message (img, FALSE, "I'm here\n");
+ img_message (img, FALSE, _("I'm here\n"));
//gtk_clipboard_clear(clipboard);
}
diff --git a/src/export.c b/src/export.c
index 00ba5ad..50b7250 100644
--- a/src/export.c
+++ b/src/export.c
@@ -736,7 +736,7 @@ img_run_encoder( img_window_struct *img )
gboolean ret;
g_shell_parse_argv( img->export_cmd_line, &argc, &argv, NULL);
- img_message(img, FALSE, "Running %s\n", img->export_cmd_line);
+ img_message(img, FALSE, _("Running %s\n"), img->export_cmd_line);
ret = g_spawn_async_with_pipes( NULL, argv, NULL,
G_SPAWN_SEARCH_PATH,
@@ -1377,8 +1377,8 @@ void test_ffmpeg(img_window_struct *img)
gint argc;
/* Check if ffmpeg/avconv is compiled with avfilter setdar */
- img_message(img, FALSE, (g_strrstr(img->encoder_name, "ffmpeg") ? "Testing ffmpeg abilities with \"ffmpeg -filters\" ... "
- : "Testing avconv abilities with \"avconv -filters\" ... "));
+ img_message(img, FALSE, (g_strrstr(img->encoder_name, "ffmpeg") ? _("Testing ffmpeg abilities with \"ffmpeg -filters\" ... ")
+ : _("Testing avconv abilities with \"avconv -filters\" ... ")));
if (g_strrstr(img->encoder_name, "ffmpeg"))
g_shell_parse_argv("ffmpeg -filters", &argc, &argv, NULL);
@@ -1392,12 +1392,12 @@ void test_ffmpeg(img_window_struct *img)
NULL, NULL);
if (NULL != ffmpeg_test_result && NULL != g_strrstr(ffmpeg_test_result, "setdar"))
{
- img_message(img, FALSE, "setdar found!\n");
+ img_message(img, FALSE, _("setdar found!\n"));
img->ffmpeg_aspect_ratio_cmd = "-vf setdar=";
}
else
{
- img_message(img, FALSE, "setdar not found!\n");
+ img_message(img, FALSE, _("setdar not found!\n"));
img->ffmpeg_aspect_ratio_cmd = "-aspect ";
}
diff --git a/src/support.c b/src/support.c
index 35310be..76025dd 100644
--- a/src/support.c
+++ b/src/support.c
@@ -1143,12 +1143,12 @@ img_check_for_encoder(img_window_struct *img)
name = g_find_program_in_path("ffmpeg");
if (name == NULL)
{
- img_message(img, TRUE, "Using avconv for encoding.\n");
+ img_message(img, TRUE, _("Using avconv for encoding.\n"));
img->encoder_name = g_strdup("avconv");
}
else
{
- img_message(img, TRUE, "Using ffmpeg for encoding.\n");
+ img_message(img, TRUE, _("Using ffmpeg for encoding.\n"));
img->encoder_name = name;
}
}
diff --git a/transitions/Makefile.am b/transitions/Makefile.am
index 9f01de0..28bb379 100644
--- a/transitions/Makefile.am
+++ b/transitions/Makefile.am
@@ -38,21 +38,21 @@ plugin_LTLIBRARIES = \
misc_shape_wipe.la \
rochade.la
-bar_wipe_la_SOURCES = bar_wipe.c
-barn_door_wipe_la_SOURCES = barn_door_wipe.c
-bow_tie_wipe_la_SOURCES = bow_tie_wipe.c
-box_wipe_la_SOURCES = box_wipe.c
-clock_wipe_la_SOURCES = clock_wipe.c
-diagonal_wipe_la_SOURCES = diagonal_wipe.c
-ellipse_wipe_la_SOURCES = ellipse_wipe.c
-misc_la_SOURCES = misc.c
-four_box_wipe_la_SOURCES = four_box_wipe.c
-insert_la_SOURCES = insert.c
-push_wipe_la_SOURCES = push_wipe.c
-wave_la_SOURCES = wave.c
-misc_diagonal_wipe_la_SOURCES = misc_diagonal_wipe.c
-misc_shape_wipe_la_SOURCES = misc_shape_wipe.c
-rochade_la_SOURCES = rochade.c
+bar_wipe_la_SOURCES = bar_wipe.c ima_transl.h
+barn_door_wipe_la_SOURCES = barn_door_wipe.c ima_transl.h
+bow_tie_wipe_la_SOURCES = bow_tie_wipe.c ima_transl.h
+box_wipe_la_SOURCES = box_wipe.c ima_transl.h
+clock_wipe_la_SOURCES = clock_wipe.c ima_transl.h
+diagonal_wipe_la_SOURCES = diagonal_wipe.c ima_transl.h
+ellipse_wipe_la_SOURCES = ellipse_wipe.c ima_transl.h
+misc_la_SOURCES = misc.c ima_transl.h
+four_box_wipe_la_SOURCES = four_box_wipe.c ima_transl.h
+insert_la_SOURCES = insert.c ima_transl.h
+push_wipe_la_SOURCES = push_wipe.c ima_transl.h
+wave_la_SOURCES = wave.c ima_transl.h
+misc_diagonal_wipe_la_SOURCES = misc_diagonal_wipe.c ima_transl.h
+misc_shape_wipe_la_SOURCES = misc_shape_wipe.c ima_transl.h
+rochade_la_SOURCES = rochade.c ima_transl.h
# instead of linking against all in $(GTK_LIBS), we link only against needed libs
bar_wipe_la_LIBADD = $(PLUGINS_LIBS)
diff --git a/transitions/bar_wipe.c b/transitions/bar_wipe.c
index fefcf8b..3a3070a 100644
--- a/transitions/bar_wipe.c
+++ b/transitions/bar_wipe.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -35,19 +36,19 @@ img_get_plugin_info( gchar **group,
{
gint i = 0;
- *group = "Bar Wipe";
+ *group = _("Bar Wipe");
*trans = g_new( gchar *, 13 );
- (*trans)[i++] = "Left to Right";
+ (*trans)[i++] = _("Left to Right");
(*trans)[i++] = "img_left";
(*trans)[i++] = GINT_TO_POINTER( 1 );
- (*trans)[i++] = "Top to Bottom";
+ (*trans)[i++] = _("Top to Bottom");
(*trans)[i++] = "img_top";
(*trans)[i++] = GINT_TO_POINTER( 2 );
- (*trans)[i++] = "Right to Left";
+ (*trans)[i++] = _("Right to Left");
(*trans)[i++] = "img_right";
(*trans)[i++] = GINT_TO_POINTER( 3 );
- (*trans)[i++] = "Bottom to Top";
+ (*trans)[i++] = _("Bottom to Top");
(*trans)[i++] = "img_bottom";
(*trans)[i++] = GINT_TO_POINTER( 4 );
(*trans)[i++] = NULL;
diff --git a/transitions/barn_door_wipe.c b/transitions/barn_door_wipe.c
index e480f77..235cabd 100644
--- a/transitions/barn_door_wipe.c
+++ b/transitions/barn_door_wipe.c
@@ -20,6 +20,7 @@
#include <cairo.h>
#include <glib.h>
#include <math.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -35,19 +36,19 @@ img_get_plugin_info( gchar **group,
gchar ***trans )
{
gint i = 0;
- *group = "Barn Door Wipe";
+ *group = _("Barn Door Wipe");
*trans = g_new( gchar *, 13 );
- (*trans)[i++] = "Vertical";
+ (*trans)[i++] = _("Vertical");
(*trans)[i++] = "img_vertical";
(*trans)[i++] = GINT_TO_POINTER( 15 );
- (*trans)[i++] = "Horizontal";
+ (*trans)[i++] = _("Horizontal");
(*trans)[i++] = "img_horizontal";
(*trans)[i++] = GINT_TO_POINTER( 16 );
- (*trans)[i++] = "Diagonal Bottom Left";
+ (*trans)[i++] = _("Diagonal Bottom Left");
(*trans)[i++] = "img_diagonal_bottom_left";
(*trans)[i++] = GINT_TO_POINTER( 17 );
- (*trans)[i++] = "Diagonal Top Left";
+ (*trans)[i++] = _("Diagonal Top Left");
(*trans)[i++] = "img_diagonal_top_left";
(*trans)[i++] = GINT_TO_POINTER( 18 );
(*trans)[i++] = NULL;
diff --git a/transitions/bow_tie_wipe.c b/transitions/bow_tie_wipe.c
index 08dcd7d..de0775d 100644
--- a/transitions/bow_tie_wipe.c
+++ b/transitions/bow_tie_wipe.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -35,13 +36,13 @@ img_get_plugin_info( gchar **group,
{
gint i = 0;
- *group = "Bow Tie Wipe";
+ *group = _("Bow Tie Wipe");
*trans = g_new( gchar *, 7 );
- (*trans)[i++] = "Vertical";
+ (*trans)[i++] = _("Vertical");
(*trans)[i++] = "img_vertical";
(*trans)[i++] = GINT_TO_POINTER( 36 );
- (*trans)[i++] = "Horizontal";
+ (*trans)[i++] = _("Horizontal");
(*trans)[i++] = "img_horizontal";
(*trans)[i++] = GINT_TO_POINTER( 37 );
(*trans)[i++] = NULL;
diff --git a/transitions/box_wipe.c b/transitions/box_wipe.c
index db0b94e..cd667c1 100644
--- a/transitions/box_wipe.c
+++ b/transitions/box_wipe.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -34,31 +35,31 @@ img_get_plugin_info( gchar **group,
gchar ***trans )
{
gint i = 0;
- *group = "Box Wipe";
+ *group = _("Box Wipe");
*trans = g_new( gchar *, 25 );
- (*trans)[i++] = "Top Left";
+ (*trans)[i++] = _("Top Left");
(*trans)[i++] = "img_top_left";
(*trans)[i++] = GINT_TO_POINTER( 5 );
- (*trans)[i++] = "Top Right";
+ (*trans)[i++] = _("Top Right");
(*trans)[i++] = "img_top_right";
(*trans)[i++] = GINT_TO_POINTER( 6 );
- (*trans)[i++] = "Bottom Right";
+ (*trans)[i++] = _("Bottom Right");
(*trans)[i++] = "img_bottom_right";
(*trans)[i++] = GINT_TO_POINTER( 7 );
- (*trans)[i++] = "Bottom Left";
+ (*trans)[i++] = _("Bottom Left");
(*trans)[i++] = "img_bottom_left";
(*trans)[i++] = GINT_TO_POINTER( 8 );
- (*trans)[i++] = "Top Center";
+ (*trans)[i++] = _("Top Center");
(*trans)[i++] = "img_top_center";
(*trans)[i++] = GINT_TO_POINTER( 9 );
- (*trans)[i++] = "Right Center";
+ (*trans)[i++] = _("Right Center");
(*trans)[i++] = "img_right_center";
(*trans)[i++] = GINT_TO_POINTER( 10 );
- (*trans)[i++] = "Bottom Center";
+ (*trans)[i++] = _("Bottom Center");
(*trans)[i++] = "img_bottom_center";
(*trans)[i++] = GINT_TO_POINTER( 11 );
- (*trans)[i++] = "Left Center";
+ (*trans)[i++] = _("Left Center");
(*trans)[i++] = "img_left_center";
(*trans)[i++] = GINT_TO_POINTER( 12 );
(*trans)[i++] = NULL;
diff --git a/transitions/clock_wipe.c b/transitions/clock_wipe.c
index b2defba..c2eac69 100644
--- a/transitions/clock_wipe.c
+++ b/transitions/clock_wipe.c
@@ -20,6 +20,7 @@
#include <cairo.h>
#include <glib.h>
#include <math.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -36,31 +37,31 @@ img_get_plugin_info( gchar **group,
gchar ***trans )
{
gint i = 0;
- *group = "Clock Wipe";
+ *group = _("Clock Wipe");
*trans = g_new( gchar *, 25 );
- (*trans)[i++] = "Clockwise Twelve";
+ (*trans)[i++] = _("Clockwise Twelve");
(*trans)[i++] = "img_ctw";
(*trans)[i++] = GINT_TO_POINTER( 40 );
- (*trans)[i++] = "Counter Clockwise Twelve";
+ (*trans)[i++] = _("Counter Clockwise Twelve");
(*trans)[i++] = "img_cctw";
(*trans)[i++] = GINT_TO_POINTER( 41 );
- (*trans)[i++] = "Clockwise Three";
+ (*trans)[i++] = _("Clockwise Three");
(*trans)[i++] = "img_cth";
(*trans)[i++] = GINT_TO_POINTER( 42 );
- (*trans)[i++] = "Counter Clockwise Three";
+ (*trans)[i++] = _("Counter Clockwise Three");
(*trans)[i++] = "img_ccth";
(*trans)[i++] = GINT_TO_POINTER( 43 );
- (*trans)[i++] = "Clockwise Six";
+ (*trans)[i++] = _("Clockwise Six");
(*trans)[i++] = "img_csi";
(*trans)[i++] = GINT_TO_POINTER( 44 );
- (*trans)[i++] = "Counter Clockwise Six";
+ (*trans)[i++] = _("Counter Clockwise Six");
(*trans)[i++] = "img_ccsi";
(*trans)[i++] = GINT_TO_POINTER( 45 );
- (*trans)[i++] = "Clockwise Nine";
+ (*trans)[i++] = _("Clockwise Nine");
(*trans)[i++] = "img_cni";
(*trans)[i++] = GINT_TO_POINTER( 46 );
- (*trans)[i++] = "Counter Clockwise Nine";
+ (*trans)[i++] = _("Counter Clockwise Nine");
(*trans)[i++] = "img_ccni";
(*trans)[i++] = GINT_TO_POINTER( 47 );
(*trans)[i++] = NULL;
diff --git a/transitions/diagonal_wipe.c b/transitions/diagonal_wipe.c
index c417d28..1d09ba2 100644
--- a/transitions/diagonal_wipe.c
+++ b/transitions/diagonal_wipe.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -35,19 +36,19 @@ img_get_plugin_info( gchar **group,
{
gint i = 0;
- *group = "Diagonal Wipe";
+ *group = _("Diagonal Wipe");
*trans = g_new( gchar *, 13 );
- (*trans)[i++] = "Top Left";
+ (*trans)[i++] = _("Top Left");
(*trans)[i++] = "img_top_left";
(*trans)[i++] = GINT_TO_POINTER( 32 );
- (*trans)[i++] = "Top Right";
+ (*trans)[i++] = _("Top Right");
(*trans)[i++] = "img_top_right";
(*trans)[i++] = GINT_TO_POINTER( 33 );
- (*trans)[i++] = "Bottom Right";
+ (*trans)[i++] = _("Bottom Right");
(*trans)[i++] = "img_bottom_right";
(*trans)[i++] = GINT_TO_POINTER( 34 );
- (*trans)[i++] = "Bottom Left";
+ (*trans)[i++] = _("Bottom Left");
(*trans)[i++] = "img_bottom_left";
(*trans)[i++] = GINT_TO_POINTER( 35 );
(*trans)[i++] = NULL;
diff --git a/transitions/ellipse_wipe.c b/transitions/ellipse_wipe.c
index 11b3a0c..66948b7 100644
--- a/transitions/ellipse_wipe.c
+++ b/transitions/ellipse_wipe.c
@@ -21,6 +21,7 @@
#include <math.h>
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
#define AB 0.5 /* This controls the deformation */
#define BA ( 1 / ( AB ) ) /* Inverse value for vertical effects */
@@ -40,25 +41,25 @@ img_get_plugin_info( gchar **group,
{
gint i = 0;
- *group = "Ellipse Wipe";
+ *group = _("Ellipse Wipe");
*trans = g_new( gchar *, 19 );
- (*trans)[i++] = "Circle In";
+ (*trans)[i++] = _("Circle In");
(*trans)[i++] = "img_circle_in";
(*trans)[i++] = GINT_TO_POINTER( 20 );
- (*trans)[i++] = "Circle Out";
+ (*trans)[i++] = _("Circle Out");
(*trans)[i++] = "img_circle_out";
(*trans)[i++] = GINT_TO_POINTER( 21 );
- (*trans)[i++] = "Horizontal In";
+ (*trans)[i++] = _("Horizontal In");
(*trans)[i++] = "img_horizontal_in";
(*trans)[i++] = GINT_TO_POINTER( 22 );
- (*trans)[i++] = "Horizontal Out";
+ (*trans)[i++] = _("Horizontal Out");
(*trans)[i++] = "img_horizontal_out";
(*trans)[i++] = GINT_TO_POINTER( 23 );
- (*trans)[i++] = "Vertical In";
+ (*trans)[i++] = _("Vertical In");
(*trans)[i++] = "img_vertical_in";
(*trans)[i++] = GINT_TO_POINTER( 24 );
- (*trans)[i++] = "Vertical Out";
+ (*trans)[i++] = _("Vertical Out");
(*trans)[i++] = "img_vertical_out";
(*trans)[i++] = GINT_TO_POINTER( 25 );
(*trans)[i++] = NULL;
diff --git a/transitions/four_box_wipe.c b/transitions/four_box_wipe.c
index 625f289..4fc992b 100644
--- a/transitions/four_box_wipe.c
+++ b/transitions/four_box_wipe.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -34,13 +35,13 @@ img_get_plugin_info( gchar **group,
gchar ***trans )
{
gint i = 0;
- *group = "Four Box Wipe";
+ *group = _("Four Box Wipe");
*trans = g_new( gchar *, 7 );
- (*trans)[i++] = "Corners In";
+ (*trans)[i++] = _("Corners In");
(*trans)[i++] = "img_corners_in";
(*trans)[i++] = GINT_TO_POINTER( 13 );
- (*trans)[i++] = "Corners Out";
+ (*trans)[i++] = _("Corners Out");
(*trans)[i++] = "img_corners_out";
(*trans)[i++] = GINT_TO_POINTER( 14 );
(*trans)[i++] = NULL;
diff --git a/transitions/ima_transl.h b/transitions/ima_transl.h
new file mode 100644
index 0000000..246cfa6
--- /dev/null
+++ b/transitions/ima_transl.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2020 Pavel Moseev <mars@altlinux.org>
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License,or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not,write to the Free Software
+ * Foundation,Inc.,59 Temple Place - Suite 330,Boston,MA 02111-1307,USA.
+ *
+ */
+
+#ifndef __IMAGINATION_TRANSLATION_H
+#define __IMAGINATION_TRANSLATION_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef ENABLE_NLS
+# include <glib/gi18n.h>
+#else
+# define gettext(String) (String)
+# define _(String) (String)
+# define Q_(String) g_strip_context ((String), (String))
+# define N_(String) (String)
+#endif
+
+#endif
diff --git a/transitions/insert.c b/transitions/insert.c
index 19cc680..be8bc6c 100644
--- a/transitions/insert.c
+++ b/transitions/insert.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -43,28 +44,28 @@ img_get_plugin_info( gchar **group,
{
gint i = 0;
- *group = "Insert";
+ *group = _("Insert");
*trans = g_new( gchar *, 22 );
- (*trans)[i++] = "Clockwise";
+ (*trans)[i++] = _("Clockwise");
(*trans)[i++] = "img_spin_insert";
(*trans)[i++] = GINT_TO_POINTER( 60 );
- (*trans)[i++] = "Counter Clockwise";
+ (*trans)[i++] = _("Counter Clockwise");
(*trans)[i++] = "img_spininv_insert";
(*trans)[i++] = GINT_TO_POINTER( 61 );
- (*trans)[i++] = "From Center";
+ (*trans)[i++] = _("From Center");
(*trans)[i++] = "img_simple_insert";
(*trans)[i++] = GINT_TO_POINTER( 62 );
- (*trans)[i++] = "From Top Left";
+ (*trans)[i++] = _("From Top Left");
(*trans)[i++] = "img_upleft_insert";
(*trans)[i++] = GINT_TO_POINTER( 63 );
- (*trans)[i++] = "From Top Right";
+ (*trans)[i++] = _("From Top Right");
(*trans)[i++] = "img_upright_insert";
(*trans)[i++] = GINT_TO_POINTER( 64 );
- (*trans)[i++] = "From Bottom Left";
+ (*trans)[i++] = _("From Bottom Left");
(*trans)[i++] = "img_downleft_insert";
(*trans)[i++] = GINT_TO_POINTER( 65 );
- (*trans)[i++] = "From Bottom Right";
+ (*trans)[i++] = _("From Bottom Right");
(*trans)[i++] = "img_downright_insert";
(*trans)[i++] = GINT_TO_POINTER( 66 );
(*trans)[i++] = NULL;
diff --git a/transitions/misc.c b/transitions/misc.c
index 205f612..b5a166c 100644
--- a/transitions/misc.c
+++ b/transitions/misc.c
@@ -21,6 +21,7 @@
#include <cairo.h>
#include <glib.h>
#include <stdlib.h>
+#include "ima_transl.h"
#define RAND_VALS 10 /* Number of random values to use */
@@ -39,13 +40,13 @@ img_get_plugin_info( gchar **group,
{
gint i = 0;
- *group = "Misc";
+ *group = _("Misc");
*trans = g_new( gchar *, 7 );
- (*trans)[i++] = "Cross Fade";
+ (*trans)[i++] = _("Cross Fade");
(*trans)[i++] = "img_cross_fade";
(*trans)[i++] = GINT_TO_POINTER( 19 );
- (*trans)[i++] = "Dissolve";
+ (*trans)[i++] = _("Dissolve");
(*trans)[i++] = "img_dissolve";
(*trans)[i++] = GINT_TO_POINTER( 67 );
(*trans)[i++] = NULL;
diff --git a/transitions/misc_diagonal_wipe.c b/transitions/misc_diagonal_wipe.c
index f3fe67a..126b539 100644
--- a/transitions/misc_diagonal_wipe.c
+++ b/transitions/misc_diagonal_wipe.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -34,13 +35,13 @@ img_get_plugin_info( gchar **group,
gchar ***trans )
{
gint i = 0;
- *group = "Misc Diagonal Wipe";
+ *group = _("Misc Diagonal Wipe");
*trans = g_new( gchar *, 7 );
- (*trans)[i++] = "Double Barn Door";
+ (*trans)[i++] = _("Double Barn Door");
(*trans)[i++] = "img_barn";
(*trans)[i++] = GINT_TO_POINTER( 38 );
- (*trans)[i++] = "Double Diamond";
+ (*trans)[i++] = _("Double Diamond");
(*trans)[i++] = "img_diamond";
(*trans)[i++] = GINT_TO_POINTER( 39 );
(*trans)[i++] = NULL;
diff --git a/transitions/misc_shape_wipe.c b/transitions/misc_shape_wipe.c
index 14d7dad..4385411 100644
--- a/transitions/misc_shape_wipe.c
+++ b/transitions/misc_shape_wipe.c
@@ -18,6 +18,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations go here */
static void
@@ -35,23 +36,23 @@ img_get_plugin_info( gchar **group,
gchar ***trans )
{
gint i = 0;
- *group = "Misc Shape Wipe";
+ *group = _("Misc Shape Wipe");
*trans = g_new( gchar *, 13 );
- (*trans)[i++] = "Heart In";
+ (*trans)[i++] = _("Heart In");
(*trans)[i++] = "img_heart_in";
(*trans)[i++] = GINT_TO_POINTER( 56 );
- (*trans)[i++] = "Heart Out";
+ (*trans)[i++] = _("Heart Out");
(*trans)[i++] = "img_heart_out";
(*trans)[i++] = GINT_TO_POINTER( 57 );
- (*trans)[i++] = "Keyhole In";
+ (*trans)[i++] = _("Keyhole In");
(*trans)[i++] = "img_key_in";
(*trans)[i++] = GINT_TO_POINTER( 58 );
- (*trans)[i++] = "Keyhole Out";
+ (*trans)[i++] = _("Keyhole Out");
(*trans)[i++] = "img_key_out";
(*trans)[i++] = GINT_TO_POINTER( 59 );
diff --git a/transitions/push_wipe.c b/transitions/push_wipe.c
index 329c354..f9465d7 100644
--- a/transitions/push_wipe.c
+++ b/transitions/push_wipe.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -35,19 +36,19 @@ img_get_plugin_info( gchar **group,
{
gint i = 0;
- *group = "Push Wipe";
+ *group = _("Push Wipe");
*trans = g_new( gchar *, 13 );
- (*trans)[i++] = "From Left";
+ (*trans)[i++] = _("From Left");
(*trans)[i++] = "img_from_left";
(*trans)[i++] = GINT_TO_POINTER( 26 );
- (*trans)[i++] = "From Right";
+ (*trans)[i++] = _("From Right");
(*trans)[i++] = "img_from_right";
(*trans)[i++] = GINT_TO_POINTER( 27 );
- (*trans)[i++] = "From Top";
+ (*trans)[i++] = _("From Top");
(*trans)[i++] = "img_from_top";
(*trans)[i++] = GINT_TO_POINTER( 28 );
- (*trans)[i++] = "From Bottom";
+ (*trans)[i++] = _("From Bottom");
(*trans)[i++] = "img_from_bottom";
(*trans)[i++] = GINT_TO_POINTER( 29 );
(*trans)[i++] = NULL;
diff --git a/transitions/rochade.c b/transitions/rochade.c
index 682bac4..2e36762 100644
--- a/transitions/rochade.c
+++ b/transitions/rochade.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
#include <math.h>
+#include "ima_transl.h"
#define POW2( val ) \
( ( val ) * ( val ) )
@@ -44,19 +45,19 @@ img_get_plugin_info( gchar **group,
{
gint i = 0;
- *group = "Rochade";
+ *group = _("Rochade");
*trans = g_new( gchar *, 13 );
- (*trans)[i++] = "Rochade Right";
+ (*trans)[i++] = _("Rochade Right");
(*trans)[i++] = "right";
(*trans)[i++] = GINT_TO_POINTER( 68 );
- (*trans)[i++] = "Rochade Left";
+ (*trans)[i++] = _("Rochade Left");
(*trans)[i++] = "left";
(*trans)[i++] = GINT_TO_POINTER( 69 );
- (*trans)[i++] = "Rochade Up";
+ (*trans)[i++] = _("Rochade Up");
(*trans)[i++] = "up";
(*trans)[i++] = GINT_TO_POINTER( 70 );
- (*trans)[i++] = "Rochade Down";
+ (*trans)[i++] = _("Rochade Down");
(*trans)[i++] = "down";
(*trans)[i++] = GINT_TO_POINTER( 71 );
(*trans)[i++] = NULL;
diff --git a/transitions/wave.c b/transitions/wave.c
index b9f622c..f79d1e3 100644
--- a/transitions/wave.c
+++ b/transitions/wave.c
@@ -19,6 +19,7 @@
#include <cairo.h>
#include <glib.h>
+#include "ima_transl.h"
/* Local functions declarations */
static void
@@ -35,31 +36,31 @@ img_get_plugin_info( gchar **group,
{
gint i = 0;
- *group = "Wave";
+ *group = _("Wave");
*trans = g_new( gchar *, 25 );
- (*trans)[i++] = "Wave Down";
+ (*trans)[i++] = _("Wave Down");
(*trans)[i++] = "img_down";
(*trans)[i++] = GINT_TO_POINTER( 48 );
- (*trans)[i++] = "Wave Up";
+ (*trans)[i++] = _("Wave Up");
(*trans)[i++] = "img_up";
(*trans)[i++] = GINT_TO_POINTER( 49 );
- (*trans)[i++] = "Wave Left";
+ (*trans)[i++] = _("Wave Left");
(*trans)[i++] = "img_left";
(*trans)[i++] = GINT_TO_POINTER( 50 );
- (*trans)[i++] = "Wave Right";
+ (*trans)[i++] = _("Wave Right");
(*trans)[i++] = "img_right";
(*trans)[i++] = GINT_TO_POINTER( 51 );
- (*trans)[i++] = "Wave Left Down";
+ (*trans)[i++] = _("Wave Left Down");
(*trans)[i++] = "img_left_down";
(*trans)[i++] = GINT_TO_POINTER( 52 );
- (*trans)[i++] = "Wave Left Up";
+ (*trans)[i++] = _("Wave Left Up");
(*trans)[i++] = "img_left_up";
(*trans)[i++] = GINT_TO_POINTER( 53 );
- (*trans)[i++] = "Wave Right Up";
+ (*trans)[i++] = _("Wave Right Up");
(*trans)[i++] = "img_right_up";
(*trans)[i++] = GINT_TO_POINTER( 54 );
- (*trans)[i++] = "Wave Right Down";
+ (*trans)[i++] = _("Wave Right Down");
(*trans)[i++] = "img_right_down";
(*trans)[i++] = GINT_TO_POINTER( 55 );
(*trans)[i++] = NULL;
--
2.24.1