summaryrefslogtreecommitdiff
path: root/filter/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 /filter/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 'filter/inc')
-rw-r--r--filter/inc/strings.hrc83
-rw-r--r--filter/inc/strings.hxx4
2 files changed, 85 insertions, 2 deletions
diff --git a/filter/inc/strings.hrc b/filter/inc/strings.hrc
new file mode 100644
index 000000000000..279fee3eedbf
--- /dev/null
+++ b/filter/inc/strings.hrc
@@ -0,0 +1,83 @@
+/* -*- 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_FILTER_INC_STRINGS_HRC
+#define INCLUDED_FILTER_INC_STRINGS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+#define STR_COLUMN_HEADER_NAME NC_("STR_COLUMN_HEADER_NAME", "Name")
+#define STR_COLUMN_HEADER_TYPE NC_("STR_COLUMN_HEADER_TYPE", "Type")
+#define STR_UNKNOWN_APPLICATION NC_("STR_UNKNOWN_APPLICATION", "Unknown")
+#define STR_IMPORT_ONLY NC_("STR_IMPORT_ONLY", "import filter")
+#define STR_IMPORT_EXPORT NC_("STR_IMPORT_EXPORT", "import/export filter")
+#define STR_EXPORT_ONLY NC_("STR_EXPORT_ONLY", "export filter")
+#define STR_WARN_DELETE NC_("STR_WARN_DELETE", "Do you really want to delete the XML Filter '%s'? This action cannot be undone.")
+#define STR_ERROR_FILTER_NAME_EXISTS NC_("STR_ERROR_FILTER_NAME_EXISTS", "An XML filter with the name '%s' already exists. Please enter a different name.")
+#define STR_ERROR_TYPE_NAME_EXISTS NC_("STR_ERROR_TYPE_NAME_EXISTS", "The name for the user interface '%s1' is already used by the XML filter '%s2'. Please enter a different name.")
+#define STR_ERROR_EXPORT_XSLT_NOT_FOUND NC_("STR_ERROR_EXPORT_XSLT_NOT_FOUND", "The XSLT for export cannot be found. Please enter a valid path.")
+#define STR_ERROR_IMPORT_XSLT_NOT_FOUND NC_("STR_ERROR_IMPORT_XSLT_NOT_FOUND", "The XSLT for import cannot be found. Please enter a valid path.")
+#define STR_ERROR_IMPORT_TEMPLATE_NOT_FOUND NC_("STR_ERROR_IMPORT_TEMPLATE_NOT_FOUND", "The given import template cannot be found. Please enter a valid path.")
+#define STR_DEFAULT_FILTER_NAME NC_("STR_DEFAULT_FILTER_NAME", "New Filter")
+#define STR_DEFAULT_UI_NAME NC_("STR_DEFAULT_UI_NAME", "Untitled")
+#define STR_UNDEFINED_FILTER NC_("STR_UNDEFINED_FILTER", "undefined filter")
+#define STR_FILTER_HAS_BEEN_SAVED NC_("STR_FILTER_HAS_BEEN_SAVED", "The XML filter '%s' has been saved as package '%s'. ")
+#define STR_FILTERS_HAVE_BEEN_SAVED NC_("STR_FILTERS_HAVE_BEEN_SAVED", "%s XML filters have been saved in the package '%s'.")
+#define STR_FILTER_PACKAGE NC_("STR_FILTER_PACKAGE", "XSLT filter package")
+#define STR_FILTER_INSTALLED NC_("STR_FILTER_INSTALLED", "The XML filter '%s' has been installed successfully.")
+#define STR_FILTERS_INSTALLED NC_("STR_FILTERS_INSTALLED", "%s XML filters have been installed successfully.")
+#define STR_NO_FILTERS_FOUND NC_("STR_NO_FILTERS_FOUND", "No XML filter could be installed because the package '%s' does not contain any XML filters.")
+#define STR_XML_FILTER_LISTBOX NC_("STR_XML_FILTER_LISTBOX", "XML Filter List")
+
+#define T602FILTER_STR_IMPORT_DIALOG_TITLE NC_("T602FILTER_STR_IMPORT_DIALOG_TITLE", "Settings for T602 import")
+#define T602FILTER_STR_ENCODING_LABEL NC_("T602FILTER_STR_ENCODING_LABEL", "Encoding")
+#define T602FILTER_STR_ENCODING_AUTO NC_("T602FILTER_STR_ENCODING_AUTO", "Automatic")
+#define T602FILTER_STR_ENCODING_CP852 NC_("T602FILTER_STR_ENCODING_CP852", "CP852 (Latin2)")
+#define T602FILTER_STR_ENCODING_CP895 NC_("T602FILTER_STR_ENCODING_CP895", "CP895 (KEYB2CS, Kamenicky)")
+#define T602FILTER_STR_ENCODING_KOI8CS2 NC_("T602FILTER_STR_ENCODING_KOI8CS2", "KOI8 CS2")
+#define T602FILTER_STR_CYRILLIC_MODE NC_("T602FILTER_STR_CYRILLIC_MODE", "Mode for Russian language (Cyrillic)")
+#define T602FILTER_STR_REFORMAT_TEXT NC_("T602FILTER_STR_REFORMAT_TEXT", "Reformat the text")
+#define T602FILTER_STR_DOT_COMMANDS NC_("T602FILTER_STR_DOT_COMMANDS", "Display dot commands")
+#define T602FILTER_STR_CANCEL_BUTTON NC_("T602FILTER_STR_CANCEL_BUTTON", "Cancel")
+#define T602FILTER_STR_OK_BUTTON NC_("T602FILTER_STR_OK_BUTTON", "OK")
+
+#define KEY_VERSION_CHECK NC_("KEY_VERSION_CHECK", "Warning: Not all of the imported EPS graphics could be saved at level1\nas some are at a higher level!")
+
+#define PDF_PROGRESS_BAR NC_("PDF_PROGRESS_BAR", "Export as PDF")
+
+//strings used in encryption UI
+//password dialog title
+#define STR_PDF_EXPORT_UDPWD NC_("STR_PDF_EXPORT_UDPWD", "Set open password")
+//password dialog title
+#define STR_PDF_EXPORT_ODPWD NC_("STR_PDF_EXPORT_ODPWD", "Set permission password")
+#define STR_WARN_PASSWORD_PDFA NC_("STR_WARN_PASSWORD_PDFA", "PDF/A does not allow encryption. The exported PDF file will not be password protected.")
+#define STR_WARN_TRANSP_PDFA_SHORT NC_("STR_WARN_TRANSP_PDFA_SHORT", "PDF/A transparency")
+#define STR_WARN_TRANSP_PDFA NC_("STR_WARN_TRANSP_PDFA", "PDF/A forbids transparency. A transparent object was painted opaque instead.")
+#define STR_WARN_TRANSP_VERSION_SHORT NC_("STR_WARN_TRANSP_VERSION_SHORT", "PDF version conflict")
+#define STR_WARN_TRANSP_VERSION NC_("STR_WARN_TRANSP_VERSION", "Transparency is not supported in PDF versions earlier than PDF 1.4. A transparent object was painted opaque instead")
+#define STR_WARN_FORMACTION_PDFA_SHORT NC_("STR_WARN_FORMACTION_PDFA_SHORT", "PDF/A form action")
+#define STR_WARN_FORMACTION_PDFA NC_("STR_WARN_FORMACTION_PDFA", "A form control contained an action not supported by the PDF/A standard. The action was skipped")
+#define STR_WARN_TRANSP_CONVERTED NC_("STR_WARN_TRANSP_CONVERTED", "Some objects were converted to an image in order to remove transparencies, because the target PDF format does not support transparencies. Possibly better results can be achieved if you remove the transparent objects before exporting.")
+#define STR_WARN_TRANSP_CONVERTED_SHORT NC_("STR_WARN_TRANSP_CONVERTED_SHORT", "Transparencies removed")
+#define STR_ERR_SIGNATURE_FAILED NC_("STR_ERR_SIGNATURE_FAILED", "Signature generation failed")
+#define STR_ERR_PDF_EXPORT_ABORTED NC_("STR_ERR_PDF_EXPORT_ABORTED", "PDF export aborted")
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/inc/strings.hxx b/filter/inc/strings.hxx
index 3a25ef921b31..c405e61121ab 100644
--- a/filter/inc/strings.hxx
+++ b/filter/inc/strings.hxx
@@ -7,8 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_FILTER_INC_STRINGS_HRC
-#define INCLUDED_FILTER_INC_STRINGS_HRC
+#ifndef INCLUDED_FILTER_INC_STRINGS_HXX
+#define INCLUDED_FILTER_INC_STRINGS_HXX
#define STR_APPL_NAME_WRITER "%PRODUCTNAME Writer (.sxw)"
#define STR_APPL_NAME_CALC "%PRODUCTNAME Calc (.sxc)"