mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 07:05:24 +00:00
fix(i18n): complete Simplified Chinese core and plugin translations (#1542)
* fix(i18n): complete Chinese onboarding and navigation labels * fix(i18n): translate remaining Chinese core and plugin interfaces * fix(i18n): translate host editor tab overflow controls * fix(i18n): use consistent Chinese fleet terminology * fix(i18n): localize hardcoded controls and plugin views * fix(i18n): translate built-in homepage widget catalog * test(homepage): follow translated timezone placeholder * fix(i18n): translate plugin-provided homepage widgets * fix(i18n): localize feature settings section titles
This commit is contained in:
1 parent
13f5736d8f
commit
0214a81e5d
78 files changed
+2423
-1833
No files matched your search
@@ -140,14 +140,18 @@ export function AddWidgetMenu({ state, onAdd, onClose }: AddWidgetMenuProps) {
|
||||
{type.labelComponent ? (
|
||||
<type.labelComponent part="name" />
|
||||
) : (
|
||||
type.name
|
||||
t(`homepage.widgets.${type.id}.name`, {
|
||||
defaultValue: type.name,
|
||||
})
|
||||
)}
|
||||
</span>
|
||||
<span className="text-[10px] text-muted-foreground truncate">
|
||||
{type.labelComponent ? (
|
||||
<type.labelComponent part="description" />
|
||||
) : (
|
||||
type.description
|
||||
t(`homepage.widgets.${type.id}.description`, {
|
||||
defaultValue: type.description,
|
||||
})
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@ export function ClockEditForm({
|
||||
onChange={(e) =>
|
||||
onChange({ ...config, timezone: e.target.value || undefined })
|
||||
}
|
||||
placeholder="America/New_York (leave blank for local)"
|
||||
placeholder={t("homepage.timezonePlaceholder")}
|
||||
aria-invalid={invalidTimezone}
|
||||
className={
|
||||
invalidTimezone ? "h-8 text-sm border-destructive" : "h-8 text-sm"
|
||||
|
||||
@@ -16,7 +16,7 @@ export function NotesEditForm({
|
||||
<Textarea
|
||||
value={config.content}
|
||||
onChange={(e) => onChange({ ...config, content: e.target.value })}
|
||||
placeholder="Write your notes here..."
|
||||
placeholder={t("homepage.notesPlaceholder")}
|
||||
className="text-sm min-h-[120px] resize-none rounded-none"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ export function WeatherEditForm({
|
||||
<Input
|
||||
value={config.location}
|
||||
onChange={(e) => onChange({ ...config, location: e.target.value })}
|
||||
placeholder="New York, London, Tokyo..."
|
||||
placeholder={t("homepage.locationPlaceholder")}
|
||||
className="h-8 text-sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useTranslation } from "@termix/plugin-sdk/frontend";
|
||||
import { StickyNote } from "lucide-react";
|
||||
import { registerWidget } from "./WidgetRegistry";
|
||||
import {
|
||||
@@ -8,6 +9,7 @@ import {
|
||||
import { WidgetTitle } from "@termix/plugin-sdk/ui";
|
||||
|
||||
function NotesWidget({ widget, config }: WidgetComponentProps<NotesConfig>) {
|
||||
const { t } = useTranslation();
|
||||
const { content, backgroundColor } = config;
|
||||
|
||||
return (
|
||||
@@ -19,7 +21,9 @@ function NotesWidget({ widget, config }: WidgetComponentProps<NotesConfig>) {
|
||||
<div className="flex-1 overflow-auto p-3">
|
||||
<pre className="text-xs text-foreground whitespace-pre-wrap break-words font-sans leading-relaxed select-text w-full">
|
||||
{content || (
|
||||
<span className="text-muted-foreground italic">Empty note...</span>
|
||||
<span className="text-muted-foreground italic">
|
||||
{t("homepage.emptyNote")}
|
||||
</span>
|
||||
)}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
@@ -100,7 +100,7 @@ function WeatherWidget({
|
||||
if (error) {
|
||||
return (
|
||||
<div className="flex items-center justify-center w-full h-full text-xs text-destructive/70 p-3 text-center">
|
||||
Could not load weather for "{location}"
|
||||
{t("homepage.weatherLoadFailed", { location })}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -108,7 +108,7 @@ function WeatherWidget({
|
||||
if (!data) {
|
||||
return (
|
||||
<div className="flex items-center justify-center w-full h-full text-xs text-muted-foreground/50">
|
||||
Loading...
|
||||
{t("common.loading")}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -138,7 +138,7 @@ function WeatherWidget({
|
||||
{desc}
|
||||
</span>
|
||||
<span className="text-[10px] text-muted-foreground/70">
|
||||
Feels like {displayFeels}
|
||||
{t("homepage.feelsLike", { temperature: displayFeels })}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user