From 00657aef09d854c74fb426a935a3e8b1fc390bb0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 11 Jun 2017 20:56:30 +0100 Subject: migrate to boost::gettext * all .ui files go from to 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 --- xmlsecurity/AllLangMoTarget_xsc.mk | 13 +++ xmlsecurity/AllLangResTarget_xsec.mk | 32 -------- xmlsecurity/Module_xmlsecurity.mk | 4 +- xmlsecurity/inc/global.hrc | 29 ------- xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx | 2 - xmlsecurity/inc/resourcemanager.hxx | 6 +- xmlsecurity/inc/strings.hrc | 58 ++++++++++++++ .../source/component/documentdigitalsignatures.cxx | 2 +- xmlsecurity/source/component/warnbox.src | 27 ------- xmlsecurity/source/dialogs/certificateviewer.cxx | 3 +- xmlsecurity/source/dialogs/certificateviewer.src | 92 ---------------------- xmlsecurity/source/dialogs/dialogs.hrc | 45 ----------- .../source/dialogs/digitalsignaturesdialog.cxx | 3 +- .../source/dialogs/digitalsignaturesdialog.hrc | 34 -------- .../source/dialogs/digitalsignaturesdialog.src | 59 -------------- xmlsecurity/source/dialogs/macrosecurity.cxx | 2 +- xmlsecurity/source/dialogs/resourcemanager.cxx | 9 +-- xmlsecurity/uiconfig/ui/certdetails.ui | 2 +- xmlsecurity/uiconfig/ui/certgeneral.ui | 16 ++-- xmlsecurity/uiconfig/ui/certpage.ui | 12 +-- xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui | 38 ++++----- xmlsecurity/uiconfig/ui/macrosecuritydialog.ui | 8 +- xmlsecurity/uiconfig/ui/securitylevelpage.ui | 10 +-- xmlsecurity/uiconfig/ui/securitytrustpage.ui | 18 ++--- xmlsecurity/uiconfig/ui/selectcertificatedialog.ui | 36 ++++----- xmlsecurity/uiconfig/ui/viewcertdialog.ui | 10 +-- 26 files changed, 159 insertions(+), 411 deletions(-) create mode 100644 xmlsecurity/AllLangMoTarget_xsc.mk delete mode 100644 xmlsecurity/AllLangResTarget_xsec.mk delete mode 100644 xmlsecurity/inc/global.hrc create mode 100644 xmlsecurity/inc/strings.hrc delete mode 100644 xmlsecurity/source/component/warnbox.src delete mode 100644 xmlsecurity/source/dialogs/certificateviewer.src delete mode 100644 xmlsecurity/source/dialogs/dialogs.hrc delete mode 100644 xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc delete mode 100644 xmlsecurity/source/dialogs/digitalsignaturesdialog.src (limited to 'xmlsecurity') diff --git a/xmlsecurity/AllLangMoTarget_xsc.mk b/xmlsecurity/AllLangMoTarget_xsc.mk new file mode 100644 index 000000000000..90b80207cee3 --- /dev/null +++ b/xmlsecurity/AllLangMoTarget_xsc.mk @@ -0,0 +1,13 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# 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/. + +$(eval $(call gb_AllLangMoTarget_AllLangMoTarget,xsc)) + +$(eval $(call gb_AllLangMoTarget_set_polocation,xsc,xmlsecurity)) + +# vim: set noet sw=4 ts=4: diff --git a/xmlsecurity/AllLangResTarget_xsec.mk b/xmlsecurity/AllLangResTarget_xsec.mk deleted file mode 100644 index d2fce602fd8d..000000000000 --- a/xmlsecurity/AllLangResTarget_xsec.mk +++ /dev/null @@ -1,32 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# 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/. -# - -$(eval $(call gb_AllLangResTarget_AllLangResTarget,xmlsec)) - -$(eval $(call gb_AllLangResTarget_set_reslocation,xmlsec,xmlsecurity)) - -$(eval $(call gb_AllLangResTarget_add_srs,xmlsec,\ - xmlsec/res \ -)) - -$(eval $(call gb_SrsTarget_SrsTarget,xmlsec/res)) - -$(eval $(call gb_SrsTarget_set_include,xmlsec/res,\ - $$(INCLUDE) \ - -I$(SRCDIR)/xmlsecurity/inc \ - -I$(SRCDIR)/xmlsecurity/source/dialogs \ -)) - -$(eval $(call gb_SrsTarget_add_files,xmlsec/res,\ - xmlsecurity/source/dialogs/certificateviewer.src \ - xmlsecurity/source/dialogs/digitalsignaturesdialog.src \ - xmlsecurity/source/component/warnbox.src \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index b14729ffc405..23435b0512a9 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -17,6 +17,7 @@ $(eval $(call gb_Module_add_targets,xmlsecurity,\ Library_xmlsecurity \ Library_xsec_fw \ Library_xsec_xmlsec \ + UIConfig_xmlsec \ )) $(eval $(call gb_Module_add_slowcheck_targets,xmlsecurity,\ @@ -25,8 +26,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,xmlsecurity,\ )) $(eval $(call gb_Module_add_l10n_targets,xmlsecurity,\ - AllLangResTarget_xsec \ - UIConfig_xmlsec \ + AllLangMoTarget_xsc \ )) # failing diff --git a/xmlsecurity/inc/global.hrc b/xmlsecurity/inc/global.hrc deleted file mode 100644 index 00dfdd33cc58..000000000000 --- a/xmlsecurity/inc/global.hrc +++ /dev/null @@ -1,29 +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 . - */ - -#ifndef INCLUDED_XMLSECURITY_INC_GLOBAL_HRC -#define INCLUDED_XMLSECURITY_INC_GLOBAL_HRC - -// global resource ids - -#define RID_XMLSECWB_NO_MOZILLA_PROFILE 1013 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx b/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx index 07008a0b5181..3bfbe07dabc5 100644 --- a/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx +++ b/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx @@ -252,7 +252,6 @@ #include #include #include -#include #include #include #include @@ -278,7 +277,6 @@ #include #include #include -#include #include #include #include diff --git a/xmlsecurity/inc/resourcemanager.hxx b/xmlsecurity/inc/resourcemanager.hxx index 659c65bc0431..cba9e7061f98 100644 --- a/xmlsecurity/inc/resourcemanager.hxx +++ b/xmlsecurity/inc/resourcemanager.hxx @@ -34,7 +34,7 @@ class LocaleDataWrapper; namespace XmlSec { - ResMgr* GetResMgr(); + const std::locale& GetResLocale(); const LocaleDataWrapper& GetLocaleData(); DateTime GetDateTime( const css::util::DateTime& _rDT ); @@ -51,9 +51,9 @@ namespace XmlSec OUString GetHexString( const css::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep, sal_uInt16 _nLineBreak = 0xFFFF ); } -inline OUString XsResId(sal_uInt16 nId) +inline OUString XsResId(const char* pId) { - return ResId(nId, *XmlSec::GetResMgr()); + return Translate::get(pId, XmlSec::GetResLocale()); } #endif diff --git a/xmlsecurity/inc/strings.hrc b/xmlsecurity/inc/strings.hrc new file mode 100644 index 000000000000..b572082ec6cf --- /dev/null +++ b/xmlsecurity/inc/strings.hrc @@ -0,0 +1,58 @@ +/* -*- 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 . + */ + +#ifndef INCLUDED_XMLSECURITY_INC_STRINGS_HRC +#define INCLUDED_XMLSECURITY_INC_STRINGS_HRC + +#define NC_(Context, String) (Context "\004" u8##String) + +#define STR_CERTIFICATE_NOT_VALIDATED NC_("STR_CERTIFICATE_NOT_VALIDATED", "The certificate could not be validated.") +#define STR_HEADERBAR NC_("STR_HEADERBAR", "Field\tValue") +#define STR_VERSION NC_("STR_VERSION", "Version") +#define STR_SERIALNUM NC_("STR_SERIALNUM", "Serial Number") +#define STR_ISSUER NC_("STR_ISSUER", "Issuer") +#define STR_VALIDFROM NC_("STR_VALIDFROM", "Valid From") +#define STR_VALIDTO NC_("STR_VALIDTO", "Valid to") +#define STR_SUBJECT NC_("STR_SUBJECT", "Subject") +#define STR_SUBJECT_PUBKEY_ALGO NC_("STR_SUBJECT_PUBKEY_ALGO", "Subject Algorithm") +#define STR_SUBJECT_PUBKEY_VAL NC_("STR_SUBJECT_PUBKEY_VAL", "Public Key") +#define STR_SIGNATURE_ALGO NC_("STR_SIGNATURE_ALGO", "Signature Algorithm") +#define STR_USE NC_("STR_USE", "Certificate Use") +#define STR_THUMBPRINT_SHA1 NC_("STR_THUMBPRINT_SHA1", "Thumbprint SHA1") +#define STR_THUMBPRINT_MD5 NC_("STR_THUMBPRINT_MD5", "Thumbprint MD5") + +#define STR_XMLSECDLG_OLD_ODF_FORMAT NC_("STR_XMLSECDLG_OLD_ODF_FORMAT", "This document contains signatures in ODF 1.1 (OpenOffice.org 2.x) format. " \ + "Signing documents in %PRODUCTNAME %PRODUCTVERSION requires ODF 1.2 format version. " \ + "Thus no signatures can be added or removed to this document.\n\n" \ + "Save document in ODF 1.2 format and add all desired signatures again.") +#define STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN NC_("STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN", "Adding or removing a macro signature will remove all document signatures.\n" \ + "Do you really want to continue?") +#define STR_XMLSECDLG_QUERY_REALLYREMOVE NC_("STR_XMLSECDLG_QUERY_REALLYREMOVE", "Document signature cannot be restored, once removed.\n" \ + "Do you really want to remove selected signature?") + +#define STR_XMLSECDLG_SIGNING_FAILED NC_("STR_XMLSECDLG_SIGNING_FAILED", "An error occurred while adding the signature.") +#define STR_XMLSECDLG_NO_CERT_MANAGER NC_("STR_XMLSECDLG_NO_CERT_MANAGER", "Could not find any certificate manager.") +#define STR_XMLSECDLG_NO_CERT_FOUND NC_("STR_XMLSECDLG_NO_CERT_FOUND", "Could not find the certificate.") + +#define RID_XMLSECWB_NO_MOZILLA_PROFILE NC_("RID_XMLSECWB_NO_MOZILLA_PROFILE", "Digital signatures functionality could not be used, because no Mozilla user profile was found. Please check the Mozilla installation.") + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index f092a7370ff3..6449ed254787 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include diff --git a/xmlsecurity/source/component/warnbox.src b/xmlsecurity/source/component/warnbox.src deleted file mode 100644 index 38f090ce6f6c..000000000000 --- a/xmlsecurity/source/component/warnbox.src +++ /dev/null @@ -1,27 +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 - -String RID_XMLSECWB_NO_MOZILLA_PROFILE -{ - Text [ en-US ] = "Digital signatures functionality could not be used, because no Mozilla user profile was found. Please check the Mozilla installation." ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index e4afcacf4714..1b7d94b5bdd7 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -29,8 +29,9 @@ #include #include -#include "dialogs.hrc" +#include "strings.hrc" #include "resourcemanager.hxx" +#include "svtools/controldims.hxx" #include "bitmaps.hlst" #include diff --git a/xmlsecurity/source/dialogs/certificateviewer.src b/xmlsecurity/source/dialogs/certificateviewer.src deleted file mode 100644 index a3820fc59117..000000000000 --- a/xmlsecurity/source/dialogs/certificateviewer.src +++ /dev/null @@ -1,92 +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 "dialogs.hrc" - -String STR_CERTIFICATE_NOT_VALIDATED -{ - Text [ en-US ] = "The certificate could not be validated."; -}; - -String STR_HEADERBAR -{ - Text [ en-US ] = "Field\tValue"; -}; - -String STR_VERSION -{ - Text [ en-US ] = "Version"; -}; - -String STR_SERIALNUM -{ - Text [ en-US ] = "Serial Number"; -}; - -String STR_ISSUER -{ - Text [ en-US ] = "Issuer"; -}; - -String STR_VALIDFROM -{ - Text [ en-US ] = "Valid From"; -}; - -String STR_VALIDTO -{ - Text [ en-US ] = "Valid to"; -}; - -String STR_SUBJECT -{ - Text [ en-US ] = "Subject"; -}; - -String STR_SUBJECT_PUBKEY_ALGO -{ - Text [ en-US ] = "Subject Algorithm"; -}; - -String STR_SUBJECT_PUBKEY_VAL -{ - Text [ en-US ] = "Public Key"; -}; - -String STR_SIGNATURE_ALGO -{ - Text [ en-US ] = "Signature Algorithm"; -}; - -String STR_USE -{ - Text [ en-US ] = "Certificate Use"; -}; - -String STR_THUMBPRINT_SHA1 -{ - Text [ en-US ] = "Thumbprint SHA1"; -}; - -String STR_THUMBPRINT_MD5 -{ - Text [ en-US ] = "Thumbprint MD5"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/dialogs/dialogs.hrc b/xmlsecurity/source/dialogs/dialogs.hrc deleted file mode 100644 index a0abefacb401..000000000000 --- a/xmlsecurity/source/dialogs/dialogs.hrc +++ /dev/null @@ -1,45 +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 . - */ - -#ifndef INCLUDED_XMLSECURITY_SOURCE_DIALOGS_DIALOGS_HRC -#define INCLUDED_XMLSECURITY_SOURCE_DIALOGS_DIALOGS_HRC - -#include -#include - -#define STR_HEADERBAR 256 -#define STR_VERSION 257 -#define STR_SERIALNUM 258 -#define STR_ISSUER 259 -#define STR_VALIDFROM 260 -#define STR_VALIDTO 261 -#define STR_SUBJECT 262 -#define STR_SUBJECT_PUBKEY_ALGO 263 -#define STR_SUBJECT_PUBKEY_VAL 264 -#define STR_SIGNATURE_ALGO 266 -#define STR_THUMBPRINT_SHA1 267 -#define STR_THUMBPRINT_MD5 268 -#define STR_USE 271 - -// --------- tab page Certificate viewer - General --------- -#define STR_CERTIFICATE_NOT_VALIDATED 269 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 85edf4391561..2b79174c615f 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -49,8 +49,7 @@ #include #include -#include "dialogs.hrc" -#include "digitalsignaturesdialog.hrc" +#include "strings.hrc" #include "resourcemanager.hxx" #include diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc b/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc deleted file mode 100644 index c56c26da96d1..000000000000 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc +++ /dev/null @@ -1,34 +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 . - */ - -#ifndef INCLUDED_DIGITALSIGNATURESDIALOG_HRC -#define INCLUDED_DIGITALSIGNATURESDIALOG_HRC - -//global.hrc in inc starts at 1000 -#define RID_DIGITALSIGNATUREDLG_START 2000 - -#define STR_XMLSECDLG_OLD_ODF_FORMAT RID_DIGITALSIGNATUREDLG_START -#define STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN (RID_DIGITALSIGNATUREDLG_START + 1) -#define STR_XMLSECDLG_QUERY_REALLYREMOVE (RID_DIGITALSIGNATUREDLG_START + 2) -#define STR_XMLSECDLG_SIGNING_FAILED (RID_DIGITALSIGNATUREDLG_START + 3) -#define STR_XMLSECDLG_NO_CERT_MANAGER (RID_DIGITALSIGNATUREDLG_START + 4) -#define STR_XMLSECDLG_NO_CERT_FOUND (RID_DIGITALSIGNATUREDLG_START + 5) -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src b/xmlsecurity/source/dialogs/digitalsignaturesdialog.src deleted file mode 100644 index a01f7d1a33b6..000000000000 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src +++ /dev/null @@ -1,59 +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 "dialogs.hrc" -#include "digitalsignaturesdialog.hrc" - -String STR_XMLSECDLG_OLD_ODF_FORMAT -{ - Text [ en-US ] = - "This document contains signatures in ODF 1.1 (OpenOffice.org 2.x) format. " - "Signing documents in %PRODUCTNAME %PRODUCTVERSION requires ODF 1.2 format version. " - "Thus no signatures can be added or removed to this document.\n\n" - "Save document in ODF 1.2 format and add all desired signatures again."; -}; - -String STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN -{ - Text [ en-US ] = "Adding or removing a macro signature will remove all document signatures.\n" - "Do you really want to continue?"; -}; - -String STR_XMLSECDLG_QUERY_REALLYREMOVE -{ - Text [ en-US ] = "Document signature cannot be restored, once removed.\n" - "Do you really want to remove selected signature?"; -}; - -String STR_XMLSECDLG_SIGNING_FAILED -{ - Text [ en-US ] = "An error occurred while adding the signature."; -}; - -String STR_XMLSECDLG_NO_CERT_MANAGER -{ - Text [ en-US ] = "Could not find any certificate manager."; -}; - -String STR_XMLSECDLG_NO_CERT_FOUND -{ - Text [ en-US ] = "Could not find the certificate."; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index 63a112361280..7616d5fd9992 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -41,7 +41,7 @@ #include -#include "dialogs.hrc" +#include "strings.hrc" #include "resourcemanager.hxx" using namespace ::com::sun::star; diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx index 5b04868e52a1..9296c02a89d4 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.cxx +++ b/xmlsecurity/source/dialogs/resourcemanager.cxx @@ -32,13 +32,10 @@ using namespace std; namespace XmlSec { - static ResMgr* pResMgr = nullptr; - - ResMgr* GetResMgr() + const std::locale& GetResLocale() { - if (!pResMgr) - pResMgr = ResMgr::CreateResMgr("xmlsec"); - return pResMgr; + static const std::locale loc = Translate::Create("xsc", Application::GetSettings().GetUILanguageTag()); + return loc; } const LocaleDataWrapper& GetLocaleData() diff --git a/xmlsecurity/uiconfig/ui/certdetails.ui b/xmlsecurity/uiconfig/ui/certdetails.ui index 75fec82e52f9..ae9a27bd7438 100644 --- a/xmlsecurity/uiconfig/ui/certdetails.ui +++ b/xmlsecurity/uiconfig/ui/certdetails.ui @@ -1,6 +1,6 @@ - + diff --git a/xmlsecurity/uiconfig/ui/certgeneral.ui b/xmlsecurity/uiconfig/ui/certgeneral.ui index 3bf3792a54de..b570b32348a6 100644 --- a/xmlsecurity/uiconfig/ui/certgeneral.ui +++ b/xmlsecurity/uiconfig/ui/certgeneral.ui @@ -1,6 +1,6 @@ - + True @@ -29,7 +29,7 @@ True False - Certificate Information + Certificate Information @@ -67,7 +67,7 @@ 36 108 0 - This certificate is validated. + This certificate is validated. @@ -100,7 +100,7 @@ True False 0 - Issued to: + Issued to: @@ -127,7 +127,7 @@ True False 0 - Issued by: + Issued by: @@ -153,7 +153,7 @@ True False 0 - Valid from: + Valid from: @@ -184,7 +184,7 @@ True False - You have a private key that corresponds to this certificate. + You have a private key that corresponds to this certificate. False @@ -204,7 +204,7 @@ True False 0 - Valid to: + Valid to: diff --git a/xmlsecurity/uiconfig/ui/certpage.ui b/xmlsecurity/uiconfig/ui/certpage.ui index a1207161e9bf..c6e3e71d752a 100644 --- a/xmlsecurity/uiconfig/ui/certpage.ui +++ b/xmlsecurity/uiconfig/ui/certpage.ui @@ -1,6 +1,6 @@ - + @@ -23,7 +23,7 @@ True False 0 - Certification path + Certification path True signatures:border @@ -36,7 +36,7 @@ - View Certificate... + View Certificate... True True True @@ -87,7 +87,7 @@ True False 0 - Certification status + Certification status True status:border @@ -124,7 +124,7 @@ False True - The certificate is OK. + The certificate is OK. False @@ -136,7 +136,7 @@ False True - The certificate could not be validated. + The certificate could not be validated. False diff --git a/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui b/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui index 487bebdf8764..84924a6ebdda 100644 --- a/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui +++ b/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui @@ -1,12 +1,12 @@ - + False 6 - Digital Signatures + Digital Signatures dialog @@ -67,7 +67,7 @@ False True - The following have signed the document content: + The following have signed the document content: 0 @@ -99,7 +99,7 @@ spread - View Certificate... + View Certificate... True True True @@ -112,7 +112,7 @@ - Sign Document... + Sign Document... True True True @@ -126,7 +126,7 @@ - Remove + Remove True True True @@ -139,7 +139,7 @@ - Start Certificate Manager... + Start Certificate Manager... True True True @@ -167,7 +167,7 @@ False True True - Signed by + Signed by 0 @@ -179,7 +179,7 @@ False True True - Digital ID issued by + Digital ID issued by 1 @@ -191,7 +191,7 @@ False True True - Date + Date 2 @@ -202,7 +202,7 @@ False True - Description + Description 3 @@ -213,7 +213,7 @@ False True - Signature type + Signature type 4 @@ -230,7 +230,7 @@ False True - The following have signed the document macro: + The following have signed the document macro: 0 @@ -242,7 +242,7 @@ False True - The following have signed this package: + The following have signed this package: 0 @@ -260,7 +260,7 @@ False True True - The signatures in this document are valid + The signatures in this document are valid 0 @@ -284,7 +284,7 @@ False True True - The signatures in this document are invalid + The signatures in this document are invalid 0 @@ -297,7 +297,7 @@ False True True - Not all parts of the document are signed + Not all parts of the document are signed 0 @@ -310,7 +310,7 @@ False True True - Certificate could not be validated + Certificate could not be validated 0 @@ -359,7 +359,7 @@ - Use AdES-compliant signature when there is a choice + Use AdES-compliant signature when there is a choice True True True diff --git a/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui b/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui index 9a4c17cb39a3..4b4d3b41f521 100644 --- a/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui +++ b/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui @@ -1,11 +1,11 @@ - + False 6 - Macro Security + Macro Security False dialog @@ -97,7 +97,7 @@ True False - Security Level + Security Level False @@ -110,7 +110,7 @@ True False - Trusted Sources + Trusted Sources 1 diff --git a/xmlsecurity/uiconfig/ui/securitylevelpage.ui b/xmlsecurity/uiconfig/ui/securitylevelpage.ui index 78674f0f6704..32260fec6225 100644 --- a/xmlsecurity/uiconfig/ui/securitylevelpage.ui +++ b/xmlsecurity/uiconfig/ui/securitylevelpage.ui @@ -1,6 +1,6 @@ - + True @@ -11,7 +11,7 @@ True - _Low (not recommended). + _Low (not recommended). All macros will be executed without confirmation. Use this setting only if you are certain that all documents that will be opened are safe. True @@ -29,7 +29,7 @@ Use this setting only if you are certain that all documents that will be opened - _Medium. + _Medium. Confirmation required before executing macros from untrusted sources. True True @@ -46,7 +46,7 @@ Confirmation required before executing macros from untrusted sources. - H_igh. + H_igh. Only signed macros from trusted sources are allowed to run. Unsigned macros are disabled. True @@ -65,7 +65,7 @@ Unsigned macros are disabled. - _Very high. + _Very high. Only macros from trusted file locations are allowed to run. All other macros, regardless whether signed or not, are disabled. True diff --git a/xmlsecurity/uiconfig/ui/securitytrustpage.ui b/xmlsecurity/uiconfig/ui/securitytrustpage.ui index 9e464d23c459..5e0a8472f594 100644 --- a/xmlsecurity/uiconfig/ui/securitytrustpage.ui +++ b/xmlsecurity/uiconfig/ui/securitytrustpage.ui @@ -1,5 +1,5 @@ - + True @@ -40,7 +40,7 @@ end - _View... + _View... True True True @@ -83,7 +83,7 @@ True False 0 - Issued to + Issued to 0 @@ -97,7 +97,7 @@ True False 0 - Issued by + Issued by 1 @@ -111,7 +111,7 @@ True False 0 - Expiration date + Expiration date 2 @@ -169,7 +169,7 @@ True False - Trusted Certificates + Trusted Certificates @@ -212,7 +212,7 @@ True False 0 - Document macros are always executed if they have been opened from one of the following locations. + Document macros are always executed if they have been opened from one of the following locations. True 56 @@ -231,7 +231,7 @@ end - A_dd... + A_dd... True True True @@ -318,7 +318,7 @@ True False - Trusted File Locations + Trusted File Locations diff --git a/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui b/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui index 57494738eda0..ac6c253dabdd 100644 --- a/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui +++ b/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui @@ -1,12 +1,12 @@ - + False 6 - Select Certificate + Select Certificate False dialog @@ -89,7 +89,7 @@ False True - Issued to + Issued to 0 @@ -100,7 +100,7 @@ False True - Issued by + Issued by 1 @@ -111,7 +111,7 @@ False True - Certificate usage + Certificate usage 2 @@ -122,7 +122,7 @@ False True - Expiration date + Expiration date 3 @@ -133,7 +133,7 @@ False True - Type + Type 4 @@ -145,42 +145,42 @@ False True - Digital signature + Digital signature False True - Non-repudiation + Non-repudiation False True - Key encipherment + Key encipherment False True - Data encipherment + Data encipherment False True - Key Agreement + Key Agreement False True - Certificate signature verification + Certificate signature verification False True - CRL signature verification + CRL signature verification False True - Only for encipherment + Only for encipherment @@ -195,7 +195,7 @@ False 0 1 - Select the certificate you want to use for signing: + Select the certificate you want to use for signing: 0 @@ -219,7 +219,7 @@ - View Certificate... + View Certificate... True True True @@ -239,7 +239,7 @@ True False - Description: + Description: False diff --git a/xmlsecurity/uiconfig/ui/viewcertdialog.ui b/xmlsecurity/uiconfig/ui/viewcertdialog.ui index 8507d85c0fcc..c9464f9cf3e1 100644 --- a/xmlsecurity/uiconfig/ui/viewcertdialog.ui +++ b/xmlsecurity/uiconfig/ui/viewcertdialog.ui @@ -1,11 +1,11 @@ - + False 6 - View Certificate + View Certificate False dialog @@ -69,7 +69,7 @@ True False - General + General False @@ -82,7 +82,7 @@ True False - Details + Details 1 @@ -96,7 +96,7 @@ True False - Certification Path + Certification Path 2 -- cgit