update localization for notifications, colors, and icons across multiple components
This commit is contained in:
@@ -394,8 +394,23 @@
|
||||
"failedScan": "Failed scan"
|
||||
},
|
||||
"descriptionPlaceholder": "Enter description...",
|
||||
"notifTemplate": {
|
||||
"notificationTemplate": {
|
||||
"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",
|
||||
"afterDue": "{{count}} {{unit}} after due",
|
||||
"errDuplicate": "This notification setting already exists. Please use a different timing.",
|
||||
|
||||
@@ -9,6 +9,32 @@
|
||||
"error": "Error",
|
||||
"success": "Success",
|
||||
"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",
|
||||
"copy": "Copy",
|
||||
"copied": "Copied!",
|
||||
|
||||
@@ -21,6 +21,20 @@
|
||||
"onTime": "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": {
|
||||
"title": "Activity Detail",
|
||||
"openTask": "Open Task",
|
||||
|
||||
@@ -3,6 +3,32 @@
|
||||
"chooseIcon": "Choose Project Icon",
|
||||
"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",
|
||||
"tasks_one": "{{count}} task",
|
||||
"tasks_other": "{{count}} tasks",
|
||||
|
||||
@@ -30,13 +30,13 @@ function getRelativeLabel(notification, t) {
|
||||
const { unit, value } = notification
|
||||
const numericValue = Number(value)
|
||||
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)
|
||||
return numericValue < 0
|
||||
? t('notifTemplate.beforeDue', { count: absValue, unit: unitName })
|
||||
: t('notifTemplate.afterDue', { count: absValue, unit: unitName })
|
||||
? t('notificationTemplate.beforeDue', { count: absValue, unit: unitName })
|
||||
: t('notificationTemplate.afterDue', { count: absValue, unit: unitName })
|
||||
}
|
||||
|
||||
// Helper functions to convert between internal value and UI representation
|
||||
@@ -223,7 +223,7 @@ const NotificationTemplate = ({
|
||||
if (!currentNotification) return
|
||||
|
||||
if (isDuplicate(currentNotification, idx, currentList)) {
|
||||
setError(t('notifTemplate.errDuplicate'))
|
||||
setError(t('notificationTemplate.errDuplicate'))
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -235,14 +235,14 @@ const NotificationTemplate = ({
|
||||
|
||||
if (type === 'due') {
|
||||
if (notificationsRef.current.some(n => Number(n.value) === 0)) {
|
||||
setError(t('notifTemplate.errOneDue'))
|
||||
setError(t('notificationTemplate.errOneDue'))
|
||||
return
|
||||
}
|
||||
newNotification = { value: 0, unit: 'm' }
|
||||
} else {
|
||||
newNotification = getSmartSuggestion(type)
|
||||
if (!newNotification) {
|
||||
setError(t('notifTemplate.errAllConfigured', { type }))
|
||||
setError(t('notificationTemplate.errAllConfigured', { type }))
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -578,7 +578,7 @@ const NotificationTemplate = ({
|
||||
value={opt.value}
|
||||
disabled={opt.value === 'ondue' && hasOnDueElsewhere}
|
||||
>
|
||||
{t(`notifTemplate.timing.${opt.value}`)}
|
||||
{t(`notificationTemplate.timing.${opt.value}`)}
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
@@ -641,7 +641,7 @@ const NotificationTemplate = ({
|
||||
>
|
||||
{timeUnits.map(opt => (
|
||||
<Option key={opt.value} value={opt.value}>
|
||||
{t(`notifTemplate.unitShort.${opt.value}`)}
|
||||
{t(`notificationTemplate.unitShort.${opt.value}`)}
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
@@ -691,7 +691,7 @@ const NotificationTemplate = ({
|
||||
},
|
||||
}}
|
||||
>
|
||||
{t('notifTemplate.reminder')}
|
||||
{t('notificationTemplate.reminder')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => addSmartNotification('due')}
|
||||
@@ -713,7 +713,7 @@ const NotificationTemplate = ({
|
||||
},
|
||||
}}
|
||||
>
|
||||
{t('notifTemplate.dueAlert')}
|
||||
{t('notificationTemplate.dueAlert')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => addSmartNotification('followup')}
|
||||
@@ -732,7 +732,7 @@ const NotificationTemplate = ({
|
||||
},
|
||||
}}
|
||||
>
|
||||
{t('notifTemplate.followUp')}
|
||||
{t('notificationTemplate.followUp')}
|
||||
</Button>
|
||||
</Box>
|
||||
{showSaveDefault && (
|
||||
@@ -765,7 +765,7 @@ const NotificationTemplate = ({
|
||||
setShowSaveDefault(false)
|
||||
}}
|
||||
>
|
||||
{t('notifTemplate.rememberFuture')}
|
||||
{t('notificationTemplate.rememberFuture')}
|
||||
</Button>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
@@ -202,7 +202,7 @@ const AdvancedFilterBuilder = ({
|
||||
{FILTER_COLORS.map(c => (
|
||||
<Box
|
||||
key={c.value}
|
||||
title={t(`common:colors.${c.key}`)}
|
||||
title={t(`common:colors.${c.name}`)}
|
||||
onClick={() => setFilterColor(c.value)}
|
||||
sx={{
|
||||
width: 26,
|
||||
|
||||
@@ -90,7 +90,7 @@ const IconPickerModal = ({
|
||||
lineHeight: 1.2,
|
||||
}}
|
||||
>
|
||||
{t(`icons.${iconData.key}`)}
|
||||
{t(`icons.${iconData.value}`)}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user