mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
fix(i18n): add translations for new notification event labels
This commit is contained in:
@@ -40,6 +40,9 @@ const EVENT_LABEL_KEYS: Record<string, string> = {
|
||||
todo_due: 'settings.notifyTodoDue',
|
||||
vacay_invite: 'settings.notifyVacayInvite',
|
||||
vacay_share: 'settings.notifyVacayShare',
|
||||
collection_invite: 'settings.notifyCollectionInvite',
|
||||
synology_session_cleared: 'settings.notifySynologySessionCleared',
|
||||
plugin_notification: 'settings.notifyPluginNotification',
|
||||
photos_shared: 'settings.notifyPhotosShared',
|
||||
collab_message: 'settings.notifyCollabMessage',
|
||||
packing_tagged: 'settings.notifyPackingTagged',
|
||||
|
||||
@@ -83,7 +83,7 @@ export default function MAdminNotifyMatrix({ t, toast }: { t: TranslationFn; toa
|
||||
</div>
|
||||
{matrix.event_types.map((eventType) => {
|
||||
const implemented = matrix.implemented_combos[eventType] ?? []
|
||||
// Only version_available has a label key so far; anything else keeps its raw id.
|
||||
// Known admin events use translated labels; anything else keeps its raw id.
|
||||
const labelKey = ADMIN_EVENT_LABEL_KEYS[eventType]
|
||||
return (
|
||||
<div key={eventType} className="flex items-center gap-1 border-b border-[color:var(--m-rowbr)] py-2">
|
||||
|
||||
@@ -39,6 +39,9 @@ const EVENT_LABEL_KEYS: Record<string, string> = {
|
||||
todo_due: 'settings.notifyTodoDue',
|
||||
vacay_invite: 'settings.notifyVacayInvite',
|
||||
vacay_share: 'settings.notifyVacayShare',
|
||||
collection_invite: 'settings.notifyCollectionInvite',
|
||||
synology_session_cleared: 'settings.notifySynologySessionCleared',
|
||||
plugin_notification: 'settings.notifyPluginNotification',
|
||||
photos_shared: 'settings.notifyPhotosShared',
|
||||
collab_message: 'settings.notifyCollabMessage',
|
||||
packing_tagged: 'settings.notifyPackingTagged',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
export const ADMIN_EVENT_LABEL_KEYS: Record<string, string> = {
|
||||
version_available: 'settings.notifyVersionAvailable',
|
||||
replica_failure: 'settings.notifyReplicaFailure',
|
||||
}
|
||||
|
||||
export const ADMIN_CHANNEL_LABEL_KEYS: Record<string, string> = {
|
||||
|
||||
Reference in New Issue
Block a user