Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(web): another missing translations #10274

Merged
merged 57 commits into from
Jun 24, 2024
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
5f363f5
chore(web): another missing translations
waclaw66 Jun 13, 2024
57ea1ec
unused removed
waclaw66 Jun 13, 2024
22306f1
Merge branch 'main' into chore/missing-translations
waclaw66 Jun 13, 2024
ef489d9
more keys
waclaw66 Jun 14, 2024
dd6dc0c
Merge branch 'main' into chore/missing-translations
waclaw66 Jun 14, 2024
df8b722
lint fix
waclaw66 Jun 14, 2024
95c9038
test fixed
waclaw66 Jun 14, 2024
233aa12
dynamic translation fix
waclaw66 Jun 14, 2024
f4c233b
fixes
waclaw66 Jun 14, 2024
f0c35df
people search translation
waclaw66 Jun 14, 2024
7a6403f
params fixed
waclaw66 Jun 14, 2024
231fefe
keep filter setting fix
waclaw66 Jun 14, 2024
7a04166
lint fix
waclaw66 Jun 14, 2024
45dd696
$t fixes
waclaw66 Jun 15, 2024
3757636
Update web/src/lib/i18n/en.json
waclaw66 Jun 15, 2024
b78f13b
another missing
waclaw66 Jun 16, 2024
82b2bdb
activity translation
waclaw66 Jun 16, 2024
08777dc
link sharing translations
waclaw66 Jun 17, 2024
3c34bc9
expiration dropdown fix - didn't work localized
waclaw66 Jun 17, 2024
9b6064c
Merge branch 'main' into chore/missing-translations
waclaw66 Jun 17, 2024
669715f
notification title
waclaw66 Jun 17, 2024
5b9ea19
device logout
waclaw66 Jun 17, 2024
c27cc94
search results
waclaw66 Jun 17, 2024
35c72c0
reset to default
waclaw66 Jun 17, 2024
1c19681
unsaved change
waclaw66 Jun 17, 2024
21cbbe7
select from computer
waclaw66 Jun 17, 2024
9eb8140
selected
waclaw66 Jun 17, 2024
368a20d
select-2
waclaw66 Jun 17, 2024
7748f24
select-3
waclaw66 Jun 17, 2024
a8c711b
unmerge
waclaw66 Jun 17, 2024
cea498c
Merge branch 'main' into chore/missing-translations
waclaw66 Jun 17, 2024
fac0716
Merge branch 'main' into chore/missing-translations
waclaw66 Jun 18, 2024
716954b
pluralize, force icu message
waclaw66 Jun 18, 2024
9a91f6d
Update web/src/lib/components/asset-viewer/asset-viewer.svelte
waclaw66 Jun 18, 2024
870b586
review fixes
waclaw66 Jun 18, 2024
7438f44
remove user
waclaw66 Jun 18, 2024
e1e8068
plural fixes
waclaw66 Jun 18, 2024
599f588
ffmpeg settings
waclaw66 Jun 19, 2024
a72e37d
Merge branch 'main' into chore/missing-translations
waclaw66 Jun 19, 2024
880e371
fixes
waclaw66 Jun 19, 2024
dec6c72
error title
waclaw66 Jun 20, 2024
e9dba7f
plural fixes
waclaw66 Jun 20, 2024
2cb64d0
onboarding
waclaw66 Jun 20, 2024
4e6f0a6
change password
waclaw66 Jun 20, 2024
082dc58
Merge branch 'main' into chore/missing-translations
waclaw66 Jun 21, 2024
f994dc9
more more
waclaw66 Jun 21, 2024
61c8826
console log fix
waclaw66 Jun 21, 2024
f2ecb22
another
waclaw66 Jun 21, 2024
d142817
Merge branch 'main' of https://github.com/waclaw66/immich into chore/…
waclaw66 Jun 21, 2024
b3c42e4
Merge branch 'main' into chore/missing-translations
waclaw66 Jun 24, 2024
2d99a38
api key desc
waclaw66 Jun 24, 2024
6171e37
map marker
waclaw66 Jun 24, 2024
ba429dc
format fix
waclaw66 Jun 24, 2024
f2c00c7
key fix
waclaw66 Jun 24, 2024
29d3bf0
asset-utils
waclaw66 Jun 24, 2024
6419402
utils
waclaw66 Jun 24, 2024
35b698a
misc
waclaw66 Jun 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more keys
waclaw66 committed Jun 14, 2024
commit ef489d9276e1785424de09df8547e24da4ede760
6 changes: 2 additions & 4 deletions web/src/lib/components/album-page/album-card.svelte
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
import { getShortDateRange } from '$lib/utils/date-time';
import AlbumCover from '$lib/components/album-page/album-cover.svelte';
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
import { s } from '$lib/utils';
import { t } from 'svelte-i18n';

export let album: AlbumResponseDto;
@@ -66,8 +65,7 @@
<span class="flex gap-2 text-sm dark:text-immich-dark-fg" data-testid="album-details">
{#if showItemCount}
<p>
{album.assetCount.toLocaleString($locale)}
item{s(album.assetCount)}
{$t('items_count', { values: { count: album.assetCount } })}
</p>
{/if}

@@ -79,7 +77,7 @@
{#if $user.id === album.ownerId}
<p>{$t('owned')}</p>
{:else if album.owner}
<p>Shared by {album.owner.name}</p>
<p>{$t('shared_by_user', { values: { user: album.owner.name } })}</p>
{:else}
<p>{$t('shared')}</p>
{/if}
2 changes: 1 addition & 1 deletion web/src/lib/components/album-page/album-options.svelte
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@
/>
{/if}
<SettingSwitch
title="Comments & likes"
title={$t('comments_and_likes')}
subtitle={$t('let_others_respond')}
checked={album.isActivityEnabled}
on:toggle={() => dispatch('toggleEnableActivity')}
3 changes: 2 additions & 1 deletion web/src/lib/components/album-page/album-summary.svelte
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
import { dateFormats } from '$lib/constants';
import { locale } from '$lib/stores/preferences.store';
import type { AlbumResponseDto } from '@immich/sdk';
import { t } from 'svelte-i18n';

export let album: AlbumResponseDto;

@@ -28,5 +29,5 @@
<span class="my-2 flex gap-2 text-sm font-medium text-gray-500" data-testid="album-details">
<span>{getDateRange(startDate, endDate)}</span>
<span>•</span>
<span>{album.assetCount} items</span>
<span>{$t('items_count', { values: { count: album.assetCount } })}</span>
</span>
8 changes: 4 additions & 4 deletions web/src/lib/components/album-page/albums-controls.svelte
Original file line number Diff line number Diff line change
@@ -118,8 +118,8 @@
options={Object.values(sortOptionsMetadata)}
selectedOption={selectedSortOption}
on:select={({ detail }) => handleChangeSortBy(detail)}
render={({ text }) => ({
title: text,
render={({ key }) => ({
waclaw66 marked this conversation as resolved.
Show resolved Hide resolved
title: $t(key),
icon: sortIcon,
})}
/>
@@ -130,8 +130,8 @@
options={Object.values(groupOptionsMetadata)}
selectedOption={selectedGroupOption}
on:select={({ detail }) => handleChangeGroupBy(detail)}
render={({ text, isDisabled }) => ({
title: text,
render={({ key, isDisabled }) => ({
title: $t(key),
icon: groupIcon,
disabled: isDisabled(),
})}
4 changes: 2 additions & 2 deletions web/src/lib/components/album-page/albums-list.svelte
Original file line number Diff line number Diff line change
@@ -304,7 +304,7 @@

const isConfirmed = await dialogController.show({
id: 'delete-album',
prompt: `Are you sure you want to delete the album ${albumToDelete.albumName}?\nIf this album is shared, other users will not be able to access it anymore.`,
prompt: $t('album_delete_confirmation', { values: { album: albumToDelete.albumName } }),
});

if (!isConfirmed) {
@@ -340,7 +340,7 @@
message: $t('album_info_updated'),
type: NotificationType.Info,
button: {
text: 'View Album',
text: $t('view_album'),
onClick() {
return goto(`${AppRoute.ALBUMS}/${album.id}`);
},
4 changes: 3 additions & 1 deletion web/src/lib/components/album-page/albums-table-row.svelte
Original file line number Diff line number Diff line change
@@ -34,7 +34,9 @@
path={mdiShareVariantOutline}
size="16"
class="inline ml-1 opacity-70"
title={album.ownerId === $user.id ? $t('shared_by_you') : `Shared by ${album.owner.name}`}
title={album.ownerId === $user.id
? $t('shared_by_you')
: $t('shared_by_user', { values: { user: album.owner.name } })}
/>
{/if}
</td>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script lang="ts">
import type { AlbumResponseDto } from '@immich/sdk';
import { t } from 'svelte-i18n';

export let album: AlbumResponseDto;
</script>

<span>{album.assetCount} items</span>
<span>{$t('items_count', { values: { count: album.assetCount } })}</span>
{#if album.shared}
<span>• Shared</span>
{/if}
15 changes: 7 additions & 8 deletions web/src/lib/components/asset-viewer/detail-panel.svelte
Original file line number Diff line number Diff line change
@@ -153,8 +153,7 @@
<div class="rounded-t bg-red-500 px-4 py-2 font-bold text-white">{$t('asset_offline')}</div>
<div class="rounded-b border border-t-0 border-red-400 bg-red-100 px-4 py-3 text-red-700">
<p>
This asset is offline. Immich can not access its file location. Please ensure the asset is available and
then rescan the library.
{$t('asset_offline_description')}
</p>
</div>
</div>
@@ -170,8 +169,8 @@
<div class="flex gap-2 items-center">
{#if unassignedFaces.length > 0}
<Icon
ariaLabel="Asset has unassigned faces"
title="Asset has unassigned faces"
ariaLabel={$t('asset_has_unassigned_faces')}
title={$t('asset_has_unassigned_faces')}
color="currentColor"
path={mdiAccountOff}
size="24"
@@ -243,11 +242,11 @@
)}
>
{#if ageInMonths <= 11}
Age {ageInMonths} months
{$t('age_months', { values: { months: ageInMonths } })}
{:else if ageInMonths > 12 && ageInMonths <= 23}
Age 1 year, {ageInMonths - 12} months
{$t('age_year_months', { values: { months: ageInMonths - 12 } })}
{:else}
Age {age}
{$t('age_years', { values: { years: age } })}
{/if}
</p>
{/if}
@@ -452,7 +451,7 @@
target="_blank"
class="font-medium text-immich-primary"
>
Open in OpenStreetMap
{$t('open_in_openstreetmap')}
</a>
</div>
</svelte:fragment>
2 changes: 1 addition & 1 deletion web/src/lib/components/faces-page/people-search.svelte
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@
searchedPeople = data;
searchWord = searchName;
} catch (error) {
handleError(error, $t('cant_search_people'));
handleError(error, $t('errors.cant_search_people'));
} finally {
clearTimeout(timeout);
timeout = null;
6 changes: 3 additions & 3 deletions web/src/lib/components/faces-page/person-side-panel.svelte
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@
allPeople = people;
peopleWithFaces = await getFaces({ id: assetId });
} catch (error) {
handleError(error, $t('cant_get_faces'));
handleError(error, $t('errors.cant_get_faces'));
} finally {
clearTimeout(timeout);
}
@@ -142,11 +142,11 @@
}

notificationController.show({
message: `Edited ${numberOfChanges} ${numberOfChanges > 1 ? 'people' : 'person'}`,
message: $t('people_edits_count', { values: { count: numberOfChanges } }),
type: NotificationType.Info,
});
} catch (error) {
handleError(error, $t('cant_apply_changes'));
handleError(error, $t('errors.cant_apply_changes'));
}
}

12 changes: 6 additions & 6 deletions web/src/lib/components/forms/login-form.svelte
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
return;
} catch (error) {
console.error('Error [login-form] [oauth.callback]', error);
oauthError = getServerErrorMessage(error) || 'Unable to complete OAuth login';
oauthError = getServerErrorMessage(error) || $t('errors.unable_to_complete_oauth_login');
oauthLoading = false;
}
}
@@ -48,7 +48,7 @@
return;
}
} catch (error) {
handleError(error, 'Unable to connect!');
handleError(error, $t('errors.unable_to_connect'));
}

oauthLoading = false;
@@ -74,7 +74,7 @@
await onSuccess();
return;
} catch (error) {
errorMessage = getServerErrorMessage(error) || 'Incorrect email or password';
errorMessage = getServerErrorMessage(error) || $t('errors.incorrect_email_or_password');
loading = false;
return;
}
@@ -86,7 +86,7 @@
const success = await oauth.authorize(window.location);
if (!success) {
oauthLoading = false;
oauthError = 'Unable to login with OAuth';
oauthError = $t('errors.unable_to_login_with_oauth');
}
};
</script>
@@ -124,7 +124,7 @@
<LoadingSpinner />
</span>
{:else}
Login
{$t('to_login')}
{/if}
</Button>
</div>
@@ -138,7 +138,7 @@
<span
class="absolute left-1/2 -translate-x-1/2 bg-white px-3 font-medium text-gray-900 dark:bg-immich-dark-gray dark:text-white"
>
or
{$t('or')}
</span>
</div>
{/if}
6 changes: 3 additions & 3 deletions web/src/lib/components/map-page/map-settings-modal.svelte
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@
settings.dateBefore = '';
}}
>
Remove custom date range
{$t('remove_custom_date_range')}
</LinkButton>
</div>
</div>
@@ -70,7 +70,7 @@
options={[
{
value: '',
text: 'All',
text: $t('all'),
},
{
value: Duration.fromObject({ hours: 24 }).toISO() || '',
@@ -101,7 +101,7 @@
settings.relativeDate = '';
}}
>
Use custom date range instead
{$t('use_custom_date_range')}
</LinkButton>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -16,9 +16,9 @@
const handleRemove = async () => {
const isConfirmed = await dialogController.show({
id: 'remove-from-shared-link',
title: 'Remove assets?',
prompt: `Are you sure you want to remove ${getAssets().size} asset${s(getAssets().size)} from this shared link?`,
confirmText: 'Remove',
title: $t('remove_assets_title'),
prompt: $t('remove_assets_confirmation', { values: { count: getAssets().size } }),
confirmText: $t('remove'),
});

if (!isConfirmed) {
@@ -46,12 +46,12 @@

notificationController.show({
type: NotificationType.Info,
message: `Removed ${count} assets`,
message: $t('assets_removed_count', { values: { count: count } }),
});

clearSelect();
} catch (error) {
handleError(error, 'Unable to remove assets from shared link');
handleError(error, $t('errors.unable_to_remove_assets_from_shared_link'));
}
};
</script>
Original file line number Diff line number Diff line change
@@ -57,11 +57,11 @@
const added = data.filter((item) => item.success).length;

notificationController.show({
message: `Added ${added} assets`,
message: $t('assets_added_count', { values: { count: added } }),
type: NotificationType.Info,
});
} catch (error) {
handleError(error, 'Unable to add assets to shared link');
handleError(error, $t('errors.unable_to_add_assets_to_shared_link'));
}
};

Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@
// skip error when a newer search is happening
if (latestSearchTimeout === searchTimeout) {
places = [];
handleError(error, $t('cant_search_places'));
handleError(error, $t('errors.cant_search_places'));
showLoadingSpinner = false;
}
});
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@
sharedLink = makeSharedLinkUrl($serverConfig.externalDomain, data.key);
dispatch('created');
} catch (error) {
handleError(error, 'Failed to create shared link');
handleError(error, $t('errors.failed_to_create_shared_link'));
}
};

@@ -162,7 +162,7 @@

onClose();
} catch (error) {
handleError(error, 'Failed to edit shared link');
handleError(error, $t('errors.failed_to_edit_shared_link'));
}
};

@@ -190,7 +190,7 @@

{#if shareType === SharedLinkType.Individual}
{#if !editingLink}
<div>Let anyone with the link see the selected photo(s)</div>
<div>{$t('create_link_to_share_description')}</div>
{:else}
<div class="text-sm">
Individual shared | <span class="text-immich-primary dark:text-immich-dark-primary"
@@ -233,13 +233,13 @@
<div class="my-3">
<SettingSwitch
bind:checked={allowDownload}
title={'Allow public user to download'}
title={$t('allow_public_user_to_download')}
disabled={!showMetadata}
/>
</div>

<div class="my-3">
<SettingSwitch bind:checked={allowUpload} title={'Allow public user to upload'} />
<SettingSwitch bind:checked={allowUpload} title={$t('allow_public_user_to_upload')} />
</div>

<div class="text-sm">
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
<div class="flex flex-wrap gap-x-5 gap-y-2 mt-1">
<Checkbox id="not-in-album-checkbox" label={$t('not_in_any_album')} bind:checked={filters.isNotInAlbum} />
<Checkbox id="archive-checkbox" label={$t('archive')} bind:checked={filters.isArchive} />
<Checkbox id="favorite-checkbox" label={$t('favorite')} bind:checked={filters.isFavorite} />
<Checkbox id="favorite-checkbox" label={$t('favorites')} bind:checked={filters.isFavorite} />
</div>
</fieldset>
</div>
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
const res = await getAllPeople({ withHidden: false });
return orderBySelectedPeopleFirst(res.people);
} catch (error) {
handleError(error, $t('failed_to_get_people'));
handleError(error, $t('errors.failed_to_get_people'));
}
}

@@ -93,10 +93,10 @@
>
{#if showAllPeople}
<span><Icon path={mdiClose} ariaHidden /></span>
Collapse
{$t('collapse')}
{:else}
<span><Icon path={mdiArrowRight} ariaHidden /></span>
See all people
{$t('see_all_people')}
{/if}
</Button>
</div>
Loading