Ticket #27 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Umit mess up with text encodings in pt_BR localized messages

Reported by: rcarvalho Owned by: rcarvalho
Priority: medium Milestone: Umit 0.9.5 RC2
Component: Umit 0.9.5 Version: current svn
Keywords: i18n UmitGUI translation pt_BR Cc:

Description

Hi folks! I was trying to run Umit using the pt_BR localized messages in my Ubuntu box, but when I start Umit with LC_MESSAGES=pt_BR.UTF-8, I get this warnings:

$ LC_MESSAGES=pt_BR.UTF-8 python umit
/home/rodolfo/Documentos/Umit/umit/umitGUI/ScanOpenPortsPage.py:96: GtkWarning: Invalid input 
string
  self.radio_sort_port = gtk.RadioButton(None, _('Sort by port number'))
/home/rodolfo/Documentos/Umit/umit/umitGUI/ScanOpenPortsPage.py:98: GtkWarning: Invalid input 
string
  _('Sort by service name'))
/home/rodolfo/Documentos/Umit/umit/higwidgets/higdialogs.py:69: GtkWarning: Failed to set text 
from markup due to error parsing markup: Erro na linha 1 caractere 45: Texto codificado em UTF-8 
inválido - '<span weight='bold'size='larger'>Usu�rio n�o privilegiado</span>' não válido
  % message_format)
/home/rodolfo/Documentos/Umit/umit/umitGUI/MainWindow.py:990: PangoWarning: Invalid UTF-8 string
 passed to pango_layout_set_text()
  self.run()
/home/rodolfo/Documentos/Umit/umit/umitGUI/App.py:61: PangoWarning: Invalid UTF-8 string passed 
to pango_layout_set_text()
  self.main_window.show_all()
/home/rodolfo/Documentos/Umit/umit/higwidgets/higbuttons.py:55: GtkWarning: Invalid input string
  gtk.Button.__init__(self, title)
/home/rodolfo/Documentos/Umit/umit/higwidgets/higboxes.py:37: GtkWarning: Invalid input string
  self.pack_start(widget, expand=True, fill=True)
/home/rodolfo/Documentos/Umit/umit/umitGUI/About.py:126: PangoWarning: Invalid UTF-8 string passed to pango_layout_set_text()
  credit.show_all()
/home/rodolfo/Documentos/Umit/umit/umitGUI/App.py:135: GtkWarning: Failed to set text from 
markup due to error parsing markup: Erro na linha 1 caractere 36: Texto codificado em UTF-8 
inválido - 'Abrir assistente de constru��o de comando do UMIT' não válido
  gtk.main()
rodolfo@deskrox:~/Documentos/Umit/umit$ LC_MESSAGES=pt_BR.UTF-8 python umit
/home/rodolfo/Documentos/Umit/umit/umitGUI/ScanOpenPortsPage.py:96: GtkWarning: Invalid input string
  self.radio_sort_port = gtk.RadioButton(None, _('Sort by port number'))
/home/rodolfo/Documentos/Umit/umit/umitGUI/ScanOpenPortsPage.py:98: GtkWarning: Invalid input string
  _('Sort by service name'))
/home/rodolfo/Documentos/Umit/umit/higwidgets/higdialogs.py:69: GtkWarning: Failed to set text 
from markup due to error parsing markup: Erro na linha 1 caractere 45: Texto codificado em UTF-8
 inválido - '<span weight='bold'size='larger'>Usu�rio n�o privilegiado</span>' não válido
  % message_format)
/home/rodolfo/Documentos/Umit/umit/umitGUI/MainWindow.py:990: PangoWarning: Invalid UTF-8 string
 passed to pango_layout_set_text()
  self.run()

Additionally I've attached a 'non-root user' window's screenshot.

Attachments

umit-screenshot.png (12.3 kB) - added by rcarvalho 5 years ago.
Non-root warning window
umit.mo (15.7 kB) - added by rcarvalho 5 years ago.

Change History

Changed 5 years ago by rcarvalho

Non-root warning window

Changed 5 years ago by rcarvalho

  • status changed from new to assigned

To resolve this issue, I just re-generate the .mo file. In share/umit/locale/pt_BR/LC_MESSAGES, I typed:

$ msgfmt -o umit.mo umit.po

When I ran Umit again, it worked fine.

Changed 5 years ago by rcarvalho

I've attached the .mo file, once we can make diff on binary files.

Changed 5 years ago by rcarvalho

Changed 5 years ago by rcarvalho

  • status changed from assigned to closed
  • resolution set to fixed

The bug is fixed. After re-compile the .mo file, all messages is working fine for pt_BR.

Note: See TracTickets for help on using tickets.