Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20245/Outlook2000/dialogs
Modified Files:
dialog_map.py
Log Message:
Prepare for i18n.
Index: dialog_map.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/dialog_map.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** dialog_map.py 23 Dec 2004 18:14:17 -0000 1.46
--- dialog_map.py 4 Jan 2005 01:53:15 -0000 1.47
***************
*** 33,37 ****
date_string = strftime("%a, %d %b %Y %I:%M:%S %p", reset_date)
else:
! date_string = "Never"
win32gui.SendMessage(date_label, win32con.WM_SETTEXT, 0, date_string)
--- 33,37 ----
date_string = strftime("%a, %d %b %Y %I:%M:%S %p", reset_date)
else:
! date_string = _("Never")
win32gui.SendMessage(date_label, win32con.WM_SETTEXT, 0, date_string)
***************
*** 43,55 ****
def GetPopupHelpText(self, idFrom):
if idFrom == self.control_id:
! return "Displays statistics on mail processed by SpamBayes"
elif idFrom == self.button_id:
! return "Resets all SpamBayes statistics to zero"
elif idFrom == self.reset_date_id:
! return "The date and time when the SpamBayes statistics were last
reset"
def ResetStatistics(self):
! question = "This will reset all your saved statistics to
zero.\r\n\r\n" \
! "Are you sure you wish to reset the statistics?"
flags = win32con.MB_ICONQUESTION | win32con.MB_YESNO |
win32con.MB_DEFBUTTON2
if win32gui.MessageBox(self.window.hwnd,
--- 43,55 ----
def GetPopupHelpText(self, idFrom):
if idFrom == self.control_id:
! return _("Displays statistics on mail processed by SpamBayes")
elif idFrom == self.button_id:
! return _("Resets all SpamBayes statistics to zero")
elif idFrom == self.reset_date_id:
! return _("The date and time when the SpamBayes statistics were
last reset")
def ResetStatistics(self):
! question = _("This will reset all your saved statistics to
zero.\r\n\r\n" \
! "Are you sure you wish to reset the statistics?")
flags = win32con.MB_ICONQUESTION | win32con.MB_YESNO |
win32con.MB_DEFBUTTON2
if win32gui.MessageBox(self.window.hwnd,
***************
*** 66,74 ****
vstring = v.get_long_version("SpamBayes Outlook Addin")
if not hasattr(sys, "frozen"):
! vstring += " from source"
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT, 0,
vstring)
def GetPopupHelpText(self, cid):
! return "The version of SpamBayes running"
class TrainingStatusProcessor(ControlProcessor):
--- 66,74 ----
vstring = v.get_long_version("SpamBayes Outlook Addin")
if not hasattr(sys, "frozen"):
! vstring += _(" from source")
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT, 0,
vstring)
def GetPopupHelpText(self, cid):
! return _("The version of SpamBayes running")
class TrainingStatusProcessor(ControlProcessor):
***************
*** 78,102 ****
nham = bayes.nham
if nspam > 10 and nham > 10:
! db_status = "Database has %d good and %d spam." % (nham, nspam)
db_ratio = nham/float(nspam)
big = small = None
if db_ratio > 5.0:
! big = "ham"
! small = "spam"
elif db_ratio < (1/5.0):
! big = "spam"
! small = "ham"
! if big is not None:
! db_status = "%s\nWarning: you have much more %s than %s - " \
"SpamBayes works best with approximately even " \
! "numbers of ham and spam." % (db_status, big,
! small)
elif nspam > 0 or nham > 0:
! db_status = "Database only has %d good and %d spam - you should "
\
! "consider performing additional training." % (nham,
nspam)
else:
! db_status = "Database has no training information. SpamBayes " \
"will classify all messages as 'unsure', " \
! "ready for you to train."
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT,
0, db_status)
--- 78,99 ----
nham = bayes.nham
if nspam > 10 and nham > 10:
! db_status = _("Database has %d good and %d spam.") % (nham, nspam)
db_ratio = nham/float(nspam)
big = small = None
if db_ratio > 5.0:
! db_status = _("%s\nWarning: you have much more ham than spam
- " \
! "SpamBayes works best with approximately even " \
! "numbers of ham and spam.") % (db_status, )
elif db_ratio < (1/5.0):
! db_status = _("%s\nWarning: you have much more spam than ham
- " \
"SpamBayes works best with approximately even " \
! "numbers of ham and spam.") % (db_status, )
elif nspam > 0 or nham > 0:
! db_status = _("Database only has %d good and %d spam - you should
" \
! "consider performing additional training.") % (nham,
nspam)
else:
! db_status = _("Database has no training information. SpamBayes "
\
"will classify all messages as 'unsure', " \
! "ready for you to train.")
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT,
0, db_status)
***************
*** 108,118 ****
nham = bayes.nham
if nspam > 10 and nham > 10:
! msg = "SpamBayes has been successfully trained and configured. "
\
"You should find the system is immediately effective at " \
! "filtering spam."
else:
! msg = "SpamBayes has been successfully trained and configured. "
\
"However, as the number of messages trained is quite small,
" \
! "SpamBayes may take some time to become truly effective."
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT,
0, msg)
--- 105,115 ----
nham = bayes.nham
if nspam > 10 and nham > 10:
! msg = _("SpamBayes has been successfully trained and configured.
" \
"You should find the system is immediately effective at " \
! "filtering spam.")
else:
! msg = _("SpamBayes has been successfully trained and configured.
" \
"However, as the number of messages trained is quite small,
" \
! "SpamBayes may take some time to become truly effective.")
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT,
0, msg)
***************
*** 171,175 ****
return
if not manager.config.filter.enabled:
! status = "Filtering is disabled. Select 'Enable SpamBayes' to
enable."
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT,
0, status)
--- 168,172 ----
return
if not manager.config.filter.enabled:
! status = _("Filtering is disabled. Select 'Enable SpamBayes' to
enable.")
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT,
0, status)
***************
*** 182,192 ****
unsure_name = manager.FormatFolderNames(
[config.unsure_folder_id], False)
! unsure_text = "unsure managed in '%s'" % (unsure_name,)
else:
! unsure_text = "unsure messages untouched"
watch_names = manager.FormatFolderNames(
config.watch_folder_ids, config.watch_include_sub)
! filter_status = "Watching '%s'. Spam managed in '%s', %s." \
% (watch_names,
certain_spam_name,
--- 179,189 ----
unsure_name = manager.FormatFolderNames(
[config.unsure_folder_id], False)
! unsure_text = _("unsure managed in '%s'") % (unsure_name,)
else:
! unsure_text = _("unsure messages untouched")
watch_names = manager.FormatFolderNames(
config.watch_folder_ids, config.watch_include_sub)
! filter_status = _("Watching '%s'. Spam managed in '%s', %s.") \
% (watch_names,
certain_spam_name,
***************
*** 281,293 ****
log_name = os.path.join(win32api.GetTempPath(), "spambayes1.log")
if not os.path.exists(log_name):
! window.manager.ReportError("The log file for this session can not
be located")
else:
cmd = 'notepad.exe "%s"' % log_name
win32api.WinExec(cmd, win32con.SW_SHOW)
else:
! question = "As you are running from source-code, viewing the\n" \
"log means executing a Python program. If you already\n" \
"have a viewer running, the output may appear in
either.\n\n"\
! "Do you want to execute this viewer?"
if not window.manager.AskQuestion(question):
return
--- 278,290 ----
log_name = os.path.join(win32api.GetTempPath(), "spambayes1.log")
if not os.path.exists(log_name):
! window.manager.ReportError(_("The log file for this session can
not be located"))
else:
cmd = 'notepad.exe "%s"' % log_name
win32api.WinExec(cmd, win32con.SW_SHOW)
else:
! question = _("As you are running from source-code, viewing the\n" \
"log means executing a Python program. If you already\n" \
"have a viewer running, the output may appear in
either.\n\n"\
! "Do you want to execute this viewer?")
if not window.manager.AskQuestion(question):
return
***************
*** 303,312 ****
def ResetConfig(window):
! question = "This will reset all configuration options to their default
values\r\n\r\n" \
"It will not reset the folders you have selected, nor
your\r\n" \
"training information, but all other options will be
reset\r\n" \
"and SpamBayes will need to be re-enabled before it will\r\n" \
"continue filtering.\r\n\r\n" \
! "Are you sure you wish to reset all options?"
flags = win32con.MB_ICONQUESTION | win32con.MB_YESNO |
win32con.MB_DEFBUTTON2
if win32gui.MessageBox(window.hwnd,
--- 300,309 ----
def ResetConfig(window):
! question = _("This will reset all configuration options to their default
values\r\n\r\n" \
"It will not reset the folders you have selected, nor
your\r\n" \
"training information, but all other options will be
reset\r\n" \
"and SpamBayes will need to be re-enabled before it will\r\n" \
"continue filtering.\r\n\r\n" \
! "Are you sure you wish to reset all options?")
flags = win32con.MB_ICONQUESTION | win32con.MB_YESNO |
win32con.MB_DEFBUTTON2
if win32gui.MessageBox(window.hwnd,
***************
*** 339,343 ****
def GetPopupHelpText(self, id):
dd = self.window.manager.dialog_parser.dialogs[self.idd]
! return "Displays the %s dialog" % dd.caption
class HiddenDialogCommand(DialogCommand):
--- 336,340 ----
def GetPopupHelpText(self, id):
dd = self.window.manager.dialog_parser.dialogs[self.idd]
! return _("Displays the %s dialog") % dd.caption
class HiddenDialogCommand(DialogCommand):
***************
*** 353,357 ****
self.OnClicked(0)
def GetPopupHelpText(self, id):
! return "Nothing to see here."
class ShowWizardCommand(DialogCommand):
--- 350,354 ----
self.OnClicked(0)
def GetPopupHelpText(self, id):
! return _("Nothing to see here.")
class ShowWizardCommand(DialogCommand):
***************
*** 379,383 ****
def WizardFinish(mgr, window):
! print "Wizard Done!"
def WizardTrainer(mgr, config, progress):
--- 376,380 ----
def WizardFinish(mgr, window):
! print _("Wizard Done!")
def WizardTrainer(mgr, config, progress):
***************
*** 399,405 ****
if rescore:
! stages = ("Training", .3), ("Saving", .1), ("Scoring", .6)
else:
! stages = ("Training", .9), ("Saving", .1)
progress.set_stages(stages)
--- 396,402 ----
if rescore:
! stages = (_("Training"), .3), (_("Saving"), .1), (_("Scoring"), .6)
else:
! stages = (_("Training"), .9), (_("Saving"), .1)
progress.set_stages(stages)
***************
*** 426,430 ****
bayes = classifier_data.bayes
! progress.set_status("Completed training with %d spam and %d good
messages" \
% (bayes.nspam, bayes.nham))
finally:
--- 423,427 ----
bayes = classifier_data.bayes
! progress.set_status(_("Completed training with %d spam and %d good
messages") \
% (bayes.nspam, bayes.nham))
finally:
***************
*** 463,467 ****
(AsyncCommandProcessor, "IDC_START IDC_PROGRESS IDC_PROGRESS_TEXT",
filter.filterer,
! "Start Filtering", "Stop Filtering",
"""IDCANCEL IDC_BUT_UNSEEN
IDC_BUT_UNREAD IDC_BROWSE IDC_BUT_ACT_SCORE
--- 460,464 ----
(AsyncCommandProcessor, "IDC_START IDC_PROGRESS IDC_PROGRESS_TEXT",
filter.filterer,
! _("Start Filtering"), _("Stop Filtering"),
"""IDCANCEL IDC_BUT_UNSEEN
IDC_BUT_UNREAD IDC_BROWSE IDC_BUT_ACT_SCORE
***************
*** 498,502 ****
(BoolButtonProcessor, "IDC_BUT_REBUILD", "Training.rebuild"),
(AsyncCommandProcessor, "IDC_START IDC_PROGRESS IDC_PROGRESS_TEXT",
! train.trainer, "Start Training", "Stop",
"IDOK IDCANCEL IDC_BROWSE_HAM
IDC_BROWSE_SPAM " \
"IDC_BUT_REBUILD IDC_BUT_RESCORE"),
--- 495,499 ----
(BoolButtonProcessor, "IDC_BUT_REBUILD", "Training.rebuild"),
(AsyncCommandProcessor, "IDC_START IDC_PROGRESS IDC_PROGRESS_TEXT",
! train.trainer, _("Start Training"),
_("Stop"),
"IDOK IDCANCEL IDC_BROWSE_HAM
IDC_BROWSE_SPAM " \
"IDC_BUT_REBUILD IDC_BUT_RESCORE"),
***************
*** 506,512 ****
"Training.train_manual_spam"),
(ComboProcessor, "IDC_DEL_SPAM_RS",
"General.delete_as_spam_message_state",
! "not change the message,mark the message as read,mark the message as
unread"),
(ComboProcessor, "IDC_RECOVER_RS",
"General.recover_from_spam_message_state",
! "not change the message,mark the message as read,mark the message as
unread"),
),
--- 503,509 ----
"Training.train_manual_spam"),
(ComboProcessor, "IDC_DEL_SPAM_RS",
"General.delete_as_spam_message_state",
! _("not change the message,mark the message as read,mark the message
as unread")),
(ComboProcessor, "IDC_RECOVER_RS",
"General.recover_from_spam_message_state",
! _("not change the message,mark the message as read,mark the message
as unread")),
),
***************
*** 520,525 ****
IDC_DELAY2_TEXT IDC_DELAY2_SLIDER
IDC_INBOX_TIMER_ONLY"""),
! (EditNumberProcessor, "IDC_DELAY1_TEXT IDC_DELAY1_SLIDER",
"Filter.timer_start_delay", 0, 10, 20, 60),
! (EditNumberProcessor, "IDC_DELAY2_TEXT IDC_DELAY2_SLIDER",
"Filter.timer_interval", 0, 10, 20, 60),
(BoolButtonProcessor, "IDC_INBOX_TIMER_ONLY",
"Filter.timer_only_receive_folders"),
(CommandButtonProcessor, "IDC_SHOW_DATA_FOLDER", ShowDataFolder, ()),
--- 517,522 ----
IDC_DELAY2_TEXT IDC_DELAY2_SLIDER
IDC_INBOX_TIMER_ONLY"""),
! (EditNumberProcessor, "IDC_DELAY1_TEXT IDC_DELAY1_SLIDER",
"Filter.timer_start_delay", 0.4, 10, 20, 60),
! (EditNumberProcessor, "IDC_DELAY2_TEXT IDC_DELAY2_SLIDER",
"Filter.timer_interval", 0.4, 10, 20, 60),
(BoolButtonProcessor, "IDC_INBOX_TIMER_ONLY",
"Filter.timer_only_receive_folders"),
(CommandButtonProcessor, "IDC_SHOW_DATA_FOLDER", ShowDataFolder, ()),
_______________________________________________
Spambayes-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-checkins