[LON-CAPA-cvs] cvs: loncom /interface lonmsgdisplay.pm /localize/localize de.pm es.pm zh.pm
bisitz
bisitz@source.lon-capa.org
Wed, 13 Jan 2010 18:23:09 -0000
This is a MIME encoded message
--bisitz1263406989
Content-Type: text/plain
bisitz Wed Jan 13 18:23:09 2010 EDT
Modified files:
/loncom/interface lonmsgdisplay.pm
/loncom/localize/localize de.pm es.pm zh.pm
Log:
- Optimized &mt() usage to allow proper translation of "There are no ... messages in this folder."
- Info style for messages about empty folders
- Adjusted translation files es.pm and zh.pm (partly; prepared new phrases), de.pm
(including changes started in lonmsgdisplay.pm 1.140)
--bisitz1263406989
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20100113182309.txt"
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.140 loncom/interface/lonmsgdisplay.pm:1.141
--- loncom/interface/lonmsgdisplay.pm:1.140 Wed Jan 13 16:39:19 2010
+++ loncom/interface/lonmsgdisplay.pm Wed Jan 13 18:23:01 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.140 2010/01/13 16:39:19 bisitz Exp $
+# $Id: lonmsgdisplay.pm,v 1.141 2010/01/13 18:23:01 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -146,7 +146,7 @@
);
$actions{'select_form_order'} = ['view','rename','delete'];
- my %statushash = &get_msgstatus_types();
+ my %statushash = &Apache::lonlocal::texthash(&get_msgstatus_types());
$statushash{'select_form_order'} = ['','new','read','replied','forwarded'];
@@ -219,8 +219,7 @@
</script>|;
my %show = ('select_form_order' => [10,20,50,100,200],
map {$_=>$_} (10,20,50,100,200));
-
-
+
$output .= '
<form method="post" action="/adm/email" name="folderlist">
<table border="0" cellspacing="2" cellpadding="2">
@@ -273,12 +272,13 @@
}
sub get_msgstatus_types {
- my %statushash = &Apache::lonlocal::texthash(
- '' => 'Any',
- new => 'Unread',
- read => 'Read',
- replied => 'Replied to',
- forwarded => 'Forwarded',
+ # Don't translate here!
+ my %statushash = (
+ '' => 'Any',
+ 'new' => 'Unread',
+ 'read' => 'Read',
+ 'replied' => 'Replied to',
+ 'forwarded' => 'Forwarded',
);
return %statushash;
}
@@ -291,7 +291,7 @@
my %statushash = &get_msgstatus_types();
my $status;
if ($msgstatus eq '') {
- $status = &mt('All');
+ $status = 'All'; # Don't translate here!
} else {
$status = $statushash{$msgstatus};
}
@@ -866,8 +866,11 @@
}
# Check to see if there were any messages.
if ($result eq '') {
- $result = "<h2>".&mt('You have no critical messages.')."</h2>".
- '<a href="/adm/roles">'.&mt('Select a course').'</a><br />'.
+ $result =
+ '<p class="LC_info">'.
+ &mt('You have no critical messages.').
+ '</p>'.
+ '<a href="/adm/roles">'.&mt('Select a course').'</a><br />'.
'<a href="/adm/email">'.&mt('Communicate').'</a>';
} else {
$r->print($header);
@@ -1070,18 +1073,20 @@
my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus);
my $totalnumber=$#temp+1;
if ($totalnumber < 1) {
+ $r->print('<p class="LC_info">');
if ($msgstatus eq '') {
- $r->print('<h2>'.&mt('Empty Folder').'</h2>');
+ $r->print(&mt('There are no messages in this folder.'));
} elsif ($msgstatus eq 'replied') {
- $r->print('<h2>'.&mt('You have not replied to any messages in this folder.').'</h2>');
- } else {
- $r->print('<h2>'.&mt('There are no '.lc($statushash{$msgstatus}).' messages in this folder.').'</h2>');
+ $r->print(&mt('You have not replied to any messages in this folder.'));
+ } else {
+ $r->print(&mt('There are no '.lc($statushash{$msgstatus}).' messages in this folder.'));
}
+ $r->print('</p>');
if ($numblocked > 0) {
$r->print(&blocked_in_folder($numblocked,$startblock,$endblock,
\%setters));
}
- return;
+ return;
}
my $interdis = $env{'form.interdis'};
my $number=int($totalnumber/$interdis);
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.343 loncom/localize/localize/de.pm:1.344
--- loncom/localize/localize/de.pm:1.343 Wed Dec 16 13:01:09 2009
+++ loncom/localize/localize/de.pm Wed Jan 13 18:23:08 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# German Localization Lexicon
#
-# $Id: de.pm,v 1.343 2009/12/16 13:01:09 bisitz Exp $
+# $Id: de.pm,v 1.344 2010/01/13 18:23:08 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -738,6 +738,9 @@
'Page'
=> 'Seite',
+ 'Page:'
+=> 'Seite:',
+
'Sequence'
=> 'Sequenz',
@@ -8297,9 +8300,6 @@
'Messages being sent.'
=> 'Nachrichten wurden gesendet',
- 'showing messages'
-=> 'zeige Nachrichten',
-
'Assigning'
=> 'Zuweisung der Rolle',
@@ -10066,8 +10066,23 @@
'Replying to'
=> 'Antwort an',
- '<b>[_1] messages</b>: showing messages [_2] through [_3] of [_4].'
-=> '<b>Nachrichten ([_1])</b>: Anzeige der Nachrichten [_2] bis [_3] von insgesamt [_4]',
+ 'All messages:'
+=> 'Alle Nachrichten:',
+
+ 'Unread messages:'
+=> 'Ungelesene Nachrichten:',
+
+ 'Read messages:'
+=> 'Gelesene Nachrichten:',
+
+ 'Replied to messages:'
+=> 'Beantwortete Nachrichten:',
+
+ 'Forwarded messages:'
+=> 'Weitergeleitete Nachrichten:',
+
+ 'showing messages [_1] through [_2] of [_3].'
+=> 'Anzeige der Nachrichten [_1] bis [_2] von insgesamt [_3]',
'Broadcast Message'
=> 'Broadcast-Nachricht',
@@ -10468,20 +10483,20 @@
'Currently available actions (will open extra window)'
=> 'Verfügbare Aktionen (öffnen in neuem Fenster)',
- 'There are no ungelesen messages in this folder.' # !
+ 'There are no unread messages in this folder.'
=> 'In diesem Verzeichnis befinden sich keine ungelesenen Nachrichten.',
- 'There are no gelesen messages in this folder' # !
+ 'There are no read messages in this folder.'
=> 'In diesem Verzeichnis befinden sich keine gelesenen Nachrichten.',
- 'There are no weitergeleitet messages in this folder.' # !
+ 'There are no forwarded messages in this folder.'
=> 'In diesem Verzeichnis befinden sich keine weitergeleiteten Nachrichten.',
'You have not replied to any messages in this folder.'
=> 'In diesem Verzeichnis befinden sich keine Nachrichten, auf die Sie geantwortet haben.',
- 'Empty Folder'
-=> 'Leeres Verzeichnis',
+ 'There are no messages in this folder.'
+=> 'In diesem Verzeichnis befinden sich keine Nachrichten.',
'To:'
=> 'An:',
Index: loncom/localize/localize/es.pm
diff -u loncom/localize/localize/es.pm:1.36 loncom/localize/localize/es.pm:1.37
--- loncom/localize/localize/es.pm:1.36 Wed Dec 16 13:01:09 2009
+++ loncom/localize/localize/es.pm Wed Jan 13 18:23:08 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Spanish Localization Lexicon
#
-# $Id: es.pm,v 1.36 2009/12/16 13:01:09 bisitz Exp $
+# $Id: es.pm,v 1.37 2010/01/13 18:23:08 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -736,6 +736,9 @@
'Page'
=> 'Página',
+ 'Page:'
+=> 'Página:',
+
'Sequence'
=> 'Secuencia',
@@ -8349,9 +8352,6 @@
'Messages being sent.'
=> 'Mensajes están siendo enviados',
- 'showing messages'
-=> 'mostrando mensajes',
-
'Assigning'
=> 'Asignando',
@@ -10073,8 +10073,23 @@
'Replying to'
=> 'Respondiendo a',
- '<b>[_1] messages</b>: showing messages [_2] through [_3] of [_4].'
-=> '<b>mensajes ([_1])</b>: mostrando mensajes [_2] hasta [_3] del total de [_4]',
+ 'All messages:'
+=> 'All messages:',
+
+ 'Unread messages:'
+=> 'Unread messages:',
+
+ 'Read messages:'
+=> 'Read messages:',
+
+ 'Replied to messages:'
+=> 'Replied to messages:',
+
+ 'Forwarded messages:'
+=> 'Forwarded messages:',
+
+ 'showing messages [_1] through [_2] of [_3].'
+=> 'mostrando mensajes [_1] hasta [_2] del total de [_3]',
'Broadcast Message'
=> 'Emitir Mensaje',
@@ -10478,22 +10493,22 @@
'Currently available actions (will open extra window)'
=> 'Acciones disponibles actualmente (abrirá una ventana extra)',
-#wait for a fix
-# 'There are no ungelesen messages in this folder.' # !
-#=> 'No hay mensajes no leídos en esta carpeta.',
-
- 'There are no leído messages in this folder' # !
-=> 'No hay mensajes no leídos en esta carpeta',
-
-#wait for a fix
-# 'There are no [_1] messages in this folder.' # !
-#=> 'No hay mensajes [_1] en esta carpeta.',
+ 'There are no unread messages in this folder.'
+=> 'No hay mensajes no leídos en esta carpeta.',
+
+ 'There are no read messages in this folder.'
+=> 'There are no read messages in this folder.',
+# => 'No hay mensajes ... en esta carpeta.',
+
+ 'There are no forwarded messages in this folder.'
+=> 'There are no forwarded messages in this folder.',
+# => 'No hay mensajes ... en esta carpeta.',
'You have not replied to any messages in this folder.'
=> 'No ha respondido a ningún mensaje en esta carpeta.',
- 'Empty Folder'
-=> 'Carpeta Vacía',
+ 'There are no messages in this folder.'
+=> 'Carpeta Vacía', # Empty Folder
'To:'
=> 'A:',
Index: loncom/localize/localize/zh.pm
diff -u loncom/localize/localize/zh.pm:1.85 loncom/localize/localize/zh.pm:1.86
--- loncom/localize/localize/zh.pm:1.85 Wed Dec 16 13:01:09 2009
+++ loncom/localize/localize/zh.pm Wed Jan 13 18:23:08 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Chinese Simplified Localization Lexicon
#
-# $Id: zh.pm,v 1.85 2009/12/16 13:01:09 bisitz Exp $
+# $Id: zh.pm,v 1.86 2010/01/13 18:23:08 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -721,6 +721,9 @@
'Page'
=> '页',
+ 'Page:'
+=> '页:',
+
'Sequence'
=> '顺序',
@@ -8236,9 +8239,6 @@
'Messages being sent.'
=> '邮件被发送。',
- 'showing messages'
-=> '浏览邮件',
-
'Assigning'
=> 'Zuweisung der Rolle',
@@ -9958,8 +9958,23 @@
'Replying to'
=> '回复',
- '<b>[_1] messages</b>: showing messages [_2] through [_3] of [_4].'
-=> '<b>消息 ([_1])</b>:显示消息[_2]通过[_3]的[_4] 。',
+ 'All messages:'
+=> 'Alle Nachrichten:',
+
+ 'Unread messages:'
+=> 'Ungelesene Nachrichten:',
+
+ 'Read messages:'
+=> 'Gelesene Nachrichten:',
+
+ 'Replied to messages:'
+=> 'Beantwortete Nachrichten:',
+
+ 'Forwarded messages:'
+=> 'Weitergeleitete Nachrichten:',
+
+ 'showing messages [_1] through [_2] of [_3].'
+=> '显示消息[_1]通过[_2]的[_3] 。',
'Broadcast Message'
=> '广播消息',
@@ -10360,20 +10375,20 @@
'Currently available actions (will open extra window):'
=> '目前可采取的行动 (在新窗口中打开):',
- 'There are no ungelesen messages in this folder.' # !
+ 'There are no unread messages in this folder.'
=> '在此文件夹中没有未阅读邮件。',
- 'There are no gelesen messages in this folder' # !
+ 'There are no read messages in this folder'
=> '在此文件夹中没有已阅读邮件。',
- 'There are no weitergeleitet messages in this folder.' # !
+ 'There are no forwarded messages in this folder.'
=> '在此文件夹中没有转发的邮件。',
'You have not replied to any messages in this folder.'
=> '在此文件夹中您没有需要回答的邮件。',
- 'Empty Folder'
-=> '空文件夹',
+ 'There are no messages in this folder.'
+=> '空文件夹', # Empty Folder
'Cc:'
=> '抄送:',
--bisitz1263406989--