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

Reset localization (sorry) + improved clarity of language setup #2877

Merged
merged 49 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7b002cb
about localized
ildyria Jan 4, 2025
50754d4
dropbox localized
ildyria Jan 4, 2025
295675b
import from link localized
ildyria Jan 4, 2025
1ec0600
import from server is gone
ildyria Jan 4, 2025
ded9a46
keybindings localized
ildyria Jan 4, 2025
877f252
login localized
ildyria Jan 4, 2025
86291c8
register localized
ildyria Jan 4, 2025
a6f4c4b
share album localized
ildyria Jan 4, 2025
0c7930e
upload localized
ildyria Jan 4, 2025
3ec5fb9
webauthn localized
ildyria Jan 4, 2025
1a9d44a
settings localized
ildyria Jan 4, 2025
237875a
users localized
ildyria Jan 4, 2025
f816e61
diagnostics localized
ildyria Jan 4, 2025
572d445
typo
ildyria Jan 4, 2025
e21aab1
statistics localized
ildyria Jan 4, 2025
32f5948
maintenance localized
ildyria Jan 5, 2025
ed4eb38
comments
ildyria Jan 5, 2025
8930631
jobs localized
ildyria Jan 5, 2025
e2a3657
profile localized
ildyria Jan 5, 2025
17cf73f
remove unused files
ildyria Jan 5, 2025
a7b70c1
warning legacy
ildyria Jan 5, 2025
82664af
landing page localized
ildyria Jan 5, 2025
900d729
permission page
ildyria Jan 5, 2025
d1b9115
sharing localized
ildyria Jan 5, 2025
4141bab
footer localized
ildyria Jan 5, 2025
f97b841
left menu localized and other fixes
ildyria Jan 5, 2025
5eb5657
albums, map, search localized
ildyria Jan 5, 2025
e50bf6b
progress on album localization: transfer, delete, search_user
ildyria Jan 5, 2025
a684e89
album move and visibility
ildyria Jan 5, 2025
f48273e
unlock localized
ildyria Jan 5, 2025
19e8101
properties localized
ildyria Jan 5, 2025
f044887
album hero localized
ildyria Jan 5, 2025
0b2a258
Merge branch 'master' into localization
ildyria Jan 5, 2025
612dbe7
fix
ildyria Jan 5, 2025
2d7ece9
headers
ildyria Jan 5, 2025
be5faba
photo copy and move
ildyria Jan 5, 2025
36addd1
merge dialog localized
ildyria Jan 5, 2025
e2a4fcc
album page done
ildyria Jan 5, 2025
e1a3b55
photo details localized
ildyria Jan 5, 2025
ecc4e8b
photo edit localized
ildyria Jan 5, 2025
c8212df
fix most php code localization
ildyria Jan 5, 2025
06b4eb6
menus
ildyria Jan 5, 2025
d48c18a
done
ildyria Jan 5, 2025
77df08a
cleaning up
ildyria Jan 5, 2025
35705d5
propagate languages
ildyria Jan 5, 2025
ce858eb
fix test
ildyria Jan 5, 2025
a4b2ae6
Apply suggestions from code review
ildyria Jan 9, 2025
6a7b21b
WRTC
ildyria Jan 9, 2025
9adb8a3
propagate changes from review
ildyria Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
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) : '';
}
}
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
Loading