|
13 | 13 | import { serverConfigManager } from '$lib/managers/server-config-manager.svelte'; |
14 | 14 | import ServerRestartingModal from '$lib/modals/ServerRestartingModal.svelte'; |
15 | 15 | import { Route } from '$lib/route'; |
16 | | - import { locale } from '$lib/stores/preferences.store'; |
| 16 | + import { lang, locale } from '$lib/stores/preferences.store'; |
17 | 17 | import { sidebarStore } from '$lib/stores/sidebar.svelte'; |
18 | 18 | import { closeWebsocketConnection, openWebsocketConnection, websocketStore } from '$lib/stores/websocket'; |
19 | 19 | import { maintenanceShouldRedirect } from '$lib/utils/maintenance'; |
|
35 | 35 | toastManager, |
36 | 36 | TooltipProvider, |
37 | 37 | } from '@immich/ui'; |
| 38 | + import { En } from 'media-chrome/lang/en'; |
| 39 | + import { addTranslation } from 'media-chrome/utils/i18n'; |
38 | 40 | import { onMount, type Snippet } from 'svelte'; |
39 | 41 | import { t } from 'svelte-i18n'; |
40 | 42 | import { get } from 'svelte/store'; |
|
73 | 75 | save: $t('save'), |
74 | 76 | supporter: $t('supporter'), |
75 | 77 | }); |
| 78 | +
|
| 79 | + addTranslation($lang, { |
| 80 | + ...En, |
| 81 | + 'Enter fullscreen mode': $t('media_chrome.enter_fullscreen_mode'), |
| 82 | + 'Exit fullscreen mode': $t('media_chrome.exit_fullscreen_mode'), |
| 83 | + Mute: $t('media_chrome.mute'), |
| 84 | + Unmute: $t('media_chrome.unmute'), |
| 85 | + Play: $t('play'), |
| 86 | + Pause: $t('pause'), |
| 87 | + 'Playback rate': $t('media_chrome.playback_rate'), |
| 88 | + 'Playback rate {playbackRate}': $t('media_chrome.playback_rate_value'), |
| 89 | + Settings: $t('settings'), |
| 90 | + volume: $t('media_chrome.volume'), |
| 91 | + 'current playback rate': $t('media_chrome.playback_rate_current'), |
| 92 | + 'playback time': $t('media_chrome.playback_time'), |
| 93 | + settings: $t('settings'), |
| 94 | + play: $t('play'), |
| 95 | + pause: $t('pause'), |
| 96 | + mute: $t('media_chrome.mute'), |
| 97 | + unmute: $t('media_chrome.unmute'), |
| 98 | + 'enter fullscreen mode': $t('media_chrome.enter_fullscreen_mode'), |
| 99 | + 'exit fullscreen mode': $t('media_chrome.exit_fullscreen_mode'), |
| 100 | +
|
| 101 | + 'Network Error': $t('media_chrome.network_error'), |
| 102 | + 'Decode Error': $t('media_chrome.decode_error'), |
| 103 | + 'Source Not Supported': $t('media_chrome.not_supported_error'), |
| 104 | + 'A network error caused the media download to fail.': $t('media_chrome.network_error_description'), |
| 105 | + 'A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.': |
| 106 | + $t('media_chrome.media_error_description'), |
| 107 | + 'An unsupported error occurred. The server or network failed, or your browser does not support this format.': $t( |
| 108 | + 'media_chrome.not_supported_error_description', |
| 109 | + ), |
| 110 | + hour: $t('hour'), |
| 111 | + hours: $t('hours'), |
| 112 | + minute: $t('minute'), |
| 113 | + minutes: $t('minutes'), |
| 114 | + second: $t('media_chrome.second'), |
| 115 | + seconds: $t('media_chrome.seconds'), |
| 116 | + '{time} remaining': $t('media_chrome.time_value_remaining'), |
| 117 | + '{currentTime} of {totalTime}': $t('media_chrome.time_value_of_total_time'), |
| 118 | + }); |
76 | 119 | }); |
77 | 120 |
|
78 | 121 | $effect(() => setLocale($locale)); |
|
0 commit comments