[translation] added translation for 'outdated' text

* better ui for outdated tag
* refactored TitleBarTags to not pass the singleton in its attribs
This commit is contained in:
silentrald
2024-12-10 23:43:40 +08:00
parent a47f17e766
commit 0b28cd61e8
10 changed files with 35 additions and 9 deletions
+3
View File
@@ -21,6 +21,9 @@
"warning": "Achtung",
"continue": "Weiter"
},
"title-bar": {
"outdated": "veraltet"
},
"nav-bar": {
"add-version": "Version hinzufügen",
"settings": "Einstellungen",
+3
View File
@@ -21,6 +21,9 @@
"warning": "Warning",
"continue": "Continue"
},
"title-bar": {
"outdated": "outdated"
},
"nav-bar": {
"add-version": "Add a version",
"settings": "Settings",
+3
View File
@@ -21,6 +21,9 @@
"warning": "Advertencia",
"continue": "Continuar"
},
"title-bar": {
"outdated": "obsoleto"
},
"nav-bar": {
"add-version": "Agregar una versión",
"settings": "Ajustes",
+3
View File
@@ -21,6 +21,9 @@
"warning": "Attention",
"continue": "Continuer"
},
"title-bar": {
"outdated": "démodé"
},
"nav-bar": {
"add-version": "Ajouter une version",
"settings": "Paramètres",
+3
View File
@@ -21,6 +21,9 @@
"warning": "警告",
"continue": "続ける"
},
"title-bar": {
"outdated": "時代遅れ"
},
"nav-bar": {
"add-version": "バージョンを追加",
"settings": "設定",
+3
View File
@@ -21,6 +21,9 @@
"warning": "경고",
"continue": "계속"
},
"title-bar": {
"outdated": "구식"
},
"nav-bar": {
"add-version": "버전 추가",
"settings": "설정",
+3
View File
@@ -21,6 +21,9 @@
"warning": "Внимание",
"continue": "Продолжить"
},
"title-bar": {
"outdated": "устаревший"
},
"nav-bar": {
"add-version": "Добавить версию игры",
"settings": "Настройки",
+3
View File
@@ -21,6 +21,9 @@
"warning": "警告",
"continue": "繼續"
},
"title-bar": {
"outdated": "過時"
},
"nav-bar": {
"add-version": "新增版本",
"settings": "設定",
+3
View File
@@ -21,6 +21,9 @@
"warning": "警告",
"continue": "继续"
},
"title-bar": {
"outdated": "过时的"
},
"nav-bar": {
"add-version": "添加版本",
"settings": "设置",
@@ -11,12 +11,12 @@ import "./title-bar.component.css";
import { useService } from "renderer/hooks/use-service.hook";
import { lastValueFrom } from "rxjs";
import { useWindowControls } from "renderer/hooks/use-window-controls.hook";
import { useTranslationV2 } from "renderer/hooks/use-translation.hook";
function TitleBarTags() {
const ipcService = useService(IpcService);
const t = useTranslationV2();
function TitleBarTags({
ipcService
}: Readonly<{
ipcService: IpcService
}>) {
const [previewVersion, setPreviewVersion] = useState("");
const [outdated, setOutdated] = useState(false);
@@ -50,15 +50,14 @@ function TitleBarTags({
</span>
}
{outdated &&
<span className="bg-main-color-1 text-white dark:text-black dark:bg-white rounded-full ml-1 text-[10px] italic px-1 uppercase h-3.5 font-bold">
Outdated
<span className="bg-warning-500 text-black rounded-full ml-1 text-[10px] italic px-1 uppercase h-3.5 font-bold">
{t.text("title-bar.outdated")}
</span>
}
</>;
}
export default function TitleBar({ template = "index.html" }: { template: AppWindow }) {
const ipcService = useService(IpcService);
const audio = useService(AudioPlayerService);
const windowControls = useWindowControls();
@@ -108,7 +107,7 @@ export default function TitleBar({ template = "index.html" }: { template: AppWin
<div id="drag-region" className="grow basis-0 h-full">
<div id="window-title" className="pl-1">
<span className="text-gray-800 dark:text-gray-100 font-bold text-xs italic">BSManager</span>
<TitleBarTags ipcService={ipcService} />
<TitleBarTags />
</div>
</div>
<div id="window-controls" className="h-full flex shrink-0 items-center">