[glom] Export to po file: Improve the msgtxt hints more.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Export to po file: Improve the msgtxt hints more.
- Date: Sun, 8 Jan 2012 00:15:31 +0000 (UTC)
commit f4a5b20eb06f98039470f5ddcc6a5911cbd54179
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Jan 8 01:04:45 2012 +0100
Export to po file: Improve the msgtxt hints more.
* glom/libglom/document/document.cc: fill_translatable_layout_items():
Mention the parent groups in the hints, t omake them more unique.
* tests/translations_po/data/test.po: Resaved.
ChangeLog | 8 +++
glom/libglom/document/document.cc | 17 ++++--
tests/translations_po/data/test.po | 113 +++++++++++++++++++++++-------------
3 files changed, 91 insertions(+), 47 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7f9ec4f..6189422 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-01-08 Murray Cumming <murrayc murrayc com>
+ Export to po file: Improve the msgtxt hints more.
+
+ * glom/libglom/document/document.cc: fill_translatable_layout_items():
+ Mention the parent groups in the hints, t omake them more unique.
+ * tests/translations_po/data/test.po: Resaved.
+
+2012-01-08 Murray Cumming <murrayc murrayc com>
+
Export to po file: Improve the msgtxt hints.
* glom/libglom/data_structure/translatable_item.[h|cc]:
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index 2612aa8..612f2e4 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -4535,6 +4535,11 @@ void Document::fill_translatable_layout_items(const sharedptr<LayoutGroup>& grou
{
the_list.push_back( pair_translatable_item_and_hint(group, hint) );
+ const Glib::ustring group_name = group->get_name();
+ Glib::ustring this_hint = hint;
+ if(!group_name.empty())
+ this_hint += ", Parent Group: " + group_name;
+
//Look at each item:
LayoutGroup::type_list_items items = group->get_items();
for(LayoutGroup::type_list_items::const_iterator iterItems = items.begin(); iterItems != items.end(); ++iterItems)
@@ -4551,21 +4556,21 @@ void Document::fill_translatable_layout_items(const sharedptr<LayoutGroup>& grou
sharedptr<CustomTitle> custom_title = field->get_title_custom();
if(custom_title)
{
- the_list.push_back( pair_translatable_item_and_hint(custom_title, hint) );
+ the_list.push_back( pair_translatable_item_and_hint(custom_title, this_hint) );
}
- fill_translatable_layout_items(group_by->m_group_secondary_fields, the_list, hint);
+ fill_translatable_layout_items(group_by->m_group_secondary_fields, the_list, this_hint);
}
//recurse:
- fill_translatable_layout_items(child_group, the_list, hint);
+ fill_translatable_layout_items(child_group, the_list, this_hint);
}
else
{
//Buttons too:
sharedptr<LayoutItem_Button> button = sharedptr<LayoutItem_Button>::cast_dynamic(item);
if(button)
- the_list.push_back( pair_translatable_item_and_hint(button, hint) );
+ the_list.push_back( pair_translatable_item_and_hint(button, this_hint) );
else
{
sharedptr<LayoutItem_Field> layout_field = sharedptr<LayoutItem_Field>::cast_dynamic(item);
@@ -4574,12 +4579,12 @@ void Document::fill_translatable_layout_items(const sharedptr<LayoutGroup>& grou
sharedptr<CustomTitle> custom_title = layout_field->get_title_custom();
if(custom_title)
{
- the_list.push_back( pair_translatable_item_and_hint(custom_title, hint) );
+ the_list.push_back( pair_translatable_item_and_hint(custom_title, this_hint) );
}
//Custom Choices, if any:
//Only text fields can have translated choice values:
- const Glib::ustring this_hint = hint + ", Parent Field: " + layout_field->get_name();
+ const Glib::ustring choice_hint = this_hint + ", Parent Field: " + layout_field->get_name();
if(layout_field->get_glom_type() == Field::TYPE_TEXT)
fill_translatable_custom_choices(layout_field->m_formatting, the_list, this_hint);
}
diff --git a/tests/translations_po/data/test.po b/tests/translations_po/data/test.po
index be8cceb..18a24fe 100644
--- a/tests/translations_po/data/test.po
+++ b/tests/translations_po/data/test.po
@@ -50,11 +50,13 @@ msgctxt "Layout Group (overview). Parent table: accommodation"
msgid "Overview"
msgstr ""
-msgctxt "Layout Group (address). Parent table: accommodation"
+msgctxt ""
+"Layout Group (address). Parent table: accommodation, Parent Group: details"
msgid "Address"
msgstr "Addresse"
-msgctxt "Layout Group (contact). Parent table: accommodation"
+msgctxt ""
+"Layout Group (contact). Parent table: accommodation, Parent Group: details"
msgid "Contact"
msgstr "Kontakt"
@@ -138,23 +140,25 @@ msgctxt "Custom Title. Parent table: characters, Parent Report: cast_list"
msgid "Agent"
msgstr ""
-msgctxt "Layout Group (overview). Parent table: characters"
+msgctxt "Layout Group (overview). Parent table: characters, Parent Group: main"
msgid "Overview"
msgstr "bersicht"
-msgctxt "Layout Group (details). Parent table: characters"
+msgctxt "Layout Group (details). Parent table: characters, Parent Group: main"
msgid "Details"
msgstr "Details"
-msgctxt "Layout Group (actor). Parent table: characters"
+msgctxt ""
+"Layout Group (actor). Parent table: characters, Parent Group: main, Parent "
+"Group: details"
msgid "Actor"
msgstr "Schauspieler"
-msgctxt "Custom Title. Parent table: characters"
+msgctxt "Custom Title. Parent table: characters, Parent Group: main"
msgid "Actor's Contact ID"
msgstr "Schauspieler Kontakt ID"
-msgctxt "Custom Title. Parent table: characters"
+msgctxt "Custom Title. Parent table: characters, Parent Group: main"
msgid "Actor's Name"
msgstr "Schauspieler Name"
@@ -166,15 +170,17 @@ msgctxt "Layout Group (details). Parent table: characters"
msgid "Details"
msgstr ""
-msgctxt "Layout Group (actor). Parent table: characters"
+msgctxt "Layout Group (actor). Parent table: characters, Parent Group: details"
msgid "Actor"
msgstr ""
-msgctxt "Custom Title. Parent table: characters"
+msgctxt ""
+"Custom Title. Parent table: characters, Parent Group: details, Parent Group: "
+"actor"
msgid "Actor's Name"
msgstr "Schauspieler Name"
-msgctxt "Custom Title. Parent table: characters"
+msgctxt "Custom Title. Parent table: characters, Parent Group: main"
msgid "Actor"
msgstr ""
@@ -394,27 +400,37 @@ msgctxt "Layout Group (details). Parent table: contacts"
msgid "Details"
msgstr "Details"
-msgctxt "Layout Group (name). Parent table: contacts"
+msgctxt ""
+"Layout Group (name). Parent table: contacts, Parent Group: details, Parent "
+"Group: notebook_contact"
msgid "Name"
msgstr "Name"
-msgctxt "Layout Group (company). Parent table: contacts"
+msgctxt ""
+"Layout Group (company). Parent table: contacts, Parent Group: details, "
+"Parent Group: notebook_contact"
msgid "Company"
msgstr "Firma"
-msgctxt "Layout Group (address). Parent table: contacts"
+msgctxt ""
+"Layout Group (address). Parent table: contacts, Parent Group: details, "
+"Parent Group: notebook_contact"
msgid "Address"
msgstr "Addresse"
-msgctxt "Layout Group (telephone). Parent table: contacts"
+msgctxt ""
+"Layout Group (telephone). Parent table: contacts, Parent Group: details, "
+"Parent Group: notebook_contact"
msgid "Telephone"
msgstr "Telefon"
-msgctxt "Layout Group (agent). Parent table: contacts"
+msgctxt ""
+"Layout Group (agent). Parent table: contacts, Parent Group: details, Parent "
+"Group: notebook_contact"
msgid "Agent"
msgstr "Agent"
-msgctxt "Custom Title. Parent table: contacts"
+msgctxt "Custom Title. Parent table: contacts, Parent Group: main"
msgid "Company Name"
msgstr ""
@@ -494,23 +510,27 @@ msgctxt "Layout Group (overview). Parent table: crew"
msgid "Overview"
msgstr "bersicht"
-msgctxt "Layout Group (department). Parent table: crew"
+msgctxt "Layout Group (department). Parent table: crew, Parent Group: details"
msgid "Department"
msgstr "Abteilung"
-msgctxt "Layout Group (contact). Parent table: crew"
+msgctxt "Layout Group (contact). Parent table: crew, Parent Group: details"
msgid "Contact"
msgstr "Kontakt"
-msgctxt "Layout Group (address). Parent table: crew"
+msgctxt ""
+"Layout Group (address). Parent table: crew, Parent Group: details, Parent "
+"Group: contact"
msgid "Address"
msgstr "Addresse"
-msgctxt "Layout Group (agent). Parent table: crew"
+msgctxt ""
+"Layout Group (agent). Parent table: crew, Parent Group: details, Parent "
+"Group: contact"
msgid "Agent"
msgstr "Agent"
-msgctxt "Custom Title. Parent table: crew"
+msgctxt "Custom Title. Parent table: crew, Parent Group: main"
msgid "Department Name"
msgstr "Abteilungsname"
@@ -570,11 +590,11 @@ msgctxt "Relationship (arrival_contact). Parent table: deliveries"
msgid "Arrival Contact"
msgstr "Empfaengerkontakt"
-msgctxt "Custom Title. Parent table: deliveries"
+msgctxt "Custom Title. Parent table: deliveries, Parent Group: main"
msgid "Departure Name"
msgstr "Sendername"
-msgctxt "Custom Title. Parent table: deliveries"
+msgctxt "Custom Title. Parent table: deliveries, Parent Group: main"
msgid "Arrival Name"
msgstr "Empfngerkontakt"
@@ -582,11 +602,13 @@ msgctxt "Layout Group (overview). Parent table: deliveries"
msgid "Overview"
msgstr ""
-msgctxt "Layout Group (departure). Parent table: deliveries"
+msgctxt ""
+"Layout Group (departure). Parent table: deliveries, Parent Group: details"
msgid "Departure"
msgstr "Departure"
-msgctxt "Layout Group (arrival). Parent table: deliveries"
+msgctxt ""
+"Layout Group (arrival). Parent table: deliveries, Parent Group: details"
msgid "Arrival"
msgstr "Arrival"
@@ -694,15 +716,16 @@ msgctxt "Layout Group (overview). Parent table: journeys"
msgid "Overview"
msgstr ""
-msgctxt "Layout Group (person). Parent table: journeys"
+msgctxt "Layout Group (person). Parent table: journeys, Parent Group: details"
msgid "Person"
msgstr "Person"
-msgctxt "Layout Group (departure). Parent table: journeys"
+msgctxt ""
+"Layout Group (departure). Parent table: journeys, Parent Group: details"
msgid "Departure"
msgstr "Departure"
-msgctxt "Layout Group (arrival). Parent table: journeys"
+msgctxt "Layout Group (arrival). Parent table: journeys, Parent Group: details"
msgid "Arrival"
msgstr "Arrival"
@@ -762,11 +785,13 @@ msgctxt "Layout Group (overview). Parent table: locations"
msgid "Overview"
msgstr ""
-msgctxt "Layout Group (address). Parent table: locations"
+msgctxt ""
+"Layout Group (address). Parent table: locations, Parent Group: details"
msgid "Address"
msgstr "Addresse"
-msgctxt "Layout Group (contact_person). Parent table: locations"
+msgctxt ""
+"Layout Group (contact_person). Parent table: locations, Parent Group: details"
msgid "Contact Person"
msgstr "Contact Person"
@@ -822,11 +847,11 @@ msgctxt "Relationship (cast). Parent table: scene_cast"
msgid "Cast"
msgstr "Besetzung"
-msgctxt "Layout Group (overview). Parent table: scene_cast"
+msgctxt "Layout Group (overview). Parent table: scene_cast, Parent Group: main"
msgid "Overview"
msgstr ""
-msgctxt "Layout Group (details). Parent table: scene_cast"
+msgctxt "Layout Group (details). Parent table: scene_cast, Parent Group: main"
msgid "Details"
msgstr ""
@@ -862,7 +887,7 @@ msgctxt "Layout Group (details). Parent table: scene_costume"
msgid "Details"
msgstr ""
-msgctxt "Custom Title. Parent table: scene_costume"
+msgctxt "Custom Title. Parent table: scene_costume, Parent Group: details"
msgid "Costume Name"
msgstr ""
@@ -894,11 +919,11 @@ msgctxt "Relationship (scenes). Parent table: scene_crew"
msgid "Scenes"
msgstr "Szenen"
-msgctxt "Layout Group (overview). Parent table: scene_crew"
+msgctxt "Layout Group (overview). Parent table: scene_crew, Parent Group: main"
msgid "Overview"
msgstr "bersicht"
-msgctxt "Layout Group (details). Parent table: scene_crew"
+msgctxt "Layout Group (details). Parent table: scene_crew, Parent Group: main"
msgid "Details"
msgstr "Details"
@@ -954,11 +979,13 @@ msgctxt "Relationship (contact). Parent table: scene_extras"
msgid "Contact"
msgstr ""
-msgctxt "Layout Group (overview). Parent table: scene_extras"
+msgctxt ""
+"Layout Group (overview). Parent table: scene_extras, Parent Group: main"
msgid "Overview"
msgstr ""
-msgctxt "Layout Group (details). Parent table: scene_extras"
+msgctxt ""
+"Layout Group (details). Parent table: scene_extras, Parent Group: main"
msgid "Details"
msgstr ""
@@ -1148,18 +1175,22 @@ msgctxt "Layout Group (details). Parent table: scenes"
msgid "Details"
msgstr "Details"
-msgctxt "Layout Group (scenario). Parent table: scenes"
+msgctxt "Layout Group (scenario). Parent table: scenes, Parent Group: details"
msgid "Scenario"
msgstr "Stimmung"
-msgctxt "Layout Group (location). Parent table: scenes"
+msgctxt "Layout Group (location). Parent table: scenes, Parent Group: details"
msgid "Location"
msgstr "Location"
-msgctxt "Custom Title. Parent table: scenes"
+msgctxt ""
+"Custom Title. Parent table: scenes, Parent Group: details, Parent Group: "
+"location"
msgid "Contact Name"
msgstr ""
-msgctxt "Custom Title. Parent table: scenes"
+msgctxt ""
+"Custom Title. Parent table: scenes, Parent Group: details_lower, Parent "
+"Group: notebook"
msgid "Actor's Name"
msgstr ""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]