mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 07:35:24 +00:00
feat: move the classic layout into its own bundled plugin
This commit is contained in:
1 parent
86161d66e2
commit
d049588f7f
234 files changed
+3066
-76205
No files matched your search
@@ -1,4 +1,8 @@
|
||||
import type { TFunction } from "i18next";
|
||||
/** The part of a translate function these helpers use. */
|
||||
export type Translator = (
|
||||
key: string,
|
||||
options?: Record<string, unknown>,
|
||||
) => string;
|
||||
|
||||
/**
|
||||
* Where a plugin's i18n keys resolve from.
|
||||
@@ -28,7 +32,7 @@ export function pluginKey(
|
||||
* listed in a registry, shows the manifest name.
|
||||
*/
|
||||
export function pluginName(
|
||||
t: TFunction,
|
||||
t: Translator,
|
||||
plugin: { id: string; name: string },
|
||||
): string {
|
||||
return t(pluginKey(plugin.id, "plugin.name"), { defaultValue: plugin.name });
|
||||
@@ -36,7 +40,7 @@ export function pluginName(
|
||||
|
||||
/** Same as pluginName, for "plugin.description". */
|
||||
export function pluginDescription(
|
||||
t: TFunction,
|
||||
t: Translator,
|
||||
plugin: { id: string; description?: string | null },
|
||||
): string {
|
||||
return t(pluginKey(plugin.id, "plugin.description"), {
|
||||
|
||||
Reference in new issue
Block a user