update localization for notifications, colors, and icons across multiple components
This commit is contained in:
@@ -394,8 +394,23 @@
|
|||||||
"failedScan": "Failed scan"
|
"failedScan": "Failed scan"
|
||||||
},
|
},
|
||||||
"descriptionPlaceholder": "Enter description...",
|
"descriptionPlaceholder": "Enter description...",
|
||||||
"notifTemplate": {
|
"notificationTemplate": {
|
||||||
"onDueDate": "On due date",
|
"onDueDate": "On due date",
|
||||||
|
"timing": {
|
||||||
|
"before": "Before",
|
||||||
|
"ondue": "Due",
|
||||||
|
"after": "After"
|
||||||
|
},
|
||||||
|
"unitName": {
|
||||||
|
"m": "minutes",
|
||||||
|
"h": "hours",
|
||||||
|
"d": "days"
|
||||||
|
},
|
||||||
|
"unitShort": {
|
||||||
|
"m": "Mins",
|
||||||
|
"h": "Hours",
|
||||||
|
"d": "Days"
|
||||||
|
},
|
||||||
"beforeDue": "{{count}} {{unit}} before due",
|
"beforeDue": "{{count}} {{unit}} before due",
|
||||||
"afterDue": "{{count}} {{unit}} after due",
|
"afterDue": "{{count}} {{unit}} after due",
|
||||||
"errDuplicate": "This notification setting already exists. Please use a different timing.",
|
"errDuplicate": "This notification setting already exists. Please use a different timing.",
|
||||||
|
|||||||
@@ -9,6 +9,32 @@
|
|||||||
"error": "Error",
|
"error": "Error",
|
||||||
"success": "Success",
|
"success": "Success",
|
||||||
"warning": "Warning",
|
"warning": "Warning",
|
||||||
|
"colors": {
|
||||||
|
"Salmon": "Salmon",
|
||||||
|
"Teal": "Teal",
|
||||||
|
"Sky Blue": "Sky Blue",
|
||||||
|
"Grape": "Grape",
|
||||||
|
"Sunshine": "Sunshine",
|
||||||
|
"Coral": "Coral",
|
||||||
|
"Lavender": "Lavender",
|
||||||
|
"Rose": "Rose",
|
||||||
|
"Charcoal": "Charcoal",
|
||||||
|
"Sienna": "Sienna",
|
||||||
|
"Mint": "Mint",
|
||||||
|
"Amber": "Amber",
|
||||||
|
"Cobalt": "Cobalt",
|
||||||
|
"Emerald": "Emerald",
|
||||||
|
"Peach": "Peach",
|
||||||
|
"Ocean": "Ocean",
|
||||||
|
"Mustard": "Mustard",
|
||||||
|
"Ruby": "Ruby",
|
||||||
|
"Periwinkle": "Periwinkle",
|
||||||
|
"Turquoise": "Turquoise",
|
||||||
|
"Lime": "Lime",
|
||||||
|
"Blush": "Blush",
|
||||||
|
"Ash": "Ash",
|
||||||
|
"Sand": "Sand"
|
||||||
|
},
|
||||||
"refresh": "Refresh",
|
"refresh": "Refresh",
|
||||||
"copy": "Copy",
|
"copy": "Copy",
|
||||||
"copied": "Copied!",
|
"copied": "Copied!",
|
||||||
|
|||||||
@@ -21,6 +21,20 @@
|
|||||||
"onTime": "On Time",
|
"onTime": "On Time",
|
||||||
"onTimeLabel": "On time"
|
"onTimeLabel": "On time"
|
||||||
},
|
},
|
||||||
|
"card": {
|
||||||
|
"wasDue": "Was due {{date}}",
|
||||||
|
"daysBeforeDue_one": "{{count}}d before due date",
|
||||||
|
"daysBeforeDue_other": "{{count}}d before due date",
|
||||||
|
"daysAfterDue_one": "{{count}}d after due date",
|
||||||
|
"daysAfterDue_other": "{{count}}d after due date",
|
||||||
|
"hoursBeforeDue_one": "{{count}}h before due date",
|
||||||
|
"hoursBeforeDue_other": "{{count}}h before due date",
|
||||||
|
"hoursAfterDue_one": "{{count}}h after due date",
|
||||||
|
"hoursAfterDue_other": "{{count}}h after due date",
|
||||||
|
"assignedTo": "Assigned to {{name}}",
|
||||||
|
"points_one": "★ {{count}} pt",
|
||||||
|
"points_other": "★ {{count}} pts"
|
||||||
|
},
|
||||||
"detail": {
|
"detail": {
|
||||||
"title": "Activity Detail",
|
"title": "Activity Detail",
|
||||||
"openTask": "Open Task",
|
"openTask": "Open Task",
|
||||||
|
|||||||
@@ -3,6 +3,32 @@
|
|||||||
"chooseIcon": "Choose Project Icon",
|
"chooseIcon": "Choose Project Icon",
|
||||||
"availableIcons": "Available Icons"
|
"availableIcons": "Available Icons"
|
||||||
},
|
},
|
||||||
|
"icons": {
|
||||||
|
"FolderOpen": "Folder",
|
||||||
|
"Work": "Work",
|
||||||
|
"Home": "Home",
|
||||||
|
"School": "School",
|
||||||
|
"BusinessCenter": "Business",
|
||||||
|
"Code": "Code",
|
||||||
|
"Build": "Build",
|
||||||
|
"Palette": "Design",
|
||||||
|
"SportsSoccer": "Sports",
|
||||||
|
"FitnessCenter": "Fitness",
|
||||||
|
"ShoppingCart": "Shopping",
|
||||||
|
"Restaurant": "Food",
|
||||||
|
"Flight": "Travel",
|
||||||
|
"Book": "Study",
|
||||||
|
"MusicNote": "Music",
|
||||||
|
"PhotoCamera": "Photo",
|
||||||
|
"Games": "Games",
|
||||||
|
"Science": "Science",
|
||||||
|
"AccountBalance": "Finance",
|
||||||
|
"LocalHospital": "Health",
|
||||||
|
"DirectionsCar": "Auto",
|
||||||
|
"Pets": "Pets",
|
||||||
|
"Garden": "Garden",
|
||||||
|
"Computer": "Tech"
|
||||||
|
},
|
||||||
"defaultChip": "Default",
|
"defaultChip": "Default",
|
||||||
"tasks_one": "{{count}} task",
|
"tasks_one": "{{count}} task",
|
||||||
"tasks_other": "{{count}} tasks",
|
"tasks_other": "{{count}} tasks",
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ function getRelativeLabel(notification, t) {
|
|||||||
const { unit, value } = notification
|
const { unit, value } = notification
|
||||||
const numericValue = Number(value)
|
const numericValue = Number(value)
|
||||||
if (numericValue === 0) {
|
if (numericValue === 0) {
|
||||||
return t('notifTemplate.onDueDate')
|
return t('notificationTemplate.onDueDate')
|
||||||
}
|
}
|
||||||
const unitName = t(`notifTemplate.unitName.${unit}`)
|
const unitName = t(`notificationTemplate.unitName.${unit}`)
|
||||||
const absValue = Math.abs(numericValue)
|
const absValue = Math.abs(numericValue)
|
||||||
return numericValue < 0
|
return numericValue < 0
|
||||||
? t('notifTemplate.beforeDue', { count: absValue, unit: unitName })
|
? t('notificationTemplate.beforeDue', { count: absValue, unit: unitName })
|
||||||
: t('notifTemplate.afterDue', { count: absValue, unit: unitName })
|
: t('notificationTemplate.afterDue', { count: absValue, unit: unitName })
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper functions to convert between internal value and UI representation
|
// Helper functions to convert between internal value and UI representation
|
||||||
@@ -223,7 +223,7 @@ const NotificationTemplate = ({
|
|||||||
if (!currentNotification) return
|
if (!currentNotification) return
|
||||||
|
|
||||||
if (isDuplicate(currentNotification, idx, currentList)) {
|
if (isDuplicate(currentNotification, idx, currentList)) {
|
||||||
setError(t('notifTemplate.errDuplicate'))
|
setError(t('notificationTemplate.errDuplicate'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -235,14 +235,14 @@ const NotificationTemplate = ({
|
|||||||
|
|
||||||
if (type === 'due') {
|
if (type === 'due') {
|
||||||
if (notificationsRef.current.some(n => Number(n.value) === 0)) {
|
if (notificationsRef.current.some(n => Number(n.value) === 0)) {
|
||||||
setError(t('notifTemplate.errOneDue'))
|
setError(t('notificationTemplate.errOneDue'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
newNotification = { value: 0, unit: 'm' }
|
newNotification = { value: 0, unit: 'm' }
|
||||||
} else {
|
} else {
|
||||||
newNotification = getSmartSuggestion(type)
|
newNotification = getSmartSuggestion(type)
|
||||||
if (!newNotification) {
|
if (!newNotification) {
|
||||||
setError(t('notifTemplate.errAllConfigured', { type }))
|
setError(t('notificationTemplate.errAllConfigured', { type }))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -578,7 +578,7 @@ const NotificationTemplate = ({
|
|||||||
value={opt.value}
|
value={opt.value}
|
||||||
disabled={opt.value === 'ondue' && hasOnDueElsewhere}
|
disabled={opt.value === 'ondue' && hasOnDueElsewhere}
|
||||||
>
|
>
|
||||||
{t(`notifTemplate.timing.${opt.value}`)}
|
{t(`notificationTemplate.timing.${opt.value}`)}
|
||||||
</Option>
|
</Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
@@ -641,7 +641,7 @@ const NotificationTemplate = ({
|
|||||||
>
|
>
|
||||||
{timeUnits.map(opt => (
|
{timeUnits.map(opt => (
|
||||||
<Option key={opt.value} value={opt.value}>
|
<Option key={opt.value} value={opt.value}>
|
||||||
{t(`notifTemplate.unitShort.${opt.value}`)}
|
{t(`notificationTemplate.unitShort.${opt.value}`)}
|
||||||
</Option>
|
</Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
@@ -691,7 +691,7 @@ const NotificationTemplate = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('notifTemplate.reminder')}
|
{t('notificationTemplate.reminder')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => addSmartNotification('due')}
|
onClick={() => addSmartNotification('due')}
|
||||||
@@ -713,7 +713,7 @@ const NotificationTemplate = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('notifTemplate.dueAlert')}
|
{t('notificationTemplate.dueAlert')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => addSmartNotification('followup')}
|
onClick={() => addSmartNotification('followup')}
|
||||||
@@ -732,7 +732,7 @@ const NotificationTemplate = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('notifTemplate.followUp')}
|
{t('notificationTemplate.followUp')}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
{showSaveDefault && (
|
{showSaveDefault && (
|
||||||
@@ -765,7 +765,7 @@ const NotificationTemplate = ({
|
|||||||
setShowSaveDefault(false)
|
setShowSaveDefault(false)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('notifTemplate.rememberFuture')}
|
{t('notificationTemplate.rememberFuture')}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ const AdvancedFilterBuilder = ({
|
|||||||
{FILTER_COLORS.map(c => (
|
{FILTER_COLORS.map(c => (
|
||||||
<Box
|
<Box
|
||||||
key={c.value}
|
key={c.value}
|
||||||
title={t(`common:colors.${c.key}`)}
|
title={t(`common:colors.${c.name}`)}
|
||||||
onClick={() => setFilterColor(c.value)}
|
onClick={() => setFilterColor(c.value)}
|
||||||
sx={{
|
sx={{
|
||||||
width: 26,
|
width: 26,
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const IconPickerModal = ({
|
|||||||
lineHeight: 1.2,
|
lineHeight: 1.2,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t(`icons.${iconData.key}`)}
|
{t(`icons.${iconData.value}`)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user