summaryrefslogtreecommitdiff
path: root/forms/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 /forms/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 'forms/inc')
-rw-r--r--forms/inc/pch/precompiled_frm.hxx2
-rw-r--r--forms/inc/strings.hrc87
2 files changed, 87 insertions, 2 deletions
diff --git a/forms/inc/pch/precompiled_frm.hxx b/forms/inc/pch/precompiled_frm.hxx
index 332168179df9..a8f5e5efcb2d 100644
--- a/forms/inc/pch/precompiled_frm.hxx
+++ b/forms/inc/pch/precompiled_frm.hxx
@@ -229,7 +229,6 @@
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/functional.hxx>
#include <o3tl/typed_flags_set.hxx>
-#include <rsc/rsc-vcl-shared-types.hxx>
#include <sfx2/dllapi.h>
#include <sfx2/sfxuno.hxx>
#include <sfx2/signaturestate.hxx>
@@ -257,7 +256,6 @@
#include <tools/link.hxx>
#include <tools/mapunit.hxx>
#include <tools/ref.hxx>
-#include <tools/resid.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/time.hxx>
diff --git a/forms/inc/strings.hrc b/forms/inc/strings.hrc
new file mode 100644
index 000000000000..50a5a19504f1
--- /dev/null
+++ b/forms/inc/strings.hrc
@@ -0,0 +1,87 @@
+/* -*- 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 RID_BASELISTBOX_ERROR_FILLLIST NC_("RID_BASELISTBOX_ERROR_FILLLIST", "The contents of a combo box or list field could not be determined.")
+#define RID_STR_IMPORT_GRAPHIC NC_("RID_STR_IMPORT_GRAPHIC", "Insert Image" )
+#define RID_STR_CONTROL_SUBSTITUTED_NAME NC_("RID_STR_CONTROL_SUBSTITUTED_NAME", "substituted")
+#define RID_STR_CONTROL_SUBSTITUTED_EPXPLAIN NC_("RID_STR_CONTROL_SUBSTITUTED_EPXPLAIN", "An error occurred while this control was being loaded. It was therefore replaced with a placeholder.")
+#define RID_STR_READERROR NC_("RID_STR_READERROR", "Error reading data from database" )
+#define RID_STR_CONNECTERROR NC_("RID_STR_CONNECTERROR", "Connection failed" )
+#define RID_ERR_LOADING_FORM NC_("RID_ERR_LOADING_FORM", "The data content could not be loaded.")
+#define RID_ERR_REFRESHING_FORM NC_("RID_ERR_REFRESHING_FORM", "The data content could not be updated")
+#define RID_STR_ERR_INSERTRECORD NC_("RID_STR_ERR_INSERTRECORD", "Error inserting the new record")
+#define RID_STR_ERR_UPDATERECORD NC_("RID_STR_ERR_UPDATERECORD", "Error updating the current record")
+#define RID_STR_ERR_DELETERECORD NC_("RID_STR_ERR_DELETERECORD", "Error deleting the current record")
+#define RID_STR_ERR_DELETERECORDS NC_("RID_STR_ERR_DELETERECORDS", "Error deleting the specified records")
+#define RID_STR_NEED_NON_NULL_OBJECT NC_("RID_STR_NEED_NON_NULL_OBJECT", "The object cannot be NULL.")
+#define RID_STR_OPEN_GRAPHICS NC_("RID_STR_OPEN_GRAPHICS", "Insert Image from...")
+#define RID_STR_CLEAR_GRAPHICS NC_("RID_STR_CLEAR_GRAPHICS", "Remove Image")
+#define RID_STR_INVALIDSTREAM NC_("RID_STR_INVALIDSTREAM", "The given stream is invalid.")
+#define RID_STR_SYNTAXERROR NC_("RID_STR_SYNTAXERROR", "Syntax error in query expression" )
+#define RID_STR_INCOMPATIBLE_TYPES NC_("RID_STR_INCOMPATIBLE_TYPES", "The value types supported by the binding cannot be used for exchanging data with this control.")
+#define RID_STR_LABEL_RECORD NC_("RID_STR_LABEL_RECORD", "Record")
+#define RID_STR_INVALID_VALIDATOR NC_("RID_STR_INVALID_VALIDATOR", "The control is connected to an external value binding, which at the same time acts as validator. You need to revoke the value binding, before you can set a new validator.")
+#define RID_STR_LABEL_OF NC_("RID_STR_LABEL_OF", "of")
+#define RID_STR_QUERY_SAVE_MODIFIED_ROW NC_("RID_STR_QUERY_SAVE_MODIFIED_ROW", "The content of the current form has been modified.\nDo you want to save your changes?")
+#define RID_STR_COULD_NOT_SET_ORDER NC_("RID_STR_COULD_NOT_SET_ORDER", "Error setting the sort criteria")
+#define RID_STR_COULD_NOT_SET_FILTER NC_("RID_STR_COULD_NOT_SET_FILTER", "Error setting the filter criteria")
+#define RID_STR_FEATURE_REQUIRES_PARAMETERS NC_("RID_STR_FEATURE_REQUIRES_PARAMETERS", "To execute this function, parameters are needed.")
+#define RID_STR_FEATURE_NOT_EXECUTABLE NC_("RID_STR_FEATURE_NOT_EXECUTABLE", "This function cannot be executed, but is only for status queries.")
+#define RID_STR_FEATURE_UNKNOWN NC_("RID_STR_FEATURE_UNKNOWN", "Unknown function.")
+
+#define RID_STR_XFORMS_NO_BINDING_EXPRESSION NC_("RID_STR_XFORMS_NO_BINDING_EXPRESSION", "Please enter a binding expression.")
+#define RID_STR_XFORMS_INVALID_BINDING_EXPRESSION NC_("RID_STR_XFORMS_INVALID_BINDING_EXPRESSION", "This is an invalid binding expression.")
+#define RID_STR_XFORMS_INVALID_VALUE NC_("RID_STR_XFORMS_INVALID_VALUE", "Value is invalid.")
+#define RID_STR_XFORMS_REQUIRED NC_("RID_STR_XFORMS_REQUIRED", "A value is required.")
+#define RID_STR_XFORMS_INVALID_CONSTRAINT NC_("RID_STR_XFORMS_INVALID_CONSTRAINT", "The constraint '$1' not validated.")
+#define RID_STR_XFORMS_VALUE_IS_NOT_A NC_("RID_STR_XFORMS_VALUE_IS_NOT_A", "The value is not of the type '$2'.")
+#define RID_STR_XFORMS_VALUE_MAX_INCL NC_("RID_STR_XFORMS_VALUE_MAX_INCL", "The value must be smaller than or equal to $2.")
+#define RID_STR_XFORMS_VALUE_MAX_EXCL NC_("RID_STR_XFORMS_VALUE_MAX_EXCL", "The value must be smaller than $2.")
+#define RID_STR_XFORMS_VALUE_MIN_INCL NC_("RID_STR_XFORMS_VALUE_MIN_INCL", "The value must be greater than or equal to $2.")
+#define RID_STR_XFORMS_VALUE_MIN_EXCL NC_("RID_STR_XFORMS_VALUE_MIN_EXCL", "The value must be greater than $2.")
+#define RID_STR_XFORMS_VALUE_TOTAL_DIGITS NC_("RID_STR_XFORMS_VALUE_TOTAL_DIGITS", "$2 digits allowed at most.")
+#define RID_STR_XFORMS_VALUE_FRACTION_DIGITS NC_("RID_STR_XFORMS_VALUE_FRACTION_DIGITS", "$2 fraction digits allowed at most.")
+#define RID_STR_XFORMS_VALUE_LENGTH NC_("RID_STR_XFORMS_VALUE_LENGTH", "The string must be $2 characters long.")
+#define RID_STR_XFORMS_VALUE_MIN_LENGTH NC_("RID_STR_XFORMS_VALUE_MIN_LENGTH", "The string must be at least $2 characters long.")
+#define RID_STR_XFORMS_VALUE_MAX_LENGTH NC_("RID_STR_XFORMS_VALUE_MAX_LENGTH", "The string can only be $2 characters long at most.")
+#define RID_STR_DATATYPE_STRING NC_("RID_STR_DATATYPE_STRING", "String")
+#define RID_STR_DATATYPE_URL NC_("RID_STR_DATATYPE_URL", "Hyperlink")
+#define RID_STR_DATATYPE_BOOLEAN NC_("RID_STR_DATATYPE_BOOLEAN", "True/False (Boolean)")
+#define RID_STR_DATATYPE_DECIMAL NC_("RID_STR_DATATYPE_DECIMAL", "Decimal")
+#define RID_STR_DATATYPE_FLOAT NC_("RID_STR_DATATYPE_FLOAT", "Floating point")
+#define RID_STR_DATATYPE_DOUBLE NC_("RID_STR_DATATYPE_DOUBLE", "Double")
+#define RID_STR_DATATYPE_DATE NC_("RID_STR_DATATYPE_DATE", "Date")
+#define RID_STR_DATATYPE_TIME NC_("RID_STR_DATATYPE_TIME", "Time")
+#define RID_STR_DATATYPE_DATETIME NC_("RID_STR_DATATYPE_DATETIME", "Date and Time")
+#define RID_STR_DATATYPE_YEAR NC_("RID_STR_DATATYPE_YEAR", "Year")
+#define RID_STR_DATATYPE_MONTH NC_("RID_STR_DATATYPE_MONTH", "Month")
+#define RID_STR_DATATYPE_DAY NC_("RID_STR_DATATYPE_DAY", "Day")
+#define RID_STR_XFORMS_CANT_EVALUATE NC_("RID_STR_XFORMS_CANT_EVALUATE", "Error during evaluation")
+#define RID_STR_XFORMS_PATTERN_DOESNT_MATCH NC_("RID_STR_XFORMS_PATTERN_DOESNT_MATCH", "The string '$1' does not match the required regular expression '$2'.")
+#define RID_STR_XFORMS_BINDING_UI_NAME NC_("RID_STR_XFORMS_BINDING_UI_NAME", "Binding" )
+#define RID_STR_XFORMS_CANT_REMOVE_TYPE NC_("RID_STR_XFORMS_CANT_REMOVE_TYPE", "This is a built-in type and cannot be removed." )
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */