mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
translating parsing error messages
Original commit message from CVS: translating parsing error messages
This commit is contained in:
parent
7e56c5435f
commit
8e96cb73f6
6 changed files with 199 additions and 35 deletions
|
@ -1,3 +1,11 @@
|
|||
2004-01-13 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/parse/grammar.y:
|
||||
* po/POTFILES.in:
|
||||
* po/nl.po:
|
||||
* tools/gst-launch.c: (xmllaunch_parse_cmdline), (main):
|
||||
translate parsing error messages
|
||||
|
||||
2004-01-13 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* po/POTFILES.in: adding gst-launch
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "../gst_private.h"
|
||||
#include "../gst-i18n-lib.h"
|
||||
|
||||
#include "../gstconfig.h"
|
||||
#include "../gstparse.h"
|
||||
|
@ -13,6 +14,11 @@
|
|||
#include "../gsturi.h"
|
||||
#include "types.h"
|
||||
|
||||
/* All error messages in this file are user-visible and need to be translated.
|
||||
* Don't start the message with a capital, and don't end them with a period,
|
||||
* as they will be presented inside a sentence/error.
|
||||
*/
|
||||
|
||||
#define YYERROR_VERBOSE 1
|
||||
#define YYPARSE_PARAM graph
|
||||
|
||||
|
@ -160,12 +166,12 @@ typedef struct {
|
|||
GSList *walk; \
|
||||
GstBin *bin = (GstBin *) gst_element_factory_make (type, NULL); \
|
||||
if (!chain) { \
|
||||
ERROR (GST_PARSE_ERROR_EMPTY_BIN, "Specified empty bin \"%s\", not allowed", type); \
|
||||
ERROR (GST_PARSE_ERROR_EMPTY_BIN, _("specified empty bin \"%s\", not allowed"), type); \
|
||||
g_slist_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
|
||||
g_slist_free (assign); \
|
||||
YYERROR; \
|
||||
} else if (!bin) { \
|
||||
ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT, "No bin \"%s\", omitting...", type); \
|
||||
ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no bin \"%s\", skipping"), type); \
|
||||
g_slist_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
|
||||
g_slist_free (assign); \
|
||||
res = chain; \
|
||||
|
@ -309,7 +315,7 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
|
|||
}
|
||||
g_object_set_property (G_OBJECT (element), value, &v);
|
||||
} else {
|
||||
ERROR (GST_PARSE_ERROR_NO_SUCH_PROPERTY, "No property \"%s\" in element \"%s\"", value, GST_ELEMENT_NAME (element));
|
||||
ERROR (GST_PARSE_ERROR_NO_SUCH_PROPERTY, _("no property \"%s\" in element \"%s\""), value, GST_ELEMENT_NAME (element));
|
||||
}
|
||||
|
||||
out:
|
||||
|
@ -318,12 +324,12 @@ out:
|
|||
|
||||
error:
|
||||
ERROR (GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
|
||||
"Could not set property \"%s\" in element \"%s\" to \"%s\"",
|
||||
_("could not set property \"%s\" in element \"%s\" to \"%s\""),
|
||||
value, GST_ELEMENT_NAME (element), pos);
|
||||
goto out;
|
||||
error_conversion:
|
||||
ERROR (GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
|
||||
"Could not convert \"%s\" so that it fits property \"%s\" in element \"%s\"",
|
||||
_("could not convert \"%s\" so that it fits property \"%s\" in element \"%s\""),
|
||||
pos, value, GST_ELEMENT_NAME (element));
|
||||
goto out;
|
||||
}
|
||||
|
@ -502,7 +508,7 @@ success:
|
|||
return 0;
|
||||
|
||||
error:
|
||||
ERROR (GST_PARSE_ERROR_LINK, "could not link %s to %s", GST_ELEMENT_NAME (src), GST_ELEMENT_NAME (sink));
|
||||
ERROR (GST_PARSE_ERROR_LINK, _("could not link %s to %s"), GST_ELEMENT_NAME (src), GST_ELEMENT_NAME (sink));
|
||||
gst_parse_free_link (link);
|
||||
return -1;
|
||||
}
|
||||
|
@ -547,7 +553,7 @@ static int yyerror (const char *s);
|
|||
|
||||
element: IDENTIFIER { $$ = gst_element_factory_make ($1, NULL);
|
||||
if (!$$)
|
||||
ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT, "No element \"%s\"", $1);
|
||||
ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no element \"%s\""), $1);
|
||||
gst_parse_strfree ($1);
|
||||
if (!$$)
|
||||
YYERROR;
|
||||
|
@ -598,7 +604,7 @@ link: linkpart LINK linkpart { $$ = $1;
|
|||
if ($2) {
|
||||
$$->caps = gst_caps_from_string ($2);
|
||||
if (!$$->caps)
|
||||
ERROR (GST_PARSE_ERROR_LINK, "could not parse caps \"%s\"", $2);
|
||||
ERROR (GST_PARSE_ERROR_LINK, _("could not parse caps \"%s\""), $2);
|
||||
gst_parse_strfree ($2);
|
||||
}
|
||||
$$->sink_name = $3->src_name;
|
||||
|
@ -620,13 +626,13 @@ chain: element { $$ = gst_parse_chain_new ();
|
|||
| bin { $$ = $1; }
|
||||
| chain chain { if ($1->back && $2->front) {
|
||||
if (!$1->back->sink_name) {
|
||||
ERROR (GST_PARSE_ERROR_LINK, "link without source element");
|
||||
ERROR (GST_PARSE_ERROR_LINK, _("link without source element"));
|
||||
gst_parse_free_link ($1->back);
|
||||
} else {
|
||||
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $1->back);
|
||||
}
|
||||
if (!$2->front->src_name) {
|
||||
ERROR (GST_PARSE_ERROR_LINK, "link without sink element");
|
||||
ERROR (GST_PARSE_ERROR_LINK, _("link without sink element"));
|
||||
gst_parse_free_link ($2->front);
|
||||
} else {
|
||||
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
|
||||
|
@ -671,10 +677,10 @@ chain: element { $$ = gst_parse_chain_new ();
|
|||
link_t *link = (link_t *) walk->data;
|
||||
walk = walk->next;
|
||||
if (!link->sink_name && walk) {
|
||||
ERROR (GST_PARSE_ERROR_LINK, "link without sink element");
|
||||
ERROR (GST_PARSE_ERROR_LINK, _("link without sink element"));
|
||||
gst_parse_free_link (link);
|
||||
} else if (!link->src_name && !link->src) {
|
||||
ERROR (GST_PARSE_ERROR_LINK, "link without source element");
|
||||
ERROR (GST_PARSE_ERROR_LINK, _("link without source element"));
|
||||
gst_parse_free_link (link);
|
||||
} else {
|
||||
if (walk) {
|
||||
|
@ -690,7 +696,7 @@ chain: element { $$ = gst_parse_chain_new ();
|
|||
| chain error { $$ = $1; }
|
||||
| link chain { if ($2->front) {
|
||||
if (!$2->front->src_name) {
|
||||
ERROR (GST_PARSE_ERROR_LINK, "link without source element");
|
||||
ERROR (GST_PARSE_ERROR_LINK, _("link without source element"));
|
||||
gst_parse_free_link ($2->front);
|
||||
} else {
|
||||
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
|
||||
|
@ -708,7 +714,7 @@ chain: element { $$ = gst_parse_chain_new ();
|
|||
gst_element_make_from_uri (GST_URI_SRC, $1, NULL);
|
||||
if (!element) {
|
||||
ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT,
|
||||
"No source element for URI \"%s\"", $1);
|
||||
_("no source element for URI \"%s\""), $1);
|
||||
} else {
|
||||
$$->front->src = element;
|
||||
((graph_t *) graph)->links = g_slist_prepend (
|
||||
|
@ -718,7 +724,7 @@ chain: element { $$ = gst_parse_chain_new ();
|
|||
}
|
||||
} else {
|
||||
ERROR (GST_PARSE_ERROR_LINK,
|
||||
"No element to link URI \"%s\" to", $1);
|
||||
_("no element to link URI \"%s\" to"), $1);
|
||||
}
|
||||
g_free ($1);
|
||||
}
|
||||
|
@ -726,11 +732,11 @@ chain: element { $$ = gst_parse_chain_new ();
|
|||
gst_element_make_from_uri (GST_URI_SINK, $2, NULL);
|
||||
if (!element) {
|
||||
ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT,
|
||||
"No sink element for URI \"%s\"", $2);
|
||||
_("no sink element for URI \"%s\""), $2);
|
||||
YYERROR;
|
||||
} else if ($1->sink_name || $1->sink_pads) {
|
||||
ERROR (GST_PARSE_ERROR_LINK,
|
||||
"could not link sink element for URI \"%s\"", $2);
|
||||
_("could not link sink element for URI \"%s\""), $2);
|
||||
YYERROR;
|
||||
} else {
|
||||
$$ = gst_parse_chain_new ();
|
||||
|
@ -742,13 +748,13 @@ chain: element { $$ = gst_parse_chain_new ();
|
|||
g_free ($2);
|
||||
}
|
||||
;
|
||||
graph: /* NOP */ { ERROR (GST_PARSE_ERROR_EMPTY, "Empty pipeline not allowed");
|
||||
graph: /* NOP */ { ERROR (GST_PARSE_ERROR_EMPTY, _("empty pipeline not allowed"));
|
||||
$$ = (graph_t *) graph;
|
||||
}
|
||||
| chain { $$ = (graph_t *) graph;
|
||||
if ($1->front) {
|
||||
if (!$1->front->src_name) {
|
||||
ERROR (GST_PARSE_ERROR_LINK, "link without source element");
|
||||
ERROR (GST_PARSE_ERROR_LINK, _("link without source element"));
|
||||
gst_parse_free_link ($1->front);
|
||||
} else {
|
||||
$$->links = g_slist_prepend ($$->links, $1->front);
|
||||
|
@ -757,7 +763,7 @@ graph: /* NOP */ { ERROR (GST_PARSE_ERROR_EMPTY, "Empty pipeline not all
|
|||
}
|
||||
if ($1->back) {
|
||||
if (!$1->back->sink_name) {
|
||||
ERROR (GST_PARSE_ERROR_LINK, "link without sink element");
|
||||
ERROR (GST_PARSE_ERROR_LINK, _("link without sink element"));
|
||||
gst_parse_free_link ($1->back);
|
||||
} else {
|
||||
$$->links = g_slist_prepend ($$->links, $1->back);
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
gst/gst.c
|
||||
gst/gsttag.c
|
||||
gst/elements/gsttypefindelement.c
|
||||
gst/parse/grammar.y
|
||||
tools/gst-launch.c
|
||||
|
|
82
po/de.po
82
po/de.po
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gstreamer-0.7 0.7.0.1\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
|
||||
"POT-Creation-Date: 2004-01-13 14:29+0100\n"
|
||||
"POT-Creation-Date: 2004-01-13 15:14+0100\n"
|
||||
"PO-Revision-Date: 2003-10-08 15:36-0700\n"
|
||||
"Last-Translator: David Schleef <ds@schleef.org>\n"
|
||||
"Language-Team: Gnome Translators <i18n@gnome.org>\n"
|
||||
|
@ -303,6 +303,80 @@ msgstr ""
|
|||
msgid "maximum"
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:164
|
||||
#, c-format
|
||||
msgid "specified empty bin \"%s\", not allowed"
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:169
|
||||
#, c-format
|
||||
msgid "no bin \"%s\", skipping"
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:313
|
||||
#, c-format
|
||||
msgid "no property \"%s\" in element \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:322
|
||||
#, c-format
|
||||
msgid "could not set property \"%s\" in element \"%s\" to \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:327
|
||||
#, c-format
|
||||
msgid ""
|
||||
"could not convert \"%s\" so that it fits property \"%s\" in element \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:506
|
||||
#, c-format
|
||||
msgid "could not link %s to %s"
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:551
|
||||
#, c-format
|
||||
msgid "no element \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:602
|
||||
#, c-format
|
||||
msgid "could not parse caps \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:624 gst/parse/grammar.y:678 gst/parse/grammar.y:694
|
||||
#: gst/parse/grammar.y:752
|
||||
msgid "link without source element"
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:630 gst/parse/grammar.y:675 gst/parse/grammar.y:761
|
||||
msgid "link without sink element"
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:712
|
||||
#, c-format
|
||||
msgid "no source element for URI \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:722
|
||||
#, c-format
|
||||
msgid "no element to link URI \"%s\" to"
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:730
|
||||
#, c-format
|
||||
msgid "no sink element for URI \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:734
|
||||
#, c-format
|
||||
msgid "could not link sink element for URI \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: gst/parse/grammar.y:746
|
||||
msgid "empty pipeline not allowed"
|
||||
msgstr ""
|
||||
|
||||
#: tools/gst-launch.c:60
|
||||
msgid "Execution ended after %"
|
||||
msgstr ""
|
||||
|
@ -347,12 +421,12 @@ msgstr ""
|
|||
|
||||
#: tools/gst-launch.c:109
|
||||
#, c-format
|
||||
msgid "ERROR: could not parse command line argument %d: %s"
|
||||
msgid "ERROR: could not parse command line argument %d: %s.\n"
|
||||
msgstr ""
|
||||
|
||||
#: tools/gst-launch.c:119
|
||||
#, c-format
|
||||
msgid "WARNING: element named '%s' not found."
|
||||
msgid "WARNING: element named '%s' not found.\n"
|
||||
msgstr ""
|
||||
|
||||
#: tools/gst-launch.c:254
|
||||
|
@ -398,7 +472,7 @@ msgstr ""
|
|||
|
||||
#: tools/gst-launch.c:410
|
||||
#, c-format
|
||||
msgid "ERROR: pipeline could not be constructed: %s\n"
|
||||
msgid "ERROR: pipeline could not be constructed: %s.\n"
|
||||
msgstr ""
|
||||
|
||||
#: tools/gst-launch.c:414
|
||||
|
|
91
po/nl.po
91
po/nl.po
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: GStreamer\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
|
||||
"POT-Creation-Date: 2004-01-13 14:29+0100\n"
|
||||
"POT-Creation-Date: 2004-01-13 15:14+0100\n"
|
||||
"PO-Revision-Date: 2004-01-13 12:03+0100\n"
|
||||
"Last-Translator: Thomas Vander Stichele <thomas@apestaart.org>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
|
@ -310,6 +310,82 @@ msgstr "minimum"
|
|||
msgid "maximum"
|
||||
msgstr "maximum"
|
||||
|
||||
#: gst/parse/grammar.y:164
|
||||
#, c-format
|
||||
msgid "specified empty bin \"%s\", not allowed"
|
||||
msgstr "lege ton \"%s\", niet toegelaten"
|
||||
|
||||
#: gst/parse/grammar.y:169
|
||||
#, c-format
|
||||
msgid "no bin \"%s\", skipping"
|
||||
msgstr "geen ton \"%s\", overgeslagen"
|
||||
|
||||
#: gst/parse/grammar.y:313
|
||||
#, c-format
|
||||
msgid "no property \"%s\" in element \"%s\""
|
||||
msgstr "geen eigenschap \"%s\" in element \"%s\""
|
||||
|
||||
#: gst/parse/grammar.y:322
|
||||
#, c-format
|
||||
msgid "could not set property \"%s\" in element \"%s\" to \"%s\""
|
||||
msgstr "kon eigenschap \"%s\" in element \"%s\" niet op \"%s\" instellen"
|
||||
|
||||
#: gst/parse/grammar.y:327
|
||||
#, c-format
|
||||
msgid ""
|
||||
"could not convert \"%s\" so that it fits property \"%s\" in element \"%s\""
|
||||
msgstr ""
|
||||
"kon \"%s\" niet omzetten zodat het in eigenschap \"%s\" in element \"%s\" "
|
||||
"past"
|
||||
|
||||
#: gst/parse/grammar.y:506
|
||||
#, c-format
|
||||
msgid "could not link %s to %s"
|
||||
msgstr "kon %s niet verbinden met %s"
|
||||
|
||||
#: gst/parse/grammar.y:551
|
||||
#, c-format
|
||||
msgid "no element \"%s\""
|
||||
msgstr "geen element \"%s\""
|
||||
|
||||
#: gst/parse/grammar.y:602
|
||||
#, c-format
|
||||
msgid "could not parse caps \"%s\""
|
||||
msgstr "kon mogelijkheden \"%s\" niet verwerken"
|
||||
|
||||
#: gst/parse/grammar.y:624 gst/parse/grammar.y:678 gst/parse/grammar.y:694
|
||||
#: gst/parse/grammar.y:752
|
||||
msgid "link without source element"
|
||||
msgstr "verbinding zonder bronelement"
|
||||
|
||||
#: gst/parse/grammar.y:630 gst/parse/grammar.y:675 gst/parse/grammar.y:761
|
||||
msgid "link without sink element"
|
||||
msgstr "verbinding zonder doelelement"
|
||||
|
||||
#: gst/parse/grammar.y:712
|
||||
#, c-format
|
||||
msgid "no source element for URI \"%s\""
|
||||
msgstr "geen bronelement voor URI \"%s\""
|
||||
|
||||
#: gst/parse/grammar.y:722
|
||||
#, c-format
|
||||
msgid "no element to link URI \"%s\" to"
|
||||
msgstr "geen element om URI \"%s\" mee te verbinden"
|
||||
|
||||
#: gst/parse/grammar.y:730
|
||||
#, c-format
|
||||
msgid "no sink element for URI \"%s\""
|
||||
msgstr "geen doelelement voor URI \"%s\""
|
||||
|
||||
#: gst/parse/grammar.y:734
|
||||
#, c-format
|
||||
msgid "could not link sink element for URI \"%s\""
|
||||
msgstr "kon doelelement niet verbinden voor URI \"%s\""
|
||||
|
||||
#: gst/parse/grammar.y:746
|
||||
msgid "empty pipeline not allowed"
|
||||
msgstr "lege pijplijn niet toegelaten"
|
||||
|
||||
#: tools/gst-launch.c:60
|
||||
msgid "Execution ended after %"
|
||||
msgstr "Uitvoering beëindigd na %"
|
||||
|
@ -356,14 +432,13 @@ msgstr ""
|
|||
"moment."
|
||||
|
||||
#: tools/gst-launch.c:109
|
||||
#, c-format
|
||||
msgid "ERROR: could not parse command line argument %d: %s"
|
||||
msgstr "FOUT: versta argument %d op commandoregel niet: %s"
|
||||
msgid "ERROR: could not parse command line argument %d: %s.\n"
|
||||
msgstr "FOUT: versta argument %d op commandoregel niet: %s.\n"
|
||||
|
||||
#: tools/gst-launch.c:119
|
||||
#, c-format
|
||||
msgid "WARNING: element named '%s' not found."
|
||||
msgstr "WAARSCHUWING: element met naam '%s' niet gevonden."
|
||||
msgid "WARNING: element named '%s' not found.\n"
|
||||
msgstr "WAARSCHUWING: element met naam '%s' niet gevonden.\n"
|
||||
|
||||
#: tools/gst-launch.c:254
|
||||
#, c-format
|
||||
|
@ -408,8 +483,8 @@ msgstr "Aantal keren om de pijplijn te herhalen"
|
|||
|
||||
#: tools/gst-launch.c:410
|
||||
#, c-format
|
||||
msgid "ERROR: pipeline could not be constructed: %s\n"
|
||||
msgstr "FOUT: pijplijn kon niet gemaakt worden: %s\n"
|
||||
msgid "ERROR: pipeline could not be constructed: %s.\n"
|
||||
msgstr "FOUT: pijplijn kon niet gemaakt worden: %s.\n"
|
||||
|
||||
#: tools/gst-launch.c:414
|
||||
msgid "ERROR: pipeline could not be constructed.\n"
|
||||
|
|
|
@ -106,7 +106,7 @@ xmllaunch_parse_cmdline (const gchar **argv)
|
|||
value = strchr (element, '=');
|
||||
|
||||
if (!(element < property && property < value)) {
|
||||
fprintf (stderr, _("ERROR: could not parse command line argument %d: %s"), i, element);
|
||||
fprintf (stderr, _("ERROR: could not parse command line argument %d: %s.\n"), i, element);
|
||||
g_free (element);
|
||||
exit (1);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ xmllaunch_parse_cmdline (const gchar **argv)
|
|||
|
||||
e = gst_bin_get_by_name (GST_BIN (pipeline), element);
|
||||
if (!e) {
|
||||
fprintf (stderr, _("WARNING: element named '%s' not found."), element);
|
||||
fprintf (stderr, _("WARNING: element named '%s' not found.\n"), element);
|
||||
} else {
|
||||
gst_util_set_object_arg (G_OBJECT (e), property, value);
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ main(int argc, char *argv[])
|
|||
|
||||
if (!pipeline) {
|
||||
if (error) {
|
||||
fprintf(stderr, _("ERROR: pipeline could not be constructed: %s\n"),
|
||||
fprintf(stderr, _("ERROR: pipeline could not be constructed: %s.\n"),
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue