Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore: remove unused locale hooks from the codebase (#6951)

白熱0e5611553856
diff --git a/packages/ui/src/components/hooks/locale.ts b/packages/ui/src/components/hooks/locale.ts
deleted file mode 100644
index 5822d674ab..0000000000
--- a/packages/ui/src/components/hooks/locale.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Copyright 2023-present DreamNum 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { LocaleService } from '@univerjs/core';
-import { useDependency } from '../../utils/di';
-
-export function useLocaleService() {
- return useDependency(LocaleService);
-}
-
-export function t(localeService: LocaleService, key: string, ...args: Array<number | string>): string {
- return localeService.t(key);
-}
diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts
index aea5193084..869f688d4a 100644
--- a/packages/ui/src/index.ts
+++ b/packages/ui/src/index.ts
@@ -28,7 +28,6 @@ export { FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT, type IFontFamilyProp
export { FontSize } from './components/font-size/FontSize';
export { FONT_SIZE_COMPONENT, FONT_SIZE_LIST, HEADING_LIST } from './components/font-size/interface';
export * from './components/hooks';
-export { t } from './components/hooks/locale';
export { type INotificationOptions } from './components/notification/Notification';
export { ProgressBar } from './components/progress-bar/ProgressBar';
export { type IUniverUIConfig, UI_PLUGIN_CONFIG_KEY } from './config/config';