[Bps-public-commit] rt-extension-repeatticket branch, master, updated. 420962918c4a3f741a183cf57be0dee22b054b81
Alex Vandiver
alexmv at bestpractical.com
Thu Feb 13 17:18:17 EST 2014
The branch, master has been updated
via 420962918c4a3f741a183cf57be0dee22b054b81 (commit)
via 99ed282302c86e69a22a0fd84259b77d753d39c1 (commit)
via 3dd3aa238a35a7f6bb38947836a7499179d46f1b (commit)
via ebf6b42e79ab896f389554e3bbc79ed581aa273b (commit)
via 0f67850c6f54f4d5ba052d8ba7a663cae824e427 (commit)
via 4293cdacc2cfdde7969bbaa65ef19924cc246265 (commit)
from ca40fe116fea1611b9df7dda5e3a02fecb6a774f (commit)
Summary of changes:
.gitignore | 1 +
html/Ticket/Elements/EditRecurrence | 171 ++++++++++++++-------------
lib/RT/Extension/RepeatTicket.pm | 3 +-
po/repeatticket.pot | 229 ++++++++++++++++++++++++++++++++++++
4 files changed, 322 insertions(+), 82 deletions(-)
create mode 100644 po/repeatticket.pot
- Log -----------------------------------------------------------------
commit 4293cdacc2cfdde7969bbaa65ef19924cc246265
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Feb 13 14:30:45 2014 -0500
Only include the CSS on 4.2
diff --git a/lib/RT/Extension/RepeatTicket.pm b/lib/RT/Extension/RepeatTicket.pm
index d5edcb1..7e0e4c9 100644
--- a/lib/RT/Extension/RepeatTicket.pm
+++ b/lib/RT/Extension/RepeatTicket.pm
@@ -11,7 +11,8 @@ use RT::Date;
use List::MoreUtils qw/after/;
use DateTime::Event::ICal;
-RT->AddStyleSheets('repeat-ticket.css');
+RT->AddStyleSheets('repeat-ticket.css')
+ if $RT::StaticPath;
my $old_create_ticket = \&HTML::Mason::Commands::CreateTicket;
{
commit 0f67850c6f54f4d5ba052d8ba7a663cae824e427
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Feb 13 13:41:55 2014 -0500
Use <label> tags to make radio buttons easier to select
diff --git a/html/Ticket/Elements/EditRecurrence b/html/Ticket/Elements/EditRecurrence
index 8a6a063..b9e8fd8 100644
--- a/html/Ticket/Elements/EditRecurrence
+++ b/html/Ticket/Elements/EditRecurrence
@@ -22,14 +22,14 @@ jQuery( function () {
} );
</script>
<div class="repeat">
-<input name="repeat-enabled" type="checkbox" value="1" <% $ARGSRef->{'repeat-enabled'} ? 'checked="checked"' : '' |n %>/> <&|/l&>Enable Recurrence?</&>
+<label><input name="repeat-enabled" type="checkbox" value="1" <% $ARGSRef->{'repeat-enabled'} ? 'checked="checked"' : '' |n %>/> <&|/l&>Enable Recurrence?</&></label>
<div class="repeat-toggle <% $ARGSRef->{'repeat-enabled'} ? '' : 'hidden' %> ">
-<&|/l&>Ticket lead time (days)</&>:
-<input size="3" name="repeat-lead-time" type="text" value="<% $ARGSRef->{'repeat-lead-time'} %>" />
-<&|/l&>Concurrent active tickets</&>:
-<input size="3" name="repeat-coexistent-number" type="text" value="<% $ARGSRef->{'repeat-coexistent-number'} %>" />
+<label><&|/l&>Ticket lead time (days)</&>:
+<input size="3" name="repeat-lead-time" type="text" value="<% $ARGSRef->{'repeat-lead-time'} %>" /></label>
+<label><&|/l&>Concurrent active tickets</&>:
+<input size="3" name="repeat-coexistent-number" type="text" value="<% $ARGSRef->{'repeat-coexistent-number'} %>" /></label>
<fieldset>
<legend><&|/l&>Recurrence pattern</&></legend>
@@ -39,23 +39,23 @@ jQuery( function () {
<table border="0">
<tr>
<td width="100px">
- <input name="repeat-type" type="radio" value="daily" <% ($ARGSRef->{'repeat-type'} || '') eq 'daily' ? 'checked="checked"' : '' |n %> /> <&|/l&>Daily</&>
+ <label><input name="repeat-type" type="radio" value="daily" <% ($ARGSRef->{'repeat-type'} || '') eq 'daily' ? 'checked="checked"' : '' |n %> /> <&|/l&>Daily</&></label>
</td>
<td width="1" rowspan="4" bgcolor="#aaa"><br></td>
</tr>
<tr>
<td width="100px">
- <input name="repeat-type" type="radio" value="weekly" <% ($ARGSRef->{'repeat-type'} || '') eq 'weekly' ? 'checked="checked"' : '' |n %>/> <&|/l&>Weekly</&>
+ <label><input name="repeat-type" type="radio" value="weekly" <% ($ARGSRef->{'repeat-type'} || '') eq 'weekly' ? 'checked="checked"' : '' |n %>/> <&|/l&>Weekly</&></label>
</td>
</tr>
<tr>
<td width="100px">
- <input name="repeat-type" type="radio" value="monthly" <% ($ARGSRef->{'repeat-type'} || '') eq 'monthly' ? 'checked="checked"' : '' |n %>/> <&|/l&>Monthly</&>
+ <label><input name="repeat-type" type="radio" value="monthly" <% ($ARGSRef->{'repeat-type'} || '') eq 'monthly' ? 'checked="checked"' : '' |n %>/> <&|/l&>Monthly</&></label>
</td>
</tr>
<tr>
<td width="100px">
- <input name="repeat-type" type="radio" value="yearly" <% ($ARGSRef->{'repeat-type'} || '') eq 'yearly' ? 'checked="checked"' : '' |n %>/> <&|/l&>Yearly</&>
+ <label><input name="repeat-type" type="radio" value="yearly" <% ($ARGSRef->{'repeat-type'} || '') eq 'yearly' ? 'checked="checked"' : '' |n %>/> <&|/l&>Yearly</&></label>
</td>
</tr>
</table>
@@ -64,21 +64,21 @@ jQuery( function () {
<table border="0">
<tr>
<td>
- <input name="repeat-details-daily" type="radio" value="day" <% ($ARGSRef->{'repeat-details-daily'} || '') eq 'day' ? 'checked="checked"' : '' |n %>/>
+ <label><input name="repeat-details-daily" type="radio" value="day" <% ($ARGSRef->{'repeat-details-daily'} || '') eq 'day' ? 'checked="checked"' : '' |n %>/>
<&|/l&>Every</&><input name="repeat-details-daily-day" type="text"
-size="4" value="<% $ARGSRef->{'repeat-details-daily-day'} || 1 %>" /> <&|/l&>Day(s)</&>
+size="4" value="<% $ARGSRef->{'repeat-details-daily-day'} || 1 %>" /> <&|/l&>Day(s)</&></label>
</td>
</tr>
<tr>
<td>
- <input name="repeat-details-daily" type="radio" value="weekday" <% ($ARGSRef->{'repeat-details-daily'} || '') eq 'weekday' ? 'checked="checked"' : '' |n %>/>
- <&|/l&>Every Weekday</&>
+ <label><input name="repeat-details-daily" type="radio" value="weekday" <% ($ARGSRef->{'repeat-details-daily'} || '') eq 'weekday' ? 'checked="checked"' : '' |n %>/>
+ <&|/l&>Every Weekday</&></label>
</td>
</tr>
<tr>
<td>
- <input name="repeat-details-daily" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-daily'} || '') eq 'complete' ? 'checked="checked"' : '' |n %>/>
- <&|/l&>Create new task</&><input name="repeat-details-daily-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-daily-complete'} || 1 %>" /> <&|/l&>day(s) after each task is completed</&>
+ <label><input name="repeat-details-daily" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-daily'} || '') eq 'complete' ? 'checked="checked"' : '' |n %>/>
+ <&|/l&>Create new task</&><input name="repeat-details-daily-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-daily-complete'} || 1 %>" /> <&|/l&>day(s) after each task is completed</&></label>
</td>
</tr>
</table>
@@ -88,16 +88,16 @@ size="4" value="<% $ARGSRef->{'repeat-details-daily-day'} || 1 %>" /> <&|/l&>Day
<table border="0">
<tr>
<td colspan="5">
- <input name="repeat-details-weekly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-weekly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> />
+ <label><input name="repeat-details-weekly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-weekly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> />
<&|/l&>Recur every</&><input name="repeat-details-weekly-week" type="text"
-size="4" value="<% $ARGSRef->{'repeat-details-weekly-week'} || 1 %>" /> <&|/l&>week(s) on</&>
+size="4" value="<% $ARGSRef->{'repeat-details-weekly-week'} || 1 %>" /> <&|/l&>week(s) on</&></label>
</td>
</tr>
<tr>
<td width="10px" />
% for my $number ( 0 .. 6 ) {
<td>
- <input name="repeat-details-weekly-weeks" type="checkbox" value="<% $week_values[$number] %>"
+ <label><input name="repeat-details-weekly-weeks" type="checkbox" value="<% $week_values[$number] %>"
% if ( defined $ARGSRef->{'repeat-details-weekly-weeks'} && (
% ( ref $ARGSRef->{'repeat-details-weekly-weeks'} && grep { $_ eq $week_values[$number] }
% @{$ARGSRef->{'repeat-details-weekly-weeks'}} ) ||
@@ -105,7 +105,7 @@ size="4" value="<% $ARGSRef->{'repeat-details-weekly-week'} || 1 %>" /> <&|/l&>w
checked="checked"
% }
-/><% loc($week_labels[$number]) %>
+/><% loc($week_labels[$number]) %></label>
</td>
% if ( $number == 3 ) {
</tr>
@@ -116,8 +116,8 @@ size="4" value="<% $ARGSRef->{'repeat-details-weekly-week'} || 1 %>" /> <&|/l&>w
</tr>
<tr>
<td colspan="5">
- <input name="repeat-details-weekly" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-weekly'} || '') eq 'complete' ? 'checked="checked"' : '' |n%>/>
- <&|/l&>Create new task</&><input name="repeat-details-weekly-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-weekly-complete'} || 1 %>" /> <&|/l&>week(s) after each task is completed</&>
+ <label><input name="repeat-details-weekly" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-weekly'} || '') eq 'complete' ? 'checked="checked"' : '' |n%>/>
+ <&|/l&>Create new task</&><input name="repeat-details-weekly-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-weekly-complete'} || 1 %>" /> <&|/l&>week(s) after each task is completed</&></label>
</td>
</tr>
</table>
@@ -127,14 +127,14 @@ size="4" value="<% $ARGSRef->{'repeat-details-weekly-week'} || 1 %>" /> <&|/l&>w
<table border="0">
<tr>
<td>
- <input name="repeat-details-monthly" type="radio" value="day" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'day' ? 'checked="checked"' : '' |n %> /><&|/l&>Day</&>
+ <label><input name="repeat-details-monthly" type="radio" value="day" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'day' ? 'checked="checked"' : '' |n %> /><&|/l&>Day</&>
<input name="repeat-details-monthly-day-day" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-day-day'} || 1 %>" /> <&|/l&>of every</&>
- <input name="repeat-details-monthly-day-month" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-day-month'} || 1 %>" /> <&|/l&>month(s)</&>
+ <input name="repeat-details-monthly-day-month" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-day-month'} || 1 %>" /> <&|/l&>month(s)</&></label>
</td>
</tr>
<tr>
<td>
- <input name="repeat-details-monthly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> /><&|/l&>The</&>
+ <label><input name="repeat-details-monthly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> /><&|/l&>The</&>
<select name="repeat-details-monthly-week-number">
% for my $number ( 1 .. 5 ) {
<option value="<% $number == 5 ? -1 : $number %>" <%($ARGSRef->{'repeat-details-monthly-week-number'} || '') eq $number ? 'selected="selected"' : '' |n %>><% loc($week_number_labels[$number-1]) %></option>
@@ -147,14 +147,14 @@ size="4" value="<% $ARGSRef->{'repeat-details-weekly-week'} || 1 %>" /> <&|/l&>w
<%($ARGSRef->{'repeat-details-monthly-week-week'} || '') eq $week_values[$number] ? 'selected="selected"' : '' |n %>><% loc($week_labels[$number]) %></option>
% }
</select>
-<&|/l&>of every</&><input name="repeat-details-monthly-week-month" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-week-month'} || 1 %>" /> <&|/l&>month(s)</&>
+<&|/l&>of every</&><input name="repeat-details-monthly-week-month" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-week-month'} || 1 %>" /> <&|/l&>month(s)</&></label>
</td>
</tr>
<tr>
<td>
- <input name="repeat-details-monthly" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'complete' ? 'checked="checked"' : '' |n %> />
+ <label><input name="repeat-details-monthly" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'complete' ? 'checked="checked"' : '' |n %> />
<&|/l&>Create new task</&><input
-name="repeat-details-monthly-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-complete'} || 1 %>" /> <&|/l&>month(s) after each task is completed</&>
+name="repeat-details-monthly-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-complete'} || 1 %>" /> <&|/l&>month(s) after each task is completed</&></label>
</td>
</tr>
</table>
@@ -164,18 +164,18 @@ name="repeat-details-monthly-complete" type="text" size="4" value="<% $ARGSRef->
<table border="0">
<tr>
<td>
- <input name="repeat-details-yearly" type="radio" value="day" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'day' ? 'checked="checked"' : '' |n %> /><&|/l&>Every</&>
+ <label><input name="repeat-details-yearly" type="radio" value="day" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'day' ? 'checked="checked"' : '' |n %> /><&|/l&>Every</&>
<select name="repeat-details-yearly-day-month">
% for my $number ( 1 .. 12 ) {
<option value="<% $number %>" <%($ARGSRef->{'repeat-details-yearly-day-month'} || '') eq $number ? 'selected="selected"' : '' |n %>><% loc($month_labels[$number-1]) %></option>
% }
</select>
- <input name="repeat-details-yearly-day-day" type="text" size="4" value="<% $ARGSRef->{'repeat-details-yearly-day-day'} || 1 %>" />
+ <input name="repeat-details-yearly-day-day" type="text" size="4" value="<% $ARGSRef->{'repeat-details-yearly-day-day'} || 1 %>" /></label>
</td>
</tr>
<tr>
<td>
- <input name="repeat-details-yearly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> /><&|/l&>The</&>
+ <label><input name="repeat-details-yearly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> /><&|/l&>The</&>
<select name="repeat-details-yearly-week-number">
% for my $number ( 1 .. 5 ) {
<option value="<% $number == 5 ? -1 : $number %>" <%($ARGSRef->{'repeat-details-yearly-week-number'} || '') eq $number ? 'selected="selected"' : '' |n %>><% loc($week_number_labels[$number-1]) %></option>
@@ -194,13 +194,13 @@ name="repeat-details-monthly-complete" type="text" size="4" value="<% $ARGSRef->
% for my $number ( 1 .. 12 ) {
<option value="<% $number %>" <%($ARGSRef->{'repeat-details-yearly-week-month'} || '') eq $number ? 'selected="selected"' : '' |n %>><% loc($month_labels[$number-1]) %></option>
% }
-</select>
+</select></label>
</td>
</tr>
<tr>
<td>
- <input name="repeat-details-yearly" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'complete' ? 'checked="checked"' : '' |n %> />
- <&|/l&>Create new task</&><input name="repeat-details-yearly-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-yearly-complete'} || 1 %>" /> <&|/l&>year(s) after each task is completed</&>
+ <label><input name="repeat-details-yearly" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'complete' ? 'checked="checked"' : '' |n %> />
+ <&|/l&>Create new task</&><input name="repeat-details-yearly-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-yearly-complete'} || 1 %>" /> <&|/l&>year(s) after each task is completed</&></label>
</td>
</tr>
</table>
@@ -216,28 +216,33 @@ name="repeat-details-monthly-complete" type="text" size="4" value="<% $ARGSRef->
<table width="100%" border="0">
<tr>
<td rowspan="3">
+ <label>
<&|/l&>Start</&>:
<& /Elements/SelectDate, Name => 'repeat-start-date', ShowTime => 0, Default => $ARGSRef->{'repeat-start-date'} || '' &>
+ </label>
</td>
<td>
+ <label>
<input type="radio" name="repeat-end" value="none" <% ($ARGSRef->{'repeat-end'} || '') eq 'none' ? 'checked="checked"' : '' |n %>> <&|/l&>No end date</&>
+ </label>
</td>
</tr>
<tr>
<td>
- <input type="radio" name="repeat-end" value="number" <% ($ARGSRef->{'repeat-end'} || '') eq 'number' ? 'checked="checked"' : '' |n %>> <&|/l&>End after</&>:
+ <label><input type="radio" name="repeat-end" value="number" <% ($ARGSRef->{'repeat-end'} || '') eq 'number' ? 'checked="checked"' : '' |n %>> <&|/l&>End after</&>:
<input type="text" size="6" name="repeat-end-number" value="<% $ARGSRef->{'repeat-end-number'} || 10 %>"> <&|/l&>occurrence(s)</&>
% if ( $Initial ) {
<input name="repeat-occurrences" type="hidden" value="1">
% } else {
Current: <input size="6" type="text" name="repeat-occurrences" readonly="readonly" value="<% $ARGSRef->{'repeat-occurrences'} %>">
% }
+ </label>
</td>
</tr>
<tr>
<td>
- <input type="radio" name="repeat-end" value="date" <% ($ARGSRef->{'repeat-end'} || '') eq 'date' ? 'checked="checked"' : '' |n %>> <&|/l&>End by</&>:
- <& /Elements/SelectDate, Name => 'repeat-end-date', ShowTime => 0, Default => $ARGSRef->{'repeat-end-date'} || '' &>
+ <label><input type="radio" name="repeat-end" value="date" <% ($ARGSRef->{'repeat-end'} || '') eq 'date' ? 'checked="checked"' : '' |n %>> <&|/l&>End by</&>:
+ <& /Elements/SelectDate, Name => 'repeat-end-date', ShowTime => 0, Default => $ARGSRef->{'repeat-end-date'} || '' &></label>
</td>
</tr>
</table>
commit ebf6b42e79ab896f389554e3bbc79ed581aa273b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Feb 13 14:18:37 2014 -0500
Localize phrases, not individual words
Translations may make no sense if they are done one-word at a time; use
placeholders (standing in for form elements, properly escaped) to
translate whole phrases at once.
This incidentally resolves a bug where "Last" would not stay selected in
n-th-week selectors, and would revert to selcting "First" after
submission.
diff --git a/html/Ticket/Elements/EditRecurrence b/html/Ticket/Elements/EditRecurrence
index b9e8fd8..e6099f4 100644
--- a/html/Ticket/Elements/EditRecurrence
+++ b/html/Ticket/Elements/EditRecurrence
@@ -65,8 +65,7 @@ jQuery( function () {
<tr>
<td>
<label><input name="repeat-details-daily" type="radio" value="day" <% ($ARGSRef->{'repeat-details-daily'} || '') eq 'day' ? 'checked="checked"' : '' |n %>/>
- <&|/l&>Every</&><input name="repeat-details-daily-day" type="text"
-size="4" value="<% $ARGSRef->{'repeat-details-daily-day'} || 1 %>" /> <&|/l&>Day(s)</&></label>
+ <&|/l_unsafe, $input->("repeat-details-daily-day") &>Every [_1] Day(s)</&></label>
</td>
</tr>
<tr>
@@ -78,7 +77,7 @@ size="4" value="<% $ARGSRef->{'repeat-details-daily-day'} || 1 %>" /> <&|/l&>Day
<tr>
<td>
<label><input name="repeat-details-daily" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-daily'} || '') eq 'complete' ? 'checked="checked"' : '' |n %>/>
- <&|/l&>Create new task</&><input name="repeat-details-daily-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-daily-complete'} || 1 %>" /> <&|/l&>day(s) after each task is completed</&></label>
+ <&|/l_unsafe, $input->("repeat-details-daily-complete") &>Create new task [_1] day(s) after each task is completed</&></label>
</td>
</tr>
</table>
@@ -89,8 +88,7 @@ size="4" value="<% $ARGSRef->{'repeat-details-daily-day'} || 1 %>" /> <&|/l&>Day
<tr>
<td colspan="5">
<label><input name="repeat-details-weekly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-weekly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> />
- <&|/l&>Recur every</&><input name="repeat-details-weekly-week" type="text"
-size="4" value="<% $ARGSRef->{'repeat-details-weekly-week'} || 1 %>" /> <&|/l&>week(s) on</&></label>
+ <&|/l_unsafe, $input->("repeat-details-weekly-week") &>Recur every [_1] week(s) on</&>:</label>
</td>
</tr>
<tr>
@@ -117,7 +115,7 @@ size="4" value="<% $ARGSRef->{'repeat-details-weekly-week'} || 1 %>" /> <&|/l&>w
<tr>
<td colspan="5">
<label><input name="repeat-details-weekly" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-weekly'} || '') eq 'complete' ? 'checked="checked"' : '' |n%>/>
- <&|/l&>Create new task</&><input name="repeat-details-weekly-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-weekly-complete'} || 1 %>" /> <&|/l&>week(s) after each task is completed</&></label>
+ <&|/l_unsafe, $input->("repeat-details-weekly-complete") &>Create new task [_1] week(s) after each task is completed</&></label>
</td>
</tr>
</table>
@@ -127,34 +125,18 @@ size="4" value="<% $ARGSRef->{'repeat-details-weekly-week'} || 1 %>" /> <&|/l&>w
<table border="0">
<tr>
<td>
- <label><input name="repeat-details-monthly" type="radio" value="day" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'day' ? 'checked="checked"' : '' |n %> /><&|/l&>Day</&>
- <input name="repeat-details-monthly-day-day" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-day-day'} || 1 %>" /> <&|/l&>of every</&>
- <input name="repeat-details-monthly-day-month" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-day-month'} || 1 %>" /> <&|/l&>month(s)</&></label>
+ <label><input name="repeat-details-monthly" type="radio" value="day" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'day' ? 'checked="checked"' : '' |n %> /><&|/l_unsafe, $input->("repeat-details-monthly-day-day"), $input->("repeat-details-monthly-day-month") &>Day [_1] of every [_2] month(s)</&></label>
</td>
</tr>
<tr>
<td>
- <label><input name="repeat-details-monthly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> /><&|/l&>The</&>
-<select name="repeat-details-monthly-week-number">
-% for my $number ( 1 .. 5 ) {
- <option value="<% $number == 5 ? -1 : $number %>" <%($ARGSRef->{'repeat-details-monthly-week-number'} || '') eq $number ? 'selected="selected"' : '' |n %>><% loc($week_number_labels[$number-1]) %></option>
-% }
-</select>
-
-<select name="repeat-details-monthly-week-week">
-% for my $number ( 0 .. 6 ) {
- <option value="<% $week_values[$number] %>"
- <%($ARGSRef->{'repeat-details-monthly-week-week'} || '') eq $week_values[$number] ? 'selected="selected"' : '' |n %>><% loc($week_labels[$number]) %></option>
-% }
-</select>
-<&|/l&>of every</&><input name="repeat-details-monthly-week-month" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-week-month'} || 1 %>" /> <&|/l&>month(s)</&></label>
+ <label><input name="repeat-details-monthly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> /><&|/l_unsafe, $nth->("repeat-details-monthly-week-number"), $wday->("repeat-details-monthly-week-week"), $input->("repeat-details-monthly-week-month") &>The [_1] [_2] of every [_3] month(s)</&></label>
</td>
</tr>
<tr>
<td>
<label><input name="repeat-details-monthly" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-monthly'} || '') eq 'complete' ? 'checked="checked"' : '' |n %> />
- <&|/l&>Create new task</&><input
-name="repeat-details-monthly-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-monthly-complete'} || 1 %>" /> <&|/l&>month(s) after each task is completed</&></label>
+ <&|/l_unsafe, $input->("repeat-details-monthly-complete") &>Create new task [_1] month(s) after each task is completed</&></label>
</td>
</tr>
</table>
@@ -164,43 +146,18 @@ name="repeat-details-monthly-complete" type="text" size="4" value="<% $ARGSRef->
<table border="0">
<tr>
<td>
- <label><input name="repeat-details-yearly" type="radio" value="day" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'day' ? 'checked="checked"' : '' |n %> /><&|/l&>Every</&>
-<select name="repeat-details-yearly-day-month">
-% for my $number ( 1 .. 12 ) {
- <option value="<% $number %>" <%($ARGSRef->{'repeat-details-yearly-day-month'} || '') eq $number ? 'selected="selected"' : '' |n %>><% loc($month_labels[$number-1]) %></option>
-% }
-</select>
- <input name="repeat-details-yearly-day-day" type="text" size="4" value="<% $ARGSRef->{'repeat-details-yearly-day-day'} || 1 %>" /></label>
+ <label><input name="repeat-details-yearly" type="radio" value="day" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'day' ? 'checked="checked"' : '' |n %> /><&|/l_unsafe, $month->("repeat-details-yearly-day-month"), $input->("repeat-details-yearly-day-day") &>Every [_1] [_2]</&></label>
</td>
</tr>
<tr>
<td>
- <label><input name="repeat-details-yearly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> /><&|/l&>The</&>
-<select name="repeat-details-yearly-week-number">
-% for my $number ( 1 .. 5 ) {
- <option value="<% $number == 5 ? -1 : $number %>" <%($ARGSRef->{'repeat-details-yearly-week-number'} || '') eq $number ? 'selected="selected"' : '' |n %>><% loc($week_number_labels[$number-1]) %></option>
-% }
-</select>
-
-<select name="repeat-details-yearly-week-week">
-% for my $number ( 0 .. 6 ) {
- <option value="<% $week_values[$number] %>"
- <%($ARGSRef->{'repeat-details-yearly-week-week'} || '') eq $week_values[$number] ? 'selected="selected"' : '' |n %>><% loc($week_labels[$number]) %></option>
-% }
-</select>
-<&|/l&>of</&>
-
-<select name="repeat-details-yearly-week-month">
-% for my $number ( 1 .. 12 ) {
- <option value="<% $number %>" <%($ARGSRef->{'repeat-details-yearly-week-month'} || '') eq $number ? 'selected="selected"' : '' |n %>><% loc($month_labels[$number-1]) %></option>
-% }
-</select></label>
+ <label><input name="repeat-details-yearly" type="radio" value="week" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'week' ? 'checked="checked"' : '' |n %> /><&|/l_unsafe, $nth->("repeat-details-yearly-week-number"), $wday->("repeat-details-yearly-week-week"), $month->("repeat-details-yearly-week-month") &>The [_1] [_2] of [_3]</&></label>
</td>
</tr>
<tr>
<td>
<label><input name="repeat-details-yearly" type="radio" value="complete" <% ($ARGSRef->{'repeat-details-yearly'} || '') eq 'complete' ? 'checked="checked"' : '' |n %> />
- <&|/l&>Create new task</&><input name="repeat-details-yearly-complete" type="text" size="4" value="<% $ARGSRef->{'repeat-details-yearly-complete'} || 1 %>" /> <&|/l&>year(s) after each task is completed</&></label>
+ <&|/l_unsafe, $input->("repeat-details-yearly-complete") &>Create new task [_1] year(s) after each task is completed</&></label>
</td>
</tr>
</table>
@@ -229,14 +186,13 @@ name="repeat-details-monthly-complete" type="text" size="4" value="<% $ARGSRef->
</tr>
<tr>
<td>
- <label><input type="radio" name="repeat-end" value="number" <% ($ARGSRef->{'repeat-end'} || '') eq 'number' ? 'checked="checked"' : '' |n %>> <&|/l&>End after</&>:
-<input type="text" size="6" name="repeat-end-number" value="<% $ARGSRef->{'repeat-end-number'} || 10 %>"> <&|/l&>occurrence(s)</&>
+ <label><input type="radio" name="repeat-end" value="number" <% ($ARGSRef->{'repeat-end'} || '') eq 'number' ? 'checked="checked"' : '' |n %>>
+ <&|/l_unsafe, $input->("repeat-end-number",6,10) &>End after [_1] occurrence(s)</&>
% if ( $Initial ) {
<input name="repeat-occurrences" type="hidden" value="1">
% } else {
- Current: <input size="6" type="text" name="repeat-occurrences" readonly="readonly" value="<% $ARGSRef->{'repeat-occurrences'} %>">
+ <&|/l&>Current</&>: <input size="6" type="text" name="repeat-occurrences" readonly="readonly" value="<% $ARGSRef->{'repeat-occurrences'} %>"></label>
% }
- </label>
</td>
</tr>
<tr>
@@ -278,6 +234,54 @@ $ARGSRef->{'repeat-end'} ||= 'none';
$ARGSRef->{'repeat-lead-time'} ||= RT->Config->Get('RepeatTicketLeadTime') || 14;
$ARGSRef->{'repeat-coexistent-number'} ||= RT->Config->Get('RepeatTicketCoexistentNumber') || 1;
+my $input = sub {
+ my ($name, $width, $default) = (@_);
+ $width ||= 4; $default ||= 1;
+ my $escaped = $m->interp->apply_escapes($name, "h");
+ return qq|<input name="$escaped" type="text" size="$width" value="|
+ . $m->interp->apply_escapes($ARGSRef->{$name} || $default, "h")
+ . qq|" />|;
+};
+
+my $nth = sub {
+ my ($name) = @_;
+ my $escaped = $m->interp->apply_escapes($name, "h");
+ my $str = qq|<select name="$escaped">|;
+ for my $number ( 1 .. 4, -1 ) {
+ $str .= qq|<option value="$number" |
+ . (($ARGSRef->{$name} || '') eq $number ? 'selected="selected"' : '') . ">"
+ . $m->interp->apply_escapes(loc($week_number_labels[$number > 0 ? $number-1 : -1]), "h")
+ . "</option>";
+ }
+ $str .= "</select>";
+ return $str;
+};
+my $wday = sub {
+ my ($name) = @_;
+ my $escaped = $m->interp->apply_escapes($name, "h");
+ my $str = qq|<select name="$escaped">|;
+ for my $number ( 0 .. 6 ) {
+ $str .= qq|<option value="$week_values[$number]" |
+ . (($ARGSRef->{$name} || '') eq $week_values[$number] ? 'selected="selected"' : '' ) . ">"
+ . $m->interp->apply_escapes(loc($week_labels[$number]), "h")
+ . "</option>";
+ }
+ $str .= "</select>";
+ return $str;
+};
+my $month = sub {
+ my ($name) = @_;
+ my $escaped = $m->interp->apply_escapes($name, "h");
+ my $str = qq|<select name="$escaped">|;
+ for my $number ( 1 .. 12 ) {
+ $str .= qq|<option value="$number" |
+ . (($ARGSRef->{$name} || '') eq $number ? 'selected="selected"' : '') . ">"
+ . $m->interp->apply_escapes(loc($month_labels[$number-1]), "h")
+ . "</option>";
+ }
+ $str .= "</select>";
+ return $str;
+};
</%init>
<%args>
$ARGSRef => undef
commit 3dd3aa238a35a7f6bb38947836a7499179d46f1b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Feb 13 17:12:01 2014 -0500
Localize qw lists with loc_qw, not loc
diff --git a/html/Ticket/Elements/EditRecurrence b/html/Ticket/Elements/EditRecurrence
index e6099f4..87f5390 100644
--- a/html/Ticket/Elements/EditRecurrence
+++ b/html/Ticket/Elements/EditRecurrence
@@ -209,10 +209,10 @@ jQuery( function () {
</div>
<%init>
-my @week_labels = qw/Sun Mon Tue Wed Thu Fri Sat/; # loc
-my @week_values = qw/su mo tu we th fr sa/;
-my @week_number_labels = qw/First Second Third Fourth Last/; # loc
-my @month_labels = qw/January February March April May June July August September October November December/; # loc
+my @week_labels = qw(Sun Mon Tue Wed Thu Fri Sat); # loc_qw
+my @week_values = qw(su mo tu we th fr sa);
+my @week_number_labels = qw(First Second Third Fourth Last); # loc_qw
+my @month_labels = qw(January February March April May June July August September October November December); # loc_qw
if ( $Ticket ) {
my ($repeat) = $Ticket->Attributes->Named('RepeatTicketSettings');
commit 99ed282302c86e69a22a0fd84259b77d753d39c1
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Feb 13 17:12:43 2014 -0500
Add the generated .pot file
diff --git a/po/repeatticket.pot b/po/repeatticket.pot
new file mode 100644
index 0000000..ffd46b3
--- /dev/null
+++ b/po/repeatticket.pot
@@ -0,0 +1,229 @@
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "April"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "August"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:31
+msgid "Concurrent active tickets"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:80
+#. ($input->("repeat-details-daily-complete"))
+msgid "Create new task %1 day(s) after each task is completed"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:139
+#. ($input->("repeat-details-monthly-complete"))
+msgid "Create new task %1 month(s) after each task is completed"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:118
+#. ($input->("repeat-details-weekly-complete"))
+msgid "Create new task %1 week(s) after each task is completed"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:160
+#. ($input->("repeat-details-yearly-complete"))
+msgid "Create new task %1 year(s) after each task is completed"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:194
+msgid "Current"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:42
+msgid "Daily"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:128
+#. ($input->("repeat-details-monthly-day-day"), $input->("repeat-details-monthly-day-month"))
+msgid "Day %1 of every %2 month(s)"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "December"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:25
+msgid "Enable Recurrence?"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:190
+#. ($input->("repeat-end-number",6,10))
+msgid "End after %1 occurrence(s)"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:200
+msgid "End by"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:149
+#. ($month->("repeat-details-yearly-day-month"), $input->("repeat-details-yearly-day-day"))
+msgid "Every %1 %2"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:68
+#. ($input->("repeat-details-daily-day"))
+msgid "Every %1 Day(s)"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:74
+msgid "Every Weekday"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "February"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:214
+msgid "First"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:214
+msgid "Fourth"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:212
+msgid "Fri"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "January"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "July"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "June"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:214
+msgid "Last"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "March"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "May"
+msgstr ""
+
+#: html/Ticket/ModifyRecurrence.html:1
+#. ($TicketObj->Id)
+msgid "Modify recurrence for #%1"
+msgstr ""
+
+#: html/Ticket/ModifyRecurrence.html:8
+#. ($TicketObj->Id)
+msgid "Modify recurrence for ticket # %1"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:212
+msgid "Mon"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:53
+msgid "Monthly"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:183
+msgid "No end date"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "November"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "October"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:172
+msgid "Range of recurrence"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:91
+#. ($input->("repeat-details-weekly-week"))
+msgid "Recur every %1 week(s) on"
+msgstr ""
+
+#: html/Callbacks/RepeatTicket/Elements/Tabs/Privileged:23 html/Callbacks/RepeatTicket/Ticket/Create.html/AfterBasics:1 html/Callbacks/RepeatTicket/Ticket/Elements/ShowSummary/LeftColumn:1
+msgid "Recurrence"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:35
+msgid "Recurrence pattern"
+msgstr ""
+
+#: lib/RT/Extension/RepeatTicket.pm:86
+msgid "Recurrence updated"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:212
+msgid "Sat"
+msgstr ""
+
+#: html/Ticket/ModifyRecurrence.html:11
+msgid "Save Changes"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:214
+msgid "Second"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:215
+msgid "September"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:177
+msgid "Start"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:212
+msgid "Sun"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:154
+#. ($nth->("repeat-details-yearly-week-number"), $wday->("repeat-details-yearly-week-week"), $month->("repeat-details-yearly-week-month"))
+msgid "The %1 %2 of %3"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:133
+#. ($nth->("repeat-details-monthly-week-number"), $wday->("repeat-details-monthly-week-week"), $input->("repeat-details-monthly-week-month"))
+msgid "The %1 %2 of every %3 month(s)"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:214
+msgid "Third"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:212
+msgid "Thu"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:29
+msgid "Ticket lead time (days)"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:212
+msgid "Tue"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:212
+msgid "Wed"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:48
+msgid "Weekly"
+msgstr ""
+
+#: html/Ticket/Elements/EditRecurrence:58
+msgid "Yearly"
+msgstr ""
+
commit 420962918c4a3f741a183cf57be0dee22b054b81
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Feb 13 17:15:30 2014 -0500
Ignore generated MYMETA files
diff --git a/.gitignore b/.gitignore
index 3d3ce81..f9c6a8b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ pod2htm*.tmp
RT-Extension-RepeatTicket-*
/bin/rt-repeat-ticket
/lib/RT/Extension/RepeatTicket/Test.pm
+/MYMETA.*
\ No newline at end of file
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list