feat(ai): localize AI features
This commit is contained in:
@@ -55,7 +55,10 @@ export function AutoLabelSuggestionDialog({
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
credentials: 'include',
|
||||
body: JSON.stringify({ notebookId }),
|
||||
body: JSON.stringify({
|
||||
notebookId,
|
||||
language: document.documentElement.lang || 'en',
|
||||
}),
|
||||
})
|
||||
|
||||
const data = await response.json()
|
||||
@@ -68,7 +71,7 @@ export function AutoLabelSuggestionDialog({
|
||||
} else {
|
||||
// No suggestions is not an error - just close the dialog
|
||||
if (data.message) {
|
||||
}
|
||||
}
|
||||
onOpenChange(false)
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -113,7 +116,7 @@ export function AutoLabelSuggestionDialog({
|
||||
if (data.success) {
|
||||
toast.success(
|
||||
t('ai.autoLabels.created', { count: data.data.createdCount }) ||
|
||||
`${data.data.createdCount} labels created successfully`
|
||||
`${data.data.createdCount} labels created successfully`
|
||||
)
|
||||
onLabelsCreated()
|
||||
onOpenChange(false)
|
||||
|
||||
Reference in New Issue
Block a user