mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 15:42:14 +00:00
ICU-22261 Add UCONFIG_NO_MF2 flag that can be used to disable MessageFormat 2 functionality
This commit is contained in:
parent
cce642a84f
commit
aff1bbaa14
37 changed files with 182 additions and 13 deletions
18
.github/workflows/icu4c.yml
vendored
18
.github/workflows/icu4c.yml
vendored
|
@ -367,20 +367,21 @@ jobs:
|
|||
- "-DUCONFIG_NO_IDNA=1"
|
||||
- "-DUCONFIG_NO_COLLATION=1"
|
||||
- "-DUCONFIG_NO_FORMATTING=1"
|
||||
- "-DUCONFIG_NO_MF2=1"
|
||||
- "-DUCONFIG_NO_TRANSLITERATION=1"
|
||||
- "-DUCONFIG_NO_REGULAR_EXPRESSIONS=1"
|
||||
- "-DUCONFIG_NO_SERVICE=1"
|
||||
- "-DUCONFIG_NO_FILTERED_BREAK_ITERATION=1"
|
||||
# Turn on all the options in one test.
|
||||
- "-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -DUCONFIG_NO_SERVICE=1 -DUCONFIG_NO_FILTERED_BREAK_ITERATION=1"
|
||||
- "-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_MF2=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -DUCONFIG_NO_SERVICE=1 -DUCONFIG_NO_FILTERED_BREAK_ITERATION=1"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Verify no additional new UCONFIG_NO_xxx added
|
||||
run: |
|
||||
# Test that we have exactly 12 "#ifndef UCONFIG_NO_" in uconfig.h. If the number changes, we need to also
|
||||
# adjust the uconfig_cppflags above to include the new one and update the "12" below.
|
||||
expected_count="12";
|
||||
# Test that we have exactly 13 "#ifndef UCONFIG_NO_" in uconfig.h. If the number changes, we need to also
|
||||
# adjust the uconfig_cppflags above to include the new one and update the "13" below.
|
||||
expected_count="13";
|
||||
count=`egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h| wc -l`;
|
||||
if [ $expected_count != $count ]; then
|
||||
echo "More than %s UCONFIG_NO_* defined in uconfig.h, please adjust uconfig_cppflags above to include any newly added flag" % $expected_count;
|
||||
|
@ -413,21 +414,22 @@ jobs:
|
|||
- "-DUCONFIG_NO_IDNA=1"
|
||||
- "-DUCONFIG_NO_COLLATION=1"
|
||||
- "-DUCONFIG_NO_FORMATTING=1"
|
||||
- "-DUCONFIG_NO_MF2=1"
|
||||
- "-DUCONFIG_NO_TRANSLITERATION=1"
|
||||
- "-DUCONFIG_NO_REGULAR_EXPRESSIONS=1"
|
||||
- "-DUCONFIG_NO_SERVICE=1"
|
||||
- "-DUCONFIG_NO_FILTERED_BREAK_ITERATION=1"
|
||||
# Turn on all the options in one test.
|
||||
- "-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -DUCONFIG_NO_SERVICE=1 -DUCONFIG_NO_FILTERED_BREAK_ITERATION=1"
|
||||
- "-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_MF2=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -DUCONFIG_NO_SERVICE=1 -DUCONFIG_NO_FILTERED_BREAK_ITERATION=1"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Verify no additional new UCONFIG_NO_xxx added
|
||||
run: |
|
||||
# Test that we have exactly 12 "#ifndef UCONFIG_NO_" in uconfig.h. If the number changes, we need to also
|
||||
# adjust the uconfig_cppflags above to include the new one and update the "12" below.
|
||||
# Test that we have exactly 13 "#ifndef UCONFIG_NO_" in uconfig.h. If the number changes, we need to also
|
||||
# adjust the uconfig_cppflags above to include the new one and update the "13" below.
|
||||
count=`egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h| wc -l`;
|
||||
if [ "12" != $count ]; then
|
||||
if [ "13" != $count ]; then
|
||||
echo "More than %s UCONFIG_NO_* defined in uconfig.h, please adjust uconfig_cppflags above to include any newly added flag" % $count;
|
||||
echo "Currently UCONFIG_NO_* defined in uconfig.h:";
|
||||
egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h;
|
||||
|
|
|
@ -413,6 +413,17 @@
|
|||
# define UCONFIG_NO_FORMATTING 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def UCONFIG_NO_MF2
|
||||
* This switch turns off the experimental MessageFormat 2.0 API.
|
||||
*
|
||||
* @internal ICU 75.0 technology preview
|
||||
* @deprecated This API is for technology preview only.
|
||||
*/
|
||||
#ifndef UCONFIG_NO_MF2
|
||||
# define UCONFIG_NO_MF2 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def UCONFIG_NO_TRANSLITERATION
|
||||
* This switch turns off transliteration.
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_arguments.h"
|
||||
#include "unicode/messageformat2_data_model.h"
|
||||
#include "unicode/messageformat2_formattable.h"
|
||||
|
@ -871,4 +873,6 @@ void MessageFormatter::checkDeclarations(MessageContext& context, Environment*&
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// © 2024 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
||||
#ifndef MESSAGEFORMAT2_UTILS_H
|
||||
|
@ -10,6 +12,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/unistr.h"
|
||||
#include "uvector.h"
|
||||
|
||||
|
@ -129,6 +133,8 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_arguments.h"
|
||||
#include "unicode/messageformat2_data_model_names.h"
|
||||
#include "uvector.h" // U_ASSERT
|
||||
|
@ -52,4 +54,6 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// © 2024 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
||||
#ifndef MESSAGEFORMAT2_CACHED_FORMATTERS_H
|
||||
|
@ -10,6 +12,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_data_model_names.h"
|
||||
#include "unicode/messageformat2_function_registry.h"
|
||||
#include "hash.h"
|
||||
|
@ -52,6 +56,8 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "messageformat2_allocation.h"
|
||||
#include "messageformat2_checker.h"
|
||||
#include "messageformat2_macros.h"
|
||||
|
@ -292,4 +294,6 @@ void Checker::check(UErrorCode& status) {
|
|||
} // namespace message2
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// © 2024 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
||||
#ifndef MESSAGEFORMAT_CHECKER_H
|
||||
|
@ -10,6 +12,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_data_model.h"
|
||||
#include "messageformat2_errors.h"
|
||||
|
||||
|
@ -80,6 +84,8 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_data_model.h"
|
||||
#include "messageformat2_allocation.h"
|
||||
#include "messageformat2_macros.h"
|
||||
|
@ -1095,4 +1097,6 @@ MFDataModel::Builder::~Builder() {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "messageformat2_allocation.h"
|
||||
#include "messageformat2_errors.h"
|
||||
#include "messageformat2_macros.h"
|
||||
|
@ -283,4 +285,6 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// © 2024 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
||||
#ifndef MESSAGEFORMAT2_ERRORS_H
|
||||
|
@ -15,8 +17,9 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_data_model_names.h"
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/unistr.h"
|
||||
|
||||
#include "uvector.h"
|
||||
|
@ -145,6 +148,8 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "messageformat2_allocation.h"
|
||||
#include "messageformat2_cached_formatters.h"
|
||||
#include "messageformat2_evaluation.h"
|
||||
|
@ -205,4 +207,6 @@ PrioritizedVariant::~PrioritizedVariant() {}
|
|||
} // namespace message2
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// © 2024 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
||||
#ifndef MESSAGEFORMAT2_EVALUATION_H
|
||||
|
@ -15,6 +17,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_arguments.h"
|
||||
#include "unicode/messageformat2_data_model.h"
|
||||
#include "unicode/messageformat2_function_registry.h"
|
||||
|
@ -193,6 +197,8 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_formattable.h"
|
||||
#include "unicode/smpdtfmt.h"
|
||||
#include "messageformat2_macros.h"
|
||||
|
@ -331,4 +333,6 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2.h"
|
||||
#include "messageformat2_allocation.h"
|
||||
#include "messageformat2_cached_formatters.h"
|
||||
|
@ -350,4 +352,6 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/dtptngen.h"
|
||||
#include "unicode/messageformat2_data_model_names.h"
|
||||
#include "unicode/messageformat2_function_registry.h"
|
||||
|
@ -1178,5 +1180,7 @@ StandardFunctions::TextSelector::~TextSelector() {}
|
|||
} // namespace message2
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// © 2024 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
||||
#ifndef MESSAGEFORMAT2_FUNCTION_REGISTRY_INTERNAL_H
|
||||
|
@ -10,6 +12,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/datefmt.h"
|
||||
#include "unicode/messageformat2_function_registry.h"
|
||||
|
||||
|
@ -217,6 +221,8 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
// © 2024 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
||||
#ifndef MESSAGEFORMAT2_MACROS_H
|
||||
#define MESSAGEFORMAT2_MACROS_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if U_SHOW_CPLUSPLUS_API
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/format.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "plurrule_impl.h"
|
||||
|
@ -99,6 +101,8 @@ static constexpr UChar32 ID_MATCH[] = {
|
|||
} // namespace message2
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "messageformat2_errors.h"
|
||||
#include "messageformat2_macros.h"
|
||||
#include "messageformat2_parser.h"
|
||||
|
@ -2429,5 +2431,7 @@ Parser::~Parser() {}
|
|||
} // namespace message2
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// © 2024 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
||||
#ifndef MESSAGEFORMAT_PARSER_H
|
||||
|
@ -16,6 +18,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
namespace message2 {
|
||||
|
@ -138,6 +142,8 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_data_model.h"
|
||||
#include "messageformat2_macros.h"
|
||||
#include "messageformat2_serializer.h"
|
||||
|
@ -332,5 +334,7 @@ void Serializer::serialize() {
|
|||
} // namespace message2
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// © 2024 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
||||
#ifndef MESSAGEFORMAT_SERIALIZER_H
|
||||
|
@ -10,6 +12,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_data_model.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -58,6 +62,8 @@ namespace message2 {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief C++ API: Formats messages using the draft MessageFormat 2.0.
|
||||
|
@ -397,6 +399,8 @@ U_NAMESPACE_END
|
|||
|
||||
#endif // U_HIDE_DEPRECATED_API
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief C++ API: Formats messages using the draft MessageFormat 2.0.
|
||||
|
@ -134,6 +136,8 @@ U_NAMESPACE_END
|
|||
|
||||
#endif // U_HIDE_DEPRECATED_API
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/localpointer.h"
|
||||
#include "unicode/messageformat2_data_model_names.h"
|
||||
|
||||
|
@ -3070,6 +3072,8 @@ U_NAMESPACE_END
|
|||
|
||||
#endif // U_HIDE_DEPRECATED_API
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/unistr.h"
|
||||
|
||||
#ifndef U_HIDE_DEPRECATED_API
|
||||
|
@ -28,6 +30,8 @@ U_NAMESPACE_END
|
|||
|
||||
#endif // U_HIDE_DEPRECATED_API
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/chariter.h"
|
||||
#include "unicode/numberformatter.h"
|
||||
#include "unicode/messageformat2_data_model_names.h"
|
||||
|
@ -1006,6 +1008,8 @@ U_NAMESPACE_END
|
|||
|
||||
#endif // U_HIDE_DEPRECATED_API
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/messageformat2_data_model_names.h"
|
||||
#include "unicode/messageformat2_formattable.h"
|
||||
|
||||
|
@ -380,6 +382,8 @@ U_NAMESPACE_END
|
|||
|
||||
#endif // U_HIDE_DEPRECATED_API
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -288,7 +288,9 @@ void IntlTestFormat::runIndexedTest( int32_t index, UBool exec, const char* &nam
|
|||
callTest(*test, par);
|
||||
}
|
||||
break;
|
||||
#if !UCONFIG_NO_MF2
|
||||
TESTCLASS(60,TestMessageFormat2);
|
||||
#endif
|
||||
default: name = ""; break; //needed to end loop
|
||||
}
|
||||
if (exec) {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/calendar.h"
|
||||
#include "messageformat2test.h"
|
||||
|
||||
|
@ -1067,5 +1069,7 @@ void TestMessageFormat2::testInvalidPatterns() {
|
|||
testInvalidPattern(++i, ".match {1} {{_}}", 12);
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "messageformat2test_utils.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/messageformat2_formattable.h"
|
||||
|
@ -197,6 +199,8 @@ class ResourceManager : public Formatter {
|
|||
} // namespace message2
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/calendar.h"
|
||||
#include "messageformat2test.h"
|
||||
|
||||
|
@ -188,4 +190,6 @@ void TestMessageFormat2::testBuiltInFunctions() {
|
|||
testNumbers(errorCode);
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "plurrule_impl.h"
|
||||
|
||||
#include "unicode/listformatter.h"
|
||||
|
@ -725,4 +727,6 @@ void TestMessageFormat2::testMessageRefFormatter(IcuTestErrorCode& errorCode) {
|
|||
TestUtils::runTestCase(*this, test, errorCode);
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/gregocal.h"
|
||||
#include "messageformat2test.h"
|
||||
|
||||
|
@ -471,4 +473,6 @@ void TestMessageFormat2::featureTests() {
|
|||
TestCase::~TestCase() {}
|
||||
TestCase::Builder::~Builder() {}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "messageformat2test.h"
|
||||
|
||||
using namespace icu::message2;
|
||||
|
@ -1257,4 +1259,7 @@ See https://github.com/unicode-org/message-format-wg/issues/726
|
|||
|
||||
// TODO: tests for other function options?
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/gregocal.h"
|
||||
#include "unicode/msgfmt.h"
|
||||
#include "messageformat2test.h"
|
||||
|
@ -152,4 +154,6 @@ void TestMessageFormat2::messageFormat1Tests() {
|
|||
testMf1Behavior(testBuilder, errorCode);
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
#ifndef _TESTMESSAGEFORMAT2_UTILS
|
||||
#define _TESTMESSAGEFORMAT2_UTILS
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#if !UCONFIG_NO_MF2
|
||||
|
||||
#include "unicode/locid.h"
|
||||
#include "unicode/messageformat2_formattable.h"
|
||||
#include "unicode/messageformat2.h"
|
||||
|
@ -11,8 +17,6 @@
|
|||
#include "messageformat2_macros.h"
|
||||
#include "messageformat2_serializer.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
U_NAMESPACE_BEGIN namespace message2 {
|
||||
|
||||
class TestCase : public UMemory {
|
||||
|
@ -307,6 +311,8 @@ class TestUtils {
|
|||
} // namespace message2
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_MF2 */
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue