summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-11 20:56:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-21 08:20:50 +0100
commit00657aef09d854c74fb426a935a3e8b1fc390bb0 (patch)
treefd1a9bb264fe15dcc129498e62060ecd256b1ee7 /uui
parentfa987cbb813cfd729fe490f2f1258b7c8d7fb174 (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 'uui')
-rw-r--r--uui/AllLangMoTarget_uui.mk11
-rw-r--r--uui/AllLangResTarget_uui.mk36
-rw-r--r--uui/Library_uui.mk6
-rw-r--r--uui/Module_uui.mk4
-rw-r--r--uui/inc/ids.hrc174
-rw-r--r--uui/inc/ids.hxx (renamed from uui/source/ids.hrc)55
-rw-r--r--uui/inc/strings.hrc80
-rw-r--r--uui/source/alreadyopen.cxx15
-rw-r--r--uui/source/alreadyopen.hxx2
-rw-r--r--uui/source/alreadyopen.src51
-rw-r--r--uui/source/filechanged.cxx11
-rw-r--r--uui/source/filechanged.hxx2
-rw-r--r--uui/source/filechanged.src35
-rw-r--r--uui/source/fltdlg.cxx2
-rw-r--r--uui/source/iahndl-authentication.cxx21
-rw-r--r--uui/source/iahndl-errorhandler.cxx21
-rw-r--r--uui/source/iahndl-ioexceptions.cxx2
-rw-r--r--uui/source/iahndl-locking.cxx44
-rw-r--r--uui/source/iahndl-ssl.cxx52
-rw-r--r--uui/source/iahndl.cxx47
-rw-r--r--uui/source/iahndl.hxx11
-rw-r--r--uui/source/ids.src256
-rw-r--r--uui/source/lockcorrupt.cxx15
-rw-r--r--uui/source/lockcorrupt.hxx2
-rw-r--r--uui/source/lockcorrupt.src35
-rw-r--r--uui/source/lockfailed.cxx14
-rw-r--r--uui/source/lockfailed.hxx2
-rw-r--r--uui/source/lockfailed.src35
-rw-r--r--uui/source/logindlg.cxx3
-rw-r--r--uui/source/masterpasscrtdlg.cxx10
-rw-r--r--uui/source/masterpasscrtdlg.hxx4
-rw-r--r--uui/source/masterpassworddlg.cxx10
-rw-r--r--uui/source/masterpassworddlg.hxx4
-rw-r--r--uui/source/nameclashdlg.cxx13
-rw-r--r--uui/source/nameclashdlg.hxx2
-rw-r--r--uui/source/nameclashdlg.src37
-rw-r--r--uui/source/openlocked.cxx11
-rw-r--r--uui/source/openlocked.hxx2
-rw-r--r--uui/source/openlocked.src43
-rw-r--r--uui/source/passworddlg.cxx27
-rw-r--r--uui/source/passworddlg.hxx6
-rw-r--r--uui/source/passworddlg.src57
-rw-r--r--uui/source/passworderrs.src47
-rw-r--r--uui/source/secmacrowarnings.cxx1
-rw-r--r--uui/source/sslwarndlg.cxx2
-rw-r--r--uui/source/trylater.cxx13
-rw-r--r--uui/source/trylater.hxx2
-rw-r--r--uui/source/trylater.src39
-rw-r--r--uui/source/unknownauthdlg.cxx2
-rw-r--r--uui/uiconfig/ui/authfallback.ui6
-rw-r--r--uui/uiconfig/ui/filterselect.ui4
-rw-r--r--uui/uiconfig/ui/logindialog.ui28
-rw-r--r--uui/uiconfig/ui/macrowarnmedium.ui18
-rw-r--r--uui/uiconfig/ui/masterpassworddlg.ui6
-rw-r--r--uui/uiconfig/ui/password.ui4
-rw-r--r--uui/uiconfig/ui/setmasterpassworddlg.ui12
-rw-r--r--uui/uiconfig/ui/simplenameclash.ui8
-rw-r--r--uui/uiconfig/ui/sslwarndialog.ui10
-rw-r--r--uui/uiconfig/ui/unknownauthdialog.ui10
59 files changed, 507 insertions, 975 deletions
diff --git a/uui/AllLangMoTarget_uui.mk b/uui/AllLangMoTarget_uui.mk
new file mode 100644
index 000000000000..47d037f7ed4b
--- /dev/null
+++ b/uui/AllLangMoTarget_uui.mk
@@ -0,0 +1,11 @@
+# -*- 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,uui))
+
+# vim: set noet sw=4 ts=4:
diff --git a/uui/AllLangResTarget_uui.mk b/uui/AllLangResTarget_uui.mk
deleted file mode 100644
index fe59c93c6201..000000000000
--- a/uui/AllLangResTarget_uui.mk
+++ /dev/null
@@ -1,36 +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,uui))
-
-$(eval $(call gb_AllLangResTarget_add_srs,uui,\
- uui/res \
-))
-
-$(eval $(call gb_SrsTarget_SrsTarget,uui/res))
-
-$(eval $(call gb_SrsTarget_set_include,uui/res,\
- -I$(SRCDIR)/uui/source \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_SrsTarget_add_files,uui/res,\
- uui/source/alreadyopen.src \
- uui/source/filechanged.src \
- uui/source/ids.src \
- uui/source/lockfailed.src \
- uui/source/lockcorrupt.src \
- uui/source/nameclashdlg.src \
- uui/source/openlocked.src \
- uui/source/passworddlg.src \
- uui/source/passworderrs.src \
- uui/source/trylater.src \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/uui/Library_uui.mk b/uui/Library_uui.mk
index 6a2096b86632..7cef0e1da345 100644
--- a/uui/Library_uui.mk
+++ b/uui/Library_uui.mk
@@ -9,6 +9,11 @@
$(eval $(call gb_Library_Library,uui))
+$(eval $(call gb_Library_set_include,uui,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/uui/inc \
+))
+
$(eval $(call gb_Library_set_componentfile,uui,uui/util/uui))
$(eval $(call gb_Library_use_external,uui,boost_headers))
@@ -29,6 +34,7 @@ $(eval $(call gb_Library_use_libraries,uui,\
i18nlangtag \
svl \
svt \
+ svx \
tk \
tl \
utl \
diff --git a/uui/Module_uui.mk b/uui/Module_uui.mk
index 436efbfcb09c..e86ec3b1ca63 100644
--- a/uui/Module_uui.mk
+++ b/uui/Module_uui.mk
@@ -11,11 +11,11 @@ $(eval $(call gb_Module_Module,uui))
$(eval $(call gb_Module_add_targets,uui,\
Library_uui \
+ UIConfig_uui \
))
$(eval $(call gb_Module_add_l10n_targets,uui,\
- AllLangResTarget_uui \
- UIConfig_uui \
+ AllLangMoTarget_uui \
))
# screenshots
diff --git a/uui/inc/ids.hrc b/uui/inc/ids.hrc
new file mode 100644
index 000000000000..2156b63bd1b6
--- /dev/null
+++ b/uui/inc/ids.hrc
@@ -0,0 +1,174 @@
+/* -*- 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_UUI_INC_IDS_HRC
+#define INCLUDED_UUI_INC_IDS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+const std::pair<const char*, ErrCode> RID_UUI_ERRHDL[] =
+{
+ { NC_("RID_UUI_ERRHDL", "The operation executed on $(ARG1) was aborted."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_ABORT) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Access to $(ARG1) was denied."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_ACCESSDENIED) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) already exists."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_ALREADYEXISTS) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Target already exists."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_TARGETALREADYEXISTS) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "You are about to save/export a password protected basic library containing module(s) \n$(ARG1)\nwhich are too large to store in binary format. If you wish users that don't have access to the library password to be able to run macros in those module(s) you must split those modules into a number of smaller modules. Do you wish to continue to save/export this library?"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_MODULESIZEEXCEEDED) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The data from $(ARG1) has an incorrect checksum."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_BADCRC) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The object $(ARG1) cannot be created in directory $(ARG2)."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_CANTCREATE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Data of $(ARG1) could not be read."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_CANTREAD) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The seek operation on $(ARG1) could not be performed."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_CANTSEEK) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The tell operation on $(ARG1) could not be performed."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_CANTTELL) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Data for $(ARG1) could not be written."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_CANTWRITE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Action impossible: $(ARG1) is the current directory."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_CURRENTDIR) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) is not ready."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTREADY) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Action impossible: $(ARG1) and $(ARG2) are different devices (drives)."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTSAMEDEVICE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "General input/output error while accessing $(ARG1)."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_GENERAL) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "An attempt was made to access $(ARG1) in an invalid way."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_INVALIDACCESS) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) contains invalid characters."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_INVALIDCHAR) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The device (drive) $(ARG1) is invalid."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_INVALIDDEVICE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The data from $(ARG1) has an invalid length."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_INVALIDLENGTH) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The operation on $(ARG1) was started with an invalid parameter."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_INVALIDPARAMETER) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The operation cannot be performed because $(ARG1) contains wildcards."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_ISWILDCARD) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Error during shared access to $(ARG1)."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_LOCKVIOLATION) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) contains misplaced characters."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_MISPLACEDCHAR) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The name $(ARG1) contains too many characters."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NAMETOOLONG) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) does not exist."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTEXISTS) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The path $(ARG1) does not exist."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTEXISTSPATH) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The operation on $(ARG1) is not supported on this operating system."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTSUPPORTED) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) is not a directory."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTADIRECTORY) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) is not a file."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTAFILE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "There is no space left on device $(ARG1)."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_OUTOFSPACE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The operation on $(ARG1) cannot be performed because too many files are already open."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_TOOMANYOPENFILES) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The operation on $(ARG1) cannot be performed because there is no more memory available."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_OUTOFMEMORY) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The operation on $(ARG1) cannot continue because more data is pending."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_PENDING) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) cannot be copied into itself."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_RECURSIVE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Unknown input/output error while accessing $(ARG1)."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_UNKNOWN) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) is write protected."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_WRITEPROTECTED) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) is not in the correct format."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_WRONGFORMAT) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The version of $(ARG1) is not correct."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_WRONGVERSION) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Drive $(ARG1) does not exist."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTEXISTS_VOLUME) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Folder $(ARG1) does not exist."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTEXISTS_FOLDER) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The installed Java version is not supported."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_WRONGJAVA) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The installed Java version $(ARG1) is not supported."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_WRONGJAVA_VERSION) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The installed Java version is not supported, at least version $(ARG1) is required."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_WRONGJAVA_MIN) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The installed Java version $(ARG1) is not supported, at least version $(ARG2) is required."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_WRONGJAVA_VERSION_MIN) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The data associated with the partnership is corrupted."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_BADPARTNERSHIP) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The data associated with the partnership $(ARG1) is corrupted."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_BADPARTNERSHIP_NAME) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Volume $(ARG1) is not ready."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTREADY_VOLUME) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) is not ready; please insert a storage medium."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTREADY_REMOVABLE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Volume $(ARG1) is not ready; please insert a storage medium."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_NOTREADY_VOLUME_REMOVABLE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Please insert disk $(ARG1)."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_WRONGMEDIUM) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The object cannot be created in directory $(ARG1)."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_CANTCREATE_NONAME) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "%PRODUCTNAME cannot keep files from being overwritten when this transmission protocol is used. Do you want to continue anyway?"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_UNSUPPORTEDOVERWRITE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The file '$(ARG1)' is corrupt and therefore cannot be opened. %PRODUCTNAME can try to repair the file.\n\nThe corruption could be the result of document manipulation or of structural document damage due to data transmission.\n\nWe recommend that you do not trust the content of the repaired document.\nExecution of macros is disabled for this document.\n\nShould %PRODUCTNAME repair the file?\n"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_BROKENPACKAGE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The file '$(ARG1)' could not be repaired and therefore cannot be opened."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_IO_BROKENPACKAGE_CANTREPAIR) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Configuration data in '$(ARG1)' is corrupted. Without this data some functions may not operate correctly.\nDo you want to continue startup of %PRODUCTNAME without the corrupted configuration data?"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_CONFIGURATION_BROKENDATA_NOREMOVE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The personal configuration file '$(ARG1)' is corrupted and must be deleted to continue. Some of your personal settings may be lost.\nDo you want to continue startup of %PRODUCTNAME without the corrupted configuration data?"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_CONFIGURATION_BROKENDATA_WITHREMOVE) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The configuration data source '$(ARG1)' is unavailable. Without this data some functions may not operate correctly."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_CONFIGURATION_BACKENDMISSING) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The configuration data source '$(ARG1)' is unavailable. Without this data some functions may not operate correctly.\nDo you want to continue startup of %PRODUCTNAME without the missing configuration data?"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_CONFIGURATION_BACKENDMISSING_WITHRECOVER) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The form contains invalid data. Do you still want to continue?"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_INVALID_XFORMS_SUBMISSION_DATA) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The file $(ARG1) is locked by another user. Currently, another write access to this file cannot be granted."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_LOCKING_LOCKED) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The file $(ARG1) is locked by yourself. Currently, another write access to this file cannot be granted."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_LOCKING_LOCKED_SELF) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The file $(ARG1) is currently not locked by yourself."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_LOCKING_NOT_LOCKED) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "The previously obtained lock for file $(ARG1) has expired.\nThis can happen due to problems on the server managing the file lock. It cannot be guaranteed that write operations on this file will not overwrite changes done by other users!"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_LOCKING_LOCK_EXPIRED) & ERRCODE_RES_MASK) },
+ { NC_("RID_UUI_ERRHDL", "Unable to verify the identity of $(ARG1) site.\n\nBefore accepting this certificate, you should examine this site's certificate carefully. Are you willing to accept this certificate for the purpose of identifying the Web site $(ARG1)?"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_UNKNOWNAUTH_UNTRUSTED)) },
+ { NC_("RID_UUI_ERRHDL", "$(ARG1) is a site that uses a security certificate to encrypt data during transmission, but its certificate expired on $(ARG2).\n\nYou should check to make sure that your computer's time is correct."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_SSLWARN_EXPIRED_1)) },
+ { NC_("RID_UUI_ERRHDL", "You have attempted to establish a connection with $(ARG1). However, the security certificate presented belongs to $(ARG2). It is possible, though unlikely, that someone may be trying to intercept your communication with this web site.\n\nIf you suspect the certificate shown does not belong to $(ARG1), please cancel the connection and notify the site administrator.\n\nWould you like to continue anyway?"),
+ ErrCode(sal_uInt32(ERRCODE_UUI_SSLWARN_DOMAINMISMATCH_1)) },
+ { NC_("RID_UUI_ERRHDL", "The certificate could not be validated. You should examine this site's certificate carefully.\n\nIf you suspect the certificate shown, please cancel the connection and notify the site administrator."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_SSLWARN_INVALID_1)) },
+ { NC_("RID_UUI_ERRHDL", "Security Warning: Domain Name Mismatch"),
+ ErrCode(TITLE_UUI_SSLWARN_DOMAINMISMATCH) },
+ { NC_("RID_UUI_ERRHDL", "Security Warning: Server Certificate Expired"),
+ ErrCode(TITLE_UUI_SSLWARN_EXPIRED) },
+ { NC_("RID_UUI_ERRHDL", "Security Warning: Server Certificate Invalid"),
+ ErrCode(TITLE_UUI_SSLWARN_INVALID) },
+ { NC_("RID_UUI_ERRHDL", "Component cannot be loaded, possibly broken or incomplete installation.\nFull error message:\n\n $(ARG1)."),
+ ErrCode(sal_uInt32(ERRCODE_UUI_CANNOT_ACTIVATE_FACTORY) & ERRCODE_RES_MASK) },
+ { nullptr, ERRCODE_NONE }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/ids.hrc b/uui/inc/ids.hxx
index d019907c8d65..cccd0d36923e 100644
--- a/uui/source/ids.hrc
+++ b/uui/inc/ids.hxx
@@ -17,60 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef UUI_IDS_HRC
-#define UUI_IDS_HRC
+#ifndef INCLUDED_UUI_INC_IDS_HXX
+#define INCLUDED_UUI_INC_IDS_HXX
-#include <svl/solar.hrc>
#include <vcl/errcode.hxx>
-#define RID_KEEP_PASSWORD (RID_UUI_START + 0)
-#define RID_SAVE_PASSWORD (RID_UUI_START + 1)
-#define STR_ERROR_PASSWORDS_NOT_IDENTICAL (RID_UUI_START + 13)
-#define STR_ERROR_MASTERPASSWORD_WRONG (RID_UUI_START + 14)
-// RID_UUI_START + 15, 16, 17 are misused by syncaccess/source/ui/resids.hrc
-
-#define RID_UUI_ERRHDL (RID_UUI_START + 20)
-#define STR_ERROR_SIMPLE_PASSWORD_WRONG (RID_UUI_START + 23)
-#define STR_ERROR_PASSWORD_TO_OPEN_WRONG (RID_UUI_START + 24)
-#define STR_ERROR_PASSWORD_TO_MODIFY_WRONG (RID_UUI_START + 25)
-#define STR_UNKNOWNUSER (RID_UUI_START + 31)
-#define STR_OPENLOCKED_TITLE (RID_UUI_START + 32)
-#define STR_OPENLOCKED_MSG (RID_UUI_START + 33)
-#define STR_OPENLOCKED_OPENREADONLY_BTN (RID_UUI_START + 34)
-#define STR_OPENLOCKED_OPENCOPY_BTN (RID_UUI_START + 35)
-#define STR_FILECHANGED_TITLE (RID_UUI_START + 36)
-#define STR_FILECHANGED_MSG (RID_UUI_START + 37)
-#define STR_FILECHANGED_SAVEANYWAY_BTN (RID_UUI_START + 38)
-#define STR_ALREADYOPEN_TITLE (RID_UUI_START + 39)
-#define STR_ALREADYOPEN_MSG (RID_UUI_START + 40)
-#define STR_ALREADYOPEN_READONLY_BTN (RID_UUI_START + 41)
-#define STR_ALREADYOPEN_OPEN_BTN (RID_UUI_START + 42)
-#define STR_LOCKFAILED_TITLE (RID_UUI_START + 43)
-#define STR_LOCKFAILED_MSG (RID_UUI_START + 44)
-#define STR_LOCKFAILED_OPENREADONLY_BTN (RID_UUI_START + 45)
-#define STR_LOCKCORRUPT_TITLE (RID_UUI_START + 46)
-#define STR_LOCKCORRUPT_MSG (RID_UUI_START + 47)
-#define STR_LOCKCORRUPT_OPENREADONLY_BTN (RID_UUI_START + 48)
-#define STR_TRYLATER_TITLE (RID_UUI_START + 49)
-#define STR_TRYLATER_MSG (RID_UUI_START + 50)
-#define STR_TRYLATER_RETRYSAVING_BTN (RID_UUI_START + 51)
-#define STR_TRYLATER_SAVEAS_BTN (RID_UUI_START + 52)
-#define STR_ALREADYOPEN_SAVE_MSG (RID_UUI_START + 53)
-#define STR_ALREADYOPEN_RETRY_SAVE_BTN (RID_UUI_START + 54)
-#define STR_ALREADYOPEN_SAVE_BTN (RID_UUI_START + 55)
-
-#define STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE (RID_UUI_START + 56)
-#define STR_ENTER_PASSWORD_TO_OPEN (RID_UUI_START + 57)
-#define STR_ENTER_PASSWORD_TO_MODIFY (RID_UUI_START + 58)
-#define STR_RENAME_OR_REPLACE (RID_UUI_START + 59)
-#define STR_NAME_CLASH_RENAME_ONLY (RID_UUI_START + 60)
-#define STR_SAME_NAME_USED (RID_UUI_START + 61)
-#define STR_ENTER_SIMPLE_PASSWORD (RID_UUI_START + 62)
-#define STR_CONFIRM_SIMPLE_PASSWORD (RID_UUI_START + 63)
-#define STR_TITLE_CREATE_PASSWORD (RID_UUI_START + 64)
-#define STR_TITLE_ENTER_PASSWORD (RID_UUI_START + 65)
-#define STR_PASSWORD_MISMATCH (RID_UUI_START + 66)
-
#define ERRCODE_UUI_IO_ABORT ErrCode(ERRCODE_AREA_UUI + 0)
#define ERRCODE_UUI_IO_ACCESSDENIED ErrCode(ERRCODE_AREA_UUI + 1)
#define ERRCODE_UUI_IO_ALREADYEXISTS ErrCode(ERRCODE_AREA_UUI + 2)
@@ -151,6 +102,6 @@
#define ERRCODE_UUI_SSLWARN_INVALID_1 (ERRCODE_AREA_UUI_UNKNOWNAUTH + SSLWARN_TYPE_INVALID + 1)
#define TITLE_UUI_SSLWARN_INVALID (ERRCODE_AREA_UUI_UNKNOWNAUTH + SSLWARN_TYPE_INVALID + 3)
-#endif // UUI_IDS_HRC
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/inc/strings.hrc b/uui/inc/strings.hrc
new file mode 100644
index 000000000000..760402c1d57b
--- /dev/null
+++ b/uui/inc/strings.hrc
@@ -0,0 +1,80 @@
+/* -*- 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_UUI_INC_STRINGS_HRC
+#define INCLUDED_UUI_INC_STRINGS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+#define STR_ENTER_PASSWORD_TO_OPEN NC_("STR_ENTER_PASSWORD_TO_OPEN", "Enter password to open file: \n")
+#define STR_ENTER_PASSWORD_TO_MODIFY NC_("STR_ENTER_PASSWORD_TO_MODIFY", "Enter password to modify file: \n")
+#define STR_ENTER_SIMPLE_PASSWORD NC_("STR_ENTER_SIMPLE_PASSWORD", "Enter password: ")
+#define STR_CONFIRM_SIMPLE_PASSWORD NC_("STR_CONFIRM_SIMPLE_PASSWORD", "Confirm password: ")
+#define STR_TITLE_CREATE_PASSWORD NC_("STR_TITLE_CREATE_PASSWORD", "Set Password")
+#define STR_TITLE_ENTER_PASSWORD NC_("STR_TITLE_ENTER_PASSWORD", "Enter Password")
+#define STR_PASSWORD_MISMATCH NC_("STR_PASSWORD_MISMATCH", "The confirmation password did not match the password. Set the password again by entering the same password in both boxes.")
+
+#define STR_ALREADYOPEN_TITLE NC_("STR_ALREADYOPEN_TITLE", "Document in Use")
+#define STR_ALREADYOPEN_MSG NC_("STR_ALREADYOPEN_MSG", "Document file '$(ARG1)' is locked for editing by yourself on a different system since $(ARG2)\n\nOpen document read-only, or ignore own file locking and open the document for editing.\n\n")
+#define STR_ALREADYOPEN_READONLY_BTN NC_("STR_ALREADYOPEN_READONLY_BTN", "Open ~Read-Only")
+#define STR_ALREADYOPEN_OPEN_BTN NC_("STR_ALREADYOPEN_OPEN_BTN", "~Open")
+#define STR_ALREADYOPEN_SAVE_MSG NC_("STR_ALREADYOPEN_SAVE_MSG", "Document file '$(ARG1)' is locked for editing by yourself on a different system since $(ARG2)\n\nClose document on other system and retry saving or ignore own file locking and save current document.\n\n")
+#define STR_ALREADYOPEN_RETRY_SAVE_BTN NC_("STR_ALREADYOPEN_RETRY_SAVE_BTN", "~Retry Saving")
+#define STR_ALREADYOPEN_SAVE_BTN NC_("STR_ALREADYOPEN_SAVE_BTN", "~Save")
+
+#define RID_KEEP_PASSWORD NC_("RID_KEEP_PASSWORD", "~Remember password until end of session")
+#define RID_SAVE_PASSWORD NC_("RID_SAVE_PASSWORD", "~Remember password")
+#define STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE NC_("STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE", "Non-Encrypted Streams")
+
+#define STR_LOCKFAILED_TITLE NC_("STR_LOCKFAILED_TITLE", "Document Could Not Be Locked")
+#define STR_LOCKFAILED_MSG NC_("STR_LOCKFAILED_MSG", "The lock file could not be created for exclusive access by %PRODUCTNAME, due to missing permission to create a lock file on that file location or lack of free disk space.")
+#define STR_LOCKFAILED_OPENREADONLY_BTN NC_("STR_LOCKFAILED_OPENREADONLY_BTN", "Open ~Read-Only")
+
+#define STR_OPENLOCKED_TITLE NC_("STR_OPENLOCKED_TITLE", "Document in Use")
+#define STR_OPENLOCKED_MSG NC_("STR_OPENLOCKED_MSG", "Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nOpen document read-only or open a copy of the document for editing.\n\n")
+#define STR_OPENLOCKED_OPENREADONLY_BTN NC_("STR_OPENLOCKED_OPENREADONLY_BTN", "Open ~Read-Only")
+#define STR_OPENLOCKED_OPENCOPY_BTN NC_("STR_OPENLOCKED_OPENCOPY_BTN", "Open ~Copy")
+#define STR_UNKNOWNUSER NC_("STR_UNKNOWNUSER", "Unknown User")
+
+#define STR_FILECHANGED_TITLE NC_("STR_FILECHANGED_TITLE", "Document Has Been Changed by Others")
+#define STR_FILECHANGED_MSG NC_("STR_FILECHANGED_MSG", "The file has been changed since it was opened for editing in %PRODUCTNAME. Saving your version of the document will overwrite changes made by others.\n\nDo you want to save anyway?\n\n")
+#define STR_FILECHANGED_SAVEANYWAY_BTN NC_("STR_FILECHANGED_SAVEANYWAY_BTN", "~Save Anyway")
+
+#define STR_TRYLATER_TITLE NC_("STR_TRYLATER_TITLE", "Document in Use")
+#define STR_TRYLATER_MSG NC_("STR_TRYLATER_MSG", "Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nTry again later to save document or save a copy of that document.\n\n")
+#define STR_TRYLATER_RETRYSAVING_BTN NC_("STR_TRYLATER_RETRYSAVING_BTN", "~Retry Saving")
+#define STR_TRYLATER_SAVEAS_BTN NC_("STR_TRYLATER_SAVEAS_BTN", "~Save As...")
+
+#define STR_RENAME_OR_REPLACE NC_("STR_RENAME_OR_REPLACE", "A file with the name \"%NAME\" already exists in the location \"%FOLDER\".\nChoose Replace to overwrite the existing file or provide a new name.")
+#define STR_NAME_CLASH_RENAME_ONLY NC_("STR_NAME_CLASH_RENAME_ONLY", "A file with the name \"%NAME\" already exists in the location \"%FOLDER\".\nPlease enter a new name.")
+#define STR_SAME_NAME_USED NC_("STR_SAME_NAME_USED", "Please provide a different file name!")
+
+#define STR_ERROR_PASSWORD_TO_OPEN_WRONG NC_("STR_ERROR_PASSWORD_TO_OPEN_WRONG", "The password is incorrect. The file cannot be opened.")
+#define STR_ERROR_PASSWORD_TO_MODIFY_WRONG NC_("STR_ERROR_PASSWORD_TO_MODIFY_WRONG", "The password is incorrect. The file cannot be modified.")
+#define STR_ERROR_MASTERPASSWORD_WRONG NC_("STR_ERROR_MASTERPASSWORD_WRONG", "The master password is incorrect.")
+#define STR_ERROR_SIMPLE_PASSWORD_WRONG NC_("STR_ERROR_SIMPLE_PASSWORD_WRONG", "The password is incorrect.")
+#define STR_ERROR_PASSWORDS_NOT_IDENTICAL NC_("STR_ERROR_PASSWORDS_NOT_IDENTICAL", "The password confirmation does not match.")
+
+#define STR_LOCKCORRUPT_TITLE NC_("STR_LOCKCORRUPT_TITLE", "Lock file is corrupted")
+#define STR_LOCKCORRUPT_MSG NC_("STR_LOCKCORRUPT_MSG", "The lock file is corrupted and probably empty. Opening the document read-only and closing it again removes the corrupted lock file.")
+#define STR_LOCKCORRUPT_OPENREADONLY_BTN NC_("STR_LOCKCORRUPT_OPENREADONLY_BTN", "Open ~Read-Only")
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/alreadyopen.cxx b/uui/source/alreadyopen.cxx
index 353fa3c7959b..9445fc4b0fa0 100644
--- a/uui/source/alreadyopen.cxx
+++ b/uui/source/alreadyopen.cxx
@@ -17,28 +17,29 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "ids.hrc"
+#include "strings.hrc"
#include "alreadyopen.hxx"
+#include <tools/resmgr.hxx>
-AlreadyOpenQueryBox::AlreadyOpenQueryBox( vcl::Window* pParent, ResMgr* pResMgr, const OUString& aMessage, bool bIsStoring ) :
+AlreadyOpenQueryBox::AlreadyOpenQueryBox( vcl::Window* pParent, const std::locale& rLocale, const OUString& aMessage, bool bIsStoring ) :
MessBox(pParent, 0,
- ResId(STR_ALREADYOPEN_TITLE, *pResMgr).toString(),
+ Translate::get(STR_ALREADYOPEN_TITLE, rLocale),
aMessage )
{
SetImage( QueryBox::GetStandardImage() );
if ( bIsStoring )
{
- AddButton( ResId(STR_ALREADYOPEN_RETRY_SAVE_BTN, *pResMgr).toString(), RET_YES,
+ AddButton( Translate::get(STR_ALREADYOPEN_RETRY_SAVE_BTN, rLocale), RET_YES,
ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus );
- AddButton( ResId(STR_ALREADYOPEN_SAVE_BTN, *pResMgr).toString(), RET_NO);
+ AddButton( Translate::get(STR_ALREADYOPEN_SAVE_BTN, rLocale), RET_NO);
AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel );
}
else
{
- AddButton( ResId(STR_ALREADYOPEN_READONLY_BTN, *pResMgr).toString(), RET_YES,
+ AddButton( Translate::get(STR_ALREADYOPEN_READONLY_BTN, rLocale), RET_YES,
ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus );
- AddButton( ResId(STR_ALREADYOPEN_OPEN_BTN, *pResMgr).toString(), RET_NO);
+ AddButton( Translate::get(STR_ALREADYOPEN_OPEN_BTN, rLocale), RET_NO);
AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel );
}
diff --git a/uui/source/alreadyopen.hxx b/uui/source/alreadyopen.hxx
index badca91b90af..809044bc120e 100644
--- a/uui/source/alreadyopen.hxx
+++ b/uui/source/alreadyopen.hxx
@@ -24,7 +24,7 @@
class AlreadyOpenQueryBox : public MessBox
{
public:
- AlreadyOpenQueryBox( vcl::Window* pParent, ResMgr* pResMgr, const OUString& aMessage, bool bIsStoring );
+ AlreadyOpenQueryBox( vcl::Window* pParent, const std::locale& rResLocale, const OUString& aMessage, bool bIsStoring );
virtual ~AlreadyOpenQueryBox() override;
};
diff --git a/uui/source/alreadyopen.src b/uui/source/alreadyopen.src
deleted file mode 100644
index 6bcca248d9ef..000000000000
--- a/uui/source/alreadyopen.src
+++ /dev/null
@@ -1,51 +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 "ids.hrc"
-
-String STR_ALREADYOPEN_TITLE
-{
- Text [ en-US ] = "Document in Use";
-};
-String STR_ALREADYOPEN_MSG
-{
- Text [ en-US ] = "Document file '$(ARG1)' is locked for editing by yourself on a different system since $(ARG2)\n\nOpen document read-only, or ignore own file locking and open the document for editing.\n\n";
-};
-String STR_ALREADYOPEN_READONLY_BTN
-{
- Text [ en-US ] = "Open ~Read-Only";
-};
-String STR_ALREADYOPEN_OPEN_BTN
-{
- Text [ en-US ] = "~Open";
-};
-String STR_ALREADYOPEN_SAVE_MSG
-{
- Text [ en-US ] = "Document file '$(ARG1)' is locked for editing by yourself on a different system since $(ARG2)\n\nClose document on other system and retry saving or ignore own file locking and save current document.\n\n";
-};
-String STR_ALREADYOPEN_RETRY_SAVE_BTN
-{
- Text [ en-US ] = "~Retry Saving";
-};
-String STR_ALREADYOPEN_SAVE_BTN
-{
- Text [ en-US ] = "~Save";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/filechanged.cxx b/uui/source/filechanged.cxx
index 33b5dee6b777..7fefdba84f08 100644
--- a/uui/source/filechanged.cxx
+++ b/uui/source/filechanged.cxx
@@ -17,22 +17,23 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "ids.hrc"
+#include "strings.hrc"
+#include <tools/resmgr.hxx>
#include "filechanged.hxx"
-FileChangedQueryBox::FileChangedQueryBox( vcl::Window* pParent, ResMgr* pResMgr ) :
+FileChangedQueryBox::FileChangedQueryBox( vcl::Window* pParent, const std::locale& rLocale ) :
MessBox(pParent, 0,
- ResId(STR_FILECHANGED_TITLE, *pResMgr).toString(),
+ Translate::get(STR_FILECHANGED_TITLE, rLocale),
OUString() )
{
SetImage( QueryBox::GetStandardImage() );
- AddButton(ResId(STR_FILECHANGED_SAVEANYWAY_BTN, *pResMgr).toString(), RET_YES,
+ AddButton(Translate::get(STR_FILECHANGED_SAVEANYWAY_BTN, rLocale), RET_YES,
ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus);
AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel );
SetButtonHelpText( RET_YES, OUString() );
- SetMessText(ResId(STR_FILECHANGED_MSG, *pResMgr).toString());
+ SetMessText(Translate::get(STR_FILECHANGED_MSG, rLocale));
}
FileChangedQueryBox::~FileChangedQueryBox()
diff --git a/uui/source/filechanged.hxx b/uui/source/filechanged.hxx
index 5fe447b19c3e..f15e1ced340d 100644
--- a/uui/source/filechanged.hxx
+++ b/uui/source/filechanged.hxx
@@ -24,7 +24,7 @@
class FileChangedQueryBox : public MessBox
{
public:
- FileChangedQueryBox( vcl::Window* pParent, ResMgr* pResMgr );
+ FileChangedQueryBox( vcl::Window* pParent, const std::locale& pResLocale );
virtual ~FileChangedQueryBox() override;
};
diff --git a/uui/source/filechanged.src b/uui/source/filechanged.src
deleted file mode 100644
index ebc37bf72dd6..000000000000
--- a/uui/source/filechanged.src
+++ /dev/null
@@ -1,35 +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 "ids.hrc"
-
-String STR_FILECHANGED_TITLE
-{
- Text [ en-US ] = "Document Has Been Changed by Others";
-};
-String STR_FILECHANGED_MSG
-{
- Text [ en-US ] = "The file has been changed since it was opened for editing in %PRODUCTNAME. Saving your version of the document will overwrite changes made by others.\n\nDo you want to save anyway?\n\n";
-};
-String STR_FILECHANGED_SAVEANYWAY_BTN
-{
- Text [ en-US ] = "~Save Anyway";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index 0b49946563cd..42c870de403a 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -19,7 +19,7 @@
#include "fltdlg.hxx"
-#include "ids.hrc"
+#include "ids.hxx"
#include <com/sun/star/util/XStringWidth.hpp>
#include <cppuhelper/implbase.hxx>
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 1a8fe8686289..bf1392e90f0f 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -34,6 +34,7 @@
#include <osl/diagnose.h>
#include <rtl/digest.h>
+#include <tools/resmgr.hxx>
#include <vcl/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/msgbox.hxx>
@@ -41,7 +42,7 @@
#include <vcl/svapp.hxx>
#include "authfallbackdlg.hxx"
-#include "ids.hrc"
+#include "strings.hrc"
#include "getcontinuations.hxx"
#include "passwordcontainer.hxx"
#include "loginerr.hxx"
@@ -100,12 +101,12 @@ executeLoginDialog(
if (bSavePassword)
{
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
+ std::locale aLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
xDialog->SetSavePasswordText(
- ResId(rInfo.GetIsRememberPersistent()
+ Translate::get(rInfo.GetIsRememberPersistent()
? RID_SAVE_PASSWORD
: RID_KEEP_PASSWORD,
- *xManager.get()));
+ aLocale));
xDialog->SetSavePassword(rInfo.GetIsRememberPassword());
}
@@ -413,11 +414,11 @@ executeMasterPasswordDialog(
{
SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
+ std::locale aResLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
ScopedVclPtrInstance< MasterPasswordCreateDialog > xDialog(
- pParent, xManager.get());
+ pParent, aResLocale);
rInfo.SetResult(xDialog->Execute()
== RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel);
aMaster = OUStringToOString(
@@ -426,7 +427,7 @@ executeMasterPasswordDialog(
else
{
ScopedVclPtrInstance< MasterPasswordDialog > xDialog(
- pParent, nMode, xManager.get());
+ pParent, nMode, aResLocale);
rInfo.SetResult(xDialog->Execute()
== RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel);
aMaster = OUStringToOString(
@@ -511,12 +512,12 @@ executePasswordDialog(
{
SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
+ std::locale aResLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
if (bIsSimplePasswordRequest)
{
- ScopedVclPtrInstance<PasswordDialog> xDialog(pParent, nMode, xManager.get(), aDocName,
+ ScopedVclPtrInstance<PasswordDialog> xDialog(pParent, nMode, aResLocale, aDocName,
bIsPasswordToModify, bIsSimplePasswordRequest);
xDialog->SetMinLen(0);
@@ -539,7 +540,7 @@ executePasswordDialog(
}
else // enter password or reenter password
{
- ScopedVclPtrInstance<PasswordDialog> xDialog(pParent, nMode, xManager.get(), aDocName,
+ ScopedVclPtrInstance<PasswordDialog> xDialog(pParent, nMode, aResLocale, aDocName,
bIsPasswordToModify, bIsSimplePasswordRequest);
xDialog->SetMinLen(0);
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index b1a3acb331a3..5818b24220eb 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -26,9 +26,12 @@
#include <com/sun/star/task/XInteractionRetry.hpp>
#include <vcl/errinf.hxx>
-#include <svtools/svtools.hrc>
+#include <svtools/strings.hrc>
+#include <svx/svxerr.hxx>
#include <svx/dialogs.hrc>
+#include <tools/resmgr.hxx>
+#include "ids.hxx"
#include "ids.hrc"
#include "getcontinuations.hxx"
@@ -152,9 +155,9 @@ UUIInteractionHelper::handleErrorHandlerRequest(
{
enum Source { SOURCE_DEFAULT, SOURCE_SVX, SOURCE_UUI };
static char const * const aManager[3] = { "svt", "svx", "uui" };
- static sal_uInt16 const aId[3]
- = { RID_ERRHDL,
- RID_SVXERRCODE,
+ static const ErrMsgCode* const aId[3]
+ = { getRID_ERRHDL(),
+ getRID_SVXERRCODE(),
RID_UUI_ERRHDL };
ErrCode nErrorId = nErrorCode.IgnoreWarning();
Source eSource = nErrorId < ErrCode(ERRCODE_AREA_SVX) ?
@@ -164,13 +167,9 @@ UUIInteractionHelper::handleErrorHandlerRequest(
SOURCE_SVX :
SOURCE_UUI;
- SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager;
- xManager.reset(ResMgr::CreateResMgr(aManager[eSource]));
- if (!xManager.get())
- return;
- ResId aResId(aId[eSource], *xManager.get());
- if (!ErrorResource(aResId).getString(nErrorCode, aMessage))
+ std::locale aResLocale = Translate::Create(aManager[eSource], Application::GetSettings().GetUILanguageTag());
+ ErrorResource aErrorResource(aId[eSource], aResLocale);
+ if (!aErrorResource.getString(nErrorCode, aMessage))
return;
}
diff --git a/uui/source/iahndl-ioexceptions.cxx b/uui/source/iahndl-ioexceptions.cxx
index 15db83ee26ec..e11ed64c901f 100644
--- a/uui/source/iahndl-ioexceptions.cxx
+++ b/uui/source/iahndl-ioexceptions.cxx
@@ -22,7 +22,7 @@
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
#include <comphelper/fileurl.hxx>
-#include "ids.hrc"
+#include "ids.hxx"
#include "iahndl.hxx"
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index d5ca16f95a96..927351727129 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -30,10 +30,11 @@
#include <com/sun/star/task/XInteractionAbort.hpp>
#include <com/sun/star/task/XInteractionRequest.hpp>
+#include <tools/resmgr.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
-#include "ids.hrc"
+#include "strings.hrc"
#include "getcontinuations.hxx"
#include "openlocked.hxx"
#include "trylater.hxx"
@@ -73,9 +74,7 @@ handleLockedDocumentRequest_(
try
{
SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
- if (!xManager.get())
- return;
+ std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
OUString aMessage;
std::vector< OUString > aArguments;
@@ -86,41 +85,40 @@ handleLockedDocumentRequest_(
{
aArguments.push_back( !aInfo.isEmpty()
? aInfo
- : ResId( STR_UNKNOWNUSER,
- *xManager.get() ).toString() );
- aMessage = ResId(STR_OPENLOCKED_MSG, *xManager.get()).toString();
+ : Translate::get( STR_UNKNOWNUSER, aResLocale) );
+ aMessage = Translate::get(STR_OPENLOCKED_MSG, aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
- ScopedVclPtrInstance< OpenLockedQueryBox > xDialog(pParent, xManager.get(), aMessage);
+ ScopedVclPtrInstance< OpenLockedQueryBox > xDialog(pParent, aResLocale, aMessage);
nResult = xDialog->Execute();
}
else if ( nMode == UUI_DOC_SAVE_LOCK )
{
aArguments.push_back( !aInfo.isEmpty()
? aInfo
- : ResId( STR_UNKNOWNUSER,
- *xManager.get() ).toString() );
- aMessage = ResId(STR_TRYLATER_MSG, *xManager.get()).toString();
+ : Translate::get( STR_UNKNOWNUSER,
+ aResLocale ) );
+ aMessage = Translate::get(STR_TRYLATER_MSG, aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
- ScopedVclPtrInstance< TryLaterQueryBox > xDialog( pParent, xManager.get(), aMessage );
+ ScopedVclPtrInstance< TryLaterQueryBox > xDialog(pParent, aResLocale, aMessage);
nResult = xDialog->Execute();
}
else if ( nMode == UUI_DOC_OWN_LOAD_LOCK ||
nMode == UUI_DOC_OWN_SAVE_LOCK )
{
aArguments.push_back( aInfo );
- aMessage = ResId(nMode == UUI_DOC_OWN_SAVE_LOCK
+ aMessage = Translate::get(nMode == UUI_DOC_OWN_SAVE_LOCK
? STR_ALREADYOPEN_SAVE_MSG
: STR_ALREADYOPEN_MSG,
- *xManager.get() ).toString();
+ aResLocale );
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
ScopedVclPtrInstance< AlreadyOpenQueryBox > xDialog( pParent,
- xManager.get(),
+ aResLocale,
aMessage,
nMode == UUI_DOC_OWN_SAVE_LOCK );
nResult = xDialog->Execute();
@@ -155,11 +153,8 @@ handleChangedByOthersRequest_(
try
{
SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
- if (!xManager.get())
- return;
-
- ScopedVclPtrInstance< FileChangedQueryBox > xDialog(pParent, xManager.get());
+ std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
+ ScopedVclPtrInstance< FileChangedQueryBox > xDialog(pParent, aResLocale);
sal_Int32 nResult = xDialog->Execute();
if ( nResult == RET_YES )
@@ -194,24 +189,21 @@ handleLockFileProblemRequest_(
try
{
SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
- if (!xManager.get())
- return;
+ std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
sal_Int32 nResult;
if (nWhichDlg == UUI_DOC_CreateErrDlg)
{
- ScopedVclPtrInstance< LockFailedQueryBox > xDialog(pParent, xManager.get());
+ ScopedVclPtrInstance< LockFailedQueryBox > xDialog(pParent, aResLocale);
nResult = xDialog->Execute();
}
else
{
- ScopedVclPtrInstance< LockCorruptQueryBox > xDialog(pParent, xManager.get());
+ ScopedVclPtrInstance< LockCorruptQueryBox > xDialog(pParent, aResLocale);
nResult = xDialog->Execute();
}
-
if ( nResult == RET_OK )
xApprove->select();
else
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index 2937b0ee3d81..c835cdeb1f04 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -31,9 +31,11 @@
#include <comphelper/sequence.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <svl/zforlist.hxx>
+#include <tools/resmgr.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
+#include "ids.hxx"
#include "ids.hrc"
#include "getcontinuations.hxx"
#include "sslwarndlg.hxx"
@@ -153,17 +155,14 @@ executeUnknownAuthDialog(
std::vector< OUString > aArguments;
aArguments.push_back( getContentPart( rXCert->getSubjectName()) );
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
- if (xManager.get())
+ std::locale aResLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
+ ErrorResource aErrorResource(RID_UUI_ERRHDL, aResLocale);
+
+ if (aErrorResource.getString(ERRCODE_UUI_UNKNOWNAUTH_UNTRUSTED, aMessage))
{
- ResId aResId(RID_UUI_ERRHDL, *xManager.get());
- if (ErrorResource(aResId).getString(
- ERRCODE_UUI_UNKNOWNAUTH_UNTRUSTED, aMessage))
- {
- aMessage = UUIInteractionHelper::replaceMessageWithArguments(
- aMessage, aArguments );
- xDialog->setDescriptionText( aMessage );
- }
+ aMessage = UUIInteractionHelper::replaceMessageWithArguments(
+ aMessage, aArguments );
+ xDialog->setDescriptionText( aMessage );
}
return static_cast<bool>(xDialog->Execute());
@@ -214,26 +213,23 @@ executeSSLWarnDialog(
break;
}
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
+ std::locale aResLocale(Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
+ ErrorResource aErrorResource(RID_UUI_ERRHDL, aResLocale);
+
+ if (aErrorResource.getString(
+ ErrCode(ERRCODE_AREA_UUI_UNKNOWNAUTH + failure + DESCRIPTION_1),
+ aMessage_1))
+ {
+ aMessage_1 = UUIInteractionHelper::replaceMessageWithArguments(
+ aMessage_1, aArguments_1 );
+ xDialog->setDescription1Text( aMessage_1 );
+ }
- if (xManager.get())
+ OUString aTitle;
+ if (aErrorResource.getString(
+ ErrCode(ERRCODE_AREA_UUI_UNKNOWNAUTH + failure + TITLE), aTitle))
{
- ResId aResId(RID_UUI_ERRHDL, *xManager.get());
- if (ErrorResource(aResId).getString(
- ErrCode(sal_uInt32(ERRCODE_AREA_UUI_UNKNOWNAUTH) + failure + DESCRIPTION_1),
- aMessage_1))
- {
- aMessage_1 = UUIInteractionHelper::replaceMessageWithArguments(
- aMessage_1, aArguments_1 );
- xDialog->setDescription1Text( aMessage_1 );
- }
-
- OUString aTitle;
- if (ErrorResource(aResId).getString(
- ErrCode(sal_uInt32(ERRCODE_AREA_UUI_UNKNOWNAUTH) + failure + TITLE), aTitle))
- {
- xDialog->SetText(aTitle);
- }
+ xDialog->SetText(aTitle);
}
return static_cast<bool>(xDialog->Execute());
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index e7938b121db2..cb24ce840f04 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -61,7 +61,7 @@
#include <rtl/strbuf.hxx>
#include <osl/conditn.hxx>
-#include <tools/rcid.h>
+#include <tools/resmgr.hxx>
#include <vcl/errinf.hxx>
#include <osl/thread.hxx>
#include <tools/diagnose_ex.h>
@@ -76,7 +76,9 @@
#include <typelib/typedescription.hxx>
#include <unotools/confignode.hxx>
+#include "ids.hxx"
#include "ids.hrc"
+#include "strings.hrc"
#include "getcontinuations.hxx"
#include "secmacrowarnings.hxx"
@@ -996,11 +998,8 @@ NameClashResolveDialogResult executeSimpleNameClashResolveDialog( vcl::Window *p
OUString & rProposedNewName,
bool bAllowOverwrite )
{
- std::unique_ptr< ResMgr > xManager( ResMgr::CreateResMgr( "uui" ) );
- if ( !xManager.get() )
- return ABORT;
-
- ScopedVclPtrInstance<NameClashDialog> aDialog(pParent, xManager.get(), rTargetFolderURL,
+ std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
+ ScopedVclPtrInstance<NameClashDialog> aDialog(pParent, aResLocale, rTargetFolderURL,
rClashingName, rProposedNewName, bAllowOverwrite);
NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog->Execute();
@@ -1101,12 +1100,10 @@ UUIInteractionHelper::handleGenericErrorRequest(
OUString aErrorString;
ErrorHandler::GetErrorString( nErrorCode, aErrorString );
- std::unique_ptr< ResMgr > xManager(
- ResMgr::CreateResMgr( "uui" ) );
+ std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
OUString aTitle( utl::ConfigManager::getProductName() );
- OUString aErrTitle = ResId( STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE,
- *xManager.get() ).toString();
+ OUString aErrTitle = Translate::get(STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE, aResLocale);
if ( !aTitle.isEmpty() && !aErrTitle.isEmpty() )
aTitle += " - " ;
@@ -1197,13 +1194,8 @@ UUIInteractionHelper::handleBrokenPackageRequest(
OUString aMessage;
{
- SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
- if (!xManager.get())
- return;
-
- ResId aResId( RID_UUI_ERRHDL, *xManager.get() );
- if ( !ErrorResource(aResId).getString(nErrorCode, aMessage) )
+ ErrorResource aErrorResource(RID_UUI_ERRHDL, Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
+ if (!aErrorResource.getString(nErrorCode, aMessage))
return;
}
@@ -1257,19 +1249,18 @@ UUIInteractionHelper::handleBrokenPackageRequest(
}
}
-
// ErrorResource Implementation
-
-
-bool
-ErrorResource::getString(ErrCode nErrorCode, OUString &rString)
- const
+bool ErrorResource::getString(ErrCode nErrorCode, OUString &rString) const
{
- sal_uInt32 nIdx = m_aStringArray.FindIndex(nErrorCode.GetRest());
- if (nIdx == RESARRAY_INDEX_NOTFOUND)
- return false;
- rString = m_aStringArray.GetString(nIdx);
- return true;
+ for (const std::pair<const char*, ErrCode>* pStringArray = m_pStringArray; pStringArray->first != nullptr; ++pStringArray)
+ {
+ if (ErrCode(nErrorCode.GetRest()) == pStringArray->second)
+ {
+ rString = Translate::get(pStringArray->first, m_rResLocale);
+ return true;
+ }
+ }
+ return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 558951b3ef90..5b1fda3e38c5 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -30,7 +30,6 @@
#include <com/sun/star/task/InteractionClassification.hpp>
#include <vcl/errcode.hxx>
-#include <tools/resary.hxx>
#include <tools/wintypes.hxx>
#include <unordered_map>
@@ -248,10 +247,14 @@ private:
class ErrorResource
{
- ResStringArray m_aStringArray;
+ const std::pair<const char*, ErrCode>* m_pStringArray;
+ const std::locale& m_rResLocale;
public:
- explicit ErrorResource(ResId& rResId) : m_aStringArray(rResId) {}
-
+ explicit ErrorResource(const std::pair<const char*, ErrCode>* pStringArray, const std::locale& rResLocale)
+ : m_pStringArray(pStringArray)
+ , m_rResLocale(rResLocale)
+ {
+ }
bool getString(ErrCode nErrorCode, OUString &rString) const;
};
diff --git a/uui/source/ids.src b/uui/source/ids.src
deleted file mode 100644
index 82f5191b19c1..000000000000
--- a/uui/source/ids.src
+++ /dev/null
@@ -1,256 +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 "ids.hrc"
-
-String RID_KEEP_PASSWORD
-{
- Text [ en-US ] = "~Remember password until end of session";
-};
-
-String RID_SAVE_PASSWORD
-{
- Text [ en-US ] = "~Remember password";
-};
-
-String STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE
-{
- Text [ en-US ] = "Non-Encrypted Streams" ;
-};
-
-StringArray RID_UUI_ERRHDL
-{
- ItemList [ en-US ] =
- {
- < "The operation executed on $(ARG1) was aborted." ;
- (ERRCODE_UUI_IO_ABORT & ERRCODE_RES_MASK) ; >;
-
- < "Access to $(ARG1) was denied." ;
- (ERRCODE_UUI_IO_ACCESSDENIED & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) already exists.";
- (ERRCODE_UUI_IO_ALREADYEXISTS & ERRCODE_RES_MASK) ; >;
-
- < "Target already exists." ;
- (ERRCODE_UUI_IO_TARGETALREADYEXISTS & ERRCODE_RES_MASK) ; >;
-
- < "You are about to save/export a password protected basic library containing module(s) \n$(ARG1)\nwhich are too large to store in binary format. If you wish users that don't have access to the library password to be able to run macros in those module(s) you must split those modules into a number of smaller modules. Do you wish to continue to save/export this library?" ;
- (ERRCODE_UUI_IO_MODULESIZEEXCEEDED & ERRCODE_RES_MASK) ; >;
-
- < "The data from $(ARG1) has an incorrect checksum." ;
- (ERRCODE_UUI_IO_BADCRC & ERRCODE_RES_MASK) ; >;
-
- < "The object $(ARG1) cannot be created in directory $(ARG2)." ;
- (ERRCODE_UUI_IO_CANTCREATE & ERRCODE_RES_MASK) ; >;
-
- < "Data of $(ARG1) could not be read." ;
- (ERRCODE_UUI_IO_CANTREAD & ERRCODE_RES_MASK) ; >;
-
- < "The seek operation on $(ARG1) could not be performed." ;
- (ERRCODE_UUI_IO_CANTSEEK & ERRCODE_RES_MASK) ; >;
-
- < "The tell operation on $(ARG1) could not be performed." ;
- (ERRCODE_UUI_IO_CANTTELL & ERRCODE_RES_MASK) ; >;
-
- < "Data for $(ARG1) could not be written." ;
- (ERRCODE_UUI_IO_CANTWRITE & ERRCODE_RES_MASK) ; >;
-
- < "Action impossible: $(ARG1) is the current directory." ;
- (ERRCODE_UUI_IO_CURRENTDIR & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) is not ready." ;
- (ERRCODE_UUI_IO_NOTREADY & ERRCODE_RES_MASK) ; >;
-
- < "Action impossible: $(ARG1) and $(ARG2) are different devices (drives)." ;
- (ERRCODE_UUI_IO_NOTSAMEDEVICE & ERRCODE_RES_MASK) ; >;
-
- < "General input/output error while accessing $(ARG1)." ;
- (ERRCODE_UUI_IO_GENERAL & ERRCODE_RES_MASK) ; >;
-
- < "An attempt was made to access $(ARG1) in an invalid way." ;
- (ERRCODE_UUI_IO_INVALIDACCESS & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) contains invalid characters." ;
- (ERRCODE_UUI_IO_INVALIDCHAR & ERRCODE_RES_MASK) ; >;
-
- < "The device (drive) $(ARG1) is invalid." ;
- (ERRCODE_UUI_IO_INVALIDDEVICE & ERRCODE_RES_MASK) ; >;
-
- < "The data from $(ARG1) has an invalid length." ;
- (ERRCODE_UUI_IO_INVALIDLENGTH & ERRCODE_RES_MASK) ; >;
-
- < "The operation on $(ARG1) was started with an invalid parameter." ;
- (ERRCODE_UUI_IO_INVALIDPARAMETER & ERRCODE_RES_MASK) ; >;
-
- < "The operation cannot be performed because $(ARG1) contains wildcards." ;
- (ERRCODE_UUI_IO_ISWILDCARD & ERRCODE_RES_MASK) ; >;
-
- < "Error during shared access to $(ARG1)." ;
- (ERRCODE_UUI_IO_LOCKVIOLATION & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) contains misplaced characters." ;
- (ERRCODE_UUI_IO_MISPLACEDCHAR & ERRCODE_RES_MASK) ; >;
-
- < "The name $(ARG1) contains too many characters." ;
- (ERRCODE_UUI_IO_NAMETOOLONG & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) does not exist." ;
- (ERRCODE_UUI_IO_NOTEXISTS & ERRCODE_RES_MASK) ; >;
-
- < "The path $(ARG1) does not exist." ;
- (ERRCODE_UUI_IO_NOTEXISTSPATH & ERRCODE_RES_MASK) ; >;
-
- < "The operation on $(ARG1) is not supported on this operating system." ;
- (ERRCODE_UUI_IO_NOTSUPPORTED & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) is not a directory." ;
- (ERRCODE_UUI_IO_NOTADIRECTORY & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) is not a file." ;
- (ERRCODE_UUI_IO_NOTAFILE & ERRCODE_RES_MASK) ; >;
-
- < "There is no space left on device $(ARG1)." ;
- (ERRCODE_UUI_IO_OUTOFSPACE & ERRCODE_RES_MASK) ; >;
-
- < "The operation on $(ARG1) cannot be performed because too many files are already open." ;
- (ERRCODE_UUI_IO_TOOMANYOPENFILES & ERRCODE_RES_MASK) ; >;
-
- < "The operation on $(ARG1) cannot be performed because there is no more memory available." ;
- (ERRCODE_UUI_IO_OUTOFMEMORY & ERRCODE_RES_MASK) ; >;
-
- < "The operation on $(ARG1) cannot continue because more data is pending." ;
- (ERRCODE_UUI_IO_PENDING & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) cannot be copied into itself." ;
- (ERRCODE_UUI_IO_RECURSIVE & ERRCODE_RES_MASK) ; >;
-
- < "Unknown input/output error while accessing $(ARG1)." ;
- (ERRCODE_UUI_IO_UNKNOWN & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) is write protected." ;
- (ERRCODE_UUI_IO_WRITEPROTECTED & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) is not in the correct format." ;
- (ERRCODE_UUI_IO_WRONGFORMAT & ERRCODE_RES_MASK) ; >;
-
- < "The version of $(ARG1) is not correct." ;
- (ERRCODE_UUI_IO_WRONGVERSION & ERRCODE_RES_MASK) ; >;
-
- < "Drive $(ARG1) does not exist." ;
- (ERRCODE_UUI_IO_NOTEXISTS_VOLUME & ERRCODE_RES_MASK) ; >;
-
- < "Folder $(ARG1) does not exist." ;
- (ERRCODE_UUI_IO_NOTEXISTS_FOLDER & ERRCODE_RES_MASK) ; >;
-
- < "The installed Java version is not supported." ;
- (ERRCODE_UUI_WRONGJAVA & ERRCODE_RES_MASK) ; >;
-
- < "The installed Java version $(ARG1) is not supported." ;
- (ERRCODE_UUI_WRONGJAVA_VERSION & ERRCODE_RES_MASK) ; >;
-
- < "The installed Java version is not supported, at least version $(ARG1) is required." ;
- (ERRCODE_UUI_WRONGJAVA_MIN & ERRCODE_RES_MASK) ; >;
-
- < "The installed Java version $(ARG1) is not supported, at least version $(ARG2) is required." ;
- (ERRCODE_UUI_WRONGJAVA_VERSION_MIN & ERRCODE_RES_MASK) ; >;
-
- < "The data associated with the partnership is corrupted." ;
- (ERRCODE_UUI_BADPARTNERSHIP & ERRCODE_RES_MASK) ; >;
-
- < "The data associated with the partnership $(ARG1) is corrupted." ;
- (ERRCODE_UUI_BADPARTNERSHIP_NAME & ERRCODE_RES_MASK) ; >;
-
- < "Volume $(ARG1) is not ready." ;
- (ERRCODE_UUI_IO_NOTREADY_VOLUME & ERRCODE_RES_MASK) ; >;
-
- < "$(ARG1) is not ready; please insert a storage medium." ;
- (ERRCODE_UUI_IO_NOTREADY_REMOVABLE & ERRCODE_RES_MASK) ; >;
-
- < "Volume $(ARG1) is not ready; please insert a storage medium." ;
- (ERRCODE_UUI_IO_NOTREADY_VOLUME_REMOVABLE & ERRCODE_RES_MASK) ; >;
-
- < "Please insert disk $(ARG1)." ;
- (ERRCODE_UUI_WRONGMEDIUM & ERRCODE_RES_MASK) ; >;
-
- < "The object cannot be created in directory $(ARG1)." ;
- (ERRCODE_UUI_IO_CANTCREATE_NONAME & ERRCODE_RES_MASK) ; >;
-
- < "%PRODUCTNAME cannot keep files from being overwritten when this transmission protocol is used. Do you want to continue anyway?" ;
- (ERRCODE_UUI_IO_UNSUPPORTEDOVERWRITE & ERRCODE_RES_MASK) ; >;
-
- < "The file '$(ARG1)' is corrupt and therefore cannot be opened. %PRODUCTNAME can try to repair the file.\n\nThe corruption could be the result of document manipulation or of structural document damage due to data transmission.\n\nWe recommend that you do not trust the content of the repaired document.\nExecution of macros is disabled for this document.\n\nShould %PRODUCTNAME repair the file?\n" ;
- (ERRCODE_UUI_IO_BROKENPACKAGE & ERRCODE_RES_MASK) ; >;
-
- < "The file '$(ARG1)' could not be repaired and therefore cannot be opened." ;
- (ERRCODE_UUI_IO_BROKENPACKAGE_CANTREPAIR & ERRCODE_RES_MASK) ; >;
-
- < "Configuration data in '$(ARG1)' is corrupted. Without this data some functions may not operate correctly.\nDo you want to continue startup of %PRODUCTNAME without the corrupted configuration data?" ;
- (ERRCODE_UUI_CONFIGURATION_BROKENDATA_NOREMOVE & ERRCODE_RES_MASK) ; >;
-
- < "The personal configuration file '$(ARG1)' is corrupted and must be deleted to continue. Some of your personal settings may be lost.\nDo you want to continue startup of %PRODUCTNAME without the corrupted configuration data?" ;
- (ERRCODE_UUI_CONFIGURATION_BROKENDATA_WITHREMOVE & ERRCODE_RES_MASK) ; >;
-
- < "The configuration data source '$(ARG1)' is unavailable. Without this data some functions may not operate correctly." ;
- (ERRCODE_UUI_CONFIGURATION_BACKENDMISSING & ERRCODE_RES_MASK) ; >;
-
- < "The configuration data source '$(ARG1)' is unavailable. Without this data some functions may not operate correctly.\nDo you want to continue startup of %PRODUCTNAME without the missing configuration data?" ;
- (ERRCODE_UUI_CONFIGURATION_BACKENDMISSING_WITHRECOVER & ERRCODE_RES_MASK) ; >;
-
- < "The form contains invalid data. Do you still want to continue?" ;
- (ERRCODE_UUI_INVALID_XFORMS_SUBMISSION_DATA & ERRCODE_RES_MASK) ; >;
-
- < "The file $(ARG1) is locked by another user. Currently, another write access to this file cannot be granted." ;
- (ERRCODE_UUI_LOCKING_LOCKED & ERRCODE_RES_MASK) ; >;
-
- < "The file $(ARG1) is locked by yourself. Currently, another write access to this file cannot be granted." ;
- (ERRCODE_UUI_LOCKING_LOCKED_SELF & ERRCODE_RES_MASK) ; >;
-
- < "The file $(ARG1) is currently not locked by yourself." ;
- (ERRCODE_UUI_LOCKING_NOT_LOCKED & ERRCODE_RES_MASK) ; >;
-
- < "The previously obtained lock for file $(ARG1) has expired.\nThis can happen due to problems on the server managing the file lock. It cannot be guaranteed that write operations on this file will not overwrite changes done by other users!" ;
- (ERRCODE_UUI_LOCKING_LOCK_EXPIRED & ERRCODE_RES_MASK) ; >;
-
- < "Unable to verify the identity of $(ARG1) site.\n\nBefore accepting this certificate, you should examine this site's certificate carefully. Are you willing to accept this certificate for the purpose of identifying the Web site $(ARG1)?" ;
- (ERRCODE_UUI_UNKNOWNAUTH_UNTRUSTED) ; >;
-
- < "$(ARG1) is a site that uses a security certificate to encrypt data during transmission, but its certificate expired on $(ARG2).\n\nYou should check to make sure that your computer's time is correct." ;
- (ERRCODE_UUI_SSLWARN_EXPIRED_1) ; >;
-
- < "You have attempted to establish a connection with $(ARG1). However, the security certificate presented belongs to $(ARG2). It is possible, though unlikely, that someone may be trying to intercept your communication with this web site.\n\nIf you suspect the certificate shown does not belong to $(ARG1), please cancel the connection and notify the site administrator.\n\nWould you like to continue anyway?" ;
- (ERRCODE_UUI_SSLWARN_DOMAINMISMATCH_1) ; >;
-
- < "The certificate could not be validated. You should examine this site's certificate carefully.\n\nIf you suspect the certificate shown, please cancel the connection and notify the site administrator." ;
- (ERRCODE_UUI_SSLWARN_INVALID_1) ; >;
-
- < "Security Warning: Domain Name Mismatch" ;
- (TITLE_UUI_SSLWARN_DOMAINMISMATCH) ; >;
-
- < "Security Warning: Server Certificate Expired" ;
- (TITLE_UUI_SSLWARN_EXPIRED) ; >;
-
- < "Security Warning: Server Certificate Invalid" ;
- (TITLE_UUI_SSLWARN_INVALID) ; >;
-
- < "Component cannot be loaded, possibly broken or incomplete installation.\nFull error message:\n\n $(ARG1)." ;
- (ERRCODE_UUI_CANNOT_ACTIVATE_FACTORY & ERRCODE_RES_MASK) ; >;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/lockcorrupt.cxx b/uui/source/lockcorrupt.cxx
index a22ad863ccc0..9230dc80e890 100644
--- a/uui/source/lockcorrupt.cxx
+++ b/uui/source/lockcorrupt.cxx
@@ -17,24 +17,23 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "ids.hrc"
+#include "ids.hxx"
+#include "strings.hrc"
#include "lockcorrupt.hxx"
-
+#include <tools/resmgr.hxx>
#include <vcl/button.hxx>
-LockCorruptQueryBox::LockCorruptQueryBox( vcl::Window* pParent, ResMgr* pResMgr ) :
- MessBox(pParent, 0,
- ResId(STR_LOCKCORRUPT_TITLE, *pResMgr).toString(),
- OUString() )
+LockCorruptQueryBox::LockCorruptQueryBox(vcl::Window* pParent, const std::locale& rResLocale)
+ : MessBox(pParent, 0, Translate::get(STR_LOCKCORRUPT_TITLE, rResLocale), OUString())
{
SetImage( ErrorBox::GetStandardImage() );
- AddButton(ResId(STR_LOCKCORRUPT_OPENREADONLY_BTN, *pResMgr).toString(), RET_OK,
+ AddButton(Translate::get(STR_LOCKCORRUPT_OPENREADONLY_BTN, rResLocale), RET_OK,
ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus);
AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel );
- SetMessText(ResId(STR_LOCKCORRUPT_MSG, *pResMgr ).toString());
+ SetMessText(Translate::get(STR_LOCKCORRUPT_MSG, rResLocale));
}
LockCorruptQueryBox::~LockCorruptQueryBox()
diff --git a/uui/source/lockcorrupt.hxx b/uui/source/lockcorrupt.hxx
index b83d94084d8c..425117144e14 100644
--- a/uui/source/lockcorrupt.hxx
+++ b/uui/source/lockcorrupt.hxx
@@ -24,7 +24,7 @@
class LockCorruptQueryBox : public MessBox
{
public:
- LockCorruptQueryBox( vcl::Window* pParent, ResMgr* pResMgr );
+ LockCorruptQueryBox(vcl::Window* pParent, const std::locale& rResLocale);
virtual ~LockCorruptQueryBox() override;
};
diff --git a/uui/source/lockcorrupt.src b/uui/source/lockcorrupt.src
deleted file mode 100644
index a588882aa196..000000000000
--- a/uui/source/lockcorrupt.src
+++ /dev/null
@@ -1,35 +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 "ids.hrc"
-
-String STR_LOCKCORRUPT_TITLE
-{
- Text [ en-US ] = "Lock file is corrupted";
-};
-String STR_LOCKCORRUPT_MSG
-{
- Text [ en-US ] = "The lock file is corrupted and probably empty. Opening the document read-only and closing it again removes the corrupted lock file.";
-};
-String STR_LOCKCORRUPT_OPENREADONLY_BTN
-{
- Text [ en-US ] = "Open ~Read-Only";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx
index 63ad3a76f2a0..4b829e9af568 100644
--- a/uui/source/lockfailed.cxx
+++ b/uui/source/lockfailed.cxx
@@ -17,24 +17,22 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "ids.hrc"
+#include "strings.hrc"
#include "lockfailed.hxx"
-
+#include <tools/resmgr.hxx>
#include <vcl/button.hxx>
-LockFailedQueryBox::LockFailedQueryBox( vcl::Window* pParent, ResMgr* pResMgr ) :
- MessBox(pParent, 0,
- ResId(STR_LOCKFAILED_TITLE, *pResMgr).toString(),
- OUString() )
+LockFailedQueryBox::LockFailedQueryBox(vcl::Window* pParent, const std::locale& rResLocale)
+ : MessBox(pParent, 0, Translate::get(STR_LOCKFAILED_TITLE, rResLocale), OUString())
{
SetImage( ErrorBox::GetStandardImage() );
- AddButton(ResId(STR_LOCKFAILED_OPENREADONLY_BTN, *pResMgr).toString(), RET_OK,
+ AddButton(Translate::get(STR_LOCKFAILED_OPENREADONLY_BTN, rResLocale), RET_OK,
ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus);
AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel );
- SetMessText(ResId(STR_LOCKFAILED_MSG, *pResMgr ).toString());
+ SetMessText(Translate::get(STR_LOCKFAILED_MSG, rResLocale));
}
LockFailedQueryBox::~LockFailedQueryBox()
diff --git a/uui/source/lockfailed.hxx b/uui/source/lockfailed.hxx
index 09499d88a6b9..5cf9ceda1ee7 100644
--- a/uui/source/lockfailed.hxx
+++ b/uui/source/lockfailed.hxx
@@ -24,7 +24,7 @@
class LockFailedQueryBox : public MessBox
{
public:
- LockFailedQueryBox( vcl::Window* pParent, ResMgr* pResMgr );
+ LockFailedQueryBox(vcl::Window* pParent, const std::locale& rResLocale);
virtual ~LockFailedQueryBox() override;
};
diff --git a/uui/source/lockfailed.src b/uui/source/lockfailed.src
deleted file mode 100644
index 5fa7ba5b3482..000000000000
--- a/uui/source/lockfailed.src
+++ /dev/null
@@ -1,35 +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 "ids.hrc"
-
-String STR_LOCKFAILED_TITLE
-{
- Text [ en-US ] = "Document Could Not Be Locked";
-};
-String STR_LOCKFAILED_MSG
-{
- Text [ en-US ] = "The lock file could not be created for exclusive access by %PRODUCTNAME, due to missing permission to create a lock file on that file location or lack of free disk space.";
-};
-String STR_LOCKFAILED_OPENREADONLY_BTN
-{
- Text [ en-US ] = "Open ~Read-Only";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index 76465d96a6b5..659f3bd6b090 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -21,8 +21,7 @@
#include <vcl/msgbox.hxx>
#include "logindlg.hxx"
-#include "ids.hrc"
-#include <tools/resid.hxx>
+#include "strings.hrc"
#include <osl/file.hxx>
#ifdef UNX
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index 1064d140df6e..58e6a736a316 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -18,9 +18,9 @@
*/
#include <sal/macros.h>
+#include <tools/resmgr.hxx>
#include <vcl/layout.hxx>
-
-#include "ids.hrc"
+#include "strings.hrc"
#include "masterpasscrtdlg.hxx"
// MasterPasswordCreateDialog---------------------------------------------------
@@ -38,7 +38,7 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl, Button*, void)
EndDialog( RET_OK );
else
{
- OUString aErrorMsg( ResId( STR_ERROR_PASSWORDS_NOT_IDENTICAL, *pResourceMgr ));
+ OUString aErrorMsg(Translate::get(STR_ERROR_PASSWORDS_NOT_IDENTICAL, rResLocale));
ScopedVclPtrInstance< MessageDialog > aErrorBox(this, aErrorMsg);
aErrorBox->Execute();
m_pEDMasterPasswordCrt->SetText( OUString() );
@@ -47,9 +47,9 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl, Button*, void)
}
}
-MasterPasswordCreateDialog::MasterPasswordCreateDialog(vcl::Window* pParent, ResMgr* pResMgr)
+MasterPasswordCreateDialog::MasterPasswordCreateDialog(vcl::Window* pParent, const std::locale& rLocale)
: ModalDialog(pParent, "SetMasterPasswordDialog", "uui/ui/setmasterpassworddlg.ui")
- , pResourceMgr(pResMgr)
+ , rResLocale(rLocale)
{
get(m_pEDMasterPasswordCrt, "password1");
get(m_pEDMasterPasswordRepeat, "password2");
diff --git a/uui/source/masterpasscrtdlg.hxx b/uui/source/masterpasscrtdlg.hxx
index 01931eb4f89f..d0c29b541bf2 100644
--- a/uui/source/masterpasscrtdlg.hxx
+++ b/uui/source/masterpasscrtdlg.hxx
@@ -40,14 +40,14 @@ private:
DECL_LINK(EditHdl_Impl, Edit&, void);
public:
- MasterPasswordCreateDialog( vcl::Window* pParent, ResMgr * pResMgr );
+ MasterPasswordCreateDialog(vcl::Window* pParent, const std::locale& rLocale);
virtual ~MasterPasswordCreateDialog() override;
virtual void dispose() override;
OUString GetMasterPassword() const { return m_pEDMasterPasswordCrt->GetText(); }
private:
- ResMgr* pResourceMgr;
+ const std::locale& rResLocale;
};
#endif // INCLUDED_UUI_SOURCE_MASTERPASSCRTDLG_HXX
diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx
index 625d307583c9..3afe239cd039 100644
--- a/uui/source/masterpassworddlg.cxx
+++ b/uui/source/masterpassworddlg.cxx
@@ -17,9 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <tools/resmgr.hxx>
#include <vcl/layout.hxx>
-
-#include "ids.hrc"
+#include "strings.hrc"
#include "masterpassworddlg.hxx"
// MasterPasswordDialog---------------------------------------------------
@@ -35,17 +35,17 @@ MasterPasswordDialog::MasterPasswordDialog
(
vcl::Window* pParent,
css::task::PasswordRequestMode aDialogMode,
- ResMgr* pResMgr
+ const std::locale& rLocale
)
: ModalDialog(pParent, "MasterPasswordDialog", "uui/ui/masterpassworddlg.ui")
, nDialogMode(aDialogMode)
- , pResourceMgr(pResMgr)
+ , rResLocale(rLocale)
{
get(m_pEDMasterPassword, "password");
get(m_pOKBtn, "ok");
if( nDialogMode == css::task::PasswordRequestMode_PASSWORD_REENTER )
{
- OUString aErrorMsg( ResId( STR_ERROR_MASTERPASSWORD_WRONG, *pResourceMgr ));
+ OUString aErrorMsg(Translate::get(STR_ERROR_MASTERPASSWORD_WRONG, rResLocale));
ScopedVclPtrInstance< MessageDialog > aErrorBox(pParent, aErrorMsg);
aErrorBox->Execute();
}
diff --git a/uui/source/masterpassworddlg.hxx b/uui/source/masterpassworddlg.hxx
index 525d588d7003..cb27bfd3b865 100644
--- a/uui/source/masterpassworddlg.hxx
+++ b/uui/source/masterpassworddlg.hxx
@@ -35,7 +35,7 @@ class MasterPasswordDialog : public ModalDialog
DECL_LINK(OKHdl_Impl, Button*, void);
public:
- MasterPasswordDialog( vcl::Window* pParent, css::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr );
+ MasterPasswordDialog(vcl::Window* pParent, css::task::PasswordRequestMode nDlgMode, const std::locale& rLocale);
virtual ~MasterPasswordDialog() override;
virtual void dispose() override;
@@ -43,7 +43,7 @@ public:
private:
css::task::PasswordRequestMode nDialogMode;
- ResMgr* pResourceMgr;
+ const std::locale& rResLocale;
};
#endif // INCLUDED_UUI_SOURCE_MASTERPASSWORDDLG_HXX
diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx
index 43a7351bdcb9..2d5f1f0ed24b 100644
--- a/uui/source/nameclashdlg.cxx
+++ b/uui/source/nameclashdlg.cxx
@@ -17,10 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <vcl/layout.hxx>
#include <osl/file.hxx>
+#include <tools/resmgr.hxx>
+#include <vcl/layout.hxx>
-#include "ids.hrc"
+#include "strings.hrc"
#include "nameclashdlg.hxx"
// NameClashDialog ---------------------------------------------------------
@@ -47,7 +48,7 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, Button *, pBtn, void )
}
-NameClashDialog::NameClashDialog( vcl::Window* pParent, ResMgr* pResMgr,
+NameClashDialog::NameClashDialog( vcl::Window* pParent, const std::locale& rResLocale,
OUString const & rTargetFolderURL,
OUString const & rClashingName,
OUString const & rProposedNewName,
@@ -69,11 +70,11 @@ NameClashDialog::NameClashDialog( vcl::Window* pParent, ResMgr* pResMgr,
OUString aInfo;
if ( bAllowOverwrite )
{
- aInfo = ResId(STR_RENAME_OR_REPLACE, *pResMgr).toString();
+ aInfo = Translate::get(STR_RENAME_OR_REPLACE, rResLocale);
}
else
{
- aInfo = ResId(STR_NAME_CLASH_RENAME_ONLY, *pResMgr).toString();
+ aInfo = Translate::get(STR_NAME_CLASH_RENAME_ONLY, rResLocale);
m_pBtnOverwrite->Hide();
}
@@ -81,7 +82,7 @@ NameClashDialog::NameClashDialog( vcl::Window* pParent, ResMgr* pResMgr,
if ( osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL( rTargetFolderURL, aPath ) )
aPath = rTargetFolderURL;
- maSameName = ResId(STR_SAME_NAME_USED, *pResMgr).toString();
+ maSameName = Translate::get(STR_SAME_NAME_USED, rResLocale);
aInfo = aInfo.replaceFirst( "%NAME", rClashingName );
aInfo = aInfo.replaceFirst( "%FOLDER", aPath );
diff --git a/uui/source/nameclashdlg.hxx b/uui/source/nameclashdlg.hxx
index 3fb37ea1cdc5..9b357b3803e6 100644
--- a/uui/source/nameclashdlg.hxx
+++ b/uui/source/nameclashdlg.hxx
@@ -42,7 +42,7 @@ class NameClashDialog : public ModalDialog
DECL_LINK( ButtonHdl_Impl, Button *, void );
public:
- NameClashDialog( vcl::Window* pParent, ResMgr* pResMgr,
+ NameClashDialog( vcl::Window* pParent, const std::locale& rLocale,
OUString const & rTargetFolderURL,
OUString const & rClashingName,
OUString const & rProposedNewName,
diff --git a/uui/source/nameclashdlg.src b/uui/source/nameclashdlg.src
deleted file mode 100644
index 615b83adc996..000000000000
--- a/uui/source/nameclashdlg.src
+++ /dev/null
@@ -1,37 +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 "ids.hrc"
-
-String STR_RENAME_OR_REPLACE
-{
- Text [ en-US ] = "A file with the name \"%NAME\" already exists in the location \"%FOLDER\".\nChoose Replace to overwrite the existing file or provide a new name.";
-};
-
-String STR_NAME_CLASH_RENAME_ONLY
-{
- Text [ en-US ] = "A file with the name \"%NAME\" already exists in the location \"%FOLDER\".\nPlease enter a new name.";
-};
-
-String STR_SAME_NAME_USED
-{
- Text [ en-US ] = "Please provide a different file name!";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx
index 4de71b54c2ca..1808a405995d 100644
--- a/uui/source/openlocked.cxx
+++ b/uui/source/openlocked.cxx
@@ -17,20 +17,21 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "ids.hrc"
+#include "strings.hrc"
#include "openlocked.hxx"
+#include <tools/resmgr.hxx>
-OpenLockedQueryBox::OpenLockedQueryBox( vcl::Window* pParent, ResMgr* pResMgr, const OUString& aMessage ) :
+OpenLockedQueryBox::OpenLockedQueryBox( vcl::Window* pParent, const std::locale& rResLocale, const OUString& aMessage ) :
MessBox(pParent, 0,
- ResId(STR_OPENLOCKED_TITLE, *pResMgr).toString(),
+ Translate::get(STR_OPENLOCKED_TITLE, rResLocale),
aMessage )
{
SetImage( QueryBox::GetStandardImage() );
- AddButton(ResId(STR_OPENLOCKED_OPENREADONLY_BTN, *pResMgr).toString(), RET_YES,
+ AddButton(Translate::get(STR_OPENLOCKED_OPENREADONLY_BTN, rResLocale), RET_YES,
ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus);
- AddButton(ResId(STR_OPENLOCKED_OPENCOPY_BTN, *pResMgr).toString(), RET_NO);
+ AddButton(Translate::get(STR_OPENLOCKED_OPENCOPY_BTN, rResLocale), RET_NO);
AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel );
SetButtonHelpText( RET_YES, OUString() );
diff --git a/uui/source/openlocked.hxx b/uui/source/openlocked.hxx
index 40c50e403e00..8584c45c2c7e 100644
--- a/uui/source/openlocked.hxx
+++ b/uui/source/openlocked.hxx
@@ -24,7 +24,7 @@
class OpenLockedQueryBox : public MessBox
{
public:
- OpenLockedQueryBox( vcl::Window* pParent, ResMgr* pResMgr, const OUString& aMessage );
+ OpenLockedQueryBox(vcl::Window* pParent, const std::locale& rResLocale, const OUString& rMessage);
virtual ~OpenLockedQueryBox() override;
};
diff --git a/uui/source/openlocked.src b/uui/source/openlocked.src
deleted file mode 100644
index 2e30dbf646b5..000000000000
--- a/uui/source/openlocked.src
+++ /dev/null
@@ -1,43 +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 "ids.hrc"
-
-String STR_OPENLOCKED_TITLE
-{
- Text [ en-US ] = "Document in Use";
-};
-String STR_OPENLOCKED_MSG
-{
- Text [ en-US ] = "Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nOpen document read-only or open a copy of the document for editing.\n\n";
-};
-String STR_OPENLOCKED_OPENREADONLY_BTN
-{
- Text [ en-US ] = "Open ~Read-Only";
-};
-String STR_OPENLOCKED_OPENCOPY_BTN
-{
- Text [ en-US ] = "Open ~Copy";
-};
-String STR_UNKNOWNUSER
-{
- Text [ en-US ] = "Unknown User";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 4a403bea6370..aa1fd0e53cb5 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -18,21 +18,22 @@
*/
#include "passworddlg.hxx"
-#include "ids.hrc"
+#include "strings.hrc"
+#include <tools/resmgr.hxx>
#include <tools/urlobj.hxx>
#include <vcl/layout.hxx>
using namespace ::com::sun::star;
PasswordDialog::PasswordDialog(vcl::Window* _pParent,
- task::PasswordRequestMode nDlgMode, ResMgr * pResMgr,
+ task::PasswordRequestMode nDlgMode, const std::locale& rLocale,
const OUString& aDocURL, bool bOpenToModify, bool bIsSimplePasswordRequest)
: ModalDialog(_pParent, "PasswordDialog", "uui/ui/password.ui")
, nMinLen(1)
- , aPasswdMismatch(ResId(STR_PASSWORD_MISMATCH, *pResMgr))
+ , aPasswdMismatch(Translate::get(STR_PASSWORD_MISMATCH, rLocale))
, nDialogMode(nDlgMode)
- , pResourceMgr(pResMgr)
+ , rResLocale(rLocale)
{
get(m_pFTPassword, "newpassFT");
get(m_pEDPassword, "newpassEntry");
@@ -42,15 +43,15 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent,
if( nDialogMode == task::PasswordRequestMode_PASSWORD_REENTER )
{
- const sal_uInt16 nOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG;
- const sal_uInt16 nErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : nOpenToModifyErrStrId;
- OUString aErrorMsg(ResId(nErrStrId, *pResourceMgr).toString());
+ const char* pOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG;
+ const char* pErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : pOpenToModifyErrStrId;
+ OUString aErrorMsg(Translate::get(pErrStrId, rResLocale));
ScopedVclPtrInstance< MessageDialog > aErrorBox(GetParent(), aErrorMsg);
aErrorBox->Execute();
}
// default settings for enter password or reenter passwd...
- OUString aTitle(ResId(STR_TITLE_ENTER_PASSWORD, *pResourceMgr).toString());
+ OUString aTitle(Translate::get(STR_TITLE_ENTER_PASSWORD, rResLocale));
m_pFTConfirmPassword->Hide();
m_pEDConfirmPassword->Hide();
m_pFTConfirmPassword->Enable( false );
@@ -59,9 +60,9 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent,
// settings for create password
if (nDialogMode == task::PasswordRequestMode_PASSWORD_CREATE)
{
- aTitle = ResId(STR_TITLE_CREATE_PASSWORD, *pResourceMgr).toString();
+ aTitle = Translate::get(STR_TITLE_CREATE_PASSWORD, rResLocale);
- m_pFTConfirmPassword->SetText(ResId(STR_CONFIRM_SIMPLE_PASSWORD, *pResourceMgr).toString());
+ m_pFTConfirmPassword->SetText(Translate::get(STR_CONFIRM_SIMPLE_PASSWORD, rResLocale));
m_pFTConfirmPassword->Show();
m_pEDConfirmPassword->Show();
@@ -71,8 +72,8 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent,
SetText( aTitle );
- sal_uInt16 nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN;
- OUString aMessage(ResId(nStrId, *pResourceMgr).toString());
+ const char* pStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN;
+ OUString aMessage(Translate::get(pStrId, rResLocale));
INetURLObject url(aDocURL);
aMessage += url.HasError()
? aDocURL : url.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
@@ -81,7 +82,7 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent,
if (bIsSimplePasswordRequest)
{
DBG_ASSERT( aDocURL.isEmpty(), "A simple password request should not have a document URL! Use document password request instead." );
- m_pFTPassword->SetText(ResId(STR_ENTER_SIMPLE_PASSWORD, *pResourceMgr).toString());
+ m_pFTPassword->SetText(Translate::get(STR_ENTER_SIMPLE_PASSWORD, rResLocale));
}
m_pOKBtn->SetClickHdl( LINK( this, PasswordDialog, OKHdl_Impl ) );
diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx
index dc63370832ff..fc067db250ba 100644
--- a/uui/source/passworddlg.hxx
+++ b/uui/source/passworddlg.hxx
@@ -42,8 +42,8 @@ class PasswordDialog : public ModalDialog
DECL_LINK(OKHdl_Impl, Button*, void);
public:
- PasswordDialog( vcl::Window* pParent, css::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr, const OUString& aDocURL,
- bool bOpenToModify, bool bIsSimplePasswordRequest );
+ PasswordDialog(vcl::Window* pParent, css::task::PasswordRequestMode nDlgMode, const std::locale& rLocale, const OUString& aDocURL,
+ bool bOpenToModify, bool bIsSimplePasswordRequest);
virtual ~PasswordDialog() override;
virtual void dispose() override;
@@ -52,7 +52,7 @@ public:
private:
css::task::PasswordRequestMode nDialogMode;
- ResMgr* pResourceMgr;
+ const std::locale& rResLocale;
};
#endif // INCLUDED_UUI_SOURCE_PASSWORDDLG_HXX
diff --git a/uui/source/passworddlg.src b/uui/source/passworddlg.src
deleted file mode 100644
index 93d3d5ee18b0..000000000000
--- a/uui/source/passworddlg.src
+++ /dev/null
@@ -1,57 +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 "ids.hrc"
-
-String STR_ENTER_PASSWORD_TO_OPEN
-{
- Text [ en-US ] = "Enter password to open file: \n";
-};
-
-String STR_ENTER_PASSWORD_TO_MODIFY
-{
- Text [ en-US ] = "Enter password to modify file: \n";
-};
-
-String STR_ENTER_SIMPLE_PASSWORD
-{
- Text [ en-US ] = "Enter password: ";
-};
-
-String STR_CONFIRM_SIMPLE_PASSWORD
-{
- Text [ en-US ] = "Confirm password: ";
-};
-
-String STR_TITLE_CREATE_PASSWORD
-{
- Text [ en-US ] = "Set Password";
-};
-
-String STR_TITLE_ENTER_PASSWORD
-{
- Text [ en-US ] = "Enter Password";
-};
-
-String STR_PASSWORD_MISMATCH
-{
- Text [ en-US ] = "The confirmation password did not match the password. Set the password again by entering the same password in both boxes." ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/passworderrs.src b/uui/source/passworderrs.src
deleted file mode 100644
index ae92de07e717..000000000000
--- a/uui/source/passworderrs.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 "ids.hrc"
-
-String STR_ERROR_PASSWORD_TO_OPEN_WRONG
-{
- Text [ en-US ] = "The password is incorrect. The file cannot be opened.";
-};
-
-String STR_ERROR_PASSWORD_TO_MODIFY_WRONG
-{
- Text [ en-US ] = "The password is incorrect. The file cannot be modified.";
-};
-
-String STR_ERROR_MASTERPASSWORD_WRONG
-{
- Text [ en-US ] = "The master password is incorrect.";
-};
-
-String STR_ERROR_SIMPLE_PASSWORD_WRONG
-{
- Text [ en-US ] = "The password is incorrect.";
-};
-
-String STR_ERROR_PASSWORDS_NOT_IDENTICAL
-{
- Text [ en-US ] = "The password confirmation does not match.";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx
index 47b8bdd58a14..1641a3a59ef7 100644
--- a/uui/source/secmacrowarnings.cxx
+++ b/uui/source/secmacrowarnings.cxx
@@ -31,7 +31,6 @@
using namespace ::com::sun::star::security;
-#include "ids.hrc"
#include "secmacrowarnings.hxx"
using namespace ::com::sun::star;
diff --git a/uui/source/sslwarndlg.cxx b/uui/source/sslwarndlg.cxx
index 162df6553831..6803f67d1749 100644
--- a/uui/source/sslwarndlg.cxx
+++ b/uui/source/sslwarndlg.cxx
@@ -19,7 +19,7 @@
#include <vcl/msgbox.hxx>
-#include "ids.hrc"
+#include "ids.hxx"
#include "sslwarndlg.hxx"
#include <comphelper/processfactory.hxx>
diff --git a/uui/source/trylater.cxx b/uui/source/trylater.cxx
index 90688a95e2a3..de5ca390580d 100644
--- a/uui/source/trylater.cxx
+++ b/uui/source/trylater.cxx
@@ -17,19 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "ids.hrc"
+#include <tools/resmgr.hxx>
+#include "strings.hrc"
#include "trylater.hxx"
-TryLaterQueryBox::TryLaterQueryBox( vcl::Window* pParent, ResMgr* pResMgr, const OUString& aMessage ) :
- MessBox(pParent, 0,
- ResId(STR_TRYLATER_TITLE, *pResMgr).toString(),
- aMessage )
+TryLaterQueryBox::TryLaterQueryBox(vcl::Window* pParent, const std::locale& rResLocale, const OUString& aMessage)
+ : MessBox(pParent, 0, Translate::get(STR_TRYLATER_TITLE, rResLocale), aMessage)
{
SetImage( QueryBox::GetStandardImage() );
- AddButton(ResId(STR_TRYLATER_RETRYSAVING_BTN, *pResMgr).toString(), RET_YES,
+ AddButton(Translate::get(STR_TRYLATER_RETRYSAVING_BTN, rResLocale), RET_YES,
ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus);
- AddButton(ResId(STR_TRYLATER_SAVEAS_BTN, *pResMgr).toString(), RET_NO);
+ AddButton(Translate::get(STR_TRYLATER_SAVEAS_BTN, rResLocale), RET_NO);
AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel );
SetButtonHelpText( RET_YES, OUString() );
diff --git a/uui/source/trylater.hxx b/uui/source/trylater.hxx
index 961cbe5f3a14..23d0a0c78841 100644
--- a/uui/source/trylater.hxx
+++ b/uui/source/trylater.hxx
@@ -24,7 +24,7 @@
class TryLaterQueryBox : public MessBox
{
public:
- TryLaterQueryBox( vcl::Window* pParent, ResMgr* pResMgr, const OUString& aMessage );
+ TryLaterQueryBox(vcl::Window* pParent, const std::locale& rLocale, const OUString& aMessage);
virtual ~TryLaterQueryBox() override;
};
diff --git a/uui/source/trylater.src b/uui/source/trylater.src
deleted file mode 100644
index 0b02b391bb6e..000000000000
--- a/uui/source/trylater.src
+++ /dev/null
@@ -1,39 +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 "ids.hrc"
-
-String STR_TRYLATER_TITLE
-{
- Text [ en-US ] = "Document in Use";
-};
-String STR_TRYLATER_MSG
-{
- Text [ en-US ] = "Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nTry again later to save document or save a copy of that document.\n\n";
-};
-String STR_TRYLATER_RETRYSAVING_BTN
-{
- Text [ en-US ] = "~Retry Saving";
-};
-String STR_TRYLATER_SAVEAS_BTN
-{
- Text [ en-US ] = "~Save As...";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/unknownauthdlg.cxx b/uui/source/unknownauthdlg.cxx
index 291d618c9276..1f7230ab6e55 100644
--- a/uui/source/unknownauthdlg.cxx
+++ b/uui/source/unknownauthdlg.cxx
@@ -19,7 +19,7 @@
#include <vcl/msgbox.hxx>
-#include "ids.hrc"
+#include "strings.hrc"
#include "unknownauthdlg.hxx"
#include <comphelper/processfactory.hxx>
diff --git a/uui/uiconfig/ui/authfallback.ui b/uui/uiconfig/ui/authfallback.ui
index f7a0b58ed0ee..edd074ade47e 100644
--- a/uui/uiconfig/ui/authfallback.ui
+++ b/uui/uiconfig/ui/authfallback.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="uui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="AuthFallbackDlg">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Authentication Code</property>
+ <property name="title" translatable="yes" context="authfallback|AuthFallbackDlg">Authentication Code</property>
<property name="default_width">400</property>
<property name="default_height">270</property>
<property name="type_hint">dialog</property>
@@ -127,7 +127,7 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Enter the 6 digit PIN:</property>
+ <property name="label" translatable="yes" context="authfallback|label1">Enter the 6 digit PIN:</property>
<property name="xalign">0</property>
</object>
<packing>
diff --git a/uui/uiconfig/ui/filterselect.ui b/uui/uiconfig/ui/filterselect.ui
index 7053bbde59fa..b2843c627eee 100644
--- a/uui/uiconfig/ui/filterselect.ui
+++ b/uui/uiconfig/ui/filterselect.ui
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<interface>
+<interface domain="uui">
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="FilterSelectDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Filter Selection</property>
+ <property name="title" translatable="yes" context="filterselect|FilterSelectDialog">Filter Selection</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
diff --git a/uui/uiconfig/ui/logindialog.ui b/uui/uiconfig/ui/logindialog.ui
index 806d8f582fd3..be927fe941df 100644
--- a/uui/uiconfig/ui/logindialog.ui
+++ b/uui/uiconfig/ui/logindialog.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="uui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="LoginDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Authentication Required</property>
+ <property name="title" translatable="yes" context="logindialog|LoginDialog">Authentication Required</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -77,7 +77,7 @@
<property name="column_spacing">12</property>
<child>
<object class="GtkCheckButton" id="syscreds">
- <property name="label" translatable="yes">_Use system credentials</property>
+ <property name="label" translatable="yes" context="logindialog|syscreds">_Use system credentials</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -93,7 +93,7 @@
</child>
<child>
<object class="GtkCheckButton" id="remember">
- <property name="label" translatable="yes">_Remember password</property>
+ <property name="label" translatable="yes" context="logindialog|remember">_Remember password</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -124,7 +124,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">A_ccount:</property>
+ <property name="label" translatable="yes" context="logindialog|accountft">A_ccount:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">accounted</property>
</object>
@@ -138,7 +138,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Pass_word:</property>
+ <property name="label" translatable="yes" context="logindialog|passwordft">Pass_word:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">passworded</property>
</object>
@@ -177,7 +177,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_User name:</property>
+ <property name="label" translatable="yes" context="logindialog|nameft">_User name:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">nameed</property>
</object>
@@ -191,7 +191,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_Path:</property>
+ <property name="label" translatable="yes" context="logindialog|pathft">_Path:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">pathed</property>
</object>
@@ -219,7 +219,7 @@
</child>
<child>
<object class="GtkButton" id="pathbtn">
- <property name="label" translatable="yes">_Browse…</property>
+ <property name="label" translatable="yes" context="logindialog|pathbtn">_Browse…</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -241,7 +241,7 @@
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Enter user name and password for:
+ <property name="label" translatable="yes" context="logindialog|loginrealm">Enter user name and password for:
“%2” on %1</property>
</object>
<packing>
@@ -255,7 +255,7 @@
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Wrong user name and password for:
+ <property name="label" translatable="yes" context="logindialog|wrongloginrealm">Wrong user name and password for:
“%2” on %1</property>
</object>
<packing>
@@ -269,7 +269,7 @@
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Wrong user name and password for:
+ <property name="label" translatable="yes" context="logindialog|wrongrequestinfo">Wrong user name and password for:
%1</property>
</object>
<packing>
@@ -283,7 +283,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Enter user name and password for:
+ <property name="label" translatable="yes" context="logindialog|requestinfo">Enter user name and password for:
%1</property>
</object>
<packing>
@@ -297,7 +297,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Message from server:</property>
+ <property name="label" translatable="yes" context="logindialog|errorft">Message from server:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">errorinfo</property>
</object>
diff --git a/uui/uiconfig/ui/macrowarnmedium.ui b/uui/uiconfig/ui/macrowarnmedium.ui
index a9c49c3f5804..702ef79d9067 100644
--- a/uui/uiconfig/ui/macrowarnmedium.ui
+++ b/uui/uiconfig/ui/macrowarnmedium.ui
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- interface-requires gtk+ 3.0 -->
-<interface>
+<interface domain="uui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="MacroWarnMedium">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">%PRODUCTNAME - Security Warning</property>
+ <property name="title" translatable="yes" context="macrowarnmedium|MacroWarnMedium">%PRODUCTNAME - Security Warning</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
@@ -22,7 +22,7 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
- <property name="label" translatable="yes">_Enable Macros</property>
+ <property name="label" translatable="yes" context="macrowarnmedium|ok">_Enable Macros</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -36,7 +36,7 @@
</child>
<child>
<object class="GtkButton" id="cancel">
- <property name="label" translatable="yes">_Disable Macros</property>
+ <property name="label" translatable="yes" context="macrowarnmedium|cancel">_Disable Macros</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -124,7 +124,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
- <property name="label" translatable="yes">The document contains document macros signed by:</property>
+ <property name="label" translatable="yes" context="macrowarnmedium|descr1Label">The document contains document macros signed by:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -138,7 +138,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
- <property name="label" translatable="yes">The document contains document macros.</property>
+ <property name="label" translatable="yes" context="macrowarnmedium|descr1aLabel">The document contains document macros.</property>
</object>
<packing>
<property name="expand">False</property>
@@ -165,7 +165,7 @@
</child>
<child>
<object class="GtkButton" id="viewSignsButton">
- <property name="label" translatable="yes">_View Signatures…</property>
+ <property name="label" translatable="yes" context="macrowarnmedium|viewSignsButton">_View Signatures…</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -193,7 +193,7 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes">Macros may contain viruses. Disabling macros for a document is always safe. If you disable macros you may lose functionality provided by the document macros.</property>
+ <property name="label" translatable="yes" context="macrowarnmedium|descr2Label">Macros may contain viruses. Disabling macros for a document is always safe. If you disable macros you may lose functionality provided by the document macros.</property>
<property name="wrap">True</property>
<property name="max_width_chars">62</property>
</object>
@@ -205,7 +205,7 @@
</child>
<child>
<object class="GtkCheckButton" id="alwaysTrustCheckbutton">
- <property name="label" translatable="yes">_Always trust macros from this source</property>
+ <property name="label" translatable="yes" context="macrowarnmedium|alwaysTrustCheckbutton">_Always trust macros from this source</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
diff --git a/uui/uiconfig/ui/masterpassworddlg.ui b/uui/uiconfig/ui/masterpassworddlg.ui
index 67093dbed575..9dc6b3672c8d 100644
--- a/uui/uiconfig/ui/masterpassworddlg.ui
+++ b/uui/uiconfig/ui/masterpassworddlg.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="uui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="MasterPasswordDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Enter Master Password</property>
+ <property name="title" translatable="yes" context="masterpassworddlg|MasterPasswordDialog">Enter Master Password</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -83,7 +83,7 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0.54000002145767212</property>
- <property name="label" translatable="yes">_Enter password:</property>
+ <property name="label" translatable="yes" context="masterpassworddlg|label1">_Enter password:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">password</property>
</object>
diff --git a/uui/uiconfig/ui/password.ui b/uui/uiconfig/ui/password.ui
index d3cbe5a3de52..7413d150914c 100644
--- a/uui/uiconfig/ui/password.ui
+++ b/uui/uiconfig/ui/password.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="uui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="PasswordDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Set Password</property>
+ <property name="title" translatable="yes" context="password|PasswordDialog">Set Password</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
diff --git a/uui/uiconfig/ui/setmasterpassworddlg.ui b/uui/uiconfig/ui/setmasterpassworddlg.ui
index 7d008edb0c2e..ba7d181de538 100644
--- a/uui/uiconfig/ui/setmasterpassworddlg.ui
+++ b/uui/uiconfig/ui/setmasterpassworddlg.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="uui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="SetMasterPasswordDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Set Master Password</property>
+ <property name="title" translatable="yes" context="setmasterpassworddlg|SetMasterPasswordDialog">Set Master Password</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -81,7 +81,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Passwords for web connections are protected by a master password. You will be asked to enter it once per session, if %PRODUCTNAME retrieves a password from the protected password list.</property>
+ <property name="label" translatable="yes" context="setmasterpassworddlg|label1">Passwords for web connections are protected by a master password. You will be asked to enter it once per session, if %PRODUCTNAME retrieves a password from the protected password list.</property>
<property name="wrap">True</property>
<property name="max_width_chars">62</property>
</object>
@@ -97,7 +97,7 @@
<property name="can_focus">False</property>
<property name="margin_top">6</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_Enter password:</property>
+ <property name="label" translatable="yes" context="setmasterpassworddlg|label2">_Enter password:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">password1</property>
</object>
@@ -125,7 +125,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_Reenter password:</property>
+ <property name="label" translatable="yes" context="setmasterpassworddlg|label3">_Reenter password:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">password2</property>
</object>
@@ -154,7 +154,7 @@
<property name="can_focus">False</property>
<property name="margin_top">6</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Caution: If you forget the master password, you will be unable to access any of the information protected by it. Passwords are case sensitive.</property>
+ <property name="label" translatable="yes" context="setmasterpassworddlg|label4">Caution: If you forget the master password, you will be unable to access any of the information protected by it. Passwords are case sensitive.</property>
<property name="wrap">True</property>
<property name="max_width_chars">62</property>
</object>
diff --git a/uui/uiconfig/ui/simplenameclash.ui b/uui/uiconfig/ui/simplenameclash.ui
index 32b42ecb5ff6..5ef8a553bc5c 100644
--- a/uui/uiconfig/ui/simplenameclash.ui
+++ b/uui/uiconfig/ui/simplenameclash.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="uui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="SimpleNameClashDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">File Exists</property>
+ <property name="title" translatable="yes" context="simplenameclash|SimpleNameClashDialog">File Exists</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -34,7 +34,7 @@
</child>
<child>
<object class="GtkButton" id="replace">
- <property name="label" translatable="yes">Replace</property>
+ <property name="label" translatable="yes" context="simplenameclash|replace">Replace</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -48,7 +48,7 @@
</child>
<child>
<object class="GtkButton" id="rename">
- <property name="label" translatable="yes">Rename</property>
+ <property name="label" translatable="yes" context="simplenameclash|rename">Rename</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
diff --git a/uui/uiconfig/ui/sslwarndialog.ui b/uui/uiconfig/ui/sslwarndialog.ui
index 4e01aa2528af..e93112399ac0 100644
--- a/uui/uiconfig/ui/sslwarndialog.ui
+++ b/uui/uiconfig/ui/sslwarndialog.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="uui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkMessageDialog" id="SSLWarnDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Security Warning: </property>
+ <property name="title" translatable="yes" context="sslwarndialog|SSLWarnDialog">Security Warning: </property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
@@ -21,7 +21,7 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
- <property name="label" translatable="yes">Continue</property>
+ <property name="label" translatable="yes" context="sslwarndialog|ok">Continue</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -35,7 +35,7 @@
</child>
<child>
<object class="GtkButton" id="cancel">
- <property name="label" translatable="yes">Cancel Connection</property>
+ <property name="label" translatable="yes" context="sslwarndialog|cancel">Cancel Connection</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -49,7 +49,7 @@
</child>
<child>
<object class="GtkButton" id="view">
- <property name="label" translatable="yes">View Certificate</property>
+ <property name="label" translatable="yes" context="sslwarndialog|view">View Certificate</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
diff --git a/uui/uiconfig/ui/unknownauthdialog.ui b/uui/uiconfig/ui/unknownauthdialog.ui
index b41ae1b5fec8..9988e57b9e13 100644
--- a/uui/uiconfig/ui/unknownauthdialog.ui
+++ b/uui/uiconfig/ui/unknownauthdialog.ui
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="uui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkMessageDialog" id="UnknownAuthDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Website Certified by an Unknown Authority</property>
+ <property name="title" translatable="yes" context="unknownauthdialog|UnknownAuthDialog">Website Certified by an Unknown Authority</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
@@ -77,7 +77,7 @@
<property name="row_spacing">6</property>
<child>
<object class="GtkRadioButton" id="accept">
- <property name="label" translatable="yes">Accept this certificate temporarily for this session</property>
+ <property name="label" translatable="yes" context="unknownauthdialog|accept">Accept this certificate temporarily for this session</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -94,7 +94,7 @@
</child>
<child>
<object class="GtkRadioButton" id="reject">
- <property name="label" translatable="yes">Do not accept this certificate and do not connect to this Web site</property>
+ <property name="label" translatable="yes" context="unknownauthdialog|reject">Do not accept this certificate and do not connect to this Web site</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -109,7 +109,7 @@
</child>
<child>
<object class="GtkButton" id="examine">
- <property name="label" translatable="yes">Examine Certificate…</property>
+ <property name="label" translatable="yes" context="unknownauthdialog|examine">Examine Certificate…</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>