chore(web): more translations for user settings and admin pages (#10161)

* chore(web): more translations for user settings and admin pages

* JobSettings translations

* feedback

* missed one

* feedback
This commit is contained in:
Michel Heusschen
2024-06-12 12:54:40 +02:00
committed by GitHub
parent 0e1311e3d3
commit 9e5c52b7b7
34 changed files with 300 additions and 160 deletions
+21 -16
View File
@@ -80,7 +80,7 @@
notificationController.show({
type: NotificationType.Info,
message: `Repaired ${matches.length} items`,
message: $t('admin.repaired_items', { values: { count: matches.length } }),
});
matches = [];
@@ -118,10 +118,13 @@
try {
const matched = await loadAndMatch([filename]);
if (matched) {
notificationController.show({ message: `Matched 1 item`, type: NotificationType.Info });
notificationController.show({
message: $t('admin.repair_matched_items', { values: { count: 1 } }),
type: NotificationType.Info,
});
}
} catch (error) {
handleError(error, $t('errors.unable_to_check_item'));
handleError(error, $t('errors.repair_unable_to_check_items', { values: { count: 'one' } }));
}
};
@@ -137,12 +140,15 @@
count += await loadAndMatch(filenames.slice(index, index + chunkSize));
}
} catch (error) {
handleError(error, $t('errors.unable_to_check_items'));
handleError(error, $t('errors.repair_unable_to_check_items', { values: { count: 'other' } }));
} finally {
checking = false;
}
notificationController.show({ message: `Matched ${count} items`, type: NotificationType.Info });
notificationController.show({
message: $t('admin.repair_matched_items', { values: { count } }),
type: NotificationType.Info,
});
};
const loadAndMatch = async (filenames: string[]) => {
@@ -178,25 +184,25 @@
<LinkButton on:click={() => handleRepair()} disabled={matches.length === 0 || repairing}>
<div class="flex place-items-center gap-2 text-sm">
<Icon path={mdiWrench} size="18" />
Repair All
{$t('admin.repair_all')}
</div>
</LinkButton>
<LinkButton on:click={() => handleCheckAll()} disabled={extras.length === 0 || checking}>
<div class="flex place-items-center gap-2 text-sm">
<Icon path={mdiCheckAll} size="18" />
Check All
{$t('admin.check_all')}
</div>
</LinkButton>
<LinkButton on:click={() => handleDownload()} disabled={extras.length + orphans.length === 0}>
<div class="flex place-items-center gap-2 text-sm">
<Icon path={mdiDownload} size="18" />
Export
{$t('export')}
</div>
</LinkButton>
<LinkButton on:click={() => handleRefresh()}>
<div class="flex place-items-center gap-2 text-sm">
<Icon path={mdiRefresh} size="18" />
Refresh
{$t('refresh')}
</div>
</LinkButton>
</div>
@@ -215,8 +221,8 @@
<tr class="flex w-full place-items-center p-2 md:p-5">
<th class="w-full text-sm place-items-center font-medium flex justify-between" colspan="2">
<div class="px-3">
<p>MATCHES {matches.length > 0 ? `(${matches.length})` : ''}</p>
<p class="text-gray-600 dark:text-gray-300 mt-1">These files are matched by their checksums</p>
<p>{$t('matches').toUpperCase()} {matches.length > 0 ? `(${matches.length})` : ''}</p>
<p class="text-gray-600 dark:text-gray-300 mt-1">{$t('admin.these_files_matched_by_checksum')}</p>
</div>
</th>
</tr>
@@ -249,9 +255,9 @@
<tr class="flex w-full place-items-center p-1 md:p-5">
<th class="w-full text-sm font-medium justify-between place-items-center flex" colspan="2">
<div class="px-3">
<p>OFFLINE PATHS {orphans.length > 0 ? `(${orphans.length})` : ''}</p>
<p>{$t('admin.offline_paths').toUpperCase()} {orphans.length > 0 ? `(${orphans.length})` : ''}</p>
<p class="text-gray-600 dark:text-gray-300 mt-1">
These results may be due to manual deletion of files that are not part of an external library.
{$t('admin.offline_paths_description')}
</p>
</div>
</th>
@@ -287,10 +293,9 @@
<tr class="flex w-full place-items-center p-2 md:p-5">
<th class="w-full text-sm font-medium place-items-center flex justify-between" colspan="2">
<div class="px-3">
<p>UNTRACKED FILES {extras.length > 0 ? `(${extras.length})` : ''}</p>
<p>{$t('admin.untracked_files').toUpperCase()} {extras.length > 0 ? `(${extras.length})` : ''}</p>
<p class="text-gray-600 dark:text-gray-300 mt-1">
These files are not tracked by the application. They can be the results of failed moves,
interrupted uploads, or left behind due to a bug
{$t('admin.untracked_files_description')}
</p>
</div>
</th>