Commit e6b08da7 authored by Simon Budig's avatar Simon Budig Committed by Simon Budig
Browse files

Made it possible to have multiple lines of translators in the about

2003-12-30  Simon Budig  <simon@gimp.org>

	* app/gui/about-dialog.c: Made it possible to have multiple
	lines of translators in the about dialog. Simply translate
	"<Translators: insert your names here, separated by newline>".

	Fixes bug #58507.
parent 618467b8
2003-12-30 Simon Budig <simon@gimp.org>
* app/gui/about-dialog.c: Made it possible to have multiple
lines of translators in the about dialog. Simply translate
"<Translators: insert your names here, separated by newline>".
Fixes bug #58507.
2003-12-30 Simon Budig <simon@gimp.org>
 
* app/vectors/gimpvectors-compat.c: When there is a visible
......@@ -51,10 +51,16 @@ static gchar *founders[] =
static gchar *translators[] =
{
N_("Translation by"),
N_("<Translator: insert your name here>"),
N_("<Translators: insert your names here, separated by newline>"),
};
static gchar *contri_intro[] =
{
N_("Contributions by")
};
static gchar **translator_names = NULL;
typedef struct
{
GtkWidget *about_dialog;
......@@ -717,13 +723,14 @@ about_dialog_timer (gpointer data)
if (about_info.index >= G_N_ELEMENTS (founders))
{
about_info.index = 0;
about_info.state++;
/* skip the translators section when the translator
* did not provide a translation with his name
*/
if (gettext (translators[1]) == translators[1])
about_info.index = G_N_ELEMENTS (translators) - 1;
about_info.state = 3;
else
about_info.state = 1;
}
else
{
......@@ -745,7 +752,7 @@ about_dialog_timer (gpointer data)
if (about_info.state == 1)
{
about_info.visible = TRUE;
if (about_info.index >= G_N_ELEMENTS (translators))
if (about_info.index >= G_N_ELEMENTS (translators) - 1)
{
about_info.index = 0;
about_info.state++;
......@@ -756,8 +763,42 @@ about_dialog_timer (gpointer data)
about_info.index++;
}
}
if (about_info.state == 2)
{
if (!translator_names)
translator_names = g_strsplit (gettext (translators[1]), "\n", 0);
about_info.visible = TRUE;
if (translator_names[about_info.index] == NULL)
{
about_info.index = 0;
about_info.state++;
}
else
{
text = insert_spacers (translator_names[about_info.index]);
about_info.index++;
}
}
if (about_info.state == 3)
{
about_info.visible = TRUE;
if (about_info.index >= G_N_ELEMENTS (contri_intro))
{
about_info.index = 0;
about_info.state++;
}
else
{
text = insert_spacers (gettext (contri_intro[about_info.index]));
about_info.index++;
}
}
if (about_info.state == 4)
{
about_info.visible = TRUE;
......
......@@ -51,10 +51,16 @@ static gchar *founders[] =
static gchar *translators[] =
{
N_("Translation by"),
N_("<Translator: insert your name here>"),
N_("<Translators: insert your names here, separated by newline>"),
};
static gchar *contri_intro[] =
{
N_("Contributions by")
};
static gchar **translator_names = NULL;
typedef struct
{
GtkWidget *about_dialog;
......@@ -717,13 +723,14 @@ about_dialog_timer (gpointer data)
if (about_info.index >= G_N_ELEMENTS (founders))
{
about_info.index = 0;
about_info.state++;
/* skip the translators section when the translator
* did not provide a translation with his name
*/
if (gettext (translators[1]) == translators[1])
about_info.index = G_N_ELEMENTS (translators) - 1;
about_info.state = 3;
else
about_info.state = 1;
}
else
{
......@@ -745,7 +752,7 @@ about_dialog_timer (gpointer data)
if (about_info.state == 1)
{
about_info.visible = TRUE;
if (about_info.index >= G_N_ELEMENTS (translators))
if (about_info.index >= G_N_ELEMENTS (translators) - 1)
{
about_info.index = 0;
about_info.state++;
......@@ -756,8 +763,42 @@ about_dialog_timer (gpointer data)
about_info.index++;
}
}
if (about_info.state == 2)
{
if (!translator_names)
translator_names = g_strsplit (gettext (translators[1]), "\n", 0);
about_info.visible = TRUE;
if (translator_names[about_info.index] == NULL)
{
about_info.index = 0;
about_info.state++;
}
else
{
text = insert_spacers (translator_names[about_info.index]);
about_info.index++;
}
}
if (about_info.state == 3)
{
about_info.visible = TRUE;
if (about_info.index >= G_N_ELEMENTS (contri_intro))
{
about_info.index = 0;
about_info.state++;
}
else
{
text = insert_spacers (gettext (contri_intro[about_info.index]));
about_info.index++;
}
}
if (about_info.state == 4)
{
about_info.visible = TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment