From a8b44b09a404aee477e735501b828d1b14aad311 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Tue, 7 Jun 2022 01:33:52 +0200
Subject: feat: Add inital translation support

---
 .../src/app/pages/views/settings-labels-tile.svelte   | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

(limited to 'apps/projects/src/app/pages/views/settings-labels-tile.svelte')

diff --git a/apps/projects/src/app/pages/views/settings-labels-tile.svelte b/apps/projects/src/app/pages/views/settings-labels-tile.svelte
index f59e233..59b5e30 100644
--- a/apps/projects/src/app/pages/views/settings-labels-tile.svelte
+++ b/apps/projects/src/app/pages/views/settings-labels-tile.svelte
@@ -5,6 +5,7 @@
 	import Button from "$shared/components/button.svelte";
 	import Tile from "$shared/components/tile.svelte";
 	import {Table, THead, TBody, TCell, TRow} from "$shared/components/table";
+	import LL from "$app/lib/i18n/i18n-svelte";
 
 	let is_loading = true;
 
@@ -25,9 +26,7 @@
 		if (
 			row &&
 			row.dataset.id &&
-			confirm(
-				"Are you sure you want to delete this label?\nIt will be removed from all related entries!"
-			)
+			confirm($LL.views.settingsLabelsTile.deleteAllConfirm())
 		) {
 			await delete_label_async({id: row.dataset.id});
 			row.classList.add("d-none");
@@ -40,14 +39,14 @@
 </script>
 
 <Tile class="col-6@md col-12 {is_loading ? 'c-disabled loading' : ''}">
-    <h2 class="margin-bottom-xxs">Labels</h2>
+    <h2 class="margin-bottom-xxs">{$LL.views.settingsLabelsTile.labels()}</h2>
     {#if active_labels.length > 0 && archived_labels.length > 0}
         <nav class="s-tabs text-sm">
             <ul class="s-tabs__list">
                 <li><a class="s-tabs__link s-tabs__link--current"
-                       href="#0">Active ({active_labels.length})</a></li>
+                       href="#0">{$LL.views.settingsLabelsTile.active()} ({active_labels.length})</a></li>
                 <li><a class="s-tabs__link"
-                       href="#0">Archived ({archived_labels.length})</a></li>
+                       href="#0">{$LL.views.settingsLabelsTile.archived()} ({archived_labels.length})</a></li>
             </ul>
         </nav>
     {/if}
@@ -56,11 +55,11 @@
             <THead class="text-left">
             <TCell type="th"
                    thScope="row">
-                Name
+                {$LL.views.settingsLabelsTile.name()}
             </TCell>
             <TCell type="th"
                    thScope="row">
-                Color
+                {$LL.views.settingsLabelsTile.color()}
             </TCell>
             <TCell type="th"
                    thScope="row"
@@ -87,13 +86,13 @@
                                     class="hide"
                                     icon_height="1.2rem"
                                     on:click={handle_edit_label_click}
-                                    title="Edit entry"/>
+                                    title="{$LL.views.settingsLabelsTile.editEntry()}"/>
                             <Button icon="{IconNames.trash}"
                                     variant="reset"
                                     icon_width="1.2rem"
                                     icon_height="1.2rem"
                                     on:click={handle_delete_label_click}
-                                    title="Delete entry"/>
+                                    title="{$LL.views.settingsLabelsTile.deleteEntry()}"/>
                         </TCell>
                     </TRow>
                 {/each}
-- 
cgit v1.3

