Index: src/main/resources/Scheduler/WebHome.xml =================================================================== --- src/main/resources/Scheduler/WebHome.xml (revision 16224) +++ src/main/resources/Scheduler/WebHome.xml (working copy) @@ -7,7 +7,14 @@ en 0 Main.WebHome +XWiki.Admin +XWiki.Admin +XWiki.Admin +1108467450000 +1166183159000 +1169801141000 +1.1 @@ -146,8 +153,9 @@ #set($ok=$scheduler.scheduleJob($jobObj)) #if($ok==false) #error("$context.get('error')") - #else - #info("Job ~~$jobObj.get('jobName')~~ *scheduled*. Next fire time : *$scheduler.getNextFireTime($jobObj)*") + #else + #set($jobName = "$jobObj.get('jobName')") + #info("$msg.get('xe.scheduler.jobscheduled', [$jobName]) *$scheduler.getNextFireTime($jobObj)*") #end #elseif($request.do=="pause") ## @@ -157,7 +165,7 @@ #if($ok==false) #error("$context.get('error')") #else - #info("Job ~~$jobObj.get('jobName')~~ *paused*.") + #info("Job ~~$jobObj.get('jobName')~~ *$msg.get('xe.scheduler.paused')*.") #end #elseif($request.do=="resume") ## @@ -167,7 +175,7 @@ #if($ok==false) #error("$context.get('error')") #else - #info("Job ~~$jobObj.get('jobName')~~ *resumed*. Next fire time : *$scheduler.getNextFireTime($jobObj)*") + #info("Job ~~$jobObj.get('jobName')~~ $msg.get('xe.scheduler.resumed') *$scheduler.getNextFireTime($jobObj)*") #end #elseif($request.do=="unschedule") ## @@ -177,7 +185,7 @@ #if($ok==false) #error("$context.get('error')") #else - #info("Job ~~$jobObj.get('jobName')~~ *unscheduled*") + #info("Job ~~$jobObj.get('jobName')~~ *$msg.get('xe.scheduler.unscheduled')*") #end #elseif($request.do=="delete") ## @@ -199,17 +207,17 @@ #end #end #end -1 Job Scheduler +1 $msg.get('xe.scheduler') -Welcome to the Job scheduler. This application allows you to create administration scripts that can be triggered periodically. +$msg.get('xe.scheduler.welcome') -1.1 List of existing jobs +1.1 $msg.get('xe.scheduler.jobs.list') ## ## Retrieve all scheduler jobs living in this space ## Display their name, status, possible next fire time, and avaible actions ## {table} -Job Name|Job Status|Next fire time|Actions +$msg.get('xe.scheduler.jobs.name') | $msg.get('xe.scheduler.jobs.status') | $msg.get('xe.scheduler.jobs.next') | $msg.get('xe.scheduler.jobs.actions') #set($hql = ", BaseObject as job where doc.space='Scheduler' and job.name=doc.fullName and job.className='XWiki.SchedulerJobClass' ") #foreach($docName in $xwiki.searchDocuments($hql)) #set($actions = $util.hashMap) ## get a hash to store action urls @@ -227,7 +235,7 @@ #set( $ok = $!actions.put("unschedule",$doc.getURL("view","do=unschedule&amp;which=${jobHolder.fullName}")) ) #end #set($ok = $!actions.put("delete",$doc.getURL("view","do=delete&amp;which=${jobHolder.fullName}")) ) -$job.get("jobName")|$status|$firetime| *Infos* : [view>$jobHolder.fullName] #if($jobHolder.hasAccessLevel("programming")) <a href="${jobHolder.getURL('inline')}">edit</a> #end *Job* : #foreach($action in $actions.keySet()) <a href="${actions.get($action)}">$action</a> #end +$job.get("jobName")|$status|$firetime| *$msg.get('xe.scheduler.jobs.infos')* : [view>$jobHolder.fullName] #if($jobHolder.hasAccessLevel("programming")) <a href="${jobHolder.getURL('inline')}">$msg.get("edit")</a> #end *$msg.get("job")* : #foreach($action in $actions.keySet()) <a href="${actions.get($action)}">$action</a> #end #end {table} @@ -239,12 +247,12 @@ ## However, this page should stay accessibles to admins, that can manipulate existing jobs : ## scheduler, pause, etc. ## -1.1 Create a new job +1.1 $msg.get('xe.scheduler.jobs.create') ## ## Form to create a new Job ## -#info("Enter here the name of the page that will hold your job. The job will be created in the current Scheduler space.") +#info($msg.get('xe.scheduler.jobs.explaincreate')) <form action="" id="newdoc"> <div> @@ -254,11 +262,11 @@ <input type="hidden" name="webname" value="Scheduler"/> <input type="hidden" name="name" value=""/> <input type="hidden" name="parent" value="${doc.fullName}"/> -<input type="text" name="title" value="Job page name" size="30"/> -<input type="button" value="Add" onclick='if (updateName(this.form.title,this.form.name)) { action="../../inline/" + this.form.webname.value + "/" + this.form.name.value; this.form.submit(); }' /> +<input type="text" name="title" value="$msg.get('xe.scheduler.jobs.pagename')" size="30"/> +<input type="button" value="$msg.get('xe.scheduler.jobs.add')" onclick='if (updateName(this.form.title,this.form.name)) { action="../../inline/" + this.form.webname.value + "/" + this.form.name.value; this.form.submit(); }' /> </div> </form> #else - #warning("Job creation is reserved for programmers. It seems you do not have programming access right allowed on the Scheduler space.") + #warning($msg.get('xe.scheduler.jobs.warning')) #end Index: src/main/resources/Scheduler/WebPreferences.xml =================================================================== --- src/main/resources/Scheduler/WebPreferences.xml (revision 16224) +++ src/main/resources/Scheduler/WebPreferences.xml (working copy) @@ -7,7 +7,14 @@ 0 Scheduler.WebHome +XWiki.Admin +XWiki.Admin +XWiki.Admin +1108467450000 +1166183159000 +1169801141000 +1.1 Index: src/main/resources/XWiki/SchedulerJobClass.xml =================================================================== --- src/main/resources/XWiki/SchedulerJobClass.xml (revision 16224) +++ src/main/resources/XWiki/SchedulerJobClass.xml (working copy) @@ -7,7 +7,14 @@ en 0 XWiki.SchedulerJobClass +XWiki.Admin +XWiki.Admin +XWiki.Admin +1108467450000 +1166183159000 +1169801141000 +1.1 Index: src/main/resources/XWiki/SchedulerJobSheet.xml =================================================================== --- src/main/resources/XWiki/SchedulerJobSheet.xml (revision 16224) +++ src/main/resources/XWiki/SchedulerJobSheet.xml (working copy) @@ -7,7 +7,14 @@ en 0 XWiki.SchedulerJobClass +XWiki.Admin +XWiki.Admin +XWiki.Admin +1108467450000 +1166183159000 +1169801141000 +1.1 @@ -48,19 +55,19 @@ #if($doc.getObject('XWiki.SchedulerJobClass')) -*Job name :* +*$msg.get("xe.scheduler.job.name")* $!doc.display('jobName') -*Job description :* +*$msg.get("xe.scheduler.job.description")* $!doc.display('jobDescription') -*Job cron expression :* +*$msg.get("xe.scheduler.job.expression")* $!doc.display('cron') -*Job script :* +*$msg.get("xe.scheduler.job.script")* #if($context.action=="inline") $!doc.display('script') @@ -72,7 +79,7 @@ #end #if($context.action=="inline") -#info("The script is the code that will be executed when the job will be triggered by the scheduler. It should be written in the groovy language. XWiki api is available through the *xwiki* et *context* pre-defined variables.") +#info($msg.get("xe.scheduler.job.scriptexplanation")) #info("Below some example of valid cron expression, from the [official quartz scheduler documentation>http://www.opensymphony.com/quartz/api/org/quartz/CronExpression.html>_blank]: {table} @@ -84,9 +91,9 @@ {table} ") #elseif($context.action=="view") -[Back to the job list>Scheduler.WebHome] +[$msg.get("xe.scheduler.job.backtolist")>Scheduler.WebHome] #end #else - #warning("This sheet must be applied to a document that holds a scheduler job object.") + #warning($msg.get("xe.scheduler.job.object")) #end Index: src/main/resources/XWiki/SchedulerJobTemplate.xml =================================================================== --- src/main/resources/XWiki/SchedulerJobTemplate.xml (revision 16224) +++ src/main/resources/XWiki/SchedulerJobTemplate.xml (working copy) @@ -7,7 +7,14 @@ en 0 XWiki.SchedulerJobClass +XWiki.Admin +XWiki.Admin +XWiki.Admin +1108467450000 +1166183159000 +1169801141000 +1.1