i18n'ed TimeTracker
This commit is contained in:
parent
aa10f84d87
commit
d5204a1fa9
2 changed files with 208 additions and 131 deletions
|
|
@ -65,8 +65,8 @@ sub definition {
|
||||||
fieldType=>"yesNo",
|
fieldType=>"yesNo",
|
||||||
defaultValue=>0,
|
defaultValue=>0,
|
||||||
tab=>"properties",
|
tab=>"properties",
|
||||||
hoverHelp=>$i18n->echo("Choose yes to pull projects and task information from the various project management assets on your site"),
|
hoverHelp=>$i18n->get("Choose yes to pull projects and task information from the various project management assets on your site"),
|
||||||
label=>$i18n->echo("Project Management Integration")
|
label=>$i18n->get("Project Management Integration")
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
|
@ -194,9 +194,9 @@ sub view {
|
||||||
|
|
||||||
$var->{'form.footer'} = WebGUI::Form::formFooter($session);
|
$var->{'form.footer'} = WebGUI::Form::formFooter($session);
|
||||||
|
|
||||||
$var->{'js.alert.removeRow.error'} = $i18n->echo("There must be at least one row. Please add more rows if you wish to delete this one");
|
$var->{'js.alert.removeRow.error'} = $i18n->get("There must be at least one row. Please add more rows if you wish to delete this one");
|
||||||
$var->{'js.alert.validate.hours.error'} = $i18n->echo("You may not submit more hours than are available during any given week.");
|
$var->{'js.alert.validate.hours.error'} = $i18n->get("You may not submit more hours than are available during any given week.");
|
||||||
$var->{'js.alert.validate.incomplete.error'} = $i18n->echo("The highlighted fields are required if you wish to submit this form.");
|
$var->{'js.alert.validate.incomplete.error'} = $i18n->get("The highlighted fields are required if you wish to submit this form.");
|
||||||
|
|
||||||
$var->{'form.timetracker'} = $self->www_buildTimeTable($var);
|
$var->{'form.timetracker'} = $self->www_buildTimeTable($var);
|
||||||
|
|
||||||
|
|
@ -284,7 +284,7 @@ sub www_deleteProject {
|
||||||
my ($count) = $db->quickArray("select count(*) from TT_timeEntry where projectId=".$db->quote($projectId));
|
my ($count) = $db->quickArray("select count(*) from TT_timeEntry where projectId=".$db->quote($projectId));
|
||||||
|
|
||||||
if($count > 0) {
|
if($count > 0) {
|
||||||
my $error = $i18n->echo("This project cannot be deleted as it is currently being used by existing time entry records and would corrupt this data. The records must be deleted if you wish to remove this project");
|
my $error = $i18n->get("This project cannot be deleted as it is currently being used by existing time entry records and would corrupt this data. The records must be deleted if you wish to remove this project");
|
||||||
return $self->www_manageProjects($error);
|
return $self->www_manageProjects($error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -346,9 +346,9 @@ sub www_editProject {
|
||||||
);
|
);
|
||||||
|
|
||||||
#Add Tasks
|
#Add Tasks
|
||||||
my $taskNameLabel = $i18n->echo("New Task Name");
|
my $taskNameLabel = $i18n->get("New Task Name");
|
||||||
my $taskAddButtonLabel = $i18n->echo("Add");
|
my $taskAddButtonLabel = $i18n->get("Add");
|
||||||
my $taskTitleLabel = $i18n->echo("Tasks");
|
my $taskTitleLabel = $i18n->get("Tasks");
|
||||||
my $taskDeletePrompt = $i18n->echo("Are you sure you want to delete this activity?");
|
my $taskDeletePrompt = $i18n->echo("Are you sure you want to delete this activity?");
|
||||||
$taskDeletePrompt =~ s/'/\\'/g;
|
$taskDeletePrompt =~ s/'/\\'/g;
|
||||||
my $taskLabel = $i18n->get("edit project tasks label");
|
my $taskLabel = $i18n->get("edit project tasks label");
|
||||||
|
|
@ -433,7 +433,7 @@ sub www_editProjectSave {
|
||||||
}
|
}
|
||||||
|
|
||||||
#Add Tasks
|
#Add Tasks
|
||||||
my $newTaskLabel = $i18n->echo("New Task Name");
|
my $newTaskLabel = $i18n->get("New Task Name");
|
||||||
my $newTaskValue = $form->process("newTaskName","text");
|
my $newTaskValue = $form->process("newTaskName","text");
|
||||||
my $newTaskId = "";
|
my $newTaskId = "";
|
||||||
if($newTaskValue ne $newTaskLabel && $newTaskValue ne "") {
|
if($newTaskValue ne $newTaskLabel && $newTaskValue ne "") {
|
||||||
|
|
@ -446,7 +446,7 @@ sub www_editProjectSave {
|
||||||
|
|
||||||
if($action eq "addTask") {
|
if($action eq "addTask") {
|
||||||
my $taskError = "";
|
my $taskError = "";
|
||||||
$taskError = $i18n->echo("No name was entered for new task") if($newTaskId eq "");
|
$taskError = $i18n->get("No name was entered for new task") if($newTaskId eq "");
|
||||||
return $self->www_editProject($projectId,$taskError);
|
return $self->www_editProject($projectId,$taskError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -607,9 +607,9 @@ sub www_buildTimeTable {
|
||||||
$var->{'time.report.task.label'} = $i18n->get("time report task label");
|
$var->{'time.report.task.label'} = $i18n->get("time report task label");
|
||||||
$var->{'time.report.hours.label'} = $i18n->get("time report hours label");
|
$var->{'time.report.hours.label'} = $i18n->get("time report hours label");
|
||||||
$var->{'time.report.comments.label'} = $i18n->get("time report comments label");
|
$var->{'time.report.comments.label'} = $i18n->get("time report comments label");
|
||||||
$var->{'time.add.row.label'} = $i18n->echo("Add Row");
|
$var->{'time.add.row.label'} = $i18n->get("Add Row");
|
||||||
$var->{'time.save.label'} = $i18n->echo("Save");
|
$var->{'time.save.label'} = $i18n->get("Save");
|
||||||
$var->{'time.report.complete.label'} = $i18n->echo("Report Complete");
|
$var->{'time.report.complete.label'} = $i18n->get("Report Complete");
|
||||||
|
|
||||||
|
|
||||||
#my ($junk,$weekEnd) = $dt->dayStartEnd($daysInWeek->{"6"});
|
#my ($junk,$weekEnd) = $dt->dayStartEnd($daysInWeek->{"6"});
|
||||||
|
|
@ -636,7 +636,7 @@ sub www_buildTimeTable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $chooseLabel = $i18n->echo("Choose One");
|
my $chooseLabel = $i18n->get("Choose One");
|
||||||
#Build Task Lists based on Project Ids
|
#Build Task Lists based on Project Ids
|
||||||
tie my %taskList, "Tie::IxHash";
|
tie my %taskList, "Tie::IxHash";
|
||||||
#Build task list javascript:
|
#Build task list javascript:
|
||||||
|
|
@ -766,7 +766,7 @@ sub _buildRow {
|
||||||
});
|
});
|
||||||
|
|
||||||
#Entry Date
|
#Entry Date
|
||||||
my $chooseLabel = $i18n->echo("Choose One");
|
my $chooseLabel = $i18n->get("Choose One");
|
||||||
$var->{'entry.hours'} = $entry->{hours};
|
$var->{'entry.hours'} = $entry->{hours};
|
||||||
if($reportComplete) {
|
if($reportComplete) {
|
||||||
$var->{'form.date'} = $entry->{taskDate};
|
$var->{'form.date'} = $entry->{taskDate};
|
||||||
|
|
|
||||||
|
|
@ -1,174 +1,251 @@
|
||||||
package WebGUI::i18n::English::Asset_TimeTracking;
|
package WebGUI::i18n::English::Asset_TimeTracking;
|
||||||
|
|
||||||
our $I18N = {
|
our $I18N = {
|
||||||
'userViewTemplate hoverhelp' => {
|
'' => {
|
||||||
message => q|Template to use for main user view of Time Tracker Application|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => ''
|
||||||
},
|
},
|
||||||
|
|
||||||
'userViewTemplate label' => {
|
'Project Management Integration' => {
|
||||||
message => q|Default Time Tracker User View Template|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'Project Management Integration'
|
||||||
},
|
},
|
||||||
|
|
||||||
'managerViewTemplate hoverhelp' => {
|
'Add Row' => {
|
||||||
message => q|Template to use for manager view of Time Tracker Application|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'Add Row'
|
||||||
},
|
},
|
||||||
|
|
||||||
'managerViewTemplate label' => {
|
'There must be at least one row. Please add more rows if you wish to delete this one' => {
|
||||||
message => q|Default Time Tracker Manager View Template|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'There must be at least one row. Please add more rows if you wish to delete this one'
|
||||||
},
|
},
|
||||||
|
|
||||||
'groupToManage hoverhelp' => {
|
'manage project available task label' => {
|
||||||
message => q|Group that is able to view all time sheets and update completed time records|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Available Tasks'
|
||||||
},
|
},
|
||||||
|
|
||||||
'groupToManage label' => {
|
assetName => {
|
||||||
message => q|Group to Manage Time|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Time Tracking System'
|
||||||
},
|
},
|
||||||
|
|
||||||
'timeRowTemplateId hoverhelp' => {
|
'No name was entered for new task' => {
|
||||||
message => q|Template to user for building rows in the time tracker|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'No name was entered for new task'
|
||||||
},
|
|
||||||
|
|
||||||
'timeRowTemplateId label' => {
|
|
||||||
message => q|Default Time Tracker Row|,
|
|
||||||
lastUpdated => 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
'assetName' => {
|
'time report task label' => {
|
||||||
message => q|Time Tracking System|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Task'
|
||||||
},
|
},
|
||||||
|
|
||||||
'time report header' => {
|
'edit project label' => {
|
||||||
message => q|Time entry for week ending %s|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Edit Project'
|
||||||
},
|
},
|
||||||
|
|
||||||
'total hours label' => {
|
'manage project name label' => {
|
||||||
message => q|Total Hours|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Project Name'
|
||||||
},
|
},
|
||||||
|
|
||||||
'time report date label' => {
|
'managerViewTemplate label' => {
|
||||||
message => q|Date|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Default Time Tracker Manager View Template'
|
||||||
},
|
},
|
||||||
|
|
||||||
'time report project label' => {
|
'time report comments label' => {
|
||||||
message => q|Project|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Comments'
|
||||||
},
|
|
||||||
|
|
||||||
'time report task label' => {
|
|
||||||
message => q|Task|,
|
|
||||||
lastUpdated => 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
'time report hours label' => {
|
'total hours label' => {
|
||||||
message => q|Hours|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Total Hours'
|
||||||
},
|
},
|
||||||
|
|
||||||
'time report comments label' => {
|
'New Task Name' => {
|
||||||
message => q|Comments|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'New Task Name'
|
||||||
},
|
},
|
||||||
|
|
||||||
'project manage label' => {
|
'You may not submit more hours than are available during any given week.' => {
|
||||||
message => q|Manage Projects|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'You may not submit more hours than are available during any given week.'
|
||||||
},
|
},
|
||||||
|
|
||||||
'manage project name label' => {
|
'edit project tasks hoverhelp' => {
|
||||||
message => q|Project Name|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Enter the project tasks, one per line, that you would like to track time against for this project'
|
||||||
},
|
},
|
||||||
|
|
||||||
'manage project available task label' => {
|
'Choose yes to pull projects and task information from the various project management assets on your site' => {
|
||||||
message => q|Available Tasks|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'Choose yes to pull projects and task information from the various project management assets on your site'
|
||||||
},
|
|
||||||
|
|
||||||
'manage project resource label' => {
|
|
||||||
message => q|Available Resources|,
|
|
||||||
lastUpdated => 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
'manage projects screen label' => {
|
'The highlighted fields are required if you wish to submit this form.' => {
|
||||||
message => q|Manage Projects|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'The highlighted fields are required if you wish to submit this form.'
|
||||||
},
|
},
|
||||||
|
|
||||||
'add project label' => {
|
'time report project label' => {
|
||||||
message => q|Add New Project|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Project'
|
||||||
},
|
},
|
||||||
|
|
||||||
'edit project label' => {
|
'Are you sure you want to delete this activity' => {
|
||||||
message => q|Edit Project|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'Are you sure you want to delete this activity?'
|
||||||
},
|
|
||||||
|
|
||||||
'edit project name label' => {
|
|
||||||
message => q|Project Name|,
|
|
||||||
lastUpdated => 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
'edit project name hoverhelp' => {
|
Tasks => {
|
||||||
message => q|Enter the name of the project you wish to show up in the projects drop down menu for this time tracker|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'Tasks'
|
||||||
},
|
},
|
||||||
|
|
||||||
'edit project id label' => {
|
'edit project id hoverhelp' => {
|
||||||
message => q|Project Id|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Project Identifier'
|
||||||
},
|
},
|
||||||
|
|
||||||
'edit project id hoverhelp' => {
|
'edit project name hoverhelp' => {
|
||||||
message => q|Project Identifier|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Enter the name of the project you wish to show up in the projects drop down menu for this time tracker'
|
||||||
},
|
|
||||||
'edit project resource hoverhelp' => {
|
|
||||||
message => q|Choose the resources you would like to be able to log time to this project|,
|
|
||||||
lastUpdated => 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
'edit project resource label' => {
|
'Report Complete' => {
|
||||||
message => q|Project Resource|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'Report Complete'
|
||||||
},
|
},
|
||||||
|
|
||||||
'edit project tasks label' => {
|
Add => {
|
||||||
message => q|Project Tasks|,
|
lastUpdated => 1150997998,
|
||||||
lastUpdated => 0
|
message => 'Add'
|
||||||
},
|
|
||||||
|
|
||||||
'edit project tasks hoverhelp' => {
|
|
||||||
message => q|Enter the project tasks, one per line, that you would like to track time against for this project|,
|
|
||||||
lastUpdated => 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
'edit project screen label' => {
|
'edit project resource hoverhelp' => {
|
||||||
message => q|Edit Project|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Choose the resources you would like to be able to log time to this project'
|
||||||
},
|
},
|
||||||
|
|
||||||
'no project message' => {
|
'time report date label' => {
|
||||||
message => q|No projects created. Click <a href="%s">here</a> to add a new project|,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Date'
|
||||||
},
|
},
|
||||||
|
|
||||||
'' => {
|
'edit project screen label' => {
|
||||||
message => q||,
|
lastUpdated => 0,
|
||||||
lastUpdated => 0
|
message => 'Edit Project'
|
||||||
},
|
},
|
||||||
};
|
|
||||||
|
'Choose One' => {
|
||||||
|
lastUpdated => 1150997998,
|
||||||
|
message => 'Choose One'
|
||||||
|
},
|
||||||
|
|
||||||
|
'This project cannot be deleted as it is currently being used by existing time entry records and would corrupt this data. The records must be deleted if you wish to remove this project' => {
|
||||||
|
lastUpdated => 1150997998,
|
||||||
|
message => 'This project cannot be deleted as it is currently being used by existing time entry records and would corrupt this data. The records must be deleted if you wish to remove this project'
|
||||||
|
},
|
||||||
|
|
||||||
|
'time report header' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Time entry for week ending %s'
|
||||||
|
},
|
||||||
|
|
||||||
|
Save => {
|
||||||
|
lastUpdated => 1150997998,
|
||||||
|
message => 'Save'
|
||||||
|
},
|
||||||
|
|
||||||
|
'edit project tasks label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Project Tasks'
|
||||||
|
},
|
||||||
|
|
||||||
|
'userViewTemplate label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Default Time Tracker User View Template'
|
||||||
|
},
|
||||||
|
|
||||||
|
'no project message' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'No projects created. Click <a href="%s">here</a> to add a new project'
|
||||||
|
},
|
||||||
|
|
||||||
|
'managerViewTemplate hoverhelp' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Template to use for manager view of Time Tracker Application'
|
||||||
|
},
|
||||||
|
|
||||||
|
'add project label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Add New Project'
|
||||||
|
},
|
||||||
|
|
||||||
|
'timeRowTemplateId label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Default Time Tracker Row'
|
||||||
|
},
|
||||||
|
|
||||||
|
'groupToManage label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Group to Manage Time'
|
||||||
|
},
|
||||||
|
|
||||||
|
'time report hours label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Hours'
|
||||||
|
},
|
||||||
|
|
||||||
|
'manage projects screen label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Manage Projects'
|
||||||
|
},
|
||||||
|
|
||||||
|
'edit project name label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Project Name'
|
||||||
|
},
|
||||||
|
|
||||||
|
'project manage label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Manage Projects'
|
||||||
|
},
|
||||||
|
|
||||||
|
'timeRowTemplateId hoverhelp' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Template to user for building rows in the time tracker'
|
||||||
|
},
|
||||||
|
|
||||||
|
'groupToManage hoverhelp' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Group that is able to view all time sheets and update completed time records'
|
||||||
|
},
|
||||||
|
|
||||||
|
'edit project id label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Project Id'
|
||||||
|
},
|
||||||
|
|
||||||
|
'userViewTemplate hoverhelp' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Template to use for main user view of Time Tracker Application'
|
||||||
|
},
|
||||||
|
|
||||||
|
'manage project resource label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Available Resources'
|
||||||
|
},
|
||||||
|
|
||||||
|
'edit project resource label' => {
|
||||||
|
lastUpdated => 0,
|
||||||
|
message => 'Project Resource'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue