feat(web): translations (#9854)

* First test

* Added translation using Weblate (French)

* Translated using Weblate (German)

Currently translated at 100.0% (4 of 4 strings)

Translation: immich/web
Translate-URL: http://familie-mach.net/projects/immich/web/de/

* Translated using Weblate (French)

Currently translated at 100.0% (4 of 4 strings)

Translation: immich/web
Translate-URL: http://familie-mach.net/projects/immich/web/fr/

* Further testing

* Further testing

* Translated using Weblate (German)

Currently translated at 100.0% (18 of 18 strings)

Translation: immich/web
Translate-URL: http://familie-mach.net/projects/immich/web/de/

* Further work

* Update string file.

* More strings

* Automatically changed strings

* Add automatically translated german file for testing purposes

* Fix merge-face-selector component

* Make server stats strings uppercase

* Fix uppercase string

* Fix some strings in jobs-panel

* Fix lower and uppercase strings. Add a few additional string. Fix a few unnecessary replacements

* Update german test translations

* Fix typo in locales file

* Change string keys

* Extract more strings

* Extract and replace some more strings

* Update testtranslationfile

* Change translation keys

* Fix rebase errors

* Fix one more rebase error

* Remove german translation file

* Co-authored-by: Daniel Dietzler <danieldietzler@users.noreply.github.com>

* chore: clean up translations

* chore: add new line

* fix formatting

* chore: fixes

* fix: loading and tests

---------

Co-authored-by: root <root@Blacki>
Co-authored-by: admin <admin@example.com>
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
Manic-87
2024-06-04 21:53:00 +02:00
committed by GitHub
parent a2bccf23c9
commit f446bc8caa
177 changed files with 2779 additions and 1017 deletions

View File

@@ -37,6 +37,7 @@
import type { PageData } from './$types';
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
import { dialogController } from '$lib/components/shared-components/dialog/dialog';
import { t } from 'svelte-i18n';
export let data: PageData;
@@ -124,7 +125,7 @@
type: NotificationType.Info,
});
} catch (error) {
handleError(error, 'Unable to create library');
handleError(error, $t('unable_to_create_library'));
} finally {
toCreateLibrary = false;
await readLibraryList();
@@ -142,7 +143,7 @@
closeAll();
await readLibraryList();
} catch (error) {
handleError(error, 'Unable to update library');
handleError(error, $t('unable_to_update_library'));
}
};
@@ -162,7 +163,7 @@
type: NotificationType.Info,
});
} catch (error) {
handleError(error, 'Unable to remove library');
handleError(error, $t('unable_to_remove_library'));
} finally {
confirmDeleteLibrary = null;
deletedLibrary = null;
@@ -180,7 +181,7 @@
type: NotificationType.Info,
});
} catch (error) {
handleError(error, 'Unable to scan libraries');
handleError(error, $t('unable_to_scan_libraries'));
}
};
@@ -192,7 +193,7 @@
type: NotificationType.Info,
});
} catch (error) {
handleError(error, 'Unable to scan library');
handleError(error, $t('unable_to_scan_library'));
}
};
@@ -204,7 +205,7 @@
type: NotificationType.Info,
});
} catch (error) {
handleError(error, 'Unable to scan library');
handleError(error, $t('unable_to_scan_library'));
}
};
@@ -216,7 +217,7 @@
type: NotificationType.Info,
});
} catch (error) {
handleError(error, 'Unable to scan library');
handleError(error, $t('unable_to_scan_library'));
}
};
@@ -328,14 +329,14 @@
<LinkButton on:click={() => handleScanAll()}>
<div class="flex gap-1 text-sm">
<Icon path={mdiSync} size="18" />
<span>Scan All Libraries</span>
<span>{$t('scan_all_libraries')}</span>
</div>
</LinkButton>
{/if}
<LinkButton on:click={() => (toCreateLibrary = true)}>
<div class="flex gap-1 text-sm">
<Icon path={mdiPlusBoxOutline} size="18" />
<span>Create Library</span>
<span>{$t('create_library')}</span>
</div>
</LinkButton>
</div>
@@ -347,11 +348,11 @@
class="mb-4 flex h-12 w-full rounded-md border bg-gray-50 text-immich-primary dark:border-immich-dark-gray dark:bg-immich-dark-gray dark:text-immich-dark-primary"
>
<tr class="grid grid-cols-6 w-full place-items-center">
<th class="text-center text-sm font-medium">Type</th>
<th class="text-center text-sm font-medium">Name</th>
<th class="text-center text-sm font-medium">Owner</th>
<th class="text-center text-sm font-medium">Assets</th>
<th class="text-center text-sm font-medium">Size</th>
<th class="text-center text-sm font-medium">{$t('type')}</th>
<th class="text-center text-sm font-medium">{$t('name')}</th>
<th class="text-center text-sm font-medium">{$t('owner')}</th>
<th class="text-center text-sm font-medium">{$t('assets')}</th>
<th class="text-center text-sm font-medium">{$t('size')}</th>
<th class="text-center text-sm font-medium" />
</tr>
</thead>
@@ -390,7 +391,7 @@
<CircleIconButton
color="primary"
icon={mdiDotsVertical}
title="Library options"
title={$t('library_options')}
size="16"
on:click={(e) => showMenu(e, library, index)}
/>
@@ -401,24 +402,27 @@
<MenuOption on:click={() => onRenameClicked()} text={`Rename`} />
{#if selectedLibrary}
<MenuOption on:click={() => onEditImportPathClicked()} text="Edit Import Paths" />
<MenuOption on:click={() => onScanSettingClicked()} text="Scan Settings" />
<MenuOption on:click={() => onEditImportPathClicked()} text={$t('edit_import_paths')} />
<MenuOption on:click={() => onScanSettingClicked()} text={$t('scan_settings')} />
<hr />
<MenuOption on:click={() => onScanNewLibraryClicked()} text="Scan New Library Files" />
<MenuOption on:click={() => onScanNewLibraryClicked()} text={$t('scan_new_library_files')} />
<MenuOption
on:click={() => onScanAllLibraryFilesClicked()}
text="Re-scan All Library Files"
subtitle={'Only refreshes modified files'}
text={$t('scan_all_library_files')}
subtitle={$t('only_refreshes_modified_files')}
/>
<MenuOption
on:click={() => onForceScanAllLibraryFilesClicked()}
text="Force Re-scan All Library Files"
subtitle={'Refreshes every file'}
text={$t('force_re-scan_library_files')}
subtitle={$t('refreshes_every_file')}
/>
<hr />
<MenuOption on:click={() => onRemoveOfflineFilesClicked()} text="Remove Offline Files" />
<MenuOption
on:click={() => onRemoveOfflineFilesClicked()}
text={$t('remove_offline_files')}
/>
<MenuOption on:click={() => onDeleteLibraryClicked()}>
<p class="text-red-600">Delete library</p>
<p class="text-red-600">{$t('delete_library')}</p>
</MenuOption>
{/if}
</ContextMenu>
@@ -459,10 +463,7 @@
<!-- Empty message -->
{:else}
<EmptyPlaceholder
text="Create an external library to view your photos and videos"
onClick={() => (toCreateLibrary = true)}
/>
<EmptyPlaceholder text={$t('no_libraries_message')} onClick={() => (toCreateLibrary = true)} />
{/if}
</div>
</section>