mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-15 12:58:29 +01:00
glib-compile-schemas: Mark missing strings for translation
https://bugzilla.gnome.org/show_bug.cgi?id=695573
This commit is contained in:
committed by
Philip Withnall
parent
f2b6c11629
commit
a7aa8acc48
@@ -92,7 +92,7 @@ enum_state_add_value (EnumState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"nick must be a minimum of 2 characters");
|
_("nick must be a minimum of 2 characters"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ enum_state_add_value (EnumState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"invalid numeric value");
|
_("invalid numeric value"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ enum_state_add_value (EnumState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<value nick='%s'/> already specified", nick);
|
_("<value nick='%s'/> already specified"), nick);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ enum_state_add_value (EnumState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"value='%s' already specified", valuestr);
|
_("value='%s' already specified"), valuestr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ enum_state_add_value (EnumState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"flags values must have at most 1 bit set");
|
_("flags values must have at most 1 bit set"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ enum_state_end (EnumState **state_ptr,
|
|||||||
if (state->strinfo->len == 0)
|
if (state->strinfo->len == 0)
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<%s> must contain at least one <value>",
|
_("<%s> must contain at least one <value>"),
|
||||||
state->is_flags ? "flags" : "enum");
|
state->is_flags ? "flags" : "enum");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,8 +312,8 @@ key_state_check_range (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<%s> is not contained in "
|
_("<%s> is not contained in "
|
||||||
"the specified range", tag);
|
"the specified range"), tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,20 +324,20 @@ key_state_check_range (KeyState *state,
|
|||||||
if (state->is_enum)
|
if (state->is_enum)
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<%s> is not a valid member of "
|
_("<%s> is not a valid member of "
|
||||||
"the specified enumerated type", tag);
|
"the specified enumerated type"), tag);
|
||||||
|
|
||||||
else if (state->is_flags)
|
else if (state->is_flags)
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<%s> contains string not in the "
|
_("<%s> contains string not in the "
|
||||||
"specified flags type", tag);
|
"specified flags type"), tag);
|
||||||
|
|
||||||
else
|
else
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<%s> contains string not in "
|
_("<%s> contains string not in "
|
||||||
"<choices>", tag);
|
"<choices>"), tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -370,7 +370,7 @@ key_state_set_range (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error_literal (error, G_MARKUP_ERROR,
|
g_set_error_literal (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<range/> already specified for this key");
|
_("<range/> already specified for this key"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -388,7 +388,7 @@ key_state_set_range (KeyState *state,
|
|||||||
gchar *type = g_variant_type_dup_string (state->type);
|
gchar *type = g_variant_type_dup_string (state->type);
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<range> not allowed for keys of type '%s'", type);
|
_("<range> not allowed for keys of type '%s'"), type);
|
||||||
g_free (type);
|
g_free (type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -405,7 +405,7 @@ key_state_set_range (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<range> specified minimum is greater than maxmimum");
|
_("<range> specified minimum is greater than maxmimum"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -430,7 +430,7 @@ key_state_start_default (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"unsupported l10n category: %s", l10n);
|
_("unsupported l10n category: %s"), l10n);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,8 +438,8 @@ key_state_start_default (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error_literal (error, G_MARKUP_ERROR,
|
g_set_error_literal (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"l10n requested, but no "
|
_("l10n requested, but no "
|
||||||
"gettext domain given");
|
"gettext domain given"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,8 +450,8 @@ key_state_start_default (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error_literal (error, G_MARKUP_ERROR,
|
g_set_error_literal (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"translation context given for "
|
_("translation context given for "
|
||||||
" value without l10n enabled");
|
" value without l10n enabled"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -489,8 +489,8 @@ key_state_start_choices (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error_literal (error, G_MARKUP_ERROR,
|
g_set_error_literal (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<choices> cannot be specified for keys "
|
_("<choices> cannot be specified for keys "
|
||||||
"tagged as having an enumerated type");
|
"tagged as having an enumerated type"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,7 +498,7 @@ key_state_start_choices (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error_literal (error, G_MARKUP_ERROR,
|
g_set_error_literal (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<choices> already specified for this key");
|
_("<choices> already specified for this key"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -510,7 +510,7 @@ key_state_start_choices (KeyState *state,
|
|||||||
gchar *type_string = g_variant_type_dup_string (state->type);
|
gchar *type_string = g_variant_type_dup_string (state->type);
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<choices> not allowed for keys of type '%s'",
|
_("<choices> not allowed for keys of type '%s'"),
|
||||||
type_string);
|
type_string);
|
||||||
g_free (type_string);
|
g_free (type_string);
|
||||||
return;
|
return;
|
||||||
@@ -526,7 +526,7 @@ key_state_add_choice (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<choice value='%s'/> already given", choice);
|
_("<choice value='%s'/> already given"), choice);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -541,7 +541,7 @@ key_state_end_choices (KeyState *state,
|
|||||||
if (!state->has_choices)
|
if (!state->has_choices)
|
||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<choices> must contain at least one <choice>");
|
_("<choices> must contain at least one <choice>"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,12 +555,12 @@ key_state_start_aliases (KeyState *state,
|
|||||||
if (state->has_aliases)
|
if (state->has_aliases)
|
||||||
g_set_error_literal (error, G_MARKUP_ERROR,
|
g_set_error_literal (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<aliases> already specified for this key");
|
_("<aliases> already specified for this key"));
|
||||||
else if (!state->is_flags && !state->is_enum && !state->has_choices)
|
else if (!state->is_flags && !state->is_enum && !state->has_choices)
|
||||||
g_set_error_literal (error, G_MARKUP_ERROR,
|
g_set_error_literal (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<aliases> can only be specified for keys with "
|
_("<aliases> can only be specified for keys with "
|
||||||
"enumerated or flags types or after <choices>");
|
"enumerated or flags types or after <choices>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -578,21 +578,21 @@ key_state_add_alias (KeyState *state,
|
|||||||
if (state->is_enum)
|
if (state->is_enum)
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<alias value='%s'/> given when '%s' is already "
|
_("<alias value='%s'/> given when '%s' is already "
|
||||||
"a member of the enumerated type", alias, alias);
|
"a member of the enumerated type"), alias, alias);
|
||||||
|
|
||||||
else
|
else
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<alias value='%s'/> given when "
|
_("<alias value='%s'/> given when "
|
||||||
"<choice value='%s'/> was already given",
|
"<choice value='%s'/> was already given"),
|
||||||
alias, alias);
|
alias, alias);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<alias value='%s'/> already specified", alias);
|
_("<alias value='%s'/> already specified"), alias);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -601,8 +601,8 @@ key_state_add_alias (KeyState *state,
|
|||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR,
|
g_set_error (error, G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"alias target '%s' is not in %s", target,
|
_("alias target '%s' is not in %s"), target,
|
||||||
state->is_enum ? "enumerated type" : "<choices>");
|
state->is_enum ? _("enumerated type") : "<choices>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -616,7 +616,7 @@ key_state_end_aliases (KeyState *state,
|
|||||||
if (!state->has_aliases)
|
if (!state->has_aliases)
|
||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"<aliases> must contain at least one <alias>");
|
_("<aliases> must contain at least one <alias>"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1220,8 +1220,8 @@ parse_state_start_schema (ParseState *state,
|
|||||||
if (path && (g_str_has_prefix (path, "/apps/") ||
|
if (path && (g_str_has_prefix (path, "/apps/") ||
|
||||||
g_str_has_prefix (path, "/desktop/") ||
|
g_str_has_prefix (path, "/desktop/") ||
|
||||||
g_str_has_prefix (path, "/system/")))
|
g_str_has_prefix (path, "/system/")))
|
||||||
g_printerr ("warning: Schema '%s' has path '%s'. Paths starting with "
|
g_printerr (_("warning: Schema '%s' has path '%s'. Paths starting with "
|
||||||
"'/apps/', '/desktop/' or '/system/' are deprecated.\n", id, path);
|
"'/apps/', '/desktop/' or '/system/' are deprecated.\n"), id, path);
|
||||||
|
|
||||||
state->schema_state = schema_state_new (path, gettext_domain,
|
state->schema_state = schema_state_new (path, gettext_domain,
|
||||||
extends, extends_name, list_of);
|
extends, extends_name, list_of);
|
||||||
@@ -1511,7 +1511,7 @@ key_state_end (KeyState **state_ptr,
|
|||||||
{
|
{
|
||||||
g_set_error_literal (error,
|
g_set_error_literal (error,
|
||||||
G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
"element <default> is required in <key>");
|
_("element <default> is required in <key>"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1667,7 +1667,7 @@ output_key (gpointer key,
|
|||||||
|
|
||||||
if (state->child_schema &&
|
if (state->child_schema &&
|
||||||
!g_hash_table_lookup (data->schema_table, state->child_schema))
|
!g_hash_table_lookup (data->schema_table, state->child_schema))
|
||||||
g_printerr ("warning: undefined reference to <schema id='%s'/>\n",
|
g_printerr (_("warning: undefined reference to <schema id='%s'/>\n"),
|
||||||
state->child_schema);
|
state->child_schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user