mirror of
https://github.com/openharmony/global_i18n_lite.git
synced 2026-07-01 01:37:55 -04:00
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
|
||||
Licensed 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
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+1
-1
@@ -99,7 +99,7 @@ private:
|
||||
};
|
||||
|
||||
enum EPercentLocation {
|
||||
UNKOWN = 0,
|
||||
UNKNOWN = 0,
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
};
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+1
-1
@@ -24,7 +24,7 @@ using namespace std;
|
||||
/**
|
||||
* construct a DateTimeFormat object with request pattern and locale.
|
||||
* now we only support patterns defined in AvailableDateTimeFormatPatterns.
|
||||
* locale, locale information to retrive datetime resource form icu data.
|
||||
* locale, locale information to retrieve datetime resource form icu data.
|
||||
*/
|
||||
DateTimeFormat::DateTimeFormat(AvailableDateTimeFormatPattern requestPattern, const LocaleInfo &locale)
|
||||
{
|
||||
|
||||
Executable → Regular
+1
-1
@@ -24,7 +24,7 @@ using namespace std;
|
||||
/**
|
||||
* construct a DateTimeFormat object with request pattern and locale.
|
||||
* now we only support patterns defined in AvailableDateTimeFormatPatterns.
|
||||
* locale, locale information to retrive datetime resource form icu data.
|
||||
* locale, locale information to retrieve datetime resource form icu data.
|
||||
*/
|
||||
DateTimeFormatImpl::DateTimeFormatImpl(AvailableDateTimeFormatPattern requestPattern, const LocaleInfo &locale)
|
||||
{
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed 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
|
||||
@@ -288,9 +288,9 @@ void NumberFormatImpl::AddGroup(char *targetAndSource[], const int len[], const
|
||||
return;
|
||||
}
|
||||
char *target = targetAndSource[0]; // use array to store target and source string, first is target string
|
||||
int targetLen = len[0]; // use array to store target length and source length, first is target legnth
|
||||
int targetLen = len[0]; // use array to store target length and source length, first is target length
|
||||
char *source = targetAndSource[1]; // use array to store target and source string, second is source string
|
||||
int sourceLen = len[1]; // use array to store target length and source length, second is source legnth
|
||||
int sourceLen = len[1]; // use array to store target length and source length, second is source length
|
||||
int isTwoGroup = len[2]; // 2 is the index of group info
|
||||
int intLen = sourceLen - decLen;
|
||||
int addIndex = 0;
|
||||
|
||||
Executable → Regular
Executable → Regular
+1
-9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed 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
|
||||
@@ -178,8 +178,6 @@ bool PluralFormatImpl::ParseDecimalRule(const std::string &rule, const int ruleS
|
||||
// the final result should be true.
|
||||
} else if (nextSymbolIndex >= ruleSize) {
|
||||
return true;
|
||||
} else {
|
||||
// do nothing
|
||||
}
|
||||
} else {
|
||||
// If next symbol is or and current result or temp result is false, skip to next formula.
|
||||
@@ -194,8 +192,6 @@ bool PluralFormatImpl::ParseDecimalRule(const std::string &rule, const int ruleS
|
||||
} else if ((nextSymbolIndex >= ruleSize) &&
|
||||
!ParseDecimalFormula(rule, ruleSize, i, numberInfo, numberInfoSize)) {
|
||||
tempResult = false;
|
||||
} else {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -264,8 +260,6 @@ bool PluralFormatImpl::ParseRule(const std::string &rule, const int ruleSize, co
|
||||
// the final result should be true.
|
||||
} else if (nextSymbolIndex >= ruleSize) {
|
||||
return true;
|
||||
} else {
|
||||
// do nothing
|
||||
}
|
||||
} else {
|
||||
// If next symbol is or and current result or temp result is false, skip to next formula.
|
||||
@@ -279,8 +273,6 @@ bool PluralFormatImpl::ParseRule(const std::string &rule, const int ruleSize, co
|
||||
tempResult = false;
|
||||
} else if ((nextSymbolIndex >= ruleSize) && !ParseFormula(rule, ruleSize, i, number)) {
|
||||
tempResult = false;
|
||||
} else {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+1
-1
@@ -161,7 +161,7 @@ public:
|
||||
* and <b>ab:cd</b> indicates <b>hour:minute</b>.
|
||||
* @param appendTo Used to save the formatting result.
|
||||
* @param status Indicates the formatting status.
|
||||
* @return Returns 1 or -1 if am/pm markers should be put at the begining or end of the returned string when we call
|
||||
* @return Returns 1 or -1 if am/pm markers should be put at the beginning or end of the returned string when we call
|
||||
* format with HOUR12_MINUTE_SECOND, returns 0 if no am/pm markers should be added.
|
||||
*/
|
||||
int8_t Get12HourTimeWithoutAmpm(const time_t &cal, const std::string &zoneInfo,
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -36,9 +36,9 @@ public:
|
||||
virtual ~WeekInfo() = default;
|
||||
|
||||
/**
|
||||
* @brief Get the index of the begining day of a week.
|
||||
* @brief Get the index of the beginning day of a week.
|
||||
*
|
||||
* @return Returns the index of the begining day of a week, 1 stands for Sunday and 7 stands for Saturday
|
||||
* @return Returns the index of the beginning day of a week, 1 stands for Sunday and 7 stands for Saturday
|
||||
*/
|
||||
uint8_t GetFirstDayOfWeek();
|
||||
|
||||
@@ -50,9 +50,9 @@ public:
|
||||
uint8_t GetMinimalDaysInFirstWeek();
|
||||
|
||||
/**
|
||||
* @brief Get the index of the begining day of weekend.
|
||||
* @brief Get the index of the beginning day of weekend.
|
||||
*
|
||||
* @return Returns the index of the begining day of weekend, 1 stands for Sunday and 7 stands for Saturday
|
||||
* @return Returns the index of the beginning day of weekend, 1 stands for Sunday and 7 stands for Saturday
|
||||
*/
|
||||
uint8_t GetFirstDayOfWeekend();
|
||||
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -22,7 +22,6 @@
|
||||
<version>1.0</version>
|
||||
|
||||
<name>lite-data-tool</name>
|
||||
<!-- FIXME change it to the project's website -->
|
||||
<url>http://www.example.com</url>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -136,7 +136,7 @@ public class DataFetcher {
|
||||
* If a locale's data equals to its fallback's data, this locale is excluded
|
||||
* if a meta data of a locale equals to its fallback's data, this meta data is excluded
|
||||
* validLocales keep track of how many locales will be available in dat file.
|
||||
* count indicates how many metaData in total will be availabe in dat file.
|
||||
* count indicates how many metaData in total will be available in dat file.
|
||||
*
|
||||
* @return Total number of meta data count
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user