From e1625d1328e97e96dc7c59139a8d94c9a096c9c5 Mon Sep 17 00:00:00 2001 From: sunyaozu Date: Sat, 30 Nov 2024 03:05:34 +0000 Subject: [PATCH] update api/@ohos.i18n.d.ts. Signed-off-by: sunyaozu --- api/@ohos.i18n.d.ts | 59 ++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/api/@ohos.i18n.d.ts b/api/@ohos.i18n.d.ts index c18829ef7..992343dd5 100644 --- a/api/@ohos.i18n.d.ts +++ b/api/@ohos.i18n.d.ts @@ -19,6 +19,7 @@ */ import { BusinessError } from './@ohos.base'; +import intl from './ohos.intl'; /** * Provides international settings related APIs. @@ -680,7 +681,7 @@ declare namespace i18n { * @useinstead ohos.i18n/i18n.I18NUtil#unitConvert */ unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: number, locale: string, style?: string): string; - } + } /** * Provides util functions. @@ -793,7 +794,7 @@ declare namespace i18n { * * @param { string } locale - the origin locale. It must be a valid locale. * @param { string[] } localeList - a list of locales to be matched. It must be a valid locale. - * @returns { string } the string of the best matched locale name. + * @returns { string } the string of the best matched locale name. * The return value may be empty string due to none is matched. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. @@ -809,7 +810,7 @@ declare namespace i18n { * Get a three-letter abbreviation of the specified language. * * @param { string } locale - the origin locale or language code. It must be a valid locale. - * @returns { string } 3 letter language code. + * @returns { string } 3 letter language code. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @static @@ -823,7 +824,7 @@ declare namespace i18n { * Get a three-letter abbreviation of the specified region. * * @param { string } locale - the origin locale or region code. It must be a valid locale. - * @returns { string } 3 letter region code. + * @returns { string } 3 letter region code. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @static @@ -899,7 +900,7 @@ declare namespace i18n { * @since 12 */ measureSystem: string; - } + } /** * Provides the options of PhoneNumberFormat. @@ -958,7 +959,7 @@ declare namespace i18n { * @since 12 */ type?: string; - } + } /** * Provides the API for formatting phone number strings @@ -1089,7 +1090,7 @@ declare namespace i18n { * @since 12 */ getLocationName(number: string, locale: string): string; - } + } /** * Get a Calendar instance specified by locale and type. @@ -1556,7 +1557,7 @@ declare namespace i18n { * @since 12 */ compareDays(date: Date): number; - } + } /** * Judge whether the locale is RTL locale. @@ -1786,7 +1787,7 @@ declare namespace i18n { * @since 12 */ isBoundary(offset: number): boolean; - } + } /** * Get IndexUtil object. @@ -1877,7 +1878,7 @@ declare namespace i18n { * @since 12 */ getIndex(text: string): string; - } + } /** * Provides the API for accessing unicode character properties. For example, determine whether a character is a number. @@ -1995,7 +1996,7 @@ declare namespace i18n { * @useinstead Unicode.getType */ getType(char: string): string; - } + } /** * Provides the API for accessing unicode character properties. For example, determine whether a character is a number. @@ -2279,7 +2280,7 @@ declare namespace i18n { * @since 12 */ static getType(char: string): string; - } + } /** * check out whether system is 24-hour system. @@ -2614,7 +2615,7 @@ declare namespace i18n { * @since 12 */ static getTimezonesByLocation(longitude: number, latitude: number): Array; - } + } /** * Provides the API for transliterate text from one format to another. @@ -2688,7 +2689,7 @@ declare namespace i18n { * @since 12 */ transform(text: string): string; - } + } /** * Enumerates the Normalizer modes. @@ -2765,7 +2766,7 @@ declare namespace i18n { * @since 12 */ NFKD = 4 - } + } /** * Provides the API for text encoding normalization. @@ -2822,7 +2823,7 @@ declare namespace i18n { * @since 12 */ normalize(text: string): string; - } + } /** * Enumerates the locale suggestion type modes. @@ -2859,7 +2860,7 @@ declare namespace i18n { * @since 10 */ SUGGESTION_TYPE_SIM = 2 - } + } /** * Provides the options which is used to sort the locales. @@ -2899,7 +2900,7 @@ declare namespace i18n { * @since 10 */ isSuggestedFirst?: boolean; - } + } /** * Provide information for a language or region @@ -2948,7 +2949,7 @@ declare namespace i18n { * @since 10 */ localName?: string; - } + } /** * Provides the informations of one time zone city. @@ -3016,7 +3017,7 @@ declare namespace i18n { * @since 10 */ rawOffset?: number; - } + } /** * Provide some functions for settings and startup guide to select language or region. @@ -3107,7 +3108,7 @@ declare namespace i18n { * @since 12 */ static getTimeZoneCityItemArray(): Array; - } + } /** * Provides the informations of one holiday. @@ -3209,7 +3210,7 @@ declare namespace i18n { * @since 12 */ localNames?: Array; - } + } /** * Provides the informations holiday locale name. @@ -3260,7 +3261,7 @@ declare namespace i18n { * @since 12 */ name: string; - } + } /** * Provide some functions to manage holidays in a country or region. Partly follows the RFC2445 standard. @@ -3344,7 +3345,7 @@ declare namespace i18n { * @since 12 */ getHolidayInfoItemArray(year?: number): Array; - } + } /** * Provides the informations of one entity. @@ -3412,7 +3413,7 @@ declare namespace i18n { * @since 12 */ type: string; - } + } /** * Provide some functions to find named entity in text. @@ -3469,7 +3470,7 @@ declare namespace i18n { * @since 12 */ findEntityInfo(text: string): Array; - } + } /** * Enumerates the week day. @@ -3647,7 +3648,7 @@ declare namespace i18n { * @atomicservice * @since 16 */ - export function getNumberFormatBySkeleton(skeleton: string, locale?: intl.Locale): SimpleNumberFormat; + export function getSimpleNumberFormatBySkeleton(skeleton: string, locale?: intl.Locale): SimpleNumberFormat; /** * Provide a simple number formatting interface. @@ -3753,6 +3754,4 @@ declare namespace i18n { } } -export default i18n; - -import intl from './ohos.intl'; \ No newline at end of file +export default i18n; \ No newline at end of file -- Gitee