diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-06-11 20:56:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-21 08:20:50 +0100 |
commit | 00657aef09d854c74fb426a935a3e8b1fc390bb0 (patch) | |
tree | fd1a9bb264fe15dcc129498e62060ecd256b1ee7 /extensions/uiconfig/spropctrlr | |
parent | fa987cbb813cfd729fe490f2f1258b7c8d7fb174 (diff) |
migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
results in inserting the english original so something can be found, now the
standard fallback of using the english original from the source key is used, so
partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
com::sun::star::resource::OfficeResourceLoader
com::sun::star::resource::XResourceBundleLoader
com::sun::star::resource::XResourceBundle
when translating strings via uno apis
com.sun.star.resource.StringResourceWithLocation
can continue to be used
Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
Diffstat (limited to 'extensions/uiconfig/spropctrlr')
7 files changed, 25 insertions, 25 deletions
diff --git a/extensions/uiconfig/spropctrlr/ui/controlfontdialog.ui b/extensions/uiconfig/spropctrlr/ui/controlfontdialog.ui index 870ce46680bd..796f6983b189 100644 --- a/extensions/uiconfig/spropctrlr/ui/controlfontdialog.ui +++ b/extensions/uiconfig/spropctrlr/ui/controlfontdialog.ui @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Generated with glade 3.18.3 --> -<interface> +<interface domain="pcr"> <requires lib="gtk+" version="3.0"/> <object class="GtkDialog" id="ControlFontDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> - <property name="title" translatable="yes">Character</property> + <property name="title" translatable="yes" context="controlfontdialog|ControlFontDialog">Character</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> @@ -96,7 +96,7 @@ <object class="GtkLabel" id="font"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Font</property> + <property name="label" translatable="yes" context="controlfontdialog|font">Font</property> </object> <packing> <property name="tab_fill">False</property> @@ -109,7 +109,7 @@ <object class="GtkLabel" id="fonteffects"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Font Effects</property> + <property name="label" translatable="yes" context="controlfontdialog|fonteffects">Font Effects</property> </object> <packing> <property name="position">1</property> diff --git a/extensions/uiconfig/spropctrlr/ui/datatypedialog.ui b/extensions/uiconfig/spropctrlr/ui/datatypedialog.ui index a55ea1ead182..052e3b7c5cf1 100644 --- a/extensions/uiconfig/spropctrlr/ui/datatypedialog.ui +++ b/extensions/uiconfig/spropctrlr/ui/datatypedialog.ui @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Generated with glade 3.18.3 --> -<interface> +<interface domain="pcr"> <requires lib="gtk+" version="3.0"/> <object class="GtkDialog" id="DataTypeDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> - <property name="title" translatable="yes">New Data Type</property> + <property name="title" translatable="yes" context="datatypedialog|DataTypeDialog">New Data Type</property> <property name="type_hint">normal</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> @@ -82,7 +82,7 @@ <object class="GtkLabel" id="label"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Type a name for the new data type:</property> + <property name="label" translatable="yes" context="datatypedialog|label">Type a name for the new data type:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">entry</property> <property name="xalign">0</property> diff --git a/extensions/uiconfig/spropctrlr/ui/fieldlinkrow.ui b/extensions/uiconfig/spropctrlr/ui/fieldlinkrow.ui index 3164832345a4..fd55055afdc2 100644 --- a/extensions/uiconfig/spropctrlr/ui/fieldlinkrow.ui +++ b/extensions/uiconfig/spropctrlr/ui/fieldlinkrow.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<interface> +<interface domain="pcr"> <!-- interface-requires gtk+ 3.0 --> <object class="GtkBox" id="FieldLinkRow"> <property name="visible">True</property> diff --git a/extensions/uiconfig/spropctrlr/ui/formlinksdialog.ui b/extensions/uiconfig/spropctrlr/ui/formlinksdialog.ui index 9c598a3aef7f..de85978409ae 100644 --- a/extensions/uiconfig/spropctrlr/ui/formlinksdialog.ui +++ b/extensions/uiconfig/spropctrlr/ui/formlinksdialog.ui @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> -<interface> +<interface domain="pcr"> <!-- interface-requires gtk+ 3.0 --> <object class="GtkDialog" id="FormLinks"> <property name="can_focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="border_width">6</property> - <property name="title" translatable="yes">Link fields</property> + <property name="title" translatable="yes" context="formlinksdialog|FormLinks">Link fields</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> @@ -69,7 +69,7 @@ </child> <child> <object class="GtkButton" id="suggestButton"> - <property name="label" translatable="yes">Suggest</property> + <property name="label" translatable="yes" context="formlinksdialog|suggestButton">Suggest</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -102,7 +102,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Sub forms can be used to display detailed data about the current record of the master form. To do this, you can specify which columns in the sub form match which columns in the master form.</property> + <property name="label" translatable="yes" context="formlinksdialog|explanationLabel">Sub forms can be used to display detailed data about the current record of the master form. To do this, you can specify which columns in the sub form match which columns in the master form.</property> <property name="wrap">True</property> <property name="max_width_chars">60</property> </object> @@ -122,7 +122,7 @@ <object class="GtkLabel" id="detailLabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">label</property> + <property name="label" translatable="yes" context="formlinksdialog|detailLabel">label</property> </object> <packing> <property name="expand">False</property> @@ -134,7 +134,7 @@ <object class="GtkLabel" id="masterLabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">label</property> + <property name="label" translatable="yes" context="formlinksdialog|masterLabel">label</property> </object> <packing> <property name="expand">False</property> diff --git a/extensions/uiconfig/spropctrlr/ui/labelselectiondialog.ui b/extensions/uiconfig/spropctrlr/ui/labelselectiondialog.ui index d9ff397cce35..efce46798e7c 100644 --- a/extensions/uiconfig/spropctrlr/ui/labelselectiondialog.ui +++ b/extensions/uiconfig/spropctrlr/ui/labelselectiondialog.ui @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Generated with glade 3.18.3 --> -<interface> +<interface domain="pcr"> <requires lib="gtk+" version="3.0"/> <requires lib="LibreOffice" version="1.0"/> <object class="GtkDialog" id="LabelSelectionDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> - <property name="title" translatable="yes">Label Field Selection</property> + <property name="title" translatable="yes" context="labelselectiondialog|LabelSelectionDialog">Label Field Selection</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> @@ -85,7 +85,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="label" translatable="yes">These are control fields that can be used as label fields for the $controlclass$ $controlname$.</property> + <property name="label" translatable="yes" context="labelselectiondialog|label">These are control fields that can be used as label fields for the $controlclass$ $controlname$.</property> <property name="use_underline">True</property> <property name="wrap">True</property> <property name="mnemonic_widget">control:border</property> @@ -119,7 +119,7 @@ </child> <child> <object class="GtkCheckButton" id="noassignment"> - <property name="label" translatable="yes">_No assignment</property> + <property name="label" translatable="yes" context="labelselectiondialog|noassignment">_No assignment</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> diff --git a/extensions/uiconfig/spropctrlr/ui/listselectdialog.ui b/extensions/uiconfig/spropctrlr/ui/listselectdialog.ui index 247868baac0f..b619eb60bc56 100644 --- a/extensions/uiconfig/spropctrlr/ui/listselectdialog.ui +++ b/extensions/uiconfig/spropctrlr/ui/listselectdialog.ui @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Generated with glade 3.18.3 --> -<interface> +<interface domain="pcr"> <requires lib="gtk+" version="3.0"/> <object class="GtkDialog" id="ListSelectDialog"> <property name="can_focus">False</property> diff --git a/extensions/uiconfig/spropctrlr/ui/taborder.ui b/extensions/uiconfig/spropctrlr/ui/taborder.ui index d87b7e99d798..87d977feb41b 100644 --- a/extensions/uiconfig/spropctrlr/ui/taborder.ui +++ b/extensions/uiconfig/spropctrlr/ui/taborder.ui @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<interface> +<interface domain="pcr"> <!-- interface-requires gtk+ 3.0 --> <!-- interface-requires LibreOffice 1.0 --> <object class="GtkDialog" id="TabOrderDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> - <property name="title" translatable="yes">Tab Order</property> + <property name="title" translatable="yes" context="taborder|TabOrderDialog">Tab Order</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox3"> @@ -18,7 +18,7 @@ <property name="layout_style">end</property> <child> <object class="GtkButton" id="upB"> - <property name="label" translatable="yes">_Move Up</property> + <property name="label" translatable="yes" context="taborder|upB">_Move Up</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -32,7 +32,7 @@ </child> <child> <object class="GtkButton" id="downB"> - <property name="label" translatable="yes">Move _Down</property> + <property name="label" translatable="yes" context="taborder|downB">Move _Down</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -46,7 +46,7 @@ </child> <child> <object class="GtkButton" id="autoB"> - <property name="label" translatable="yes">_Automatic Sort</property> + <property name="label" translatable="yes" context="taborder|autoB">_Automatic Sort</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -143,7 +143,7 @@ <object class="GtkLabel" id="label2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Controls</property> + <property name="label" translatable="yes" context="taborder|label2">Controls</property> <attributes> <attribute name="weight" value="bold"/> </attributes> |