summaryrefslogtreecommitdiff
path: root/svtools/inc/errtxt.hrc
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 /svtools/inc/errtxt.hrc
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 'svtools/inc/errtxt.hrc')
-rw-r--r--svtools/inc/errtxt.hrc158
1 files changed, 158 insertions, 0 deletions
diff --git a/svtools/inc/errtxt.hrc b/svtools/inc/errtxt.hrc
new file mode 100644
index 000000000000..1383d224c51b
--- /dev/null
+++ b/svtools/inc/errtxt.hrc
@@ -0,0 +1,158 @@
+/* -*- 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
+
+#include <svtools/sfxecode.hxx>
+#include <svtools/soerr.hxx>
+
+#define NC_(Context, String) (Context "\004" u8##String)
+#define S_MAX 0x7fff
+
+const ErrMsgCode RID_ERRCTX[] =
+{
+ { NC_("RID_ERRCTX", "Error") , ErrCode(ERRCTX_ERROR) },
+ { NC_("RID_ERRCTX", "Warning") , ErrCode(ERRCTX_WARNING) },
+ { NC_("RID_ERRCTX", "$(ERR) loading the template $(ARG1)") , ErrCode(ERRCTX_SFX_LOADTEMPLATE) },
+ { NC_("RID_ERRCTX", "$(ERR) saving the document $(ARG1)"), ErrCode(ERRCTX_SFX_SAVEDOC) },
+ { NC_("RID_ERRCTX", "$(ERR) saving the document $(ARG1)"), ErrCode(ERRCTX_SFX_SAVEASDOC) },
+ { NC_("RID_ERRCTX", "$(ERR) displaying doc. information for document $(ARG1)") , ErrCode(ERRCTX_SFX_DOCINFO) },
+ { NC_("RID_ERRCTX", "$(ERR) writing document $(ARG1) as template") , ErrCode(ERRCTX_SFX_DOCTEMPLATE) },
+ { NC_("RID_ERRCTX", "$(ERR) copying or moving document contents") , ErrCode(ERRCTX_SFX_MOVEORCOPYCONTENTS) },
+ { NC_("RID_ERRCTX", "$(ERR) starting the Document Manager") , ErrCode(ERRCTX_SFX_DOCMANAGER) },
+ { NC_("RID_ERRCTX", "$(ERR) loading document $(ARG1)") , ErrCode(ERRCTX_SFX_OPENDOC) },
+ { NC_("RID_ERRCTX", "$(ERR) creating a new document") , ErrCode(ERRCTX_SFX_NEWDOCDIRECT) },
+ { NC_("RID_ERRCTX", "$(ERR) creating a new document") , ErrCode(ERRCTX_SFX_NEWDOC) },
+ { NC_("RID_ERRCTX", "$(ERR) expanding entry") , ErrCode(ERRCTX_SFX_CREATEOBJSH) },
+ { NC_("RID_ERRCTX", "$(ERR) loading BASIC of document $(ARG1)") , ErrCode(ERRCTX_SFX_LOADBASIC) },
+ { NC_("RID_ERRCTX", "$(ERR) searching for an address"), ErrCode(ERRCTX_SFX_SEARCHADDRESS) },
+ { nullptr, ERRCODE_NONE }
+};
+
+const ErrMsgCode RID_ERRHDL[] =
+{
+ { NC_("RID_ERRHDL", "Abort") , ErrCode(ERRCODE_CLASS_ABORT) },
+ { NC_("RID_ERRHDL", "Nonexistent object") , ErrCode(ERRCODE_CLASS_NOTEXISTS) },
+ { NC_("RID_ERRHDL", "Object already exists") , ErrCode(ERRCODE_CLASS_ALREADYEXISTS) },
+ { NC_("RID_ERRHDL", "Object not accessible") , ErrCode(ERRCODE_CLASS_ACCESS) },
+ { NC_("RID_ERRHDL", "Inadmissible path") , ErrCode(ERRCODE_CLASS_PATH) },
+ { NC_("RID_ERRHDL", "Locking problem") , ErrCode(ERRCODE_CLASS_LOCKING) },
+ { NC_("RID_ERRHDL", "Wrong parameter") , ErrCode(ERRCODE_CLASS_PARAMETER) },
+ { NC_("RID_ERRHDL", "Resource exhausted") , ErrCode(ERRCODE_CLASS_SPACE) },
+ { NC_("RID_ERRHDL", "Action not supported") , ErrCode(ERRCODE_CLASS_NOTSUPPORTED) },
+ { NC_("RID_ERRHDL", "Read Error") , ErrCode(ERRCODE_CLASS_READ) },
+ { NC_("RID_ERRHDL", "Write Error") , ErrCode(ERRCODE_CLASS_WRITE) },
+ { NC_("RID_ERRHDL", "unknown") , ErrCode(ERRCODE_CLASS_UNKNOWN) },
+ { NC_("RID_ERRHDL", "Version Incompatibility") , ErrCode(ERRCODE_CLASS_VERSION) },
+ { NC_("RID_ERRHDL", "General Error") , ErrCode(ERRCODE_CLASS_GENERAL) },
+ { NC_("RID_ERRHDL", "Incorrect format") , ErrCode(ERRCODE_CLASS_FORMAT) },
+ { NC_("RID_ERRHDL", "Error creating object") , ErrCode(ERRCODE_CLASS_CREATE) },
+ { NC_("RID_ERRHDL", "Inadmissible value or data type") , ErrCode(ERRCODE_CLASS_SBX) },
+ { NC_("RID_ERRHDL", "BASIC runtime error") , ErrCode(ERRCODE_CLASS_RUNTIME) },
+ { NC_("RID_ERRHDL", "BASIC syntax error") , ErrCode(ERRCODE_CLASS_COMPILER) },
+ { NC_("RID_ERRHDL", "General Error") , ErrCode(1) },
+ { NC_("RID_ERRHDL", "General input/output error.") , ErrCode(ERRCODE_IO_GENERAL) },
+ { NC_("RID_ERRHDL", "Invalid file name.") , ErrCode(ERRCODE_IO_MISPLACEDCHAR) },
+ { NC_("RID_ERRHDL", "Nonexistent file.") , ErrCode(ERRCODE_IO_NOTEXISTS) },
+ { NC_("RID_ERRHDL", "File already exists.") , ErrCode(ERRCODE_IO_ALREADYEXISTS) },
+ { NC_("RID_ERRHDL", "The object is not a directory.") , ErrCode(ERRCODE_IO_NOTADIRECTORY) },
+ { NC_("RID_ERRHDL", "The object is not a file.") , ErrCode(ERRCODE_IO_NOTAFILE) },
+ { NC_("RID_ERRHDL", "The specified device is invalid.") , ErrCode(ERRCODE_IO_INVALIDDEVICE) },
+ { NC_("RID_ERRHDL", "The object cannot be accessed\ndue to insufficient user rights.") , ErrCode(ERRCODE_IO_ACCESSDENIED) },
+ { NC_("RID_ERRHDL", "Sharing violation while accessing the object.") , ErrCode(ERRCODE_IO_LOCKVIOLATION) },
+ { NC_("RID_ERRHDL", "No more space on device.") , ErrCode(ERRCODE_IO_OUTOFSPACE) },
+ { NC_("RID_ERRHDL", "This operation cannot be run on\nfiles containing wildcards.") , ErrCode(ERRCODE_IO_ISWILDCARD) },
+ { NC_("RID_ERRHDL", "This operation is not supported on this operating system.") , ErrCode(ERRCODE_IO_NOTSUPPORTED) },
+ { NC_("RID_ERRHDL", "There are too many files open.") , ErrCode(ERRCODE_IO_TOOMANYOPENFILES) },
+ { NC_("RID_ERRHDL", "Data could not be read from the file.") , ErrCode(ERRCODE_IO_CANTREAD) },
+ { NC_("RID_ERRHDL", "The file could not be written.") , ErrCode(ERRCODE_IO_CANTWRITE) },
+ { NC_("RID_ERRHDL", "The operation could not be run due to insufficient memory.") , ErrCode(ERRCODE_IO_OUTOFMEMORY) },
+ { NC_("RID_ERRHDL", "The seek operation could not be run.") , ErrCode(ERRCODE_IO_CANTSEEK) },
+ { NC_("RID_ERRHDL", "The tell operation could not be run.") , ErrCode(ERRCODE_IO_CANTTELL) },
+ { NC_("RID_ERRHDL", "Incorrect file version.") , ErrCode(ERRCODE_IO_WRONGVERSION) },
+ { NC_("RID_ERRHDL", "Incorrect file format.") , ErrCode(ERRCODE_IO_WRONGFORMAT) },
+ { NC_("RID_ERRHDL", "The file name contains invalid characters.") , ErrCode(ERRCODE_IO_INVALIDCHAR) },
+ { NC_("RID_ERRHDL", "An unknown I/O error has occurred.") , ErrCode(ERRCODE_IO_UNKNOWN) },
+ { NC_("RID_ERRHDL", "An invalid attempt was made to access the file.") , ErrCode(ERRCODE_IO_INVALIDACCESS) },
+ { NC_("RID_ERRHDL", "The file could not be created.") , ErrCode(ERRCODE_IO_CANTCREATE) },
+ { NC_("RID_ERRHDL", "The operation was started under an invalid parameter.") , ErrCode(ERRCODE_IO_INVALIDPARAMETER) },
+ { NC_("RID_ERRHDL", "The operation on the file was aborted.") , ErrCode(ERRCODE_IO_ABORT) },
+ { NC_("RID_ERRHDL", "Path to the file does not exist.") , ErrCode(ERRCODE_IO_NOTEXISTSPATH) },
+ { NC_("RID_ERRHDL", "An object cannot be copied into itself.") , ErrCode(ERRCODE_IO_RECURSIVE) },
+ { NC_("RID_ERRHDL", "The specified template could not be found.") , ErrCode(ERRCODE_SFX_TEMPLATENOTFOUND) },
+ { NC_("RID_ERRHDL", "The file cannot be used as template.") , ErrCode(ERRCODE_SFX_NOTATEMPLATE) },
+ { NC_("RID_ERRHDL", "This document has already been opened for editing.") , ErrCode(ERRCODE_SFX_ALREADYOPEN) },
+ { NC_("RID_ERRHDL", "The wrong password has been entered.") , ErrCode(ERRCODE_SFX_WRONGPASSWORD) },
+ { NC_("RID_ERRHDL", "Error reading file.") , ErrCode(ERRCODE_SFX_DOLOADFAILED) },
+ { NC_("RID_ERRHDL", "The document was opened as read-only.") , ErrCode(ERRCODE_SFX_DOCUMENTREADONLY) },
+ { NC_("RID_ERRHDL", "General OLE Error.") , ErrCode(ERRCODE_SFX_OLEGENERAL) },
+ { NC_("RID_ERRHDL", "The host name $(ARG1) could not be resolved.") , ErrCode(ERRCODE_INET_NAME_RESOLVE) },
+ { NC_("RID_ERRHDL", "Could not establish Internet connection to $(ARG1).") , ErrCode(ERRCODE_INET_CONNECT) },
+ { NC_("RID_ERRHDL", "Error reading data from the Internet.\nServer error message: $(ARG1).") , ErrCode(ERRCODE_INET_READ) },
+ { NC_("RID_ERRHDL", "Error transferring data to the Internet.\nServer error message: $(ARG1).") , ErrCode(ERRCODE_INET_WRITE) },
+ { NC_("RID_ERRHDL", "General Internet error has occurred.") , ErrCode(ERRCODE_INET_GENERAL) },
+ { NC_("RID_ERRHDL", "The requested Internet data is not available in the cache and cannot be transmitted as the Online mode has not be activated.") , ErrCode(ERRCODE_INET_OFFLINE) },
+ { NC_("RID_ERRHDL", "The contents could not be created.") , ErrCode(ERRCODE_SFX_CANTCREATECONTENT) },
+ { NC_("RID_ERRHDL", "The file name is too long for the target file system.") , ErrCode(ERRCODE_IO_NAMETOOLONG) },
+ { NC_("RID_ERRHDL", "The input syntax is invalid.") , ErrCode(ERRCODE_SFX_INVALIDSYNTAX) },
+ { NC_("RID_ERRHDL", "The input syntax is invalid.") , ErrCode(ERRCODE_SFX_CANTCREATEFOLDER) },
+ { NC_("RID_ERRHDL", "This document contains attributes that cannot be saved in the selected format.\nPlease save the document in a %PRODUCTNAME %PRODUCTVERSION file format."), ErrCode(ERRCODE_IO_NOTSTORABLEINBINARYFORMAT) },
+ { NC_("RID_ERRHDL", "The maximum number of documents that can be opened at the same time has been reached. You need to close one or more documents before you can open a new document."), ErrCode(ERRCODE_SFX_NOMOREDOCUMENTSALLOWED) },
+ { NC_("RID_ERRHDL", "Could not create backup copy.") , ErrCode(ERRCODE_SFX_CANTCREATEBACKUP) },
+ { NC_("RID_ERRHDL", "An attempt was made to execute a macro.\nFor security reasons, macro support is disabled."), ErrCode(ERRCODE_SFX_MACROS_SUPPORT_DISABLED) },
+ { NC_("RID_ERRHDL", "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in %PRODUCTNAME - Preferences - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available.") , ErrCode(ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC) },
+ { NC_("RID_ERRHDL", "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in Tools - Options - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available.") , ErrCode(ERRCODE_SFX_DOCUMENT_MACRO_DISABLED) },
+ { NC_("RID_ERRHDL", "The encrypted document contains unexpected non-encrypted streams.\n\nThis could be the result of document manipulation.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n ") , ErrCode(ERRCODE_SFX_INCOMPLETE_ENCRYPTION) },
+ { NC_("RID_ERRHDL", "Invalid data length.") , ErrCode(ERRCODE_IO_INVALIDLENGTH) },
+ { NC_("RID_ERRHDL", "Function not possible: path contains current directory.") , ErrCode(ERRCODE_IO_CURRENTDIR) },
+ { NC_("RID_ERRHDL", "Function not possible: device (drive) not identical.") , ErrCode(ERRCODE_IO_NOTSAMEDEVICE) },
+ { NC_("RID_ERRHDL", "Device (drive) not ready.") , ErrCode(ERRCODE_IO_DEVICENOTREADY) },
+ { NC_("RID_ERRHDL", "Wrong checksum.") , ErrCode(ERRCODE_IO_BADCRC) },
+ { NC_("RID_ERRHDL", "Function not possible: write protected.") , ErrCode(ERRCODE_IO_WRITEPROTECTED) },
+ { NC_("RID_ERRHDL", "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first."), ErrCode(ERRCODE_SFX_SHARED_NOPASSWORDCHANGE) },
+ { nullptr, ERRCODE_NONE }
+};
+
+const ErrMsgCode RID_SO_ERROR_HANDLER[] =
+{
+ { NC_("RID_ERRHDL", "General OLE error."),
+ ErrCode(sal_uInt32(ERRCODE_SO_GENERALERROR) & S_MAX) },
+ { NC_("RID_ERRHDL", "False."),
+ ErrCode(sal_uInt32(ERRCODE_SO_FALSE) & S_MAX) },
+ { NC_("RID_ERRHDL", "Data not available at this time."),
+ ErrCode(sal_uInt32(ERRCODE_SO_PENDING) & S_MAX) },
+ { NC_("RID_ERRHDL", "The action cannot be executed in the object's current state."),
+ ErrCode(sal_uInt32(ERRCODE_SO_CANNOT_DOVERB_NOW) & S_MAX) },
+ { NC_("RID_ERRHDL", "The object does not support any actions."),
+ ErrCode(sal_uInt32(ERRCODE_SO_NOVERBS) & S_MAX) },
+ { NC_("RID_ERRHDL", "Object does not support this action."),
+ ErrCode(sal_uInt32(ERRCODE_SO_NOTIMPL) & S_MAX) },
+ { nullptr, ERRCODE_NONE }
+};
+
+const ErrMsgCode RID_SO_ERRCTX[] =
+{
+ { NC_("RID_ERRHDL", "$(ERR) activating object") , ErrCode(ERRCTX_SO_DOVERB) },
+ { nullptr, ERRCODE_NONE }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */