Lint: Start cleanup of the i18n imports (#7327)

## Summary

Avoid direct access of i18n instance to favor useI18n

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7327-Lint-Start-cleanup-of-the-i18n-imports-2c56d73d3650811d9214c9a02863a5a3)
by [Unito](https://www.unito.io)

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Alexander Brown
2025-12-10 18:36:58 -08:00
committed by GitHub
parent fceb0017ce
commit 987dcb189d
7 changed files with 104 additions and 78 deletions

View File

@@ -197,6 +197,7 @@ export const i18n = createI18n({
})
/** Convenience shorthand: i18n.global */
/** @deprecated use useI18n */
export const { t, te, d } = i18n.global
/**
@@ -204,7 +205,8 @@ export const { t, te, d } = i18n.global
*
* @param key - The key to translate.
* @param fallbackMessage - The fallback message to use if the key is not found.
* @deprecated Remove, use the defaultMsg overload
*/
export function st(key: string, fallbackMessage: string) {
return te(key) ? t(key) : fallbackMessage
return t(key, fallbackMessage)
}

View File

@@ -19,7 +19,7 @@
</template>
<script setup lang="ts" generic="T">
// eslint-disable-next-line no-restricted-imports -- TODO: Migrate to Select component
// oxlint-disable-next-line no-restricted-imports -- TODO: Migrate to Select component
import Dropdown from 'primevue/dropdown'
import type { SearchOption } from '@/workbench/extensions/manager/types/comfyManagerTypes'