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 /sw/inc/dbui.hrc | |
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 'sw/inc/dbui.hrc')
-rw-r--r-- | sw/inc/dbui.hrc | 74 |
1 files changed, 19 insertions, 55 deletions
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc index de79b0aba00c..d602c4f2d548 100644 --- a/sw/inc/dbui.hrc +++ b/sw/inc/dbui.hrc @@ -22,61 +22,7 @@ #include "rcid.hrc" -// Strings ------------------------------------------------------------------ - -#define SA_ADDRESS_HEADER (RC_DBUI_BEGIN + 1) -#define STR_NOTASSIGNED (RC_DBUI_BEGIN + 2) -#define STR_FILTER_ALL (RC_DBUI_BEGIN + 3) -#define STR_FILTER_SXB (RC_DBUI_BEGIN + 4) -#define STR_FILTER_SXC (RC_DBUI_BEGIN + 5) -#define STR_FILTER_DBF (RC_DBUI_BEGIN + 6) -#define STR_FILTER_XLS (RC_DBUI_BEGIN + 7) -#define STR_FILTER_TXT (RC_DBUI_BEGIN + 8) -#define STR_FILTER_CSV (RC_DBUI_BEGIN + 9) -#define STR_FILTER_ALL_DATA (RC_DBUI_BEGIN + 10) -#define STR_FILTER_MDB (RC_DBUI_BEGIN + 11) -#define STR_FILTER_ACCDB (RC_DBUI_BEGIN + 12) -#define ST_SALUTATION (RC_DBUI_BEGIN + 13) -#define ST_PUNCTUATION (RC_DBUI_BEGIN + 14) -#define ST_TEXT (RC_DBUI_BEGIN + 15) -#define RA_SALUTATION (RC_DBUI_BEGIN + 16) -#define STR_FILTER_SXW (RC_DBUI_BEGIN + 17) -#define RA_PUNCTUATION (RC_DBUI_BEGIN + 18) -#define ST_TITLE_MALE (RC_DBUI_BEGIN + 19) -#define ST_TITLE_FEMALE (RC_DBUI_BEGIN + 20) -#define ST_SALUTATIONELEMENTS (RC_DBUI_BEGIN + 21) -#define ST_INSERTSALUTATIONFIELD (RC_DBUI_BEGIN + 22) -#define ST_REMOVESALUTATIONFIELD (RC_DBUI_BEGIN + 23) -#define ST_DRAGSALUTATION (RC_DBUI_BEGIN + 24) -#define ST_TITLE_EDIT (RC_DBUI_BEGIN + 25) -#define STR_FILTER_DOC (RC_DBUI_BEGIN + 26) -#define ST_CONFIGUREMAIL (RC_DBUI_BEGIN + 32) -#define ST_FILTERNAME (RC_DBUI_BEGIN + 33) -#define ST_TYPE (RC_DBUI_BEGIN + 34) -#define ST_NAME (RC_DBUI_BEGIN + 35) -#define ST_TABLE (RC_DBUI_BEGIN + 36) -#define ST_QUERY (RC_DBUI_BEGIN + 37) -#define ST_SALUTATIONPREVIEW (RC_DBUI_BEGIN + 38) -#define ST_SALUTATIONMATCHING (RC_DBUI_BEGIN + 39) -#define ST_SALUTATIONELEMENT (RC_DBUI_BEGIN + 40) -#define ST_ADDRESSELEMENT (RC_DBUI_BEGIN + 41) -#define ST_MATCHESTO (RC_DBUI_BEGIN + 42) -#define ST_PREVIEW (RC_DBUI_BEGIN + 43) -#define ST_CONTINUE (RC_DBUI_BEGIN + 44) -#define ST_TASK (RC_DBUI_BEGIN + 45) -#define ST_STATUS (RC_DBUI_BEGIN + 46) -#define ST_SENDINGTO (RC_DBUI_BEGIN + 48) -#define ST_COMPLETED (RC_DBUI_BEGIN + 49) -#define ST_FAILED (RC_DBUI_BEGIN + 50) -#define ST_STARTING (RC_DBUI_BEGIN + 52) -#define ST_DOCUMENTTYPE (RC_DBUI_BEGIN + 53) -#define ST_ADDRESSBLOCK (RC_DBUI_BEGIN + 54) -#define ST_GREETINGSLINE (RC_DBUI_BEGIN + 55) -#define ST_LAYOUT (RC_DBUI_BEGIN + 56) -#define ST_FINISH (RC_DBUI_BEGIN + 57) -#define ST_ADDRESSLIST (RC_DBUI_BEGIN + 58) -#define ST_EXCLUDE (RC_DBUI_BEGIN + 59) -#define ST_MMWTITLE (RC_DBUI_BEGIN + 63) +#define NC_(Context, String) (Context "\004" u8##String) // Elements ----------------------------------------------------------------- #define MM_PART_TITLE 0 @@ -94,6 +40,24 @@ #define MM_PART_E_MAIL 12 #define MM_PART_GENDER 13 +const std::pair<const char*, int> SA_ADDRESS_HEADER[] = +{ + { NC_("SA_ADDRESS_HEADER", "Title") , MM_PART_TITLE }, + { NC_("SA_ADDRESS_HEADER", "First Name") , MM_PART_FIRSTNAME }, + { NC_("SA_ADDRESS_HEADER", "Last Name") , MM_PART_LASTNAME }, + { NC_("SA_ADDRESS_HEADER", "Company Name") , MM_PART_COMPANY }, + { NC_("SA_ADDRESS_HEADER", "Address Line 1") , MM_PART_ADDRESS_1 }, + { NC_("SA_ADDRESS_HEADER", "Address Line 2") , MM_PART_ADDRESS_2 }, + { NC_("SA_ADDRESS_HEADER", "City") , MM_PART_CITY }, + { NC_("SA_ADDRESS_HEADER", "State") , MM_PART_REGION }, + { NC_("SA_ADDRESS_HEADER", "ZIP") , MM_PART_ZIP }, + { NC_("SA_ADDRESS_HEADER", "Country") , MM_PART_COUNTRY }, + { NC_("SA_ADDRESS_HEADER", "Telephone private") , MM_PART_PHONE_PRIVATE }, + { NC_("SA_ADDRESS_HEADER", "Telephone business") , MM_PART_PHONE_BUSINESS }, + { NC_("SA_ADDRESS_HEADER", "E-mail Address") , MM_PART_E_MAIL }, + { NC_("SA_ADDRESS_HEADER", "Gender"), MM_PART_GENDER } +}; + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |