From 430896dc4a78f879fc48604c34dce3862e961c8c Mon Sep 17 00:00:00 2001 From: tatiana Date: Thu, 7 Jan 2010 18:55:22 +0000 Subject: [PATCH] ENH: Translation (source code changes and mo) --- .gitattributes | 1 - invesalius/gui/data_notebook.py | 6 ++++-- invesalius/gui/default_viewers.py | 4 ++-- invesalius/gui/dialogs.py | 10 +++++----- invesalius/gui/import_data_wizard.py | 372 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ invesalius/gui/task_exporter.py | 2 +- invesalius/gui/task_slice.py | 2 +- invesalius/gui/task_surface.py | 8 ++++---- invesalius/i18n.py | 2 +- locale/en/LC_MESSAGES/invesalius.mo | Bin 482 -> 0 bytes locale/es/LC_MESSAGES/invesalius.mo | Bin 482 -> 0 bytes locale/pt_BR/LC_MESSAGES/invesalius.mo | Bin 626 -> 0 bytes 12 files changed, 18 insertions(+), 389 deletions(-) delete mode 100644 invesalius/gui/import_data_wizard.py diff --git a/.gitattributes b/.gitattributes index dc68530..7333d98 100644 --- a/.gitattributes +++ b/.gitattributes @@ -129,7 +129,6 @@ invesalius/gui/default_viewers.py -text invesalius/gui/dialogs.py -text invesalius/gui/dicom_preview_panel.py -text invesalius/gui/frame.py -text -invesalius/gui/import_data_wizard.py -text invesalius/gui/import_panel.py -text invesalius/gui/language_dialog.py -text invesalius/gui/task_exporter.py -text diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py index 22495d4..5ce9738 100644 --- a/invesalius/gui/data_notebook.py +++ b/invesalius/gui/data_notebook.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python +# -*- coding: UTF-8 -*- #-------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer @@ -161,7 +163,7 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): wx_image.SetData(new_image.tostring()) return wx.BitmapFromImage(wx_image.Scale(16, 16)) - def InsertNewItem(self, index=0, label=_("Mask 1"), threshold="(1000, 4500)", + def InsertNewItem(self, index=0, label=_("Mask"), threshold="(1000, 4500)", colour=None): self.InsertStringItem(index, "") self.SetStringItem(index, 1, label, @@ -232,7 +234,7 @@ class SurfacesListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): self.InsertColumn(0, "", wx.LIST_FORMAT_CENTER) self.InsertColumn(1, _("Name")) - self.InsertColumn(2, _("Volume (mm3)")) + self.InsertColumn(2, _(u"Volume (mm³)")) self.InsertColumn(3, _("Transparency"), wx.LIST_FORMAT_RIGHT) self.SetColumnWidth(0, 20) diff --git a/invesalius/gui/default_viewers.py b/invesalius/gui/default_viewers.py index 6994fa1..2a68166 100755 --- a/invesalius/gui/default_viewers.py +++ b/invesalius/gui/default_viewers.py @@ -86,7 +86,7 @@ class Panel(wx.Panel): p3 = slice_viewer.Viewer(self, "SAGITAL") s3 = wx.aui.AuiPaneInfo().Centre().Row(1).\ - Name("Sagital Slice").Caption(_("Sagital slice")).\ + Name("Sagittal Slice").Caption(_("Sagittal slice")).\ MaximizeButton(True).CloseButton(False) p4 = VolumeViewerCover(self) @@ -409,7 +409,7 @@ class VolumeToolPanel(wx.Panel): d = wx.TextEntryDialog(self, _("Preset name")) if d.ShowModal() == wx.ID_OK: preset_name = d.GetValue() - ps.Publisher().sendMessage('Save raycasting preset', + ps.Publisher().sendMessage(_("Save raycasting preset"), preset_name) def __init_menus(self, pubsub_evt=None): diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index 3cc372b..dc88a9c 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -48,7 +48,7 @@ class NumberDialog(wx.Dialog): # Buttons btn_ok = wx.Button(self, wx.ID_OK) - btn_ok.SetHelpText(_("Above value will be applied.")) + btn_ok.SetHelpText(_("Value will be applied.")) btn_ok.SetDefault() btn_cancel = wx.Button(self, wx.ID_CANCEL) @@ -252,7 +252,7 @@ class MessageDialog(wx.Dialog): self.Centre() def SaveChangesDialog__Old(filename): - message = _("Save changes to %s?")%filename + message = _("The project %s has been modified.\nSave changes?")%filename dlg = MessageDialog(message) answer = dlg.ShowModal() @@ -291,7 +291,7 @@ def ImportInvalidFiles(): def SaveChangesDialog(filename): current_dir = os.path.abspath(".") - msg = _("Save changes to %s?")%filename + msg = _("The project %s has been modified.\nSave changes?")%filename if sys.platform == 'darwin': dlg = wx.MessageDialog(None, "", msg, wx.ICON_QUESTION | wx.YES_NO | wx.CANCEL) @@ -313,7 +313,7 @@ def SaveChangesDialog(filename): def SaveChangesDialog2(filename): current_dir = os.path.abspath(".") - msg = _("Save changes to %s?")%filename + msg = _("The project %s has been modified.\nSave changes?")%filename if sys.platform == 'darwin': dlg = wx.MessageDialog(None, "", msg, wx.ICON_QUESTION | wx.YES_NO) @@ -337,7 +337,7 @@ def ShowAboutDialog(parent): info = wx.AboutDialogInfo() info.Name = "InVesalius" info.Version = "3.a.1 - RP" - info.Copyright = _("(C) 2007 Renato Archer Research Centre") + info.Copyright = _("(c) 2007 Center for Information Technology Renato Archer") info.Description = wordwrap( _("InVesalius is a software for medical imaging 3D reconstruction. ")+\ _("Its input is a sequency of DICOM 2D image files acquired with CT or MR.\n\n")+\ diff --git a/invesalius/gui/import_data_wizard.py b/invesalius/gui/import_data_wizard.py deleted file mode 100644 index b3bb686..0000000 --- a/invesalius/gui/import_data_wizard.py +++ /dev/null @@ -1,372 +0,0 @@ -#-------------------------------------------------------------------------- -# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas -# Copyright: (C) 2001 Centro de Pesquisas Renato Archer -# Homepage: http://www.softwarepublico.gov.br -# Contact: invesalius@cti.gov.br -# License: GNU - GPL 2 (LICENSE.txt/LICENCA.txt) -#-------------------------------------------------------------------------- -# Este programa e software livre; voce pode redistribui-lo e/ou -# modifica-lo sob os termos da Licenca Publica Geral GNU, conforme -# publicada pela Free Software Foundation; de acordo com a versao 2 -# da Licenca. -# -# Este programa eh distribuido na expectativa de ser util, mas SEM -# QUALQUER GARANTIA; sem mesmo a garantia implicita de -# COMERCIALIZACAO ou de ADEQUACAO A QUALQUER PROPOSITO EM -# PARTICULAR. Consulte a Licenca Publica Geral GNU para obter mais -# detalhes. -#-------------------------------------------------------------------------- -import cStringIO -import wx -import widgets.foldpanelbar as fpb -import wx.lib.filebrowsebutton as filebrowse -import wx.lib.hyperlink as hl -import wx.wizard as wiz - -def getWizTest1Data(): - return \ -'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00t\x00\x00\x01\x04\x08\x02\ -\x00\x00\x00v\xad\x87\x05\x00\x00\x00\x03sBIT\x08\x08\x08\xdb\xe1O\xe0\x00\ -\x00\x06\x06IDATx\x9c\xed\x9b\xc1\xcd\xdbF\x10FGA\xe0\xc0\x07]\x048M\xa8\x01\ -\x9f\x9c\x02\xd4\x81\xd3\x84\x1a\x10\xec@\r\xa8\x89\xa4\x03\x15\x90\x9c\xd2\ -\x80\x9aH\x00]t\x08\xec\x0bs`D\x04\xc9\x92\xe0\xee\xf2\xed\xceR\xdf;\x1a$\ -\xbd\xf8\xf083\xbb?\xb5\xe9\xba\xce\x04\xc37\xb5\x17\xb0f\x14.\x88\xc2\x05Q\ -\xb8 \n\x17D\xe1\x82(\\\x10\x85\x0b\xa2pA\x14.\x88\xc2\x05Q\xb8 \xdf\xe6?b\ -\xb3\xd9\xa4\xdd\xb8\xfa3#\x99\x0b\xb2\x80\xb9O>c\x17\xb7\x8a\xcc\x05Y2\xdc\ -\xae\xfb\xd4u\x9f\x16|`\xeb\xc8\\\x10\x85\x0b\xb2`C\x9b\xe6\xf3\xff\xffi\xce\ -\x0c\xd7\xf4\xb8&sA\x8a\x99kf\x16ea\xea\xd6\xc4\x11\xb3\xc2M\xde\x83\xbd8*\ -\x0b \x11ea\xec\x9d\x8e\xb4zx\xcc\xfa\xdf\x06\x99\x0b\x12\xd9\xd0\xfa\x964R\ -\x827\x9b\x9f\xb2\xd7\xb3*d.\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]\xcc\xa2\xc8\\\x10\x07\xe6N\xe1\xee\xa0+\n\x99\x0b\ -\xe2\xd4\xdc\xe0\x14\xd1W\xe5a\xf3\xea\x7fR\x96\xb9 \n\x17\xc4iY\x88\xc4i}\ -\x90\xb9 \n\x17\xc4AY\xc8k\xfa\x9eG\x06\x99\x0bR\xd9\xdc\x1c\xed\\}\\\x13D\ -\xe6\x82\xe8\xe3g\x10\x99\x0b\xa2pA\x14.\x88\xc2\x05\xf9\x1b\xa1\x11\xf1\xe2\ -?\xae\xd64\x00\x00\x00\x00IEND\xaeB`\x82' - -def getWizTest1Bitmap(): - return wx.BitmapFromImage(getWizTest1Image()) - -def getWizTest1Image(): - stream = cStringIO.StringIO(getWizTest1Data()) - return wx.ImageFromStream(stream) - - -def makePageTitle(wizPg, title): - sizer = wx.BoxSizer(wx.VERTICAL) - wizPg.SetSizer(sizer) - title = wx.StaticText(wizPg, -1, title) - title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD)) - sizer.Add(title, 0, wx.ALIGN_CENTRE|wx.ALL, 5) - sizer.Add(wx.StaticLine(wizPg, -1), 0, wx.EXPAND|wx.ALL, 5) - return sizer - -class BasePage(wiz.PyWizardPage): - def __init__(self, parent, title, number): - wiz.PyWizardPage.__init__(self, parent) - # header data - self.title = title - self.number = number - # previous / next page data - self.next = self.prev = None - self.jump_next_page = False - - self.__init_gui() - - self.Update() - self.SetAutoLayout(1) - self.Fit() - - def __init_gui(self): - sizer = wx.BoxSizer(wx.VERTICAL) - self.SetSizer(sizer) - - # Build header - first_line = wx.BoxSizer(wx.HORIZONTAL) - number = wx.StaticText(self, -1, str(self.number)+".") - number.SetFont(wx.Font(20, wx.SWISS, wx.NORMAL, wx.BOLD)) - self.header_number = number - title = wx.StaticText(self, -1, self.title) - title.SetFont(wx.Font(16, wx.SWISS, wx.NORMAL, wx.NORMAL)) - first_line.Add(number, 0, wx.ALIGN_LEFT|wx.ALIGN_BOTTOM|wx.RIGHT, 5) - first_line.Add(title, 0, wx.ALIGN_LEFT|wx.ALIGN_BOTTOM|wx.RIGHT|wx.BOTTOM, 2) - sizer.AddSizer(first_line, 0) - sizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND|wx.ALL, 5) - - self.sizer = sizer - - def DecreasePageNumber(self): - print "number before", self.number - self.number -= 1 - self.header_number.SetLabel(str(self.number)+".") - - def SetNext(self, next): - self.next = next - - def SetPrev(self, prev): - self.prev = prev - - # Classes derived from wxPyWizardPanel must override - # GetNext and GetPrev, and may also override GetBitmap - # as well as all those methods overridable by - # wx.PyWindow. - - def GetNext(self): - return self.next - - def GetPrev(self): - return self.prev - -class RawDataPage(BasePage): - def __init__(self, parent, title, number): - BasePage.__init__(self, parent, title, number) - -class StudyPage(BasePage): - def __init__(self, parent, title, number): - BasePage.__init__(self, parent, title, number) - -class DirPage(BasePage): - """ - Wizard page for selecting which directory or directories should be searched - for retrieving medical images. - """ - - def __init__(self, parent, title, number): - BasePage.__init__(self, parent, title, number) - self.__init_specific_gui() - - self.selected_dir = [] - - def __init_specific_gui(self): - - line1 = wx.StaticText(self, -1,_("Select the directory which ")+\ - _("contains medical images of the study interest.")) - - - - t1 = wx.TextCtrl(self, -1, "", size=(125, -1)) - - dbb = filebrowse.DirBrowseButton( - self, -1, size=(450, -1), changeCallback = self.dbbCallback) - dbb.SetLabel("") - line2 = dbb - #line2 = wx.BoxSizer(wx.HORIZONTAL) - - #line3 = wx.BoxSizer(wx.VERTICAL) - #self.line3 = line3 - - #link_add_another_dir = hl.HyperLinkCtrl(self, -1,"Add a new directory") - #link_add_another_dir.SetUnderlines(True, False, False) - #link_add_another_dir.SetColours("BLUE", "BLUE", "BLUE") - #link_add_another_dir.AutoBrowse(False) - #link_add_another_dir.UpdateLink() - #link_add_another_dir.Bind(hl.EVT_HYPERLINK_LEFT, self.OnAddDir) - #self.link_add_new = link_add_another_dir - - - # ADVANCED - # [] Save selected folders as default - # [] Consider files inside inner folders of the selected folder, using recursion - - - self.sizer.Add(line1, 0, wx.LEFT|wx.RIGHT|wx.TOP, 5) - self.sizer.Add(line2, 0, wx.ALL, 5) - #self.sizer.Add(line3, 0, wx.ALL, 5) - #self.sizer.Add(link_add_another_dir, 0, wx.LEFT|wx.BOTTOM, 10) - - - fold_panel = fpb.FoldPanelBar(self, -1, wx.DefaultPosition, - (450, 100), 0,fpb.FPB_SINGLE_FOLD) - - # Fold panel style - style = fpb.CaptionBarStyle() - style.SetCaptionStyle(fpb.CAPTIONBAR_RECTANGLE) - style.SetSecondColour(wx.Colour(255,255,255)) - - # Fold 1 - Surface properties - item = fold_panel.AddFoldPanel(_("Advanced options"), - collapsed=True) - fold_panel.ApplyCaptionStyle(item, style) - fold_panel.AddFoldPanelWindow(item, - wx.CheckBox(item, wx.ID_ANY, _("Use selected folder(s) as default")), - Spacing= 0, leftSpacing=0, rightSpacing=0) - fold_panel.AddFoldPanelWindow(item, - wx.CheckBox(item, wx.ID_ANY, _("Enable recursion in folder(s)")), - Spacing= 0, leftSpacing=0, rightSpacing=0) - - - self.sizer.Add(fold_panel, 0, wx.TOP|wx.LEFT, 5) - - self.sizer.Fit(self) - self.Update() - self.SetAutoLayout(1) - - - def JumpNextPage(self): - self.jump_next_page = True - self.next.GetNext().DecreasePageNumber() - - def OnAddDir(self, evt): - dlg = wx.DirDialog(self, _("Choose a directory:"), - style=wx.DD_DIR_MUST_EXIST) - - if dlg.ShowModal() == wx.ID_OK: - path = dlg.GetPath() - self.selected_dir.append(path) - self.link_add_new.SetLabel(_("Add another directory")) - self.AddNewDir(path) - dlg.Destroy() - - def OnChangeDir(self, prev_dir, text): - dlg = wx.DirDialog(self, _("Choose a directory:"), - style=wx.DD_DIR_MUST_EXIST) - dlg.SetPath(prev_dir) - - if dlg.ShowModal() == wx.ID_OK: - path = dlg.GetPath() - self.selected_dir.remove(prev_dir) - self.selected_dir.append(path) - text.SetValue(path) - dlg.Destroy() - - - def AddNewDir(self, path): - folder_bmp = wx.ArtProvider.GetBitmap(wx.ART_FOLDER_OPEN, wx.ART_BUTTON, - (12,12)) - btn = wx.BitmapButton(self, -1, folder_bmp) - - text_dir_path = wx.StaticText(self, -1, path) - - tooltip = wx.ToolTip(_("Remove this directory from list")) - link_remove = hl.HyperLinkCtrl(self, -1,_("Remove")) - link_remove.SetUnderlines(True, False, False) - link_remove.SetColours("BLUE", "BLUE", "BLUE") - link_remove.SetToolTip(tooltip) - link_remove.AutoBrowse(False) - link_remove.UpdateLink() - - dir_line = wx.BoxSizer(wx.HORIZONTAL) - dir_line.Add(btn, 0, wx.LEFT|wx.RIGHT, 5) - dir_line.Add(text_dir_path, 0) - dir_line.Add(link_remove, 0, wx.ALIGN_RIGHT|wx.RIGHT|wx.LEFT, 5) - - link_remove.Bind(hl.EVT_HYPERLINK_LEFT, lambda e: self.RemoveDir(path, dir_line)) - btn.Bind(wx.EVT_BUTTON, lambda e: self.OnChangeDir(path, link_remove)) - - self.line3.Add(dir_line, 1, wx.LEFT, 2) - #self.line3.Add(text_dir_path, 0, wx.ALL, 5) - - self.Fit() - - def RemoveDir(self, path, sizer): - self.selected_dir.remove(path) - self.line3.Hide(sizer) - self.line3.RemoveSizer(sizer) - if not self.selected_dir: - self.link_add_new.SetLabel(_("Add another directory")) - self.Layout() - self.Fit() - - - - - def GetNext(self): - """If jump_next_page is true then return the next page's next page""" - if self.jump_next_page: - try: - self.next.GetNext().SetPrev(self) - except AttributeError: - print "Warning: Next is the last Wizard page." - return None - else: - return self.next.GetNext() - else: - try: - self.next.GetNext().SetPrev(self.next) - except AttributeError: - print "Worning: This is the last Wizard page" - return self.next - - - def dbbCallback(self, evt): - self.log.write('DirBrowseButton: %s\n' % evt.GetString()) - -def CreateWizard(parent): - wizard = wiz.Wizard(parent, -1, _("Import medical images"), getWizTest1Bitmap()) - - page1 = DirPage(wizard, _("Choose directory"), 1) - page2 = RawDataPage(wizard, _("Define RAW data"), 2) - page3 = StudyPage(wizard, _("Select study"), 3) # 2 can be 3 - - - wizard.FitToPage(page1) - page3.sizer.Add(wx.StaticText(page3, -1, _("\nThis is the last page."))) - - # Set the initial order of the pages - page1.SetNext(page2) - page2.SetPrev(page1) - page2.SetNext(page3) - page3.SetPrev(page2) - - page1.JumpNextPage() - - wizard.GetPageAreaSizer().Add(page1) - - if wizard.RunWizard(page1): - print "Completed - Send message to import data" - else: - print "Canceled" - -class ImportApp(wx.App): - def OnInit(self): - CreateWizard(None) - return True - -if __name__ == '__main__': - app = ImportApp(0) - app.MainLoop() diff --git a/invesalius/gui/task_exporter.py b/invesalius/gui/task_exporter.py index 074cc8f..e5d40fa 100644 --- a/invesalius/gui/task_exporter.py +++ b/invesalius/gui/task_exporter.py @@ -291,7 +291,7 @@ class InnerTaskPanel(wx.Panel): dlg = wx.MessageDialog(None, _("You need to create a surface and make it ") + _("visible before exporting it."), - _('InVesalius Information'), + 'InVesalius 3', wx.OK | wx.ICON_INFORMATION) try: dlg.ShowModal() diff --git a/invesalius/gui/task_slice.py b/invesalius/gui/task_slice.py index 05bfcb3..d87232b 100644 --- a/invesalius/gui/task_slice.py +++ b/invesalius/gui/task_slice.py @@ -135,7 +135,7 @@ class InnerTaskPanel(wx.Panel): def OnLinkNewMask(self, evt=None): dlg = wx.TextEntryDialog(self, _('Name of new mask:'), - _('InVesalius 3.0 - New mask')) + _('InVesalius 3 - New mask')) dlg.CenterOnScreen() default_mask_name = const.MASK_NAME_PATTERN %(mask.Mask.general_index+2) dlg.SetValue(default_mask_name) diff --git a/invesalius/gui/task_surface.py b/invesalius/gui/task_surface.py index 3b14a51..ce13b2a 100644 --- a/invesalius/gui/task_surface.py +++ b/invesalius/gui/task_surface.py @@ -128,7 +128,7 @@ class InnerTaskPanel(wx.Panel): evt.Skip() def OnLinkNewSurface(self, evt=None): - dlg = NewSurfaceDialog(self, -1, _('InVesalius 3.0 - New surface')) + dlg = NewSurfaceDialog(self, -1, _('InVesalius 3 - New surface')) if dlg.ShowModal() == wx.ID_OK: print "TODO: Send Signal - Create 3d surface %s \n" % dlg.GetValue() dlg.Destroy() @@ -180,7 +180,7 @@ class NewSurfaceDialog(wx.Dialog): text = wx.TextCtrl(self, -1, "", size=(80,-1)) text.SetHelpText(_("Name the new surface to be created")) - text.SetValue(_("Default 3D")) + text.SetValue(_("Surface")) self.text = text sizer = wx.BoxSizer(wx.VERTICAL) @@ -208,8 +208,8 @@ class NewSurfaceDialog(wx.Dialog): self.SetSizer(sizer) sizer.Fit(self) - def GetValue(self): - return self.text.GetValue() + _("| mask: ") + MASK_LIST[self.combo_surface_name.GetSelection()] + #def GetValue(self): + # return self.text.GetValue() + _("| mask: ") + MASK_LIST[self.combo_surface_name.GetSelection()] class FoldPanel(wx.Panel): def __init__(self, parent): diff --git a/invesalius/i18n.py b/invesalius/i18n.py index a4521df..29d48fc 100644 --- a/invesalius/i18n.py +++ b/invesalius/i18n.py @@ -49,4 +49,4 @@ def InstallLanguage(language): languages=[language], codeset='utf8') # Using unicode lang.install(unicode=1) - return lang.gettext + return lang.ugettext diff --git a/locale/en/LC_MESSAGES/invesalius.mo b/locale/en/LC_MESSAGES/invesalius.mo index f4d761a..709a4a4 100644 Binary files a/locale/en/LC_MESSAGES/invesalius.mo and b/locale/en/LC_MESSAGES/invesalius.mo differ diff --git a/locale/es/LC_MESSAGES/invesalius.mo b/locale/es/LC_MESSAGES/invesalius.mo index f4d761a..709a4a4 100644 Binary files a/locale/es/LC_MESSAGES/invesalius.mo and b/locale/es/LC_MESSAGES/invesalius.mo differ diff --git a/locale/pt_BR/LC_MESSAGES/invesalius.mo b/locale/pt_BR/LC_MESSAGES/invesalius.mo index 7c707a0..9d59455 100644 Binary files a/locale/pt_BR/LC_MESSAGES/invesalius.mo and b/locale/pt_BR/LC_MESSAGES/invesalius.mo differ -- libgit2 0.21.2