[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm /localize/localize de.pm
bisitz
bisitz at source.lon-capa.org
Tue Aug 13 14:14:26 EDT 2013
bisitz Tue Aug 13 18:14:26 2013 EDT
Modified files:
/loncom/interface lonparmset.pm
/loncom/localize/localize de.pm
Log:
- Improve Internationalization:
- First concatenate, then translate
- Updated related translation entries
- Own paragraphs for warning messages
- Warning style instead of error style for warnings about invalid user input
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.539 loncom/interface/lonparmset.pm:1.540
--- loncom/interface/lonparmset.pm:1.539 Wed Jul 17 12:00:28 2013
+++ loncom/interface/lonparmset.pm Tue Aug 13 18:14:21 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.539 2013/07/17 12:00:28 raeburn Exp $
+# $Id: lonparmset.pm,v 1.540 2013/08/13 18:14:21 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2088,8 +2088,10 @@
$id='';
} else {
$message=
- '<span class="LC_error">'.&mt("Unknown ID")." '$id' ".
- &mt('at domain')." '$udom'</span>";
+ '<p class="LC_warning">'.
+ &mt('Unknown ID [_1] at domain [_2]',
+ "'".$id."'","'".$udom."'").
+ '</p>';
}
} else {
$uname=$env{'form.uname'};
@@ -2100,16 +2102,20 @@
$uhome=&Apache::lonnet::homeserver($uname,$udom);
if ($uhome eq 'no_host') {
$message=
- '<span class="LC_error">'.&mt("Unknown user")." '$uname' ".
- &mt("at domain")." '$udom'</span>";
+ '<p class="LC_warning">'.
+ &mt('Unknown user [_1] at domain [_2]',
+ "'".$uname."'","'".$udom."'").
+ '</p>';
$uname='';
} else {
$csec=&Apache::lonnet::getsection($udom,$uname,
$env{'request.course.id'});
if ($csec eq '-1') {
- $message='<span class="LC_error">'.
- &mt("User")." '$uname' ".&mt("at domain")." '$udom' ".
- &mt("not in this course")."</span>";
+ $message=
+ '<p class="LC_warning">'.
+ &mt('User [_1] at domain [_2] not in this course',
+ "'".$uname."'","'".$udom."'").
+ '</p>';
$uname='';
$csec=$env{'form.csec'};
$cgroup=$env{'form.cgroup'};
@@ -2373,7 +2379,7 @@
$userspan ++;
}
$r->print('<th colspan="'.$userspan.'" rowspan="2">');
- $r->print(&mt("User")." $uname ".&mt('at Domain')." $udom</th>");
+ $r->print(&mt('User [_1] at Domain [_2]',"'".$uname."'","'".$udom."'").'</th>');
}
my %lt=&Apache::lonlocal::texthash(
'pie' => "Parameter in Effect",
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.521 loncom/localize/localize/de.pm:1.522
--- loncom/localize/localize/de.pm:1.521 Tue Aug 13 17:38:23 2013
+++ loncom/localize/localize/de.pm Tue Aug 13 18:14:25 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# German Localization Lexicon
#
-# $Id: de.pm,v 1.521 2013/08/13 17:38:23 bisitz Exp $
+# $Id: de.pm,v 1.522 2013/08/13 18:14:25 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2714,11 +2714,11 @@
'USERS'
=> 'BENUTZER',
- 'Unknown ID'
-=> 'Unbekannte ID',
+ 'Unknown ID [_1] at domain [_2]'
+=> 'Unbekannte ID [_1] in der Domäne [_2]',
- 'Unknown user'
-=> 'Unbekannter Benutzer',
+ 'Unknown user [_1] at domain [_2]'
+=> 'Unbekannter Benutzer [_1] in der Domäne [_2]',
'Update Course Assessment Parameter Display'
=> 'Aktualisiere die Anzeige der Parameter zur Kursbeurteilung',
@@ -2768,11 +2768,8 @@
'at'
=> 'in',
- 'at Domain'
-=> 'in Domäne',
-
- 'at domain'
-=> 'in Domäne',
+ 'User [_1] at Domain [_2]'
+=> 'Benutzer [_1] in der Domäne [_2]',
'default'
=> 'voreingestellt',
@@ -17875,8 +17872,8 @@
'Problem Type'
=> 'Aufgabentyp',
- 'not in this course'
-=> 'nicht in diesem Kurs',
+ 'User [_1] at domain [_2] not in this course'
+=> 'Der Benutzer [_1] in der Domäne [_2] ist nicht in diesem Kurs.',
#Start: redesigned menus
#lonparmset.pm
'Edit environment settings for this course.'
More information about the LON-CAPA-cvs
mailing list