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 /sc/source/ui/miscdlgs | |
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 'sc/source/ui/miscdlgs')
22 files changed, 23 insertions, 193 deletions
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index ae1dbd9c5630..eca4369b36c7 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -33,7 +33,7 @@ #include "docsh.hxx" #include "scresid.hxx" #include "globstr.hrc" -#include "scres.hrc" +#include "strings.hrc" #include "simpref.hxx" #include "scmod.hxx" #include "tabvwsh.hxx" diff --git a/sc/source/ui/miscdlgs/acredlin.src b/sc/source/ui/miscdlgs/acredlin.src deleted file mode 100644 index 3c0dbcae18f2..000000000000 --- a/sc/source/ui/miscdlgs/acredlin.src +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 "globstr.hrc" - -String STR_CHG_INSERT_COLS -{ - Text [ en-US ] = "Column inserted" ; -}; -String STR_CHG_INSERT_ROWS -{ - Text [ en-US ] = "Row inserted " ; -}; -String STR_CHG_INSERT_TABS -{ - Text [ en-US ] = "Sheet inserted " ; -}; -String STR_CHG_DELETE_COLS -{ - Text [ en-US ] = "Column deleted" ; -}; -String STR_CHG_DELETE_ROWS -{ - Text [ en-US ] = "Row deleted" ; -}; -String STR_CHG_DELETE_TABS -{ - Text [ en-US ] = "Sheet deleted" ; -}; -String STR_CHG_MOVE -{ - Text [ en-US ] = "Range moved" ; -}; -String STR_CHG_CONTENT -{ - Text [ en-US ] = "Changed contents" ; -}; -String STR_CHG_CONTENT_WITH_CHILD -{ - Text [ en-US ] = "Changed contents" ; -}; -String STR_CHG_CHILD_CONTENT -{ - Text [ en-US ] = "Changed to " ; -}; -String STR_CHG_CHILD_ORGCONTENT -{ - Text [ en-US ] = "Original" ; -}; -String STR_CHG_REJECT -{ - Text [ en-US ] = "Changes rejected" ; -}; -String STR_CHG_ACCEPTED -{ - Text [ en-US ] = "Accepted" ; -}; -String STR_CHG_REJECTED -{ - Text [ en-US ] = "Rejected" ; -}; -String STR_CHG_NO_ENTRY -{ - Text [ en-US ] = "No Entry" ; -}; -String STR_CHG_EMPTY -{ - Text [ en-US ] = "<empty>" ; -}; -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index c228e2f8f4d5..0a7f9de81a50 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -37,7 +37,7 @@ #include <sfx2/viewfrm.hxx> #include <comphelper/processfactory.hxx> -#include "scres.hrc" +#include "strings.hrc" #include "scmod.hxx" #include "attrib.hxx" #include "zforauto.hxx" diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index bbab72f1827d..c88ed6023e47 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -21,7 +21,7 @@ #include <vcl/msgbox.hxx> #include "conflictsdlg.hxx" -#include "scres.hrc" +#include "strings.hrc" #include "scresid.hxx" #include "viewdata.hxx" #include "dbfunc.hxx" diff --git a/sc/source/ui/miscdlgs/conflictsdlg.src b/sc/source/ui/miscdlgs/conflictsdlg.src deleted file mode 100644 index e22979e85da7..000000000000 --- a/sc/source/ui/miscdlgs/conflictsdlg.src +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 "scres.hrc" - -String STR_TITLE_CONFLICT -{ - Text [ en-US ] = "Conflict" ; -}; - -String STR_TITLE_AUTHOR -{ - Text [ en-US ] = "Author" ; -}; - -String STR_TITLE_DATE -{ - Text [ en-US ] = "Date" ; -}; - -String STR_UNKNOWN_USER_CONFLICT -{ - Text [ en-US ] = "Unknown User" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx index 41c2992860f9..77520bbb9778 100644 --- a/sc/source/ui/miscdlgs/crdlg.cxx +++ b/sc/source/ui/miscdlgs/crdlg.cxx @@ -21,7 +21,7 @@ #include "crdlg.hxx" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" ScColOrRowDlg::ScColOrRowDlg(vcl::Window* pParent, const OUString& rStrTitle, const OUString& rStrLabel) diff --git a/sc/source/ui/miscdlgs/delcldlg.cxx b/sc/source/ui/miscdlgs/delcldlg.cxx index 7eecf2d1b292..31528b1b2899 100644 --- a/sc/source/ui/miscdlgs/delcldlg.cxx +++ b/sc/source/ui/miscdlgs/delcldlg.cxx @@ -21,7 +21,7 @@ #include "delcldlg.hxx" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" static sal_uInt8 nDelItemChecked=0; diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx index 79fac75b8859..fa862b1378c8 100644 --- a/sc/source/ui/miscdlgs/delcodlg.cxx +++ b/sc/source/ui/miscdlgs/delcodlg.cxx @@ -21,7 +21,7 @@ #include "delcodlg.hxx" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" bool ScDeleteContentsDlg::bPreviousAllCheck = false; InsertDeleteFlags ScDeleteContentsDlg::nPreviousChecks = (InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index 4c8ca4c158fc..c5e16bfa7c73 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -26,7 +26,7 @@ #include "scresid.hxx" #include "document.hxx" #include "globstr.hrc" -#include "scres.hrc" +#include "strings.hrc" #include "filldlg.hxx" // class ScFillSeriesDlg diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx index 977358b5c4b7..891d3ae9b7f9 100644 --- a/sc/source/ui/miscdlgs/inscldlg.cxx +++ b/sc/source/ui/miscdlgs/inscldlg.cxx @@ -21,7 +21,7 @@ #include "inscldlg.hxx" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" static sal_uInt8 nInsItemChecked=0; diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx index 190d108e9e63..eb99aff262cb 100644 --- a/sc/source/ui/miscdlgs/inscodlg.cxx +++ b/sc/source/ui/miscdlgs/inscodlg.cxx @@ -21,7 +21,7 @@ #include "inscodlg.hxx" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" bool ScInsertContentsDlg::bPreviousAllCheck = false; InsertDeleteFlags ScInsertContentsDlg::nPreviousChecks = (InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING); diff --git a/sc/source/ui/miscdlgs/lbseldlg.cxx b/sc/source/ui/miscdlgs/lbseldlg.cxx index d9adb2d426c9..ff59830c1926 100644 --- a/sc/source/ui/miscdlgs/lbseldlg.cxx +++ b/sc/source/ui/miscdlgs/lbseldlg.cxx @@ -23,7 +23,7 @@ #include "lbseldlg.hxx" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" ScSelEntryDlg::ScSelEntryDlg(vcl::Window* pParent, const std::vector<OUString> &rEntryList) : ModalDialog(pParent, "SelectRangeDialog", "modules/scalc/ui/selectrange.ui") diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx index 7a81c54c67ed..b38bc98a6d58 100644 --- a/sc/source/ui/miscdlgs/mtrindlg.cxx +++ b/sc/source/ui/miscdlgs/mtrindlg.cxx @@ -21,7 +21,7 @@ #include "mtrindlg.hxx" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" ScMetricInputDlg::ScMetricInputDlg( vcl::Window* pParent, const OString& sDialogName, diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 0d3abf9fd624..820c4affe618 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -24,7 +24,7 @@ #include "mvtabdlg.hxx" #include "document.hxx" #include "docsh.hxx" -#include "scres.hrc" +#include "strings.hrc" #include "global.hxx" #include "scresid.hxx" #include "globstr.hrc" diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx index 92afddb5b14c..e193e023f453 100644 --- a/sc/source/ui/miscdlgs/retypepassdlg.cxx +++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "scres.hrc" +#include "strings.hrc" #include "retypepassdlg.hxx" #include "scresid.hxx" #include "document.hxx" diff --git a/sc/source/ui/miscdlgs/retypepassdlg.src b/sc/source/ui/miscdlgs/retypepassdlg.src deleted file mode 100644 index a2cc62ee2bc1..000000000000 --- a/sc/source/ui/miscdlgs/retypepassdlg.src +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 "scres.hrc" - -String STR_NOT_PROTECTED -{ - Text [ en-US ] = "Not protected" ; -}; - -String STR_NOT_PASS_PROTECTED -{ - Text [ en-US ] = "Not password-protected" ; -}; - -String STR_HASH_BAD -{ - Text [ en-US ] = "Hash incompatible" ; -}; - -String STR_HASH_GOOD -{ - Text [ en-US ] = "Hash compatible" ; -}; - -String STR_RETYPE -{ - Text [ en-US ] = "Re-type" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index fbf1245de8d1..da465ae23774 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -34,8 +34,9 @@ #include <svl/zforlist.hxx> #include <vcl/msgbox.hxx> #include <comphelper/processfactory.hxx> +#include <sfx2/strings.hrc> #include <sfx2/sfxresid.hxx> -#include "scres.hrc" +#include "strings.hrc" #include "scmod.hxx" #include "attrib.hxx" #include "zforauto.hxx" @@ -46,6 +47,7 @@ #include "scuiautofmt.hxx" #include "scresid.hxx" #include "document.hxx" +#include "helpids.h" // AutoFormat-Dialog: diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx index db473dca0ccb..747351aef56e 100644 --- a/sc/source/ui/miscdlgs/shtabdlg.cxx +++ b/sc/source/ui/miscdlgs/shtabdlg.cxx @@ -23,7 +23,7 @@ #include "shtabdlg.hxx" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" ScShowTabDlg::ScShowTabDlg(vcl::Window* pParent) : ModalDialog(pParent, "ShowSheetDialog", "modules/scalc/ui/showsheetdialog.ui") diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx index 69f6a4e5a7d0..bc63af0afc9e 100644 --- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx +++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx @@ -20,15 +20,15 @@ #undef SC_DLLIMPLEMENTATION #include "tabbgcolordlg.hxx" +#include "sc.hrc" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" #include <tools/color.hxx> #include <sfx2/objsh.hxx> #include <svx/xtable.hxx> #include <svx/drawitem.hxx> #include <unotools/pathoptions.hxx> -#include <tools/resid.hxx> #include <editeng/editrids.hrc> #include <editeng/eerdll.hxx> #include <vcl/builderfactory.hxx> diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index daf684dac704..101293a867d4 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -26,6 +26,7 @@ #include "document.hxx" #include "scresid.hxx" #include "sc.hrc" +#include "strings.hrc" #include "reffact.hxx" #include "tabopdlg.hxx" diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx index 578681598940..c1416798f247 100644 --- a/sc/source/ui/miscdlgs/textdlgs.cxx +++ b/sc/source/ui/miscdlgs/textdlgs.cxx @@ -20,6 +20,7 @@ #undef SC_DLLIMPLEMENTATION #include <svx/svxids.hrc> +#include <svx/dialogs.hrc> #include <editeng/flstitem.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx index 20b4bdb6f10a..9cd98b09f60c 100644 --- a/sc/source/ui/miscdlgs/warnbox.cxx +++ b/sc/source/ui/miscdlgs/warnbox.cxx @@ -22,7 +22,8 @@ #include "scmod.hxx" #include "inputopt.hxx" #include "scresid.hxx" -#include "scres.hrc" +#include "strings.hrc" +#include "helpids.h" ScReplaceWarnBox::ScReplaceWarnBox( vcl::Window* pParent ) : WarningBox( pParent, WB_YES_NO | WB_DEF_YES, ScResId( STR_REPLCELLSWARN ) ) |