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 /scp2/source/ooo | |
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 'scp2/source/ooo')
-rw-r--r-- | scp2/source/ooo/common_brand.scp | 8 | ||||
-rw-r--r-- | scp2/source/ooo/file_ooo.scp | 63 | ||||
-rw-r--r-- | scp2/source/ooo/file_resource_ooo.scp | 99 | ||||
-rw-r--r-- | scp2/source/ooo/module_lang_template.scp | 79 |
4 files changed, 74 insertions, 175 deletions
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp index a9e53ab7906e..e39a65e19ef1 100644 --- a/scp2/source/ooo/common_brand.scp +++ b/scp2/source/ooo/common_brand.scp @@ -638,6 +638,14 @@ ProfileItem gid_Brand_Profileitem_Fundamental_Brand_Share_Subdir Value = LIBO_SHARE_FOLDER; End +ProfileItem gid_Brand_Profileitem_Fundamental_Brand_Resource_Subdir + ModuleID = gid_Module_Root_Brand; + ProfileID = gid_Brand_Profile_Fundamental_Ini; + Section = "Bootstrap"; + Key = "BRAND_SHARE_RESOURCE_SUBDIR"; + Value = LIBO_SHARE_RESOURCE_FOLDER; +End + ProfileItem gid_Brand_Profileitem_Fundamental_Brand_Bin_Subdir ModuleID = gid_Module_Root_Brand; ProfileID = gid_Brand_Profile_Fundamental_Ini; diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp index bd57e8287ada..ea8eddc16635 100644 --- a/scp2/source/ooo/file_ooo.scp +++ b/scp2/source/ooo/file_ooo.scp @@ -27,8 +27,6 @@ #include "macros.inc" -STD_RES_FILE( gid_File_Res_Eps, eps ) - #if defined WITH_HELP File gid_File_Help_Common_Zip Dir = FILELIST_DIR; @@ -177,33 +175,40 @@ UI_FILELIST(vcl, "UIConfig/vcl.filelist") UI_FILELIST(writerperfect, "UIConfig/writerperfect.filelist") UI_FILELIST(xmlsec, "UIConfig/xmlsec.filelist") -UI_FILELIST_ALL_LANG(basicide, modules/BasicIDE) -UI_FILELIST_ALL_LANG(cui, cui) -#ifdef DBCONNECTIVITY -UI_FILELIST_ALL_LANG(dbaccess, dbaccess) -UI_FILELIST_ALL_LANG(dbreport, modules/dbreport) -UI_FILELIST_ALL_LANG(sbibliography, modules/sbibliography) -UI_FILELIST_ALL_LANG(spropctrlr, modules/spropctrlr) -#endif -UI_FILELIST_ALL_LANG(desktop, desktop) -UI_FILELIST_ALL_LANG(editeng, editeng) -UI_FILELIST_ALL_LANG(filter, filter) -UI_FILELIST_ALL_LANG(formula, formula) -UI_FILELIST_ALL_LANG(fps, fps) -UI_FILELIST_ALL_LANG(sabpilot, modules/sabpilot) -UI_FILELIST_ALL_LANG(scalc, modules/scalc) -UI_FILELIST_ALL_LANG(scanner, modules/scanner) -UI_FILELIST_ALL_LANG(schart, modules/schart) -UI_FILELIST_ALL_LANG(sdraw, modules/sdraw) -UI_FILELIST_ALL_LANG(sfx, sfx) -UI_FILELIST_ALL_LANG(simpress, modules/simpress) -UI_FILELIST_ALL_LANG(smath, modules/smath) -UI_FILELIST_ALL_LANG(svt, svt) -UI_FILELIST_ALL_LANG(svx, svx) -UI_FILELIST_ALL_LANG(swriter, modules/swriter) -UI_FILELIST_ALL_LANG(uui, uui) -UI_FILELIST_ALL_LANG(vcl, vcl) -UI_FILELIST_ALL_LANG(xmlsec, xmlsec) +MO_FILELIST_ALL_LANG(acc) +MO_FILELIST_ALL_LANG(avmedia) +#ifndef DISABLE_SCRIPTING +MO_FILELIST_ALL_LANG(basctl) +#endif +MO_FILELIST_ALL_LANG(chart) +MO_FILELIST_ALL_LANG(cnr) +MO_FILELIST_ALL_LANG(cui) +MO_FILELIST_ALL_LANG(dba) +MO_FILELIST_ALL_LANG(dkt) +MO_FILELIST_ALL_LANG(editeng) +MO_FILELIST_ALL_LANG(flt) +MO_FILELIST_ALL_LANG(for) +MO_FILELIST_ALL_LANG(fps) +MO_FILELIST_ALL_LANG(frm) +MO_FILELIST_ALL_LANG(fwk) +MO_FILELIST_ALL_LANG(pcr) +MO_FILELIST_ALL_LANG(rpt) +MO_FILELIST_ALL_LANG(sb) +MO_FILELIST_ALL_LANG(sc) +MO_FILELIST_ALL_LANG(sca) +MO_FILELIST_ALL_LANG(scc) +MO_FILELIST_ALL_LANG(sd) +MO_FILELIST_ALL_LANG(sfx) +MO_FILELIST_ALL_LANG(sm) +MO_FILELIST_ALL_LANG(svl) +MO_FILELIST_ALL_LANG(svt) +MO_FILELIST_ALL_LANG(svx) +MO_FILELIST_ALL_LANG(sw) +MO_FILELIST_ALL_LANG(uui) +MO_FILELIST_ALL_LANG(vcl) +MO_FILELIST_ALL_LANG(wiz) +MO_FILELIST_ALL_LANG(wpt) +MO_FILELIST_ALL_LANG(xsc) #if defined UNX && ! defined MACOSX diff --git a/scp2/source/ooo/file_resource_ooo.scp b/scp2/source/ooo/file_resource_ooo.scp deleted file mode 100644 index ac90ee812f5a..000000000000 --- a/scp2/source/ooo/file_resource_ooo.scp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "macros.inc" - -#ifndef DISABLE_SCRIPTING - -STD_RES_FILE( gid_File_Res_Basctl, basctl) - -#endif - -STD_RES_FILE( gid_File_Res_Bib, bib ) - -STD_RES_FILE( gid_File_Res_Chartcontroller, chartcontroller ) - -STD_RES_FILE( gid_File_Res_Dba, dba) - -STD_RES_FILE( gid_File_Res_Sdbt, sdbt) - -STD_RES_FILE( gid_File_Res_Dbmm, dbmm) - -STD_RES_FILE( gid_File_Res_Dbw, dbw ) - -STD_RES_FILE( gid_File_Res_Dkt, dkt) - -STD_RES_FILE( gid_File_Res_Frm, frm) - -STD_RES_FILE( gid_File_Res_Fwe, fwe) - -STD_RES_FILE( gid_File_Res_Fps_Office, fps_office) - -STD_RES_FILE( gid_File_Res_Gal, gal ) - -STD_RES_FILE( gid_File_Res_Deployment, deployment ) -STD_RES_FILE( gid_File_Res_DeploymentGui, deploymentgui ) - -STD_RES_FILE( gid_File_Res_Pcr, pcr) - -STD_RES_FILE( gid_File_Res_Pdffilter, pdffilter) - -#ifdef UNX - -STD_RES_FILE( gid_File_Res_San, scn ) - -#endif - -STD_RES_FILE( gid_File_Res_Sd, sd ) - -STD_RES_FILE( gid_File_Res_Sfx, sfx ) - -STD_RES_FILE( gid_File_Res_Sb, sb ) - -STD_RES_FILE( gid_File_Res_Svl, svl ) - -STD_RES_FILE( gid_File_Res_Svt, svt ) - -STD_RES_FILE( gid_File_Res_Svx, svx ) -STD_RES_FILE( gid_File_Res_Editeng, editeng ) - -STD_RES_FILE( gid_File_Res_Cui, cui ) - -STD_RES_FILE( gid_File_Res_Sw, sw ) - - -STD_RES_FILE( gid_File_Res_Acc, acc ) - -STD_RES_FILE( gid_File_Res_Uui, uui ) - -STD_RES_FILE( gid_File_Res_Vcl, vcl ) - -STD_RES_FILE( gid_File_Res_Writerperfect, writerperfect ) - -STD_RES_FILE( gid_File_Res_Xsltdlg, xsltdlg ) - -STD_RES_FILE( gid_File_Res_AVMedia, avmedia ) - -STD_RES_FILE( gid_File_Res_XMLSecurity, xmlsec ) - -STD_RES_FILE( gid_File_Res_Upd, upd ) - -STD_RES_FILE( gid_File_Res_T602Filter, t602filter ) - -STD_RES_FILE( gid_File_Res_Forui, forui ) -STD_RES_FILE( gid_File_Res_For, for ) diff --git a/scp2/source/ooo/module_lang_template.scp b/scp2/source/ooo/module_lang_template.scp index 2b2f86f0342b..0455a4e75133 100644 --- a/scp2/source/ooo/module_lang_template.scp +++ b/scp2/source/ooo/module_lang_template.scp @@ -49,6 +49,38 @@ Module gid_Module_Langpack_Basis_Template gid_File_Share_Config_Sofficecfg_uiconfig_uui_Lang, gid_File_Share_Config_Sofficecfg_uiconfig_vcl_Lang, gid_File_Share_Config_Sofficecfg_uiconfig_xmlsec_Lang, + gid_File_Res_acc_Lang, + gid_File_Res_avmedia_Lang, + gid_File_Res_basctl_Lang, + gid_File_Res_chart_Lang, + gid_File_Res_cnr_Lang, + gid_File_Res_cui_Lang, + gid_File_Res_dba_Lang, + gid_File_Res_dkt_Lang, + gid_File_Res_editeng_Lang, + gid_File_Res_flt_Lang, + gid_File_Res_for_Lang, + gid_File_Res_fps_Lang, + gid_File_Res_frm_Lang, + gid_File_Res_fwk_Lang, + gid_File_Res_pcr_Lang, + gid_File_Res_rpt_Lang, + gid_File_Res_sb_Lang, + gid_File_Res_sc_Lang, + gid_File_Res_sca_Lang, + gid_File_Res_scc_Lang, + gid_File_Res_sd_Lang, + gid_File_Res_sfx_Lang, + gid_File_Res_sm_Lang, + gid_File_Res_svl_Lang, + gid_File_Res_svt_Lang, + gid_File_Res_svx_Lang, + gid_File_Res_sw_Lang, + gid_File_Res_uui_Lang, + gid_File_Res_vcl_Lang, + gid_File_Res_wiz_Lang, + gid_File_Res_wpt_Lang, + gid_File_Res_xsc_Lang, gid_File_Extra_Autotextshare_Lang, gid_File_Registry_Filter_Zip, gid_File_Registry_Lang, @@ -59,53 +91,6 @@ Module gid_Module_Langpack_Basis_Template gid_Dir_Autotext_Language); End -Module gid_Module_Langpack_Resource_Template - ParentID = gid_Module_Langpack_Languageroot; - Name = "gid_Module_Langpack_Resource_Template"; - Description = "gid_Module_Langpack_Resource_Template"; - Styles = (TEMPLATEMODULE); - Files = (gid_File_Res_Basctl, - gid_File_Res_Bib, - gid_File_Res_Chartcontroller, - gid_File_Res_Sdbt, - gid_File_Res_Dbmm, - gid_File_Res_Dba, - gid_File_Res_Dbw, - gid_File_Res_Dkt, - gid_File_Res_Editeng, - gid_File_Res_For, - gid_File_Res_Forui, - gid_File_Res_Fps_Office, - gid_File_Res_Frm, - gid_File_Res_Fwe, - gid_File_Res_Gal, - gid_File_Res_Deployment, - gid_File_Res_DeploymentGui, - gid_File_Res_Pcr, - gid_File_Res_Pdffilter, - gid_File_Res_San, - gid_File_Res_Sb, - gid_File_Res_Sd, - gid_File_Res_Sfx, - gid_File_Res_Spa, - gid_File_Res_Svl, - gid_File_Res_Svt, - gid_File_Res_Svx, - gid_File_Res_Cui, - gid_File_Res_Sw, - gid_File_Res_Tk, - gid_File_Res_Acc, - gid_File_Res_Uui, - gid_File_Res_Vcl, - gid_File_Res_Writerperfect, - gid_File_Res_Wzi, - gid_File_Res_Xsltdlg, - gid_File_Res_AVMedia, - gid_File_Res_XMLSecurity, - gid_File_Res_Eps, - gid_File_Res_UpdChk, - gid_File_Res_Upd); -End Module gid_Module_Langpack_Fonts_Template ParentID = gid_Module_Langpack_Languageroot; Name = "gid_Module_Langpack_Fonts_Template"; |