summaryrefslogtreecommitdiff
path: root/sc/inc/scerrors.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 /sc/inc/scerrors.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 'sc/inc/scerrors.hrc')
-rw-r--r--sc/inc/scerrors.hrc111
1 files changed, 111 insertions, 0 deletions
diff --git a/sc/inc/scerrors.hrc b/sc/inc/scerrors.hrc
new file mode 100644
index 000000000000..9e8b89d4d6f2
--- /dev/null
+++ b/sc/inc/scerrors.hrc
@@ -0,0 +1,111 @@
+/* -*- 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_SC_INC_SCERRORS_HRC
+#define INCLUDED_SC_INC_SCERRORS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+#include "scerrors.hxx"
+
+const ErrMsgCode RID_ERRHDLSC[] =
+{
+ // ERRORS -----------------------------------------------------
+ { NC_("RID_ERRHDLSC", "Impossible to connect to the file.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_CONNECT) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "File could not be opened.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_OPEN) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "An unknown error has occurred.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_UNKNOWN) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Not enough memory while importing.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_OUTOFMEM) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Unknown Lotus1-2-3 file format.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_UNKNOWN_WK) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Error in file structure while importing.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_FORMAT) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "There is no filter available for this file type.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_NI) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Unknown or unsupported Excel file format.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_UNKNOWN_BIFF) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Excel file format not yet implemented.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_NI_BIFF) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "This file is password-protected.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_FILEPASSWD) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Internal import error.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_INTERNAL) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The file contains data after row 8192 and therefore can not be read.") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_8K_LIMIT) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)."),
+ ErrCode(sal_uInt32(SCERR_IMPORT_FILE_ROWCOL) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "File format error found at $(ARG1)(row,col).") ,
+ ErrCode(sal_uInt32(SCERR_IMPORT_FORMAT_ROWCOL) & ERRCODE_RES_MASK) },
+
+ // Export ----------------------------------------------------
+ { NC_("RID_ERRHDLSC", "Connection to the file could not be established.") ,
+ ErrCode(sal_uInt32(SCERR_EXPORT_CONNECT) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Data could not be written.") ,
+ ErrCode(sal_uInt32(SCERR_EXPORT_DATA) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "$(ARG1)") ,
+ ErrCode(sal_uInt32(SCERR_EXPORT_SQLEXCEPTION) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Cell $(ARG1) contains characters that are not representable in the selected target character set \"$(ARG2)\".") ,
+ ErrCode(sal_uInt32(SCERR_EXPORT_ENCODING) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Cell $(ARG1) contains a string that is longer in the selected target character set \"$(ARG2)\" than the given field width.") ,
+ ErrCode(sal_uInt32(SCERR_EXPORT_FIELDWIDTH) & ERRCODE_RES_MASK) },
+
+ // WARNINGS ---------------------------------------------------
+ { NC_("RID_ERRHDLSC", "Only the active sheet was saved.") ,
+ ErrCode(sal_uInt32(SCWARN_EXPORT_ASCII) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The maximum number of rows has been exceeded. Excess rows were not imported!") ,
+ ErrCode(sal_uInt32(SCWARN_IMPORT_RANGE_OVERFLOW) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The data could not be loaded completely because the maximum number of rows per sheet was exceeded.") ,
+ ErrCode(sal_uInt32(SCWARN_IMPORT_ROW_OVERFLOW) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The data could not be loaded completely because the maximum number of columns per sheet was exceeded.") ,
+ ErrCode(sal_uInt32(SCWARN_IMPORT_COLUMN_OVERFLOW) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Not all sheets have been loaded because the maximum number of sheets was exceeded.\n\nPlease be warned that re-saving this document will permanently delete those sheets that have not been loaded!") ,
+ ErrCode(sal_uInt32(SCWARN_IMPORT_SHEET_OVERFLOW) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The data could not be loaded completely because the maximum number of characters per cell was exceeded.") ,
+ ErrCode(sal_uInt32(SCWARN_IMPORT_CELL_OVERFLOW) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Corresponding FM3-File could not be opened.") ,
+ ErrCode(sal_uInt32(SCWARN_IMPORT_OPEN_FM3) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Error in file structure of corresponding FM3-File.") ,
+ ErrCode(sal_uInt32(SCWARN_IMPORT_WRONG_FM3) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Document too complex for automatic calculation. Press F9 to recalculate.") ,
+ ErrCode(sal_uInt32(SCWARN_CORE_HARD_RECALC) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The document contains more rows than supported in the selected format.\nAdditional rows were not saved.") ,
+ ErrCode(sal_uInt32(SCWARN_EXPORT_MAXROW) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The document contains more columns than supported in the selected format.\nAdditional columns were not saved.") ,
+ ErrCode(sal_uInt32(SCWARN_EXPORT_MAXCOL) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The document contains more sheets than supported in the selected format.\nAdditional sheets were not saved.") ,
+ ErrCode(sal_uInt32(SCWARN_EXPORT_MAXTAB) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The document contains information not recognized by this program version.\nResaving the document will delete this information!") ,
+ ErrCode(sal_uInt32(SCWARN_IMPORT_INFOLOST) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Not all cell contents could be saved in the specified format.") ,
+ ErrCode(sal_uInt32(SCWARN_EXPORT_DATALOST) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "The following characters could not be converted to the selected character set\nand were written as &#1234; surrogates:\n\n$(ARG1)"),
+ ErrCode(sal_uInt32(SCWARN_EXPORT_NONCONVERTIBLE_CHARS) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)."),
+ ErrCode(sal_uInt32(SCWARN_IMPORT_FILE_ROWCOL) & ERRCODE_RES_MASK) },
+ { NC_("RID_ERRHDLSC", "Not all attributes could be read.") ,
+ ErrCode(sal_uInt32(SCWARN_IMPORT_FEATURES_LOST) & ERRCODE_RES_MASK) },
+ { nullptr, ERRCODE_NONE }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */