feat(ai): localize AI features
This commit is contained in:
@@ -24,6 +24,15 @@ export interface Translations {
|
||||
createAccount: string
|
||||
rememberMe: string
|
||||
orContinueWith: string
|
||||
checkYourEmail: string
|
||||
resetEmailSent: string
|
||||
returnToLogin: string
|
||||
forgotPasswordTitle: string
|
||||
forgotPasswordDescription: string
|
||||
sending: string
|
||||
sendResetLink: string
|
||||
backToLogin: string
|
||||
signOut: string
|
||||
}
|
||||
sidebar: {
|
||||
notes: string
|
||||
@@ -65,6 +74,8 @@ export interface Translations {
|
||||
invalidDateTime: string
|
||||
reminderMustBeFuture: string
|
||||
reminderSet: string
|
||||
reminderPastError: string
|
||||
reminderRemoved: string
|
||||
addImage: string
|
||||
addLink: string
|
||||
linkAdded: string
|
||||
@@ -92,6 +103,34 @@ export interface Translations {
|
||||
noNotes: string
|
||||
noNotesFound: string
|
||||
createFirstNote: string
|
||||
size: string
|
||||
small: string
|
||||
medium: string
|
||||
large: string
|
||||
shareWithCollaborators: string
|
||||
view: string
|
||||
edit: string
|
||||
readOnly: string
|
||||
preview: string
|
||||
noContent: string
|
||||
takeNote: string
|
||||
takeNoteMarkdown: string
|
||||
addItem: string
|
||||
sharedReadOnly: string
|
||||
makeCopy: string
|
||||
saving: string
|
||||
copySuccess: string
|
||||
copyFailed: string
|
||||
copy: string
|
||||
markdownOn: string
|
||||
markdownOff: string
|
||||
undo: string
|
||||
redo: string
|
||||
}
|
||||
pagination: {
|
||||
previous: string
|
||||
pageInfo: string
|
||||
next: string
|
||||
}
|
||||
labels: {
|
||||
title: string
|
||||
@@ -110,9 +149,19 @@ export interface Translations {
|
||||
labelName: string
|
||||
labelColor: string
|
||||
manageLabels: string
|
||||
manageLabelsDescription: string
|
||||
selectedLabels: string
|
||||
allLabels: string
|
||||
clearAll: string
|
||||
filterByLabel: string
|
||||
tagAdded: string
|
||||
showLess: string
|
||||
showMore: string
|
||||
editLabels: string
|
||||
editLabelsDescription: string
|
||||
noLabelsFound: string
|
||||
loading: string
|
||||
notebookRequired: string
|
||||
}
|
||||
search: {
|
||||
placeholder: string
|
||||
@@ -133,6 +182,27 @@ export interface Translations {
|
||||
canEdit: string
|
||||
canView: string
|
||||
shareNote: string
|
||||
shareWithCollaborators: string
|
||||
addCollaboratorDescription: string
|
||||
viewerDescription: string
|
||||
emailAddress: string
|
||||
enterEmailAddress: string
|
||||
invite: string
|
||||
peopleWithAccess: string
|
||||
noCollaborators: string
|
||||
noCollaboratorsViewer: string
|
||||
pendingInvite: string
|
||||
pending: string
|
||||
remove: string
|
||||
unnamedUser: string
|
||||
done: string
|
||||
willBeAdded: string
|
||||
alreadyInList: string
|
||||
nowHasAccess: string
|
||||
accessRevoked: string
|
||||
errorLoading: string
|
||||
failedToAdd: string
|
||||
failedToRemove: string
|
||||
}
|
||||
ai: {
|
||||
analyzing: string
|
||||
@@ -143,6 +213,64 @@ export interface Translations {
|
||||
poweredByAI: string
|
||||
languageDetected: string
|
||||
processing: string
|
||||
tagAdded: string
|
||||
titleGenerating: string
|
||||
titleGenerateWithAI: string
|
||||
titleGenerationMinWords: string
|
||||
titleGenerationError: string
|
||||
titlesGenerated: string
|
||||
titleGenerationFailed: string
|
||||
titleApplied: string
|
||||
reformulationNoText: string
|
||||
reformulationSelectionTooShort: string
|
||||
reformulationMinWords: string
|
||||
reformulationMaxWords: string
|
||||
reformulationError: string
|
||||
reformulationFailed: string
|
||||
reformulationApplied: string
|
||||
transformMarkdown: string
|
||||
transforming: string
|
||||
transformSuccess: string
|
||||
transformError: string
|
||||
assistant: string
|
||||
generating: string
|
||||
generateTitles: string
|
||||
reformulateText: string
|
||||
reformulating: string
|
||||
clarify: string
|
||||
shorten: string
|
||||
improveStyle: string
|
||||
reformulationComparison: string
|
||||
original: string
|
||||
reformulated: string
|
||||
}
|
||||
batchOrganization: {
|
||||
error: string
|
||||
noNotesSelected: string
|
||||
title: string
|
||||
description: string
|
||||
analyzing: string
|
||||
notesToOrganize: string
|
||||
selected: string
|
||||
noNotebooks: string
|
||||
noSuggestions: string
|
||||
confidence: string
|
||||
unorganized: string
|
||||
applying: string
|
||||
apply: string
|
||||
}
|
||||
autoLabels: {
|
||||
error: string
|
||||
noLabelsSelected: string
|
||||
created: string
|
||||
analyzing: string
|
||||
title: string
|
||||
description: string
|
||||
note: string
|
||||
notes: string
|
||||
typeContent: string
|
||||
createNewLabel: string
|
||||
new: string
|
||||
}
|
||||
titleSuggestions: {
|
||||
available: string
|
||||
@@ -169,6 +297,71 @@ export interface Translations {
|
||||
description: string
|
||||
dailyInsight: string
|
||||
insightReady: string
|
||||
viewConnection: string
|
||||
helpful: string
|
||||
notHelpful: string
|
||||
dismiss: string
|
||||
thanksFeedback: string
|
||||
thanksFeedbackImproving: string
|
||||
connections: string
|
||||
connection: string
|
||||
connectionsBadge: string
|
||||
fused: string
|
||||
overlay: {
|
||||
title: string
|
||||
searchPlaceholder: string
|
||||
sortBy: string
|
||||
sortSimilarity: string
|
||||
sortRecent: string
|
||||
sortOldest: string
|
||||
viewAll: string
|
||||
loading: string
|
||||
noConnections: string
|
||||
}
|
||||
comparison: {
|
||||
title: string
|
||||
similarityInfo: string
|
||||
highSimilarityInsight: string
|
||||
untitled: string
|
||||
clickToView: string
|
||||
helpfulQuestion: string
|
||||
helpful: string
|
||||
notHelpful: string
|
||||
}
|
||||
editorSection: {
|
||||
title: string
|
||||
loading: string
|
||||
view: string
|
||||
compare: string
|
||||
merge: string
|
||||
compareAll: string
|
||||
mergeAll: string
|
||||
}
|
||||
fusion: {
|
||||
title: string
|
||||
mergeNotes: string
|
||||
notesToMerge: string
|
||||
optionalPrompt: string
|
||||
promptPlaceholder: string
|
||||
generateFusion: string
|
||||
generating: string
|
||||
previewTitle: string
|
||||
edit: string
|
||||
modify: string
|
||||
finishEditing: string
|
||||
optionsTitle: string
|
||||
archiveOriginals: string
|
||||
keepAllTags: string
|
||||
useLatestTitle: string
|
||||
createBacklinks: string
|
||||
cancel: string
|
||||
confirmFusion: string
|
||||
success: string
|
||||
error: string
|
||||
generateError: string
|
||||
noContentReturned: string
|
||||
unknownDate: string
|
||||
}
|
||||
}
|
||||
nav: {
|
||||
home: string
|
||||
@@ -181,6 +374,29 @@ export interface Translations {
|
||||
aiSettings: string
|
||||
logout: string
|
||||
login: string
|
||||
adminDashboard: string
|
||||
diagnostics: string
|
||||
trash: string
|
||||
support: string
|
||||
reminders: string
|
||||
userManagement: string
|
||||
accountSettings: string
|
||||
manageAISettings: string
|
||||
configureAI: string
|
||||
supportDevelopment: string
|
||||
supportDescription: string
|
||||
buyMeACoffee: string
|
||||
donationDescription: string
|
||||
donateOnKofi: string
|
||||
donationNote: string
|
||||
sponsorOnGithub: string
|
||||
sponsorDescription: string
|
||||
workspace: string
|
||||
quickAccess: string
|
||||
myLibrary: string
|
||||
favorites: string
|
||||
recent: string
|
||||
proPlan: string
|
||||
}
|
||||
settings: {
|
||||
title: string
|
||||
@@ -230,6 +446,21 @@ export interface Translations {
|
||||
profileError: string
|
||||
accountSettings: string
|
||||
manageAISettings: string
|
||||
displaySettings: string
|
||||
displaySettingsDescription: string
|
||||
fontSize: string
|
||||
selectFontSize: string
|
||||
fontSizeSmall: string
|
||||
fontSizeMedium: string
|
||||
fontSizeLarge: string
|
||||
fontSizeExtraLarge: string
|
||||
fontSizeDescription: string
|
||||
fontSizeUpdateSuccess: string
|
||||
fontSizeUpdateFailed: string
|
||||
showRecentNotes: string
|
||||
showRecentNotesDescription: string
|
||||
recentNotesUpdateSuccess: string
|
||||
recentNotesUpdateFailed: string
|
||||
}
|
||||
aiSettings: {
|
||||
title: string
|
||||
@@ -287,6 +518,25 @@ export interface Translations {
|
||||
save: string
|
||||
cancel: string
|
||||
}
|
||||
notebook: {
|
||||
create: string
|
||||
createNew: string
|
||||
createDescription: string
|
||||
name: string
|
||||
selectIcon: string
|
||||
selectColor: string
|
||||
cancel: string
|
||||
creating: string
|
||||
edit: string
|
||||
editDescription: string
|
||||
delete: string
|
||||
deleteWarning: string
|
||||
deleteConfirm: string
|
||||
summary: string
|
||||
summaryDescription: string
|
||||
generating: string
|
||||
summaryError: string
|
||||
}
|
||||
notebookSuggestion: {
|
||||
title: string
|
||||
description: string
|
||||
@@ -296,6 +546,354 @@ export interface Translations {
|
||||
moveToNotebook: string
|
||||
generalNotes: string
|
||||
}
|
||||
admin: {
|
||||
title: string
|
||||
userManagement: string
|
||||
aiTesting: string
|
||||
settings: string
|
||||
security: {
|
||||
title: string
|
||||
description: string
|
||||
allowPublicRegistration: string
|
||||
allowPublicRegistrationDescription: string
|
||||
updateSuccess: string
|
||||
updateFailed: string
|
||||
}
|
||||
ai: {
|
||||
title: string
|
||||
description: string
|
||||
tagsGenerationProvider: string
|
||||
tagsGenerationDescription: string
|
||||
embeddingsProvider: string
|
||||
embeddingsDescription: string
|
||||
provider: string
|
||||
baseUrl: string
|
||||
model: string
|
||||
apiKey: string
|
||||
selectOllamaModel: string
|
||||
openAIKeyDescription: string
|
||||
modelRecommendations: string
|
||||
commonModelsDescription: string
|
||||
selectEmbeddingModel: string
|
||||
commonEmbeddingModels: string
|
||||
saving: string
|
||||
saveSettings: string
|
||||
openTestPanel: string
|
||||
updateSuccess: string
|
||||
updateFailed: string
|
||||
providerTagsRequired: string
|
||||
providerEmbeddingRequired: string
|
||||
}
|
||||
smtp: {
|
||||
title: string
|
||||
description: string
|
||||
host: string
|
||||
port: string
|
||||
username: string
|
||||
password: string
|
||||
fromEmail: string
|
||||
forceSSL: string
|
||||
ignoreCertErrors: string
|
||||
saveSettings: string
|
||||
sending: string
|
||||
testEmail: string
|
||||
updateSuccess: string
|
||||
updateFailed: string
|
||||
testSuccess: string
|
||||
testFailed: string
|
||||
}
|
||||
users: {
|
||||
createUser: string
|
||||
addUser: string
|
||||
createUserDescription: string
|
||||
name: string
|
||||
email: string
|
||||
password: string
|
||||
role: string
|
||||
createSuccess: string
|
||||
createFailed: string
|
||||
deleteSuccess: string
|
||||
deleteFailed: string
|
||||
roleUpdateSuccess: string
|
||||
roleUpdateFailed: string
|
||||
table: {
|
||||
name: string
|
||||
email: string
|
||||
role: string
|
||||
createdAt: string
|
||||
actions: string
|
||||
}
|
||||
}
|
||||
aiTest: {
|
||||
title: string
|
||||
description: string
|
||||
tagsTestTitle: string
|
||||
tagsTestDescription: string
|
||||
embeddingsTestTitle: string
|
||||
embeddingsTestDescription: string
|
||||
howItWorksTitle: string
|
||||
provider: string
|
||||
model: string
|
||||
testing: string
|
||||
runTest: string
|
||||
testPassed: string
|
||||
testFailed: string
|
||||
responseTime: string
|
||||
generatedTags: string
|
||||
embeddingDimensions: string
|
||||
vectorDimensions: string
|
||||
first5Values: string
|
||||
error: string
|
||||
testError: string
|
||||
tipTitle: string
|
||||
tipDescription: string
|
||||
}
|
||||
}
|
||||
about: {
|
||||
title: string
|
||||
description: string
|
||||
appName: string
|
||||
appDescription: string
|
||||
version: string
|
||||
buildDate: string
|
||||
platform: string
|
||||
platformWeb: string
|
||||
features: {
|
||||
title: string
|
||||
description: string
|
||||
titleSuggestions: string
|
||||
semanticSearch: string
|
||||
paragraphReformulation: string
|
||||
memoryEcho: string
|
||||
notebookOrganization: string
|
||||
dragDrop: string
|
||||
labelSystem: string
|
||||
multipleProviders: string
|
||||
}
|
||||
technology: {
|
||||
title: string
|
||||
description: string
|
||||
frontend: string
|
||||
backend: string
|
||||
database: string
|
||||
authentication: string
|
||||
ai: string
|
||||
ui: string
|
||||
testing: string
|
||||
}
|
||||
support: {
|
||||
title: string
|
||||
description: string
|
||||
documentation: string
|
||||
reportIssues: string
|
||||
feedback: string
|
||||
}
|
||||
}
|
||||
support: {
|
||||
title: string
|
||||
description: string
|
||||
buyMeACoffee: string
|
||||
donationDescription: string
|
||||
donateOnKofi: string
|
||||
kofiDescription: string
|
||||
sponsorOnGithub: string
|
||||
sponsorDescription: string
|
||||
githubDescription: string
|
||||
howSupportHelps: string
|
||||
directImpact: string
|
||||
sponsorPerks: string
|
||||
transparency: string
|
||||
transparencyDescription: string
|
||||
hostingServers: string
|
||||
domainSSL: string
|
||||
aiApiCosts: string
|
||||
totalExpenses: string
|
||||
otherWaysTitle: string
|
||||
starGithub: string
|
||||
reportBug: string
|
||||
contributeCode: string
|
||||
shareTwitter: string
|
||||
}
|
||||
demoMode: {
|
||||
title: string
|
||||
activated: string
|
||||
deactivated: string
|
||||
toggleFailed: string
|
||||
description: string
|
||||
parametersActive: string
|
||||
similarityThreshold: string
|
||||
delayBetweenNotes: string
|
||||
unlimitedInsights: string
|
||||
createNotesTip: string
|
||||
}
|
||||
resetPassword: {
|
||||
title: string
|
||||
description: string
|
||||
invalidLinkTitle: string
|
||||
invalidLinkDescription: string
|
||||
requestNewLink: string
|
||||
newPassword: string
|
||||
confirmNewPassword: string
|
||||
resetting: string
|
||||
resetPassword: string
|
||||
passwordMismatch: string
|
||||
success: string
|
||||
loading: string
|
||||
}
|
||||
dataManagement: {
|
||||
title: string
|
||||
toolsDescription: string
|
||||
export: {
|
||||
title: string
|
||||
description: string
|
||||
button: string
|
||||
success: string
|
||||
failed: string
|
||||
}
|
||||
import: {
|
||||
title: string
|
||||
description: string
|
||||
button: string
|
||||
success: string
|
||||
failed: string
|
||||
}
|
||||
delete: {
|
||||
title: string
|
||||
description: string
|
||||
button: string
|
||||
confirm: string
|
||||
success: string
|
||||
failed: string
|
||||
}
|
||||
indexing: {
|
||||
title: string
|
||||
description: string
|
||||
button: string
|
||||
success: string
|
||||
failed: string
|
||||
}
|
||||
cleanup: {
|
||||
title: string
|
||||
description: string
|
||||
button: string
|
||||
failed: string
|
||||
}
|
||||
}
|
||||
appearance: {
|
||||
title: string
|
||||
description: string
|
||||
}
|
||||
generalSettings: {
|
||||
title: string
|
||||
description: string
|
||||
}
|
||||
toast: {
|
||||
saved: string
|
||||
saveFailed: string
|
||||
operationSuccess: string
|
||||
operationFailed: string
|
||||
openingConnection: string
|
||||
openConnectionFailed: string
|
||||
thanksFeedback: string
|
||||
thanksFeedbackImproving: string
|
||||
feedbackFailed: string
|
||||
notesFusionSuccess: string
|
||||
}
|
||||
testPages: {
|
||||
titleSuggestions: {
|
||||
title: string
|
||||
contentLabel: string
|
||||
placeholder: string
|
||||
wordCount: string
|
||||
status: string
|
||||
analyzing: string
|
||||
idle: string
|
||||
error: string
|
||||
suggestions: string
|
||||
noSuggestions: string
|
||||
}
|
||||
}
|
||||
trash: {
|
||||
title: string
|
||||
empty: string
|
||||
restore: string
|
||||
deletePermanently: string
|
||||
}
|
||||
footer: {
|
||||
privacy: string
|
||||
terms: string
|
||||
openSource: string
|
||||
}
|
||||
connection: {
|
||||
similarityInfo: string
|
||||
clickToView: string
|
||||
isHelpful: string
|
||||
helpful: string
|
||||
notHelpful: string
|
||||
memoryEchoDiscovery: string
|
||||
}
|
||||
diagnostics: {
|
||||
title: string
|
||||
configuredProvider: string
|
||||
apiStatus: string
|
||||
testDetails: string
|
||||
troubleshootingTitle: string
|
||||
tip1: string
|
||||
tip2: string
|
||||
tip3: string
|
||||
tip4: string
|
||||
}
|
||||
batch: {
|
||||
organizeWithAI: string
|
||||
organize: string
|
||||
}
|
||||
common: {
|
||||
unknown: string
|
||||
notAvailable: string
|
||||
loading: string
|
||||
error: string
|
||||
success: string
|
||||
confirm: string
|
||||
cancel: string
|
||||
close: string
|
||||
save: string
|
||||
delete: string
|
||||
edit: string
|
||||
add: string
|
||||
remove: string
|
||||
search: string
|
||||
noResults: string
|
||||
required: string
|
||||
optional: string
|
||||
}
|
||||
time: {
|
||||
justNow: string
|
||||
minutesAgo: string
|
||||
hoursAgo: string
|
||||
daysAgo: string
|
||||
yesterday: string
|
||||
today: string
|
||||
tomorrow: string
|
||||
}
|
||||
favorites: {
|
||||
title: string
|
||||
toggleSection: string
|
||||
noFavorites: string
|
||||
pinToFavorite: string
|
||||
}
|
||||
notebooks: {
|
||||
create: string
|
||||
allNotebooks: string
|
||||
noNotebooks: string
|
||||
createFirst: string
|
||||
}
|
||||
ui: {
|
||||
close: string
|
||||
open: string
|
||||
expand: string
|
||||
collapse: string
|
||||
}
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -304,12 +902,11 @@ export interface Translations {
|
||||
export async function loadTranslations(language: SupportedLanguage): Promise<Translations> {
|
||||
try {
|
||||
const translations = await import(`@/locales/${language}.json`)
|
||||
return translations.default as Translations
|
||||
return translations.default as unknown as Translations
|
||||
} catch (error) {
|
||||
console.error(`Failed to load translations for ${language}:`, error)
|
||||
// Fallback to English
|
||||
const enTranslations = await import(`@/locales/en.json`)
|
||||
return enTranslations.default as Translations
|
||||
return enTranslations.default as unknown as Translations
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user