summaryrefslogtreecommitdiff
path: root/framework
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 /framework
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 'framework')
-rw-r--r--framework/AllLangMoTarget_fwk.mk13
-rw-r--r--framework/AllLangResTarget_fwe.mk49
-rw-r--r--framework/Library_fwe.mk3
-rw-r--r--framework/Module_framework.mk4
-rw-r--r--framework/inc/classes/fwkresid.hxx15
-rw-r--r--framework/inc/classes/resource.hrc67
-rw-r--r--framework/inc/classes/resource.hxx32
-rw-r--r--framework/inc/pch/precompiled_fwe.hxx2
-rw-r--r--framework/inc/pch/precompiled_fwi.hxx2
-rw-r--r--framework/inc/pch/precompiled_fwk.hxx2
-rw-r--r--framework/inc/pch/precompiled_fwl.hxx2
-rw-r--r--framework/inc/strings.hrc58
-rw-r--r--framework/source/accelerators/presethandler.cxx2
-rw-r--r--framework/source/classes/resource.src168
-rw-r--r--framework/source/fwe/classes/fwkresid.cxx27
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx2
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx2
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx2
-rw-r--r--framework/source/services/autorecovery.cxx2
-rw-r--r--framework/source/services/desktop.cxx2
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx3
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx1
-rw-r--r--framework/source/uielement/footermenucontroller.cxx2
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/headermenucontroller.cxx2
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx2
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx2
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx2
-rw-r--r--framework/source/uielement/newmenucontroller.cxx2
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx3
-rw-r--r--framework/source/uielement/toolbarmanager.cxx3
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx2
34 files changed, 140 insertions, 346 deletions
diff --git a/framework/AllLangMoTarget_fwk.mk b/framework/AllLangMoTarget_fwk.mk
new file mode 100644
index 000000000000..cbeff181bd57
--- /dev/null
+++ b/framework/AllLangMoTarget_fwk.mk
@@ -0,0 +1,13 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+$(eval $(call gb_AllLangMoTarget_AllLangMoTarget,fwk))
+
+$(eval $(call gb_AllLangMoTarget_set_polocation,fwk,framework))
+
+# vim: set noet sw=4 ts=4:
diff --git a/framework/AllLangResTarget_fwe.mk b/framework/AllLangResTarget_fwe.mk
deleted file mode 100644
index 7a8726d3cf7a..000000000000
--- a/framework/AllLangResTarget_fwe.mk
+++ /dev/null
@@ -1,49 +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/.
-#
-# 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 .
-#
-
-$(eval $(call gb_AllLangResTarget_AllLangResTarget,fwe))
-
-$(eval $(call gb_AllLangResTarget_set_reslocation,fwe,framework))
-
-$(eval $(call gb_AllLangResTarget_add_srs,fwe,\
- fwe/fwk_classes \
-))
-
-
-$(eval $(call gb_SrsTarget_SrsTarget,fwe/fwk_classes))
-
-$(eval $(call gb_SrsTarget_set_include,fwe/fwk_classes,\
- $$(INCLUDE) \
- -I$(SRCDIR)/framework/inc \
- -I$(SRCDIR)/framework/inc/classes \
-))
-
-$(eval $(call gb_SrsTarget_add_files,fwe/fwk_classes,\
- framework/source/classes/resource.src \
-))
-
-$(eval $(call gb_SrsTarget_SrsTarget,fwe/fwk_services))
-
-$(eval $(call gb_SrsTarget_set_include,fwe/fwk_services,\
- $$(INCLUDE) \
- -I$(SRCDIR)/framework/inc \
- -I$(SRCDIR)/framework/inc/services \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk
index 2931e52e0ca7..52d53fcc79fd 100644
--- a/framework/Library_fwe.mk
+++ b/framework/Library_fwe.mk
@@ -81,7 +81,4 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\
framework/source/services/dispatchhelper \
))
-# Runtime dependency for unit-tests
-$(eval $(call gb_Library_use_restarget,fwe,fwe))
-
# vim: set noet sw=4 ts=4:
diff --git a/framework/Module_framework.mk b/framework/Module_framework.mk
index f048989ad63c..93ac5e79618f 100644
--- a/framework/Module_framework.mk
+++ b/framework/Module_framework.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_Module_add_targets,framework,\
Library_fwl \
Library_fwm \
Package_dtd \
+ UIConfig_startmodule \
))
$(eval $(call gb_Module_add_slowcheck_targets,framework,\
@@ -33,8 +34,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,framework,\
))
$(eval $(call gb_Module_add_l10n_targets,framework,\
- AllLangResTarget_fwe \
- UIConfig_startmodule \
+ AllLangMoTarget_fwk \
))
ifneq ($(OOO_JUNIT_JAR),)
diff --git a/framework/inc/classes/fwkresid.hxx b/framework/inc/classes/fwkresid.hxx
index ba54eca5f081..c6606c5271e8 100644
--- a/framework/inc/classes/fwkresid.hxx
+++ b/framework/inc/classes/fwkresid.hxx
@@ -20,21 +20,10 @@
#ifndef INCLUDED_FRAMEWORK_INC_CLASSES_FWKRESID_HXX
#define INCLUDED_FRAMEWORK_INC_CLASSES_FWKRESID_HXX
-#include <tools/resid.hxx>
#include <framework/fwedllapi.h>
+#include <rtl/ustring.hxx>
-namespace framework
-{
-
-class FWE_DLLPUBLIC FwkResId : public ResId
-{
- public:
- FwkResId( sal_uInt16 nId );
-
- static ResMgr* GetResManager();
-};
-
-}
+FWE_DLLPUBLIC OUString FwkResId(const char* pId);
#endif // __FRAMEWORK_CLASSES_FWKRESID
diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc
deleted file mode 100644
index 72a45931b048..000000000000
--- a/framework/inc/classes/resource.hrc
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FRAMEWORK_INC_CLASSES_RESOURCE_HRC
-#define INCLUDED_FRAMEWORK_INC_CLASSES_RESOURCE_HRC
-
-#define RID_STR_START 2000
-#define RID_MENU_START 10000
-#define RID_IMAGE_START 15000
-
-#define STR_MENU_HEADFOOTALL (RID_STR_START+2)
-#define STR_UPDATEDOC (RID_STR_START+3)
-#define STR_CLOSEDOC_ANDRETURN (RID_STR_START+4)
-#define STR_SAVECOPYDOC (RID_STR_START+5)
-#define STR_NODOCUMENT (RID_STR_START+6)
-#define STR_TOOLBAR_TITLE_ADDON (RID_STR_START+7)
-
-#define STR_FULL_DISC_RETRY_BUTTON (RID_STR_START+9) // used by AuotSave to show error state: full disc
-#define STR_FULL_DISC_MSG (RID_STR_START+10) // used by AuotSave to show error state: full disc
-#define STR_RESTORE_TOOLBARS (RID_STR_START+11)
-#define STR_CORRUPT_UICFG_SHARE (RID_STR_START+12)
-#define STR_CORRUPT_UICFG_USER (RID_STR_START+13)
-#define STR_CORRUPT_UICFG_GENERAL (RID_STR_START+14)
-#define STR_LANGSTATUS_MULTIPLE_LANGUAGES (RID_STR_START+15)
-#define STR_LANGSTATUS_NONE (RID_STR_START+16)
-#define STR_LANGSTATUS_MORE (RID_STR_START+17)
-#define STR_SET_LANGUAGE_FOR_PARAGRAPH (RID_STR_START+19)
-#define STR_UNTITLED_DOCUMENT (RID_STR_START+21)
-#define STR_RESET_TO_DEFAULT_LANGUAGE (RID_STR_START+22)
-#define STR_CLEAR_RECENT_FILES (RID_STR_START+23)
-#define STR_CLEAR_RECENT_FILES_HELP (RID_STR_START+24)
-#define STR_LANGSTATUS_HINT (RID_STR_START+25)
-#define STR_REMOTE_TITLE (RID_STR_START+26)
-#define STR_SAFEMODE_TITLE (RID_STR_START+27)
-#define STR_TOOLBAR_VISIBLE_BUTTONS (RID_STR_START+28)
-#define STR_TOOLBAR_CUSTOMIZE_TOOLBAR (RID_STR_START+29)
-#define STR_TOOLBAR_DOCK_TOOLBAR (RID_STR_START+30)
-#define STR_TOOLBAR_DOCK_ALL_TOOLBARS (RID_STR_START+31)
-#define STR_TOOLBAR_LOCK_TOOLBAR (RID_STR_START+32)
-#define STR_TOOLBAR_CLOSE_TOOLBAR (RID_STR_START+33)
-
-#define MENUITEM_TOOLBAR_VISIBLEBUTTON 1
-#define MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR 2
-#define MENUITEM_TOOLBAR_DOCKTOOLBAR 3
-#define MENUITEM_TOOLBAR_DOCKALLTOOLBAR 4
-#define MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION 5
-#define MENUITEM_TOOLBAR_CLOSE 6
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/resource.hxx b/framework/inc/classes/resource.hxx
new file mode 100644
index 000000000000..a9f98e607baa
--- /dev/null
+++ b/framework/inc/classes/resource.hxx
@@ -0,0 +1,32 @@
+/* -*- 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_FRAMEWORK_INC_CLASSES_RESOURCE_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_RESOURCE_HXX
+
+#define MENUITEM_TOOLBAR_VISIBLEBUTTON 1
+#define MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR 2
+#define MENUITEM_TOOLBAR_DOCKTOOLBAR 3
+#define MENUITEM_TOOLBAR_DOCKALLTOOLBAR 4
+#define MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION 5
+#define MENUITEM_TOOLBAR_CLOSE 6
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/pch/precompiled_fwe.hxx b/framework/inc/pch/precompiled_fwe.hxx
index 984b6266f5ab..86fb2645b5ff 100644
--- a/framework/inc/pch/precompiled_fwe.hxx
+++ b/framework/inc/pch/precompiled_fwe.hxx
@@ -206,7 +206,6 @@
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/typed_flags_set.hxx>
-#include <rsc/rsc-vcl-shared-types.hxx>
#include <tools/color.hxx>
#include <tools/debug.hxx>
#include <vcl/errinf.hxx>
@@ -218,7 +217,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resid.hxx>
#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
diff --git a/framework/inc/pch/precompiled_fwi.hxx b/framework/inc/pch/precompiled_fwi.hxx
index 05a4cac9e5c8..724aa721cc42 100644
--- a/framework/inc/pch/precompiled_fwi.hxx
+++ b/framework/inc/pch/precompiled_fwi.hxx
@@ -147,7 +147,6 @@
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/typed_flags_set.hxx>
-#include <rsc/rsc-vcl-shared-types.hxx>
#include <tools/color.hxx>
#include <tools/debug.hxx>
#include <vcl/errinf.hxx>
@@ -157,7 +156,6 @@
#include <tools/link.hxx>
#include <tools/mapunit.hxx>
#include <tools/ref.hxx>
-#include <tools/resid.hxx>
#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx
index 5863dbf7d55e..900e1b3c75da 100644
--- a/framework/inc/pch/precompiled_fwk.hxx
+++ b/framework/inc/pch/precompiled_fwk.hxx
@@ -319,7 +319,6 @@
#include <macros/xtypeprovider.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/typed_flags_set.hxx>
-#include <rsc/rsc-vcl-shared-types.hxx>
#include <svl/svldllapi.h>
#include <svtools/miscopt.hxx>
#include <svtools/svtdllapi.h>
@@ -343,7 +342,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resid.hxx>
#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
diff --git a/framework/inc/pch/precompiled_fwl.hxx b/framework/inc/pch/precompiled_fwl.hxx
index 62f2594a632e..2f59e411a3f8 100644
--- a/framework/inc/pch/precompiled_fwl.hxx
+++ b/framework/inc/pch/precompiled_fwl.hxx
@@ -305,7 +305,6 @@
#include <macros/xtypeprovider.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/typed_flags_set.hxx>
-#include <rsc/rsc-vcl-shared-types.hxx>
#include <svl/svldllapi.h>
#include <svtools/popupmenucontrollerbase.hxx>
#include <svtools/svtdllapi.h>
@@ -326,7 +325,6 @@
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/resid.hxx>
#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
diff --git a/framework/inc/strings.hrc b/framework/inc/strings.hrc
new file mode 100644
index 000000000000..5a1cdea24093
--- /dev/null
+++ b/framework/inc/strings.hrc
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_FRAMEWORK_INC_STRINGS_HRC
+#define INCLUDED_FRAMEWORK_INC_STRINGS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+#define STR_MENU_HEADFOOTALL NC_("STR_MENU_HEADFOOTALL", "All" )
+#define STR_UPDATEDOC NC_("STR_UPDATEDOC", "~Update" )
+#define STR_CLOSEDOC_ANDRETURN NC_("STR_CLOSEDOC_ANDRETURN", "~Close & Return to " )
+#define STR_TOOLBAR_VISIBLE_BUTTONS NC_("STR_TOOLBAR_VISIBLE_BUTTONS", "Visible ~Buttons")
+#define STR_TOOLBAR_CUSTOMIZE_TOOLBAR NC_("STR_TOOLBAR_CUSTOMIZE_TOOLBAR", "~Customize Toolbar...")
+#define STR_TOOLBAR_DOCK_TOOLBAR NC_("STR_TOOLBAR_DOCK_TOOLBAR", "~Dock Toolbar" )
+#define STR_TOOLBAR_DOCK_ALL_TOOLBARS NC_("STR_TOOLBAR_DOCK_ALL_TOOLBARS", "Dock ~All Toolbars" )
+#define STR_TOOLBAR_LOCK_TOOLBAR NC_("STR_TOOLBAR_LOCK_TOOLBAR", "~Lock Toolbar Position" )
+#define STR_TOOLBAR_CLOSE_TOOLBAR NC_("STR_TOOLBAR_CLOSE_TOOLBAR", "Close ~Toolbar" )
+#define STR_SAVECOPYDOC NC_("STR_SAVECOPYDOC", "Save Copy ~as..." )
+#define STR_NODOCUMENT NC_("STR_NODOCUMENT", "No Documents")
+#define STR_CLEAR_RECENT_FILES NC_("STR_CLEAR_RECENT_FILES", "Clear List")
+#define STR_CLEAR_RECENT_FILES_HELP NC_("STR_CLEAR_RECENT_FILES_HELP", "Clears the list with the most recently opened files. This action can not be undone.")
+#define STR_REMOTE_TITLE NC_("STR_REMOTE_TITLE", " (Remote)")
+#define STR_SAFEMODE_TITLE NC_("STR_SAFEMODE_TITLE", " (Safe Mode)")
+#define STR_TOOLBAR_TITLE_ADDON NC_("STR_TOOLBAR_TITLE_ADDON", "Add-On %num%")
+#define STR_FULL_DISC_RETRY_BUTTON NC_("STR_FULL_DISC_RETRY_BUTTON", "Retry" )
+#define STR_FULL_DISC_MSG NC_("STR_FULL_DISC_MSG", "%PRODUCTNAME could not save important internal information due to insufficient free disk space at the following location:\n%PATH\n\nYou will not be able to continue working with %PRODUCTNAME without allocating more free disk space at that location.\n\nPress the 'Retry' button after you have allocated more free disk space to retry saving the data.\n\n" )
+#define STR_RESTORE_TOOLBARS NC_("STR_RESTORE_TOOLBARS", "~Reset" )
+#define STR_CORRUPT_UICFG_SHARE NC_("STR_CORRUPT_UICFG_SHARE", "An error occurred while loading the user interface configuration data. The application will be terminated now.\nPlease try to reinstall the application." )
+#define STR_CORRUPT_UICFG_USER NC_("STR_CORRUPT_UICFG_USER", "An error occurred while loading the user interface configuration data. The application will be terminated now.\nPlease try to remove your user profile for the application." )
+#define STR_CORRUPT_UICFG_GENERAL NC_("STR_CORRUPT_UICFG_GENERAL", "An error occurred while loading the user interface configuration data. The application will be terminated now.\nPlease try to remove your user profile for the application first or try to reinstall the application." )
+#define STR_UNTITLED_DOCUMENT NC_("STR_UNTITLED_DOCUMENT", "Untitled" )
+// To translators: for displaying 'Multiple Languages' in the language statusbar control
+#define STR_LANGSTATUS_MULTIPLE_LANGUAGES NC_("STR_LANGSTATUS_MULTIPLE_LANGUAGES", "Multiple Languages" )
+#define STR_LANGSTATUS_NONE NC_("STR_LANGSTATUS_NONE", "None (Do not check spelling)" )
+#define STR_RESET_TO_DEFAULT_LANGUAGE NC_("STR_RESET_TO_DEFAULT_LANGUAGE", "Reset to Default Language" )
+#define STR_LANGSTATUS_MORE NC_("STR_LANGSTATUS_MORE", "More..." )
+#define STR_SET_LANGUAGE_FOR_PARAGRAPH NC_("STR_SET_LANGUAGE_FOR_PARAGRAPH", "Set Language for Paragraph" )
+#define STR_LANGSTATUS_HINT NC_("STR_LANGSTATUS_HINT", "Text Language. Right-click to set character or paragraph language" )
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index f1126d7c2afd..22519dff34f8 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -21,7 +21,7 @@
#include <classes/fwkresid.hxx>
-#include "classes/resource.hrc"
+#include "strings.hrc"
#include <services.h>
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
deleted file mode 100644
index 62e7b616b6ff..000000000000
--- a/framework/source/classes/resource.src
+++ /dev/null
@@ -1,168 +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 <classes/resource.hrc>
-
-String STR_MENU_HEADFOOTALL
-{
- Text [ en-US ] = "All" ;
-};
-
-String STR_UPDATEDOC
-{
- Text [ en-US ] = "~Update" ;
-};
-
-String STR_CLOSEDOC_ANDRETURN
-{
- Text [ en-US ] = "~Close & Return to " ;
-};
-
-String STR_TOOLBAR_VISIBLE_BUTTONS
-{
- Text[ en-US ] = "Visible ~Buttons";
-};
-
-String STR_TOOLBAR_CUSTOMIZE_TOOLBAR
-{
- Text[ en-US ] = "~Customize Toolbar...";
-};
-
-String STR_TOOLBAR_DOCK_TOOLBAR
-{
- Text[ en-US ] = "~Dock Toolbar" ;
-};
-
-String STR_TOOLBAR_DOCK_ALL_TOOLBARS
-{
- Text[ en-US ] = "Dock ~All Toolbars" ;
-};
-
-String STR_TOOLBAR_LOCK_TOOLBAR
-{
- Text[ en-US ] = "~Lock Toolbar Position" ;
-};
-
-String STR_TOOLBAR_CLOSE_TOOLBAR
-{
- Text[ en-US ] = "Close ~Toolbar" ;
-};
-
-String STR_SAVECOPYDOC
-{
- Text [ en-US ] = "Save Copy ~as..." ;
-};
-
-String STR_NODOCUMENT
-{
- Text [ en-US ] = "No Documents";
-};
-
-String STR_CLEAR_RECENT_FILES
-{
- Text [ en-US ] = "Clear List";
-};
-
-String STR_CLEAR_RECENT_FILES_HELP
-{
- Text [ en-US ] = "Clears the list with the most recently opened files. This action can not be undone.";
-};
-
-String STR_REMOTE_TITLE
-{
- Text [ en-US ] = " (Remote)";
-};
-
-String STR_SAFEMODE_TITLE
-{
- Text [ en-US ] = " (Safe Mode)";
-};
-
-String STR_TOOLBAR_TITLE_ADDON
-{
- Text [ en-US ] = "Add-On %num%";
-};
-
-String STR_FULL_DISC_RETRY_BUTTON
-{
- Text [ en-US ] = "Retry" ;
-};
-
-String STR_FULL_DISC_MSG
-{
- Text [ en-US ] = "%PRODUCTNAME could not save important internal information due to insufficient free disk space at the following location:\n%PATH\n\nYou will not be able to continue working with %PRODUCTNAME without allocating more free disk space at that location.\n\nPress the 'Retry' button after you have allocated more free disk space to retry saving the data.\n\n" ;
-};
-
-String STR_RESTORE_TOOLBARS
-{
- Text [ en-US ] = "~Reset" ;
-};
-
-String STR_CORRUPT_UICFG_SHARE
-{
- Text [ en-US ] = "An error occurred while loading the user interface configuration data. The application will be terminated now.\nPlease try to reinstall the application." ;
-};
-
-String STR_CORRUPT_UICFG_USER
-{
- Text [ en-US ] = "An error occurred while loading the user interface configuration data. The application will be terminated now.\nPlease try to remove your user profile for the application." ;
-};
-
-String STR_CORRUPT_UICFG_GENERAL
-{
- Text [ en-US ] = "An error occurred while loading the user interface configuration data. The application will be terminated now.\nPlease try to remove your user profile for the application first or try to reinstall the application." ;
-};
-
-String STR_UNTITLED_DOCUMENT
-{
- Text [ en-US ] = "Untitled" ;
-};
-
-// for displaying 'Multiple Languages' in the language statusbar control
-String STR_LANGSTATUS_MULTIPLE_LANGUAGES
-{
- Text [ en-US ] = "Multiple Languages" ;
-};
-
-String STR_LANGSTATUS_NONE
-{
- Text [ en-US ] = "None (Do not check spelling)" ;
-};
-
-String STR_RESET_TO_DEFAULT_LANGUAGE
-{
- Text [ en-US ] = "Reset to Default Language" ;
-};
-
-String STR_LANGSTATUS_MORE
-{
- Text [ en-US ] = "More..." ;
-};
-
-String STR_SET_LANGUAGE_FOR_PARAGRAPH
-{
- Text [ en-US ] = "Set Language for Paragraph" ;
-};
-
-String STR_LANGSTATUS_HINT
-{
- Text [ en-US ] = "Text Language. Right-click to set character or paragraph language" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/fwe/classes/fwkresid.cxx b/framework/source/fwe/classes/fwkresid.cxx
index e9a2998629fd..8ed6c1dbb5e5 100644
--- a/framework/source/fwe/classes/fwkresid.cxx
+++ b/framework/source/fwe/classes/fwkresid.cxx
@@ -24,27 +24,24 @@
#include <rtl/strbuf.hxx>
-namespace framework
+namespace
{
-
-ResMgr* FwkResId::GetResManager()
-{
- static ResMgr* pResMgr = nullptr;
-
- if ( !pResMgr )
+ const std::locale& GetResLocale()
{
- SolarMutexGuard aSolarGuard;
- pResMgr = ResMgr::CreateResMgr("fwe", Application::GetSettings().GetUILanguageTag());
+ static std::locale* pResLocale = nullptr;
+ if (!pResLocale)
+ {
+ SolarMutexGuard aSolarGuard;
+ static std::locale loc(Translate::Create("fwe", Application::GetSettings().GetUILanguageTag()));
+ pResLocale = &loc;
+ }
+ return *pResLocale;
}
-
- return pResMgr;
}
-FwkResId::FwkResId( sal_uInt16 nId ) :
- ResId( nId, *FwkResId::GetResManager() )
+OUString FwkResId(const char* pId)
{
-}
-
+ return Translate::get(pId, GetResLocale());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index 63fbd191299d..b6f521bfeea9 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -19,7 +19,7 @@
#include <framework/titlehelper.hxx>
#include <classes/fwkresid.hxx>
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <services.h>
#include <properties.h>
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index bbf91371e89e..373b2c73e159 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -27,7 +27,7 @@
#include <uielement/menubarwrapper.hxx>
#include <framework/addonsoptions.hxx>
#include <classes/fwkresid.hxx>
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <toolkit/helper/convert.hxx>
#include <uielement/progressbarwrapper.hxx>
#include <uiconfiguration/globalsettings.hxx>
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index d39bb3e90bac..a20435405741 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -23,7 +23,7 @@
#include "helpers.hxx"
#include <services.h>
#include <services/layoutmanager.hxx>
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <com/sun/star/awt/PosSize.hpp>
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index fc33349faebc..b265d616fe1e 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -24,7 +24,7 @@
#include <loadenv/targethelper.hxx>
#include <pattern/frame.hxx>
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <protocols.h>
#include <properties.h>
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 090c109318d6..f727fbe3f576 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -32,7 +32,7 @@
#include <general.h>
#include <properties.h>
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index f497ea01826e..211c9f9e27b3 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -24,7 +24,8 @@
#include "services.h"
#include <framework/sfxhelperfunctions.hxx>
#include <classes/fwkresid.hxx>
-#include <classes/resource.hrc>
+#include <classes/resource.hxx>
+#include <strings.hrc>
#include <framework/addonsoptions.hxx>
#include <uielement/comboboxtoolbarcontroller.hxx>
#include <uielement/imagebuttontoolbarcontroller.hxx>
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 5cd2984fad64..5831e5112ee6 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -37,7 +37,6 @@
#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
#include <svl/solar.hrc>
-#include <tools/rcid.h>
#include <vcl/image.hxx>
#include <svtools/menuoptions.hxx>
#include <svtools/popupmenucontrollerbase.hxx>
diff --git a/framework/source/uielement/footermenucontroller.cxx b/framework/source/uielement/footermenucontroller.cxx
index d139475079bf..0d8ffad400b7 100644
--- a/framework/source/uielement/footermenucontroller.cxx
+++ b/framework/source/uielement/footermenucontroller.cxx
@@ -20,7 +20,7 @@
#include <uielement/footermenucontroller.hxx>
#include "services.h"
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <com/sun/star/awt/XDevice.hpp>
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 886bee4fcf83..6a8dedac82fb 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -35,7 +35,7 @@
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
#include <tools/urlobj.hxx>
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <framework/menuconfiguration.hxx>
#include <uielement/menubarmanager.hxx>
diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx
index 41bf068c7047..3f086d15c337 100644
--- a/framework/source/uielement/headermenucontroller.cxx
+++ b/framework/source/uielement/headermenucontroller.cxx
@@ -21,7 +21,7 @@
#include "services.h"
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <com/sun/star/awt/XDevice.hpp>
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index 701bdf1902da..e659d5edb5de 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -40,7 +40,7 @@
#include <svtools/langtab.hxx>
#include <classes/fwkresid.hxx>
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include "helper/mischelper.hxx"
#include <osl/mutex.hxx>
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index 6f3daabb5109..e59c32eca8ae 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -19,7 +19,7 @@
#include <classes/fwkresid.hxx>
#include <services.h>
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/status.hxx>
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 7b54f2aaa911..0f3d972eb776 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -20,7 +20,7 @@
#include <uielement/macrosmenucontroller.hxx>
#include <uielement/menubarmanager.hxx>
#include "services.h"
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <com/sun/star/awt/MenuItemStyle.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 0b82b567c855..4c2c5c79ff54 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -25,7 +25,7 @@
#include <classes/fwkresid.hxx>
#include <helper/mischelper.hxx>
#include <framework/menuextensionsupplier.hxx>
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <services.h>
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index adb39d870bf6..d774fecc0ecf 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -20,7 +20,7 @@
#include <uielement/newmenucontroller.hxx>
#include "services.h"
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <com/sun/star/awt/XDevice.hpp>
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 806af7cfbc16..202f3fa85dc8 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include "bitmaps.hlst"
#include <classes/fwkresid.hxx>
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 6d3f2deafb5c..763862240844 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -37,7 +37,6 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::frame;
using namespace com::sun::star::beans;
using namespace com::sun::star::util;
-using namespace framework;
#define MAX_MENU_ITEMS 99
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index ae92672d40ec..856c3916f5d9 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -29,7 +29,8 @@
#include "properties.h"
#include <framework/sfxhelperfunctions.hxx>
#include <classes/fwkresid.hxx>
-#include <classes/resource.hrc>
+#include <classes/resource.hxx>
+#include <strings.hrc>
#include <framework/addonsoptions.hxx>
#include <uielement/toolbarmerger.hxx>
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 1b5c451af138..35f12c14d9ad 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -22,7 +22,7 @@
#include <algorithm>
#include "services.h"
-#include <classes/resource.hrc>
+#include <strings.hrc>
#include <classes/fwkresid.hxx>
#include <framework/sfxhelperfunctions.hxx>
#include <uiconfiguration/windowstateproperties.hxx>