'.&make_anchor($href_edit_location.$filename.'.meta',\%anchor_fields,$cat);
# ''.$cat.'';
}
@@ -538,12 +538,12 @@ sub delete {
my @files=&Apache::loncommon::get_env_multiple('form.selectfile');
my ($uname,$udom) = &get_name_dom();
if (&Apache::lonnet::is_locked($file_name,$udom,$uname) eq 'true') {
- $r->print("The file is locked and cannot be deleted. ");
+ $r->print(&mt('The file is locked and cannot be deleted.').' ');
$r->print(&done('Back',$url));
} else {
if (scalar(@files)) {
&open_form($r,$url);
- $r->print('
'.&mt('[_1]-based conditional access: ',&mt($title)));
if ($$acl_count{$type}) {
$r->print($$acl_count{$type}.' ');
if ($$acl_count{$type} > 1) {
@@ -1366,7 +1368,7 @@ sub display_access_row {
}
$r->print(&Apache::loncommon::end_data_table());
} else {
- $r->print(&mt('No [_1]-based conditions defined.',$type).' '
+ $r->print(&mt('No [_1]-based conditions defined.',&mt($type)).' '
.&additional_item($type));
}
return;
@@ -1526,7 +1528,7 @@ sub users_row {
sub additional_item {
my ($type) = @_;
- my $output = &mt('Add new [_1] condition(s)?',$type).' '.&mt('Number to add: ').'';
+ my $output = &mt('Add new [_1] condition(s)?',&mt($type)).' '.&mt('Number to add: ').'';
return $output;
}
@@ -1781,7 +1783,7 @@ sub check_for_upload {
} elsif ($found_file) {
if ($locked_file) {
my $msg = '';
- $msg .= &mt('Unable to upload [_1] a locked file by that name was found in [_2].',''.$fname.'',''.$port_path.$env{'form.currentpath'}.'');
+ $msg .= &mt('Unable to upload [_1]. A locked file by that name was found in [_2].',''.$fname.'',''.$port_path.$env{'form.currentpath'}.'');
$msg .= ' ';
$msg .= &mt('You will be able to rename or delete existing [_1] after a grade has been assigned.',''.$fname.'');
return ('file_locked',$msg);
@@ -1821,8 +1823,8 @@ sub upload {
$port_path.$env{'form.currentpath'},
$mode,\%allfiles,\%codebase);
if ($result !~ m|^/uploaded/|) {
- $r->print(''.'An error occurred ('.$result.
- ') while trying to upload '.&display_file().' ');
+ $r->print(''.&mt('An error occurred ([_1]) while trying to upload [_2].'
+ ,$result,&display_file()).' ');
$r->print(&done('Back',$url));
} else {
if (%allfiles) {
@@ -1838,7 +1840,7 @@ STATE
$r->print(&Apache::londocs::ask_for_embedded_content('/adm/portfolio',$state,\%allfiles,\%codebase,
{'error_on_invalid_names' => 1,
'ignore_remote_references' => 1,}));
- $r->print('
Or '.&done('Return to directory listing',$url).'
');
+ $r->print('
Or '.&done('Return to directory',$url).'
');
} else {
$r->print(&done(undef,$url));
}
@@ -1880,8 +1882,10 @@ sub upload_embedded {
&Apache::lonnet::userfileupload('embedded_item_'.$i,'',
$port_path.$path);
if ($result !~ m|^/uploaded/|) {
- $r->print(''.'An error occurred ('.$result.
- ') while trying to upload '.$orig_uploaded_filename.' for embedded element '.$env{'form.embedded_orig_'.$i}.' ');
+ $r->print(''
+ .&mt('An error occurred ([_1]) while trying to upload [_2] for embedded element [_3].'
+ ,$result,$orig_uploaded_filename,$env{'form.embedded_orig_'.$i})
+ .' ');
next;
} else {
$r->print("
Uploaded ".
@@ -1926,8 +1930,7 @@ sub lock_info {
my %course_description =
&Apache::lonnet::coursedescription($$array_item[1]);
if ( $course_description{'description'} ne '') {
- $r->print(&mt('In the course: [_1] ',
- $course_description{'description'}));
+ $r->print(&mt('In the course:').' '.$course_description{'description'}.' ');
}
}
}
@@ -1955,20 +1958,24 @@ sub createdir {
}
}
if ($found_file){
- $r->print(''.&mt('Unable to create a directory named').' '.$newdir.
- '. '.&mt('A file or directory by that name already exists.').' ');
+ $r->print(''
+ .&mt('Unable to create a directory named [_1].',''.$newdir.'')
+ .' '.&mt('A file or directory by that name already exists.').' ');
} else {
my ($uname,$udom) = &get_name_dom();
my $port_path = &get_port_path();
my $result=&Apache::lonnet::mkdiruserfile($uname,$udom,
$port_path.$env{'form.currentpath'}.$newdir);
if ($result ne 'ok') {
- $r->print(''.'An error occurred ('.$result.
- ') while trying to create a new directory '.&display_file().' ');
+ $r->print(''
+ .&mt('An error occurred ([_1]) while trying to create a new directory [_2].'
+ ,$result,&display_file())
+ .' ');
}
}
if ($newdir ne $env{'form.newdir'}) {
- $r->print(&mt("The new directory name was changed from:")." ".$env{'form.newdir'}." ".&mt('to')." $newdir ");
+ $r->print(&mt('The new directory name was changed from [_1] to [_2].'
+ ,''.$env{'form.newdir'}.'',''.$newdir.''));
}
$r->print(&done(undef,$url));
}
@@ -2069,7 +2076,7 @@ sub missing_priv {
$rtnlink .= '?';
}
$rtnlink .= 'currentpath='.$escpath;
- $r->print(&mt('
Action disallowed
'));
+ $r->print('
'.&mt('Action disallowed').'
');
$r->print(&mt('You do not have sufficient privileges to [_1] ',
$longtext->{$priv}));
if (defined($env{'form.group'})) {
@@ -2078,7 +2085,7 @@ sub missing_priv {
} else {
$r->print(&mt('in this portfolio.'));
}
- $rtnlink .= '">'.&mt('Return to directory listing page').'';
+ $rtnlink .= '">'.&mt('Return to directory').'';
$r->print(' '.$rtnlink);
$r->print(&Apache::loncommon::end_page());
return;
@@ -2170,7 +2177,7 @@ sub handler {
$r->print(&mt('Not a valid group for this course'));
$earlyout = 1;
}
- $title = &mt('Group files').' for '.$group;
+ $title = &mt('Group files for [_1]', $group);
} else {
$r->print(&mt('Invalid group'));
$earlyout = 1;
@@ -2229,8 +2236,8 @@ sub handler {
}
if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){
$r->print('');
- $r->print(&mt('No file was selected to upload. '));
- $r->print(&mt('To upload a file, click Browse... select a file, then click Upload.'));
+ $r->print(&mt('No file was selected to upload.').' ');
+ $r->print(&mt('To upload a file, click Browse... and select a file, then click Upload.'));
$r->print('');
}
if ($env{'form.meta'}) {