Skip to content

Commit

Permalink
Reset localization (sorry) + improved clarity of language setup (#2877)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>
  • Loading branch information
ildyria and d7415 authored Jan 10, 2025
1 parent 147627e commit 8e13ee2
Show file tree
Hide file tree
Showing 399 changed files with 16,333 additions and 3,812 deletions.
6 changes: 3 additions & 3 deletions app/Actions/Album/ListAlbums.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ function ($q) use ($albumsFiltering) {
$flat_tree,
[
'id' => null,
'title' => __('lychee.ROOT'),
'original' => __('lychee.ROOT'),
'short_title' => __('lychee.ROOT'),
'title' => __('gallery.root'),
'original' => __('gallery.root'),
'short_title' => __('gallery.root'),
'thumb' => URL::asset('img/no_images.svg'),
]
);
Expand Down
2 changes: 1 addition & 1 deletion app/Actions/Diagnostics/Pipes/Checks/DBIntegrityCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function handle(array &$data, \Closure $next): array
->get();

foreach ($photos as $photo) {
$data[] = 'Error: Photo without Original found -- ' . $photo->title . ' in ' . ($photo->album?->title ?? __('lychee.UNSORTED'));
$data[] = 'Error: Photo without Original found -- ' . $photo->title . ' in ' . ($photo->album?->title ?? __('gallery.smart_album.unsorted'));
}

return $next($data);
Expand Down
2 changes: 1 addition & 1 deletion app/Enum/LicenseType.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function localized(): array
{
return [
self::NONE->value => 'None',
self::RESERVED->value => __('lychee.ALBUM_RESERVED'),
self::RESERVED->value => __('gallery.album_reserved'),
self::CC0->value => 'CC0 - Public Domain',
self::CC_BY_1_0->value => 'CC Attribution 1.0',
self::CC_BY_2_0->value => 'CC Attribution 2.0',
Expand Down
8 changes: 4 additions & 4 deletions app/Enum/MapProviders.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public function getAtributionHtml(): string
{
return match ($this) {
self::Wikimedia => '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
self::OpenStreetMapOrg => '&copy; <a href="https://openstreetmap.org/copyright">' . __('lychee.OSM_CONTRIBUTORS') . '</a>',
self::OpenStreetMapDe => '&copy; <a href="https://openstreetmap.org/copyright">' . __('lychee.OSM_CONTRIBUTORS') . '</a>',
self::OpenStreetMapFr => '&copy; <a href="https://openstreetmap.org/copyright">' . __('lychee.OSM_CONTRIBUTORS') . '</a>',
self::RRZE => '&copy; <a href="https://openstreetmap.org/copyright">' . __('lychee.OSM_CONTRIBUTORS') . '</a>',
self::OpenStreetMapOrg => '&copy; <a href="https://openstreetmap.org/copyright">' . __('gallery.map.osm_contributors') . '</a>',
self::OpenStreetMapDe => '&copy; <a href="https://openstreetmap.org/copyright">' . __('gallery.map.osm_contributors') . '</a>',
self::OpenStreetMapFr => '&copy; <a href="https://openstreetmap.org/copyright">' . __('gallery.map.osm_contributors') . '</a>',
self::RRZE => '&copy; <a href="https://openstreetmap.org/copyright">' . __('gallery.map.osm_contributors') . '</a>',
};
}
}
16 changes: 8 additions & 8 deletions app/Enum/SizeVariantType.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ public function name(): string
public function localization(): string
{
return match ($this) {
self::PLACEHOLDER => __('lychee.PHOTO_PLACEHOLDER'),
self::THUMB => __('lychee.PHOTO_THUMB'),
self::THUMB2X => __('lychee.PHOTO_THUMB_HIDPI'),
self::SMALL => __('lychee.PHOTO_SMALL'),
self::SMALL2X => __('lychee.PHOTO_SMALL_HIDPI'),
self::MEDIUM => __('lychee.PHOTO_MEDIUM'),
self::MEDIUM2X => __('lychee.PHOTO_MEDIUM_HIDPI'),
self::ORIGINAL => __('lychee.PHOTO_ORIGINAL'),
self::PLACEHOLDER => __('gallery.placeholder'),
self::THUMB => __('gallery.thumb'),
self::THUMB2X => __('gallery.thumb_hidpi'),
self::SMALL => __('gallery.small'),
self::SMALL2X => __('gallery.small_hidpi'),
self::MEDIUM => __('gallery.medium'),
self::MEDIUM2X => __('gallery.medium_hidpi'),
self::ORIGINAL => __('gallery.original'),
};
}
}
2 changes: 1 addition & 1 deletion app/Http/Resources/GalleryConfigs/FooterConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public function __construct()
$copy_right_year = $copy_right_year . '-' . $site_copyright_end;
}

$this->copyright = $copy_right_year !== '' ? sprintf(__('lychee.FOOTER_COPYRIGHT'), $site_owner, $copy_right_year) : '';
$this->copyright = $copy_right_year !== '' ? sprintf(__('landing.copyright'), $site_owner, $copy_right_year) : '';
}
}
2 changes: 1 addition & 1 deletion app/Http/Resources/Models/Utils/PreformattedPhotoData.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(Photo $photo, ?SizeVariantResource $original = null)

$this->shutter = str_replace('s', 'sec', $photo->shutter ?? '');
$this->aperture = str_replace('f/', '', $photo->aperture ?? '');
$this->iso = sprintf(__('lychee.PHOTO_ISO'), $photo->iso);
$this->iso = sprintf(__('gallery.photo.details.iso'), $photo->iso);
$this->lens = ($photo->lens === '' || $photo->lens === null) ? '' : sprintf('(%s)', $photo->lens);

$this->duration = Helpers::secondsToHMS(intval($photo->aperture));
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/ProcessImageJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(
$this->originalBaseName = $file->getOriginalBasename();

$this->albumID = null;
$album_name = __('lychee.UNSORTED');
$album_name = __('gallery.smart_album.unsorted');

if ($album instanceof AbstractAlbum) {
$this->albumID = $album->id;
Expand Down
2 changes: 1 addition & 1 deletion app/Legacy/V1/Resources/Models/PhotoResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private function preformatted(?SizeVariant $original): array

'shutter' => str_replace('s', 'sec', $this->resource->shutter ?? ''),
'aperture' => str_replace('f/', '', $this->resource->aperture ?? ''),
'iso' => sprintf(__('lychee.PHOTO_ISO'), $this->resource->iso),
'iso' => sprintf(__('gallery.photo.details.iso'), $this->resource->iso),
'lens' => ($this->resource->lens === '' || $this->resource->lens === null) ? '' : sprintf('(%s)', $this->resource->lens),

'duration' => Helpers::secondsToHMS(intval($this->resource->aperture)),
Expand Down
2 changes: 1 addition & 1 deletion app/SmartAlbums/BaseSmartAlbum.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function __construct(SmartAlbumType $id, \Closure $smartCondition)
try {
$this->photoQueryPolicy = resolve(PhotoQueryPolicy::class);
$this->id = $id->value;
$this->title = __('lychee.' . $id->name) ?? $id->name;
$this->title = __('gallery.smart_album.' . strtolower($id->name)) ?? $id->name;
$this->smartPhotoCondition = $smartCondition;
/** @var AccessPermission|null $perm */
$perm = AccessPermission::query()->where('base_album_id', '=', $id->value)->first();
Expand Down
24 changes: 24 additions & 0 deletions lang/cz/diagnostics.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

return [
/*
|--------------------------------------------------------------------------
| Diagnostics page
|--------------------------------------------------------------------------
*/
'title' => 'Diagnostics',

'copy_to_clipboard' => 'Copy diagnostics to clipboard',
'self-diagnosis' => 'Self-diagnosis',
'info' => 'Info',
'space' => 'Space',
'load_space' => 'Load space usage.',
'configuration' => 'Configuration',
'loading' => 'Loading...',
'identical_content' => 'Identical content',

'toast' => [
'info' => 'Info',
'copy' => 'Diagnostics copied to clipboard!',
],
];
209 changes: 209 additions & 0 deletions lang/cz/dialogs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
<?php

return [
/*
|--------------------------------------------------------------------------
| Dialogs
|--------------------------------------------------------------------------
*/
'button' => [
'close' => 'Close',
'cancel' => 'Cancel',
'save' => 'Save',
'delete' => 'Delete',
'move' => 'Move',
],
'about' => [
'subtitle' => 'Self-hosted photo-management done right',
'description' => 'Lychee is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely.',
'update_available' => 'Update available!',
'thank_you' => 'Thank you for your support!',
'get_supporter_or_register' => 'Get exclusive features and support the development of Lychee.<br />Unlock the <a href="https://lycheeorg.github.io/get-supporter-edition/" class="text-primary-500 underline">Supporter Edition</a> or register your License key',
'here' => 'here',
],
'dropbox' => [
'not_configured' => 'Dropbox is not configured.',
],
'import_from_link' => [
'instructions' => 'Please enter the direct link to a photo to import it:',
'import' => 'Import',
],
'keybindings' => [
'don_t_show_again' => 'Don\'t show this again',
'side_wide' => 'Site-wide Shortcuts',
'back_cancel' => 'Back/Cancel',
'confirm' => 'Confirm',
'login' => 'Login',
'toggle_full_screen' => 'Toggle Full Screen',
'toggle_sensitive_albums' => 'Toggle Sensitive Albums',

'albums' => 'Albums Shortcuts',
'new_album' => 'New Album',
'upload_photos' => 'Upload Photos',
'search' => 'Search',
'show_this_modal' => 'Show this modal',
'select_all' => 'Select All',
'move_selection' => 'Move Selection',
'delete_selection' => 'Delete Selection',

'album' => 'Album Shortcuts',
'slideshow' => 'Start/Stop Slideshow',
'toggle' => 'Toggle panel',

'photo' => 'Photo Shortcuts',
'previous' => 'Previous photo',
'next' => 'Next photo',
'cycle' => 'Cycle overlay mode',
'star' => 'Star the photo',
'move' => 'Move the photo',
'delete' => 'Delete the photo',
'edit' => 'Edit information',
'show_hide_meta' => 'Show information',

'keep_hidden' => 'We will keep it hidden.',
],
'login' => [
'username' => 'Username',
'password' => 'Password',
'unknown_invalid' => 'Unknown user or invalid password.',
'signin' => 'Sign-In',
],
'register' => [
'enter_license' => 'Enter your license key below:',
'license_key' => 'License key',
'invalid_license' => 'Invalid license key.',
'register' => 'Register',
],
'share_album' => [
'url_copied' => 'Copied URL to clipboard!',
],
'upload' => [
'completed' => 'Completed',
'uploaded' => 'Uploaded:',
'release' => 'Release file to upload!',
'select' => 'Click here to select files to upload',
'drag' => '(Or drag files to the page)',
'loading' => 'Loading',
'resume' => 'Resume',
'uploading' => 'Uploading',
'finished' => 'Finished',
'failed_error' => 'Upload failed. The server returned an error!',
],
'visibility' => [
'public' => 'Public',
'public_expl' => 'Anonymous users can access this album, subject to the restrictions below.',
'full' => 'Original',
'full_expl' => 'Anonymous users can view full-resolution photos.',
'hidden' => 'Hidden',
'hidden_expl' => 'Anonymous users need a direct link to access this album.',
'downloadable' => 'Downloadable',
'downloadable_expl' => 'Anonymous users can download this album.',
'password' => 'Password',
'password_prot' => 'Password protected',
'password_prot_expl' => 'Anonymous users need a shared password to access this album.',
'nsfw' => 'Sensitive',
'nsfw_expl' => 'Album contains sensitive content.',
'visibility_updated' => 'Visibility updated.',
],
'move_album' => [
'confirm_single' => 'Are you sure you want to move the album “%1$s” into the album “%2$s”?',
'confirm_multiple' => 'Are you sure you want to move all selected albums into the album “%s”?',
'move_single' => 'Move Album',
'move_to' => 'Move to',
'move_to_single' => 'Move %s to:',
'move_to_multiple' => 'Move %d albums to:',
'no_album_target' => 'No album to move to',
'moved_single' => 'Album moved!',
'moved_single_details' => '%1$s moved to %2$s',
'moved_details' => 'Album(s) moved to %s',
],
'new_album' => [
'menu' => 'Create Album',
'info' => 'Enter a title for the new album:',
'title' => 'title',
'create' => 'Create Album',
],
'new_tag_album' => [
'menu' => 'Create Tag Album',
'info' => 'Enter a title for the new tag album:',
'title' => 'title',
'set_tags' => 'Set tags to show',
'warn' => 'Make sure to press enter after each tag',
'create' => 'Create Tag Album',
],
'delete_album' => [
'confirmation' => 'Are you sure you want to delete the album “%s” and all of the photos it contains?',
'confirmation_multiple' => 'Are you sure you want to delete all %d selected albums and all of the photos they contain?',
'warning' => 'This action can not be undone!',
'delete' => 'Delete Album and Photos',
],
'transfer' => [
'query' => 'Transfer ownership of album to',
'confirmation' => 'Are you sure you want to transfer the ownership of album “%s” and all the photos it contains to "%s"?',
'lost_access_warning' => 'Your access to this album will be lost.',
'warning' => 'This action can not be undone!',
'transfer' => 'Transfer ownership of album and photos',
],
'rename' => [
'photo' => 'Enter a new title for this photo:',
'album' => 'Enter a new title for this album:',
'rename' => 'Rename',
],
'merge' => [
'merge_to' => 'Merge %s to:',
'merge_to_multiple' => 'Merge %d albums to:',
'no_albums' => 'No albums to merge to.',
'confirm' => 'Are you sure you want to merge the album “%1$s” into the album “%2$s”?',
'confirm_multiple' => 'Are you sure you want to merge all selected albums into the album “%s”?',
'merge' => 'Merge Albums',
'merged' => 'Album(s) merged to %s!',
],
'unlock' => [
'password_required' => 'This album is protected by a password. Enter the password below to view the photos of this album:',
'password' => 'Password',
'unlock' => 'Unlock',
],
'photo_tags' => [
'question' => 'Enter your tags for this photo.',
'question_multiple' => 'Enter your tags for all %d selected photos. Existing tags will be overwritten.',
'no_tags' => 'No Tags',
'set_tags' => 'Set Tags',
'updated' => 'Tags updated!',
'tags_override_info' => 'If this is unchecked, the tags will be added to the existing tags of the photo.',
],
'photo_copy' => [
'no_albums' => 'No albums to copy to',
'copy_to' => 'Copy %s to:',
'copy_to_multiple' => 'Copy %d photos to:',
'confirm' => 'Copy %s to %s.',
'confirm_multiple' => 'Copy %d photos to %s.',
'copy' => 'Copy',
'copied' => 'Photo(s) copied!',
],
'photo_delete' => [
'confirm' => 'Are you sure you want to delete the photo “%s”?',
'confirm_multiple' => 'Are you sure you want to delete all %d selected photos?',
'deleted' => 'Photo(s) deleted!',
],
'move_photo' => [
'move_single' => 'Move %s to:',
'move_multiple' => 'Move %d photos to:',
'confirm' => 'Move %s to %s.',
'confirm_multiple' => 'Move %d photos to %s.',
'moved' => 'Photo(s) moved to %s!',
],
'target_user' => [
'placeholder' => 'Select user',
],
'target_album' => [
'placeholder' => 'Select album',
],
'webauthn' => [
'u2f' => 'U2F',
'success' => 'Authentication successful!',
'error' => 'Whoops, it looks like something went wrong. Please reload the site and try again!',
],
'se' => [
'available' => 'Available in the Supporter Edition',
],
];
Loading

0 comments on commit 8e13ee2

Please sign in to comment.