summaryrefslogtreecommitdiff
path: root/vcl/inc
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 /vcl/inc
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 'vcl/inc')
-rw-r--r--vcl/inc/pch/precompiled_vcl.hxx2
-rw-r--r--vcl/inc/print.hrc70
-rw-r--r--vcl/inc/printaccessoryview.hrc36
-rw-r--r--vcl/inc/strings.hrc143
-rw-r--r--vcl/inc/strings.hxx17
-rw-r--r--vcl/inc/svdata.hxx8
-rw-r--r--vcl/inc/svids.hrc140
-rw-r--r--vcl/inc/units.hrc58
8 files changed, 328 insertions, 146 deletions
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index f51afc873b91..e70c049faf0a 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -266,7 +266,6 @@
#include <opengl/texture.hxx>
#include <opengl/zone.hxx>
#include <outdata.hxx>
-#include <rsc/rsc-vcl-shared-types.hxx>
#include <svdata.hxx>
#include <svl/hint.hxx>
#include <svl/svldllapi.h>
@@ -282,7 +281,6 @@
#include <tools/link.hxx>
#include <tools/mapunit.hxx>
#include <tools/poly.hxx>
-#include <tools/resid.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
diff --git a/vcl/inc/print.hrc b/vcl/inc/print.hrc
new file mode 100644
index 000000000000..b1b3d47c7be3
--- /dev/null
+++ b/vcl/inc/print.hrc
@@ -0,0 +1,70 @@
+/* -*- 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_VCL_INC_PRINT_HRC
+#define INCLUDED_VCL_INC_PRINT_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+const char* RID_STR_PAPERNAMES[] =
+{
+ // To translators: This is the first entry of a sequence of paper size names
+ NC_("RID_STR_PAPERNAMES", "A0"),
+ NC_("RID_STR_PAPERNAMES", "A1"),
+ NC_("RID_STR_PAPERNAMES", "A2"),
+ NC_("RID_STR_PAPERNAMES", "A3"),
+ NC_("RID_STR_PAPERNAMES", "A4"),
+ NC_("RID_STR_PAPERNAMES", "A5"),
+ NC_("RID_STR_PAPERNAMES", "B4 (ISO)"),
+ NC_("RID_STR_PAPERNAMES", "B5 (ISO)"),
+ NC_("RID_STR_PAPERNAMES", "Letter"),
+ NC_("RID_STR_PAPERNAMES", "Legal"),
+ NC_("RID_STR_PAPERNAMES", "Tabloid"),
+ NC_("RID_STR_PAPERNAMES", "User Defined"),
+ NC_("RID_STR_PAPERNAMES", "B6 (ISO)"),
+ NC_("RID_STR_PAPERNAMES", "C4 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "C5 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "C6 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "C6/5 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "DL Envelope"),
+ NC_("RID_STR_PAPERNAMES", "Dia Slide"),
+ NC_("RID_STR_PAPERNAMES", "C"),
+ NC_("RID_STR_PAPERNAMES", "D"),
+ NC_("RID_STR_PAPERNAMES", "E"),
+ NC_("RID_STR_PAPERNAMES", "Executive"),
+ NC_("RID_STR_PAPERNAMES", "Long Bond"),
+ NC_("RID_STR_PAPERNAMES", "#8 (Monarch) Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#6 3/4 (Personal) Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#9 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#10 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#11 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "#12 Envelope"),
+ NC_("RID_STR_PAPERNAMES", "16 Kai"),
+ NC_("RID_STR_PAPERNAMES", "32 Kai"),
+ NC_("RID_STR_PAPERNAMES", "Big 32 Kai"),
+ NC_("RID_STR_PAPERNAMES", "B4 (JIS)"),
+ NC_("RID_STR_PAPERNAMES", "B5 (JIS)"),
+ NC_("RID_STR_PAPERNAMES", "B6 (JIS)"),
+ // To translators: This is the last entry of the sequence of paper size names
+ NC_("RID_STR_PAPERNAMES", "Japanese Postcard")
+};
+
+#endif // INCLUDED_VCL_INC_PRINT_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/printaccessoryview.hrc b/vcl/inc/printaccessoryview.hrc
new file mode 100644
index 000000000000..e47ac03eb5cc
--- /dev/null
+++ b/vcl/inc/printaccessoryview.hrc
@@ -0,0 +1,36 @@
+/* -*- 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_VCL_INC_PRINTACCESSORYVIEW_HRC
+#define INCLUDED_VCL_INC_PRINTACCESSORYVIEW_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+const char* SV_PRINT_NATIVE_STRINGS[] =
+{
+ NC_("SV_PRINT_NATIVE_STRINGS", "Preview"),
+ NC_("SV_PRINT_NATIVE_STRINGS", "Page number"),
+ NC_("SV_PRINT_NATIVE_STRINGS", "Number of pages"),
+ NC_("SV_PRINT_NATIVE_STRINGS", "More"),
+ NC_("SV_PRINT_NATIVE_STRINGS", "Print selection only")
+};
+
+#endif // INCLUDED_VCL_INC_PRINTACCESSORYVIEW_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/strings.hrc b/vcl/inc/strings.hrc
new file mode 100644
index 000000000000..cd2f31c1da13
--- /dev/null
+++ b/vcl/inc/strings.hrc
@@ -0,0 +1,143 @@
+/* -*- 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_VCL_INC_STRINGS_HRC
+#define INCLUDED_VCL_INC_STRINGS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+#define SV_RESID_STRING_NOSELECTIONPOSSIBLE NC_("SV_RESID_STRING_NOSELECTIONPOSSIBLE", "<No selection possible>")
+
+#define SV_MENU_MAC_SERVICES NC_("SV_MENU_MAC_SERVICES", "Services")
+#define SV_MENU_MAC_HIDEAPP NC_("SV_MENU_MAC_HIDEAPP", "Hide %PRODUCTNAME")
+#define SV_MENU_MAC_HIDEALL NC_("SV_MENU_MAC_HIDEALL", "Hide Others")
+#define SV_MENU_MAC_SHOWALL NC_("SV_MENU_MAC_SHOWALL", "Show All")
+#define SV_MENU_MAC_QUITAPP NC_("SV_MENU_MAC_QUITAPP", "Quit %PRODUCTNAME")
+
+#define SV_HELPTEXT_CLOSE NC_("SV_HELPTEXT_CLOSE", "Close")
+#define SV_HELPTEXT_MINIMIZE NC_("SV_HELPTEXT_MINIMIZE", "Minimize")
+#define SV_HELPTEXT_MAXIMIZE NC_("SV_HELPTEXT_MAXIMIZE", "Maximize")
+#define SV_HELPTEXT_RESTORE NC_("SV_HELPTEXT_RESTORE", "Restore")
+#define SV_HELPTEXT_ROLLDOWN NC_("SV_HELPTEXT_ROLLDOWN", "Drop down")
+#define SV_HELPTEXT_ROLLUP NC_("SV_HELPTEXT_ROLLUP", "Roll up")
+#define SV_HELPTEXT_HELP NC_("SV_HELPTEXT_HELP", "Help")
+#define SV_HELPTEXT_SCREENSHOT NC_("SV_HELPTEXT_SCREENSHOT", "Take and annotate a screenshot")
+#define SV_HELPTEXT_FADEIN NC_("SV_HELPTEXT_FADEIN", "Show")
+#define SV_HELPTEXT_FADEOUT NC_("SV_HELPTEXT_FADEOUT", "Hide")
+#define SV_HELPTEXT_CLOSEDOCUMENT NC_("SV_HELPTEXT_CLOSEDOCUMENT", "Close Document")
+
+// To translators: This is used on buttons for platforms other than windows, there should be a ~ mnemonic in this string
+#define SV_BUTTONTEXT_OK NC_("SV_BUTTONTEXT_OK", "~OK")
+// To translators: This is used on buttons for platforms other than windows, there should be a ~ mnemonic in this string
+#define SV_BUTTONTEXT_CANCEL NC_("SV_BUTTONTEXT_CANCEL", "~Cancel")
+// To translators: This is used on buttons for Windows, there should be no ~ mnemonic in this string
+#define SV_BUTTONTEXT_OK_NOMNEMONIC NC_("SV_BUTTONTEXT_OK_NOMNEMONIC", "OK")
+// To translators: This is used on buttons for Windows, there should be no ~ mnemonic in this string
+#define SV_BUTTONTEXT_CANCEL_NOMNEMONIC NC_("SV_BUTTONTEXT_CANCEL_NOMNEMONIC", "Cancel")
+#define SV_BUTTONTEXT_YES NC_("SV_BUTTONTEXT_YES", "~Yes")
+#define SV_BUTTONTEXT_NO NC_("SV_BUTTONTEXT_NO", "~No")
+#define SV_BUTTONTEXT_RETRY NC_("SV_BUTTONTEXT_RETRY", "~Retry")
+#define SV_BUTTONTEXT_HELP NC_("SV_BUTTONTEXT_HELP", "~Help")
+#define SV_BUTTONTEXT_CLOSE NC_("SV_BUTTONTEXT_CLOSE", "~Close")
+#define SV_BUTTONTEXT_MORE NC_("SV_BUTTONTEXT_MORE", "~More")
+#define SV_BUTTONTEXT_IGNORE NC_("SV_BUTTONTEXT_IGNORE", "~Ignore")
+#define SV_BUTTONTEXT_ABORT NC_("SV_BUTTONTEXT_ABORT", "~Abort")
+#define SV_BUTTONTEXT_LESS NC_("SV_BUTTONTEXT_LESS", "~Less")
+#define SV_BUTTONTEXT_RESET NC_("SV_BUTTONTEXT_RESET", "R~eset")
+#define SV_BUTTONTEXT_ADD NC_("SV_BUTTONTEXT_ADD", "~Add")
+#define SV_BUTTONTEXT_DELETE NC_("SV_BUTTONTEXT_DELETE", "~Delete")
+#define SV_BUTTONTEXT_REMOVE NC_("SV_BUTTONTEXT_REMOVE", "~Remove")
+#define SV_BUTTONTEXT_NEW NC_("SV_BUTTONTEXT_NEW", "~New")
+#define SV_BUTTONTEXT_EDIT NC_("SV_BUTTONTEXT_EDIT", "~Edit")
+#define SV_BUTTONTEXT_APPLY NC_("SV_BUTTONTEXT_APPLY", "~Apply")
+#define SV_BUTTONTEXT_SAVE NC_("SV_BUTTONTEXT_SAVE", "~Save")
+#define SV_BUTTONTEXT_UNDO NC_("SV_BUTTONTEXT_UNDO", "~Undo")
+#define SV_BUTTONTEXT_PASTE NC_("SV_BUTTONTEXT_PASTE", "~Paste")
+#define SV_BUTTONTEXT_NEXT NC_("SV_BUTTONTEXT_NEXT", "~Next")
+#define SV_BUTTONTEXT_GO_UP NC_("SV_BUTTONTEXT_GO_UP", "~Up")
+#define SV_BUTTONTEXT_GO_DOWN NC_("SV_BUTTONTEXT_GO_DOWN", "Do~wn")
+#define SV_BUTTONTEXT_CLEAR NC_("SV_BUTTONTEXT_CLEAR", "~Clear")
+#define SV_BUTTONTEXT_OPEN NC_("SV_BUTTONTEXT_OPEN", "~Open")
+#define SV_BUTTONTEXT_PLAY NC_("SV_BUTTONTEXT_PLAY", "~Play")
+#define SV_BUTTONTEXT_FIND NC_("SV_BUTTONTEXT_FIND", "~Find")
+#define SV_BUTTONTEXT_STOP NC_("SV_BUTTONTEXT_STOP", "~Stop")
+#define SV_BUTTONTEXT_CONNECT NC_("SV_BUTTONTEXT_CONNECT", "C~onnect")
+#define SV_BUTTONTEXT_SCREENSHOT NC_("SV_BUTTONTEXT_SCREENSHOT", "~Screenshot")
+
+#define SV_STDTEXT_SERVICENOTAVAILABLE NC_("SV_STDTEXT_SERVICENOTAVAILABLE", "The component (%s) could not be loaded.\nPlease start setup with the repair option.")
+
+#define SV_STDTEXT_DONTASKAGAIN NC_("SV_STDTEXT_DONTASKAGAIN", "Do not show this question again.")
+#define SV_STDTEXT_DONTWARNAGAIN NC_("SV_STDTEXT_DONTWARNAGAIN", "Do not show warning again.")
+
+#define SV_STDTEXT_ABOUT NC_("SV_STDTEXT_ABOUT", "About %PRODUCTNAME")
+#define SV_STDTEXT_PREFERENCES NC_("SV_STDTEXT_PREFERENCES", "Preferences...")
+#define SV_STDTEXT_ALLFILETYPES NC_("SV_STDTEXT_ALLFILETYPES", "Any type")
+
+#define STR_FPICKER_AUTO_EXTENSION NC_("STR_FPICKER_AUTO_EXTENSION", "~Automatic file name extension")
+#define STR_FPICKER_PASSWORD NC_("STR_FPICKER_PASSWORD", "Save with pass~word")
+#define STR_FPICKER_FILTER_OPTIONS NC_("STR_FPICKER_FILTER_OPTIONS", "~Edit filter settings")
+#define STR_FPICKER_READONLY NC_("STR_FPICKER_READONLY", "~Read-only")
+#define STR_FPICKER_INSERT_AS_LINK NC_("STR_FPICKER_INSERT_AS_LINK", "Insert as ~Link")
+#define STR_FPICKER_SHOW_PREVIEW NC_("STR_FPICKER_SHOW_PREVIEW", "Pr~eview")
+#define STR_FPICKER_PLAY NC_("STR_FPICKER_PLAY", "~Play")
+#define STR_FPICKER_VERSION NC_("STR_FPICKER_VERSION", "~Version:")
+#define STR_FPICKER_TEMPLATES NC_("STR_FPICKER_TEMPLATES", "S~tyles:")
+#define STR_FPICKER_IMAGE_TEMPLATE NC_("STR_FPICKER_IMAGE_TEMPLATE", "Frame Style: ")
+#define STR_FPICKER_SELECTION NC_("STR_FPICKER_SELECTION", "~Selection")
+#define STR_FPICKER_FOLDER_DEFAULT_TITLE NC_("STR_FPICKER_FOLDER_DEFAULT_TITLE", "Select Path")
+#define STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION NC_("STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION", "Please select a folder.")
+#define STR_FPICKER_ALREADYEXISTOVERWRITE_PRIMARY NC_("STR_FPICKER_ALREADYEXISTOVERWRITE_PRIMARY", "A file named \"$filename$\" already exists. Do you want to replace it?")
+#define STR_FPICKER_ALREADYEXISTOVERWRITE_SECONDARY NC_("STR_FPICKER_ALREADYEXISTOVERWRITE_SECONDARY", "The file already exists in \"$dirname$\". Replacing it will overwrite its contents.")
+#define STR_FPICKER_ALLFORMATS NC_("STR_FPICKER_ALLFORMATS", "All Formats")
+#define STR_FPICKER_OPEN NC_("STR_FPICKER_OPEN", "Open")
+#define STR_FPICKER_SAVE NC_("STR_FPICKER_SAVE", "Save")
+#define STR_FPICKER_TYPE NC_("STR_FPICKER_TYPE", "File ~type")
+
+#define SV_ACCESSERROR_NO_FONTS NC_("SV_ACCESSERROR_NO_FONTS", "No fonts could be found on the system.")
+
+#define SV_PRINT_NOPAGES NC_("SV_PRINT_NOPAGES", "No pages")
+#define SV_PRINT_TOFILE_TXT NC_("SV_PRINT_TOFILE_TXT", "Print to File...")
+#define SV_PRINT_DEFPRT_TXT NC_("SV_PRINT_DEFPRT_TXT", "Default printer")
+#define SV_PRINT_PRINTPREVIEW_TXT NC_("SV_PRINT_PRINTPREVIEW_TXT", "Print preview")
+#define SV_PRINT_QUERYFAXNUMBER_TXT NC_("SV_PRINT_QUERYFAXNUMBER_TXT", "Please enter the fax number")
+#define SV_PRINT_INVALID_TXT NC_("SV_PRINT_INVALID_TXT", "<ignore>")
+#define SV_PRINT_CUSTOM_TXT NC_("SV_PRINT_CUSTOM_TXT", "Custom")
+
+#define SV_EDIT_WARNING_STR NC_("SV_EDIT_WARNING_STR", "The inserted text exceeded the maximum length of this text field. The text was truncated.")
+
+#define SV_APP_CPUTHREADS NC_("SV_APP_CPUTHREADS", "CPU threads: ")
+#define SV_APP_OSVERSION NC_("SV_APP_OSVERSION", "OS: ")
+#define SV_APP_UIRENDER NC_("SV_APP_UIRENDER", "UI render: ")
+#define SV_APP_GL NC_("SV_APP_GL", "GL")
+#define SV_APP_DEFAULT NC_("SV_APP_DEFAULT", "default")
+
+#define SV_MSGBOX_INFO NC_("SV_MSGBOX_INFO", "Information")
+#define SV_MSGBOX_WARNING NC_("SV_MSGBOX_WARNING", "Warning")
+#define SV_MSGBOX_ERROR NC_("SV_MSGBOX_ERROR", "Error")
+#define SV_MSGBOX_QUERY NC_("SV_MSGBOX_QUERY", "Confirmation")
+
+#define STR_TEXTUNDO_DELPARA NC_("STR_TEXTUNDO_DELPARA", "delete line")
+#define STR_TEXTUNDO_CONNECTPARAS NC_("STR_TEXTUNDO_CONNECTPARAS", "delete multiple lines")
+#define STR_TEXTUNDO_SPLITPARA NC_("STR_TEXTUNDO_SPLITPARA", "insert multiple lines")
+#define STR_TEXTUNDO_INSERTCHARS NC_("STR_TEXTUNDO_INSERTCHARS", "insert '$1'")
+#define STR_TEXTUNDO_REMOVECHARS NC_("STR_TEXTUNDO_REMOVECHARS", "delete '$1'")
+
+#endif // INCLUDED_VCL_INC_STRINGS_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/strings.hxx b/vcl/inc/strings.hxx
new file mode 100644
index 000000000000..45e9b2af4310
--- /dev/null
+++ b/vcl/inc/strings.hxx
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_VCL_INC_STRINGS_HXX
+#define INCLUDED_VCL_INC_STRINGS_HXX
+
+#define SV_APP_VCLBACKEND "VCL: "
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 8c07cf9ffff1..3501d2c25d45 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -48,7 +48,6 @@ struct ImplHotKey;
struct ImplEventHook;
struct ImplSchedulerData;
class Point;
-class ResMgr;
class ImplAccelManager;
class PhysicalFontCollection;
class ImplFontCache;
@@ -337,7 +336,8 @@ struct ImplSVData
bool mbDeInit = false; // Is VCL deinitializing
SalI18NImeStatus* mpImeStatus = nullptr; // interface to ime status window
SalSystem* mpSalSystem = nullptr; // SalSystem interface
- ResMgr* mpResMgr = nullptr; // SV-Resource-Manager
+ bool mbResLocaleSet = false; // SV-Resource-Manager
+ std::locale maResLocale; // Resource locale
ImplSchedulerContext maSchedCtx; // indepen data for class Scheduler
ImplSVAppData maAppData; // indepen data for class Application
ImplSVGDIData maGDIData; // indepen data for Output classes
@@ -364,8 +364,8 @@ struct ImplSVData
void ImplDeInitSVData();
VCL_PLUGIN_PUBLIC vcl::Window* ImplGetDefaultWindow();
VCL_PLUGIN_PUBLIC vcl::Window* ImplGetDefaultContextWindow();
-VCL_PLUGIN_PUBLIC ResMgr* ImplGetResMgr();
-VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr
+VCL_PLUGIN_PUBLIC const std::locale& ImplGetResLocale();
+VCL_PLUGIN_PUBLIC OUString VclResId(const char* pId);
DockingManager* ImplGetDockingManager();
BlendFrameCache* ImplGetBlendFrameCache();
diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc
deleted file mode 100644
index b4d4cca62529..000000000000
--- a/vcl/inc/svids.hrc
+++ /dev/null
@@ -1,140 +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_VCL_INC_SVIDS_HRC
-#define INCLUDED_VCL_INC_SVIDS_HRC
-
-#define RID_STR_PAPERNAMES 1080
-
-#define SV_RESID_STRING_NOSELECTIONPOSSIBLE 2001
-
-#define SV_MENU_MAC_SERVICES 2002
-#define SV_MENU_MAC_HIDEAPP 2003
-#define SV_MENU_MAC_HIDEALL 2004
-#define SV_MENU_MAC_SHOWALL 2005
-#define SV_MENU_MAC_QUITAPP 2006
-
-#define SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT 1
-#define SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE 2
-
-#define SV_PRINT_NATIVE_STRINGS 2050
-
-#define SV_HELPTEXT_CLOSE 10000
-#define SV_HELPTEXT_MINIMIZE 10001
-#define SV_HELPTEXT_MAXIMIZE 10002
-#define SV_HELPTEXT_RESTORE 10003
-#define SV_HELPTEXT_ROLLDOWN 10004
-#define SV_HELPTEXT_ROLLUP 10005
-#define SV_HELPTEXT_HELP 10006
-#define SV_HELPTEXT_SCREENSHOT 10007
-#define SV_HELPTEXT_FADEIN 10008
-#define SV_HELPTEXT_FADEOUT 10009
-#define SV_HELPTEXT_CLOSEDOCUMENT 10012
-
-#define SV_BUTTONTEXT_OK 10100
-#define SV_BUTTONTEXT_CANCEL 10101
-#define SV_BUTTONTEXT_YES 10102
-#define SV_BUTTONTEXT_NO 10103
-#define SV_BUTTONTEXT_RETRY 10104
-#define SV_BUTTONTEXT_HELP 10105
-#define SV_BUTTONTEXT_CLOSE 10106
-#define SV_BUTTONTEXT_MORE 10107
-#define SV_BUTTONTEXT_IGNORE 10108
-#define SV_BUTTONTEXT_ABORT 10109
-#define SV_BUTTONTEXT_LESS 10110
-#define SV_BUTTONTEXT_RESET 10111
-#define SV_BUTTONTEXT_ADD 10112
-#define SV_BUTTONTEXT_DELETE 10113
-#define SV_BUTTONTEXT_REMOVE 10114
-#define SV_BUTTONTEXT_NEW 10115
-#define SV_BUTTONTEXT_EDIT 10116
-#define SV_BUTTONTEXT_APPLY 10117
-#define SV_BUTTONTEXT_SAVE 10118
-#define SV_BUTTONTEXT_OK_NOMNEMONIC 10119
-#define SV_BUTTONTEXT_CANCEL_NOMNEMONIC 10120
-#define SV_BUTTONTEXT_UNDO 10121
-#define SV_BUTTONTEXT_PASTE 10122
-#define SV_BUTTONTEXT_NEXT 10123
-#define SV_BUTTONTEXT_GO_UP 10124
-#define SV_BUTTONTEXT_GO_DOWN 10125
-#define SV_BUTTONTEXT_CLEAR 10126
-#define SV_BUTTONTEXT_OPEN 10127
-#define SV_BUTTONTEXT_PLAY 10128
-#define SV_BUTTONTEXT_FIND 10129
-#define SV_BUTTONTEXT_STOP 10130
-#define SV_BUTTONTEXT_CONNECT 10131
-#define SV_BUTTONTEXT_SCREENSHOT 10132
-
-#define SV_STDTEXT_SERVICENOTAVAILABLE 10210
-
-#define SV_STDTEXT_DONTASKAGAIN 10212
-#define SV_STDTEXT_DONTWARNAGAIN 10213
-#define SV_STDTEXT_ABOUT 10214
-#define SV_STDTEXT_PREFERENCES 10215
-#define SV_STDTEXT_ALLFILETYPES 10217
-
-#define STR_FPICKER_AUTO_EXTENSION 10300
-#define STR_FPICKER_PASSWORD 10301
-#define STR_FPICKER_FILTER_OPTIONS 10302
-#define STR_FPICKER_READONLY 10303
-#define STR_FPICKER_INSERT_AS_LINK 10304
-#define STR_FPICKER_SHOW_PREVIEW 10305
-#define STR_FPICKER_PLAY 10306
-#define STR_FPICKER_VERSION 10307
-#define STR_FPICKER_TEMPLATES 10308
-#define STR_FPICKER_IMAGE_TEMPLATE 10309
-#define STR_FPICKER_SELECTION 10310
-#define STR_FPICKER_FOLDER_DEFAULT_TITLE 10311
-#define STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION 10312
-#define STR_FPICKER_ALREADYEXISTOVERWRITE_PRIMARY 10313
-#define STR_FPICKER_ALREADYEXISTOVERWRITE_SECONDARY 10314
-#define STR_FPICKER_ALLFORMATS 10315
-#define STR_FPICKER_OPEN 10316
-#define STR_FPICKER_SAVE 10317
-#define STR_FPICKER_TYPE 10318
-
-#define SV_ACCESSERROR_NO_FONTS 10510
-
-#define SV_PRINT_NOPAGES 10609
-#define SV_PRINT_TOFILE_TXT 10610
-#define SV_PRINT_DEFPRT_TXT 10611
-#define SV_PRINT_PRINTPREVIEW_TXT 10612
-#define SV_PRINT_QUERYFAXNUMBER_TXT 10615
-#define SV_PRINT_INVALID_TXT 10616
-#define SV_PRINT_CUSTOM_TXT 10617
-
-#define SV_EDIT_WARNING_STR 10650
-
-#define SV_FUNIT_STRINGS 10700
-
-#define SV_APP_CPUTHREADS 10800
-#define SV_APP_OSVERSION 10801
-#define SV_APP_UIRENDER 10802
-#define SV_APP_GL 10803
-#define SV_APP_DEFAULT 10804
-#define SV_APP_VCLBACKEND 10805
-
-#define SV_MSGBOX_INFO 10900
-#define SV_MSGBOX_WARNING 10901
-#define SV_MSGBOX_ERROR 10902
-#define SV_MSGBOX_QUERY 10903
-
-#endif // INCLUDED_VCL_INC_SVIDS_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/units.hrc b/vcl/inc/units.hrc
new file mode 100644
index 000000000000..3fc58eca0270
--- /dev/null
+++ b/vcl/inc/units.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_VCL_INC_UNITS_HRC
+#define INCLUDED_VCL_INC_UNITS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+std::pair<const char*, FieldUnit> SV_FUNIT_STRINGS[] =
+{
+ // To translators: This is the first entry of a sequence of measurement unit names
+ { NC_("SV_FUNIT_STRINGS", "mm"), FUNIT_MM },
+ { NC_("SV_FUNIT_STRINGS", "cm"), FUNIT_CM },
+ { NC_("SV_FUNIT_STRINGS", "m"), FUNIT_M },
+ { NC_("SV_FUNIT_STRINGS", "km"), FUNIT_KM },
+ { NC_("SV_FUNIT_STRINGS", "twips"), FUNIT_TWIP },
+ { NC_("SV_FUNIT_STRINGS", "twip"), FUNIT_TWIP },
+ { NC_("SV_FUNIT_STRINGS", "pt"), FUNIT_POINT },
+ { NC_("SV_FUNIT_STRINGS", "pc"), FUNIT_PICA },
+ { NC_("SV_FUNIT_STRINGS", "\""), FUNIT_INCH },
+ { NC_("SV_FUNIT_STRINGS", "in"), FUNIT_INCH },
+ { NC_("SV_FUNIT_STRINGS", "inch"), FUNIT_INCH },
+ { NC_("SV_FUNIT_STRINGS", "'"), FUNIT_FOOT },
+ { NC_("SV_FUNIT_STRINGS", "ft"), FUNIT_FOOT },
+ { NC_("SV_FUNIT_STRINGS", "foot"), FUNIT_FOOT },
+ { NC_("SV_FUNIT_STRINGS", "feet"), FUNIT_FOOT },
+ { NC_("SV_FUNIT_STRINGS", "miles"), FUNIT_MILE },
+ { NC_("SV_FUNIT_STRINGS", "mile"), FUNIT_MILE },
+ { NC_("SV_FUNIT_STRINGS", "ch"), FUNIT_CHAR },
+ { NC_("SV_FUNIT_STRINGS", "line"), FUNIT_LINE },
+ { NC_("SV_FUNIT_STRINGS", "pixels"), FUNIT_PIXEL },
+ { NC_("SV_FUNIT_STRINGS", "pixel"), FUNIT_PIXEL },
+ /* To translators: degree */
+ { NC_("SV_FUNIT_STRINGS", "°"), FUNIT_DEGREE },
+ { NC_("SV_FUNIT_STRINGS", "sec"), FUNIT_SECOND },
+ // To translators: This is the last entry of the sequence of measurement unit names
+ { NC_("SV_FUNIT_STRINGS", "ms"), FUNIT_MILLISECOND }
+};
+
+#endif // INCLUDED_VCL_INC_UNITS_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */