@@ -34,10 +34,10 @@ const buildCreateAutomationPrompt = (
3434 const schedule = input . schedule . trim ( ) ;
3535 const prompt = normalizeSentence ( input . prompt ) ;
3636 if ( ! schedule ) {
37- return { ok : false , error : "Schedule is required." } ;
37+ return { ok : false , error : t ( "automations.schedule_required" ) } ;
3838 }
3939 if ( ! prompt ) {
40- return { ok : false , error : "Prompt is required." } ;
40+ return { ok : false , error : t ( "automations.prompt_required" ) } ;
4141 }
4242 const workdir = ( input . workdir ?? "" ) . trim ( ) ;
4343 const nameSegment = name ? ` named \"${ name } \"` : "" ;
@@ -59,7 +59,7 @@ const buildRunAutomationPrompt = (
5959 if ( job . run ?. prompt || job . prompt ) {
6060 const promptBody = ( job . run ?. prompt ?? job . prompt ?? "" ) . trim ( ) ;
6161 if ( ! promptBody ) {
62- return { ok : false , error : "Automation prompt is empty." } ;
62+ return { ok : false , error : t ( "automations.prompt_empty" ) } ;
6363 }
6464 return {
6565 ok : true ,
@@ -181,7 +181,7 @@ export function createAutomationsStore(options: {
181181 } catch ( error ) {
182182 if ( scheduledJobsContextKey ( ) !== requestContextKey ) return "skipped" ;
183183 const message = error instanceof Error ? error . message : String ( error ) ;
184- setScheduledJobsStatus ( message || "Failed to load scheduled tasks." ) ;
184+ setScheduledJobsStatus ( message || t ( "automations.failed_to_load" ) ) ;
185185 return "error" ;
186186 } finally {
187187 setScheduledJobsBusy ( false ) ;
@@ -193,15 +193,15 @@ export function createAutomationsStore(options: {
193193 const client = options . openworkServer . openworkServerClient ( ) ;
194194 const workspaceId = ( options . runtimeWorkspaceId ( ) ?? "" ) . trim ( ) ;
195195 if ( ! client || ! workspaceId ) {
196- throw new Error ( "OpenWork server unavailable. Connect to sync scheduled tasks." ) ;
196+ throw new Error ( t ( "automations.server_unavailable" ) ) ;
197197 }
198198 const response = await client . deleteScheduledJob ( workspaceId , name ) ;
199199 setScheduledJobs ( ( current ) => current . filter ( ( entry ) => entry . slug !== response . job . slug ) ) ;
200200 return ;
201201 }
202202
203203 if ( ! isTauriRuntime ( ) ) {
204- throw new Error ( "Scheduled tasks require the desktop app." ) ;
204+ throw new Error ( t ( "automations.desktop_required" ) ) ;
205205 }
206206 const root = options . selectedWorkspaceRoot ( ) . trim ( ) ;
207207 const job = await schedulerDeleteJob ( name , root || undefined ) ;
0 commit comments