[gimp/gimp-attributes-wip] plug-ins: metainfo: don't internationalize ui elements in code. Better internationalize the ui
- From: Hartmut Kuhse <hartmutkuhse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-attributes-wip] plug-ins: metainfo: don't internationalize ui elements in code. Better internationalize the ui
- Date: Thu, 9 Oct 2014 12:50:39 +0000 (UTC)
commit 4552a31b70d4dfd07894684b3cc5308f12b961c7
Author: Hartmut Kuhse <hk_priv gmx de>
Date: Thu Oct 9 14:50:20 2014 +0200
plug-ins: metainfo: don't internationalize ui elements in code.
Better internationalize the ui
plug-ins/metainfo/datapage.c | 11 ++------
plug-ins/metainfo/datapage.h | 4 +-
plug-ins/metainfo/page-administration.c | 20 +++++++-------
plug-ins/metainfo/page-artwork.c | 24 +++++++++---------
plug-ins/metainfo/page-description.c | 36 +++++++++++++-------------
plug-ins/metainfo/page-rights.c | 42 +++++++++++++++---------------
6 files changed, 66 insertions(+), 71 deletions(-)
---
diff --git a/plug-ins/metainfo/datapage.c b/plug-ins/metainfo/datapage.c
index 765e01d..55de7a8 100644
--- a/plug-ins/metainfo/datapage.c
+++ b/plug-ins/metainfo/datapage.c
@@ -308,10 +308,6 @@ datapage_init_ui (Datapage *datapage,
for (i = 0; i < datapage->metadata_entry_count; i++)
{
- obj = G_OBJECT (get_widget_from_label (builder, datapage->metadata_entry[i].ui_label));
-
- gtk_label_set_text (GTK_LABEL (obj), datapage->metadata_entry[i].label);
-
obj = G_OBJECT (get_widget_from_label (builder, datapage->metadata_entry[i].ui_entry));
gtk_widget_set_name (GTK_WIDGET (obj), datapage->metadata_entry[i].ui_entry);
@@ -348,7 +344,6 @@ datapage_init_ui (Datapage *datapage,
for (i = 0; i < array_length; i++) /*get info about structure */
{
const gchar *val_in_combo = datapage->combobox_data[(array_nr *
datapage->max_combobox_entries) + i].val_in_combo;
-// const gchar *val_in_combo = combobox_data[array_nr][i].val_in_combo;
if (! val_in_combo)
break;
@@ -1026,7 +1021,6 @@ datapage_set_label_text (Datapage *datapage,
gint struct_nr)
{
DatapagePrivate *private;
- GtkLabel label;
GObject *obj;
gchar *label_text;
gint high;
@@ -1037,8 +1031,9 @@ datapage_set_label_text (Datapage *datapage,
high = datapage_get_highest_structure (datapage, datapage->struct_element[struct_nr].number_of_element);
- label_text = g_strdup_printf ("%s (%d)", (gchar *) g_queue_peek_nth (private->expander_texts,
-
datapage->struct_element[struct_nr].number_of_element),
+ label_text = g_strdup_printf ("%s (%d)",
+ (gchar *) g_queue_peek_nth (private->expander_texts,
+
datapage->struct_element[struct_nr].number_of_element),
high);
gtk_label_set_text (GTK_LABEL (obj), label_text);
diff --git a/plug-ins/metainfo/datapage.h b/plug-ins/metainfo/datapage.h
index 6d4babb..7742c5c 100644
--- a/plug-ins/metainfo/datapage.h
+++ b/plug-ins/metainfo/datapage.h
@@ -60,7 +60,7 @@ typedef struct _MetadataEntry MetadataEntry;
struct _MetadataEntry
{
- gchar *label; /* translateable - label of the widget */
+ gchar *label; /* label of the widget */
const gchar *ui_label; /* name of the label widget in GtkBuilder ui file */
const gchar *ui_entry; /* name of the entry widget in GtkBuilder ui file */
const gchar *xmp_tag; /* xmp tag, saved in GimpAttribute.name */
@@ -73,7 +73,7 @@ typedef struct _StructureElement StructureElement;
struct _StructureElement
{
gint number_of_element; /* simply the number, corresponding to
STRUCTURES_ON_PAGE */
- const gchar *identifier; /* translateble - identifier for combobox entries */
+ const gchar *identifier; /* identifier for combobox entries */
const gchar *struct_tag; /* structure tag without array number */
GimpAttributeStructureType struct_type; /* type of structure, gexiv2 cannot get the right
list type from tag*/
const gchar *expand_label_widget; /* name of the expander label widget */
diff --git a/plug-ins/metainfo/page-administration.c b/plug-ins/metainfo/page-administration.c
index 642fb00..cf15cb3 100644
--- a/plug-ins/metainfo/page-administration.c
+++ b/plug-ins/metainfo/page-administration.c
@@ -35,7 +35,7 @@
static StructureElement struct_element [] =
{
{0,
- N_("Image supplier"),
+ "Image supplier",
"Xmp.plus.ImageSupplier",
STRUCTURE_TYPE_SEQ,
"imagesupplier-label",
@@ -45,7 +45,7 @@ static StructureElement struct_element [] =
"imagesupplier-button-minus"},
{1,
- N_("Registry ID"),
+ "Registry ID",
"Xmp.iptcExt.RegistryId",
STRUCTURE_TYPE_BAG,
"registryid-label",
@@ -70,56 +70,56 @@ static ComboBoxData combobox_data[][6] =
static MetadataEntry administration_entries[] =
{
- {N_("Image supplier name"),
+ {"Image supplier name",
"imagesupplier-name-label",
"imagesupplier-name-entry",
"Xmp.plus.ImageSupplier[x]/plus:ImageSupplierName",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Image supplier ID"),
+ {"Image supplier ID",
"imagesupplier-id-label",
"imagesupplier-id-entry",
"Xmp.plus.ImageSupplier[x]/plus:ImageSupplierID",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Image supplier image ID"),
+ {"Image supplier image ID",
"imagesupplier-imageid-label",
"imagesupplier-imageid-entry",
"Xmp.plus.ImageSupplierImageID",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Registry organistaion ID"),
+ {"Registry organistaion ID",
"regorgid-label",
"regorgid-entry",
"Xmp.iptcExt.RegistryId[x]/iptcExt:RegOrgId",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Registry item ID"),
+ {"Registry item ID",
"regitemid-label",
"regitemid-entry",
"Xmp.iptcExt.RegistryId[x]/iptcExt:RegItemId",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Max available height"),
+ {"Max available height",
"maxavailheight-label",
"maxavailheight-entry",
"Xmp.iptcExt.MaxAvailHeight",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Max available width"),
+ {"Max available width",
"maxavailwidth-label",
"maxavailwidth-entry",
"Xmp.iptcExt.MaxAvailWidth",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Digital source type"),
+ {"Digital source type",
"digitalsourcetype-label",
"digitalsourcetype-combobox",
"Xmp.iptcExt.DigitalSourceType",
diff --git a/plug-ins/metainfo/page-artwork.c b/plug-ins/metainfo/page-artwork.c
index 8be3b9d..0dd5ed0 100644
--- a/plug-ins/metainfo/page-artwork.c
+++ b/plug-ins/metainfo/page-artwork.c
@@ -35,7 +35,7 @@
static StructureElement struct_element [] =
{
{0,
- N_("Artwork or Object"),
+ "Artwork or Object",
"Xmp.iptcExt.ArtworkOrObject",
STRUCTURE_TYPE_BAG,
"artworkorobject-label",
@@ -75,42 +75,42 @@ static ComboBoxData combobox_data[][14] =
static MetadataEntry artwork_entries[] =
{
- {N_("Title"),
+ {"Title",
"artworkorobject-title-label",
"artworkorobject-title-entry",
"Xmp.iptcExt.ArtworkOrObject[x]/iptcExt:AOTitle",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Date created"),
+ {"Date created",
"artworkorobject-datecreated-label",
"artworkorobject-datecreated-entry",
"Xmp.iptcExt.ArtworkOrObject[x]/iptcExt:AODateCreated",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Creator"),
+ {"Creator",
"artworkorobject-creator-label",
"artworkorobject-creator-entry",
"Xmp.iptcExt.ArtworkOrObject[x]/iptcExt:AOCreator",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Source"),
+ {"Source",
"artworkorobject-source-label",
"artworkorobject-source-entry",
"Xmp.iptcExt.ArtworkOrObject[x]/iptcExt:AOSource",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Source inventory number"),
+ {"Source inventory number",
"artworkorobject-sourceinvno-label",
"artworkorobject-sourceinvno-entry",
"Xmp.iptcExt.ArtworkOrObject[x]/iptcExt:AOSourceInvNo",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Copyright notice"),
+ {"Copyright notice",
"artworkorobject-copyrightnotice-label",
"artworkorobject-copyrightnotice-entry",
"Xmp.iptcExt.ArtworkOrObject[x]/iptcExt:AOCopyrightNotice",
@@ -118,35 +118,35 @@ static MetadataEntry artwork_entries[] =
-1},
- {N_("Additional model information"),
+ {"Additional model information",
"addlmodelinfo-label",
"addlmodelinfo-entry",
"Xmp.iptcExt.AddlModelInfo",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Model age"),
+ {"Model age",
"modelage-label",
"modelage-entry",
"Xmp.iptcExt.ModelAge",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Model release ID"),
+ {"Model release ID",
"modelreleaseid-label",
"modelreleaseid-entry",
"Xmp.plus.ModelReleaseID",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Minor model age"),
+ {"Minor model age",
"minormodelagedisclosure-label",
"minormodelagedisclosure-combobox",
"Xmp.plus.MinorModelAgeDisclosure",
WIDGET_TYPE_COMBOBOX,
0},
- {N_("Model release status"),
+ {"Model release status",
"modelreleasestatus-label",
"modelreleasestatus-combobox",
"Xmp.plus.ModelReleaseStatus",
diff --git a/plug-ins/metainfo/page-description.c b/plug-ins/metainfo/page-description.c
index ffd6e5f..18af2bf 100644
--- a/plug-ins/metainfo/page-description.c
+++ b/plug-ins/metainfo/page-description.c
@@ -31,7 +31,7 @@
static StructureElement struct_element [] =
{
{0,
- N_("Location created"),
+ "Location created",
"Xmp.iptcExt.LocationCreated",
STRUCTURE_TYPE_BAG,
"location-created-label",
@@ -41,7 +41,7 @@ static StructureElement struct_element [] =
"location-created-button-minus"},
{1,
- N_("Location shown"),
+ "Location shown",
"Xmp.iptcExt.LocationShown",
STRUCTURE_TYPE_SEQ,
"location-shown-label",
@@ -53,56 +53,56 @@ static StructureElement struct_element [] =
static MetadataEntry description_entries[] =
{
- {N_("Person in image"),
+ {"Person in image",
"personinimage-label",
"personinimage-entry",
"Xmp.iptcExt.PersonInImage",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Event"),
+ {"Event",
"event-label",
"event-entry",
"Xmp.iptcExt.Event",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Sublocation"),
+ {"Sublocation",
"location-created-sublocation-label",
"location-created-sublocation-entry",
"Xmp.iptcExt.LocationCreated[x]/iptcExt:Sublocation",
WIDGET_TYPE_ENTRY,
-1},
- {N_("City"),
+ {"City",
"location-created-city-label",
"location-created-city-entry",
"Xmp.iptcExt.LocationCreated[x]/iptcExt:City",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Province/State"),
+ {"Province/State",
"location-created-provincestate-label",
"location-created-provincestate-entry",
"Xmp.iptcExt.LocationCreated[x]/iptcExt:ProvinceState",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Countryname"),
+ {"Countryname",
"location-created-countryname-label",
"location-created-countryname-entry",
"Xmp.iptcExt.LocationCreated[x]/iptcExt:CountryName",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Countrycode"),
+ {"Countrycode",
"location-created-countrycode-label",
"location-created-countrycode-entry",
"Xmp.iptcExt.LocationCreated[x]/iptcExt:CountryCode",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Worldregion"),
+ {"Worldregion",
"location-created-worldregion-label",
"location-created-worldregion-entry",
"Xmp.iptcExt.LocationCreated[x]/iptcExt:WorldRegion",
@@ -110,56 +110,56 @@ static MetadataEntry description_entries[] =
-1},
- {N_("Sublocation"),
+ {"Sublocation",
"location-shown-sublocation-label",
"location-shown-sublocation-entry",
"Xmp.iptcExt.LocationShown[x]/iptcExt:Sublocation",
WIDGET_TYPE_ENTRY,
-1},
- {N_("City"),
+ {"City",
"location-shown-city-label",
"location-shown-city-entry",
"Xmp.iptcExt.LocationShown[x]/iptcExt:City",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Province/State"),
+ {"Province/State",
"location-shown-provincestate-label",
"location-shown-provincestate-entry",
"Xmp.iptcExt.LocationShown[x]/iptcExt:ProvinceState",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Countryname"),
+ {"Countryname",
"location-shown-countryname-label",
"location-shown-countryname-entry",
"Xmp.iptcExt.LocationShown[x]/iptcExt:CountryName",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Countrycode"),
+ {"Countrycode",
"location-shown-countrycode-label",
"location-shown-countrycode-entry",
"Xmp.iptcExt.LocationShown[x]/iptcExt:CountryCode",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Worldregion"),
+ {"Worldregion",
"location-shown-worldregion-label",
"location-shown-worldregion-entry",
"Xmp.iptcExt.LocationShown[x]/iptcExt:WorldRegion",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Name"),
+ {"Name",
"orginimage-name-label",
"orginimage-name-entry",
"Xmp.iptcExt.OrganisationInImageName",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Code"),
+ {"Code",
"orginimage-code-label",
"orginimage-code-entry",
"Xmp.iptcExt.OrganisationInImageCode",
diff --git a/plug-ins/metainfo/page-rights.c b/plug-ins/metainfo/page-rights.c
index e96852e..d4f2926 100644
--- a/plug-ins/metainfo/page-rights.c
+++ b/plug-ins/metainfo/page-rights.c
@@ -34,7 +34,7 @@
static StructureElement struct_element [] =
{
{0,
- N_("Image creator"),
+ "Image creator",
"Xmp.plus.ImageCreator",
STRUCTURE_TYPE_SEQ,
"imagecreator-label",
@@ -44,7 +44,7 @@ static StructureElement struct_element [] =
"imagecreator-button-minus"},
{1,
- N_("Copyright Owner"),
+ "Copyright Owner",
"Xmp.plus.CopyrightOwner",
STRUCTURE_TYPE_SEQ,
"copyrightowner-label",
@@ -54,7 +54,7 @@ static StructureElement struct_element [] =
"copyrightowner-button-minus"},
{2,
- N_("Licensor"),
+ "Licensor",
"Xmp.plus.Licensor",
STRUCTURE_TYPE_BAG,
"licensor-label",
@@ -78,126 +78,126 @@ static ComboBoxData combobox_data[][5] =
static MetadataEntry rights_entries[] =
{
- {N_("Image creator name"),
+ {"Image creator name",
"imagecreator-name-label",
"imagecreator-name-entry",
"Xmp.plus.ImageCreator[x]/plus:ImageCreatorName",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Image creator ID"),
+ {"Image creator ID",
"imagecreator-id-label",
"imagecreator-id-entry",
"Xmp.plus.ImageCreator[x]/plus:ImageCreatorID",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Copyright owner name"),
+ {"Copyright owner name",
"copyrightowner-name-label",
"copyrightowner-name-entry",
"Xmp.plus.CopyrightOwner[x]/plus:CopyrightOwnerName",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Copyright owner ID"),
+ {"Copyright owner ID",
"copyrightowner-id-label",
"copyrightowner-id-entry",
"Xmp.plus.CopyrightOwner[x]/plus:CopyrightOwnerID",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Name"),
+ {"Name",
"licensor-name-label",
"licensor-name-entry",
"Xmp.plus.Licensor[x]/plus:LicensorName",
WIDGET_TYPE_ENTRY,
-1},
- {N_("ID"),
+ {"ID",
"licensor-id-label",
"licensor-id-entry",
"Xmp.plus.Licensor[x]/plus:LicensorID",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Address"),
+ {"Address",
"licensor-streetaddress-label",
"licensor-streetaddress-entry",
"Xmp.plus.Licensor[x]/plus:LicensorStreetAddress",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Extended Address"),
+ {"Extended Address",
"licensor-extendedaddress-label",
"licensor-extendedaddress-entry",
"Xmp.plus.Licensor[x]/plus:LicensorExtendedAddress",
WIDGET_TYPE_ENTRY,
-1},
- {N_("City"),
+ {"City",
"licensor-city-label",
"licensor-city-entry",
"Xmp.plus.Licensor[x]/plus:LicensorCity",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Region"),
+ {"Region",
"licensor-region-label",
"licensor-region-entry",
"Xmp.plus.Licensor[x]/plus:LicensorRegion",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Postal code"),
+ {"Postal code",
"licensor-postalcode-label",
"licensor-postalcode-entry",
"Xmp.plus.Licensor[x]/plus:LicensorPostalCode",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Country"),
+ {"Country",
"licensor-country-label",
"licensor-country-entry",
"Xmp.plus.Licensor[x]/plus:LicensorCountry",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Telephone 1"),
+ {"Telephone 1",
"licensor-telephone1-label",
"licensor-telephone1-entry",
"Xmp.plus.Licensor[x]/plus:LicensorTelephone1",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Telephone 2"),
+ {"Telephone 2",
"licensor-telephone2-label",
"licensor-telephone2-entry",
"Xmp.plus.Licensor[x]/plus:LicensorTelephone2",
WIDGET_TYPE_ENTRY,
-1},
- {N_("E-Mail"),
+ {"E-Mail",
"licensor-email-label",
"licensor-email-entry",
"Xmp.plus.Licensor[x]/plus:LicensorEmail",
WIDGET_TYPE_ENTRY,
-1},
- {N_("URL"),
+ {"URL",
"licensor-url-label",
"licensor-url-entry",
"Xmp.plus.Licensor[x]/plus:LicensorURL",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Release ID"),
+ {"Release ID",
"release-id-label",
"release-id-entry",
"Xmp.plus.PropertyReleaseID",
WIDGET_TYPE_ENTRY,
-1},
- {N_("Release status"),
+ {"Release status",
"release-status-label",
"release-status-combobox",
"Xmp.plus.PropertyReleaseStatus",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]