[hg] galaxy 1748: Apply i18n fixes from Takashi Hatakeyama and M...
details: http://www.bx.psu.edu/hg/galaxy/rev/09763a5f6ac6 changeset: 1748:09763a5f6ac6 user: Greg Von Kuster <greg@bx.psu.edu> date: Thu Apr 09 09:00:58 2009 -0400 description: Apply i18n fixes from Takashi Hatakeyama and Mitsuteru Nakao. 4 file(s) affected in this change: lib/galaxy/datatypes/data.py lib/galaxy/jobs/__init__.py lib/galaxy/tools/__init__.py lib/galaxy/web/controllers/root.py diffs (51 lines): diff -r e2be1e679ab1 -r 09763a5f6ac6 lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py Fri Apr 03 13:25:01 2009 -0400 +++ b/lib/galaxy/datatypes/data.py Thu Apr 09 09:00:58 2009 -0400 @@ -121,7 +121,7 @@ line = line.strip() if not line: continue - out.append( '<tr><td>%s</td></tr>' % escape( unicode( line, 'utf-8' ) ) ) + out.append( '<tr><td>%s</td></tr>' % escape( unicode( line ) ) ) out.append( '</table>' ) out = "".join( out ) except Exception, exc: diff -r e2be1e679ab1 -r 09763a5f6ac6 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Fri Apr 03 13:25:01 2009 -0400 +++ b/lib/galaxy/jobs/__init__.py Thu Apr 09 09:00:58 2009 -0400 @@ -472,7 +472,10 @@ elif dataset.has_data(): # Only set metadata values if they are missing... dataset.set_meta( overwrite = False ) - dataset.set_peek() + if self.tool.is_multi_byte: + dataset.set_multi_byte_peek() + else: + dataset.set_peek() else: dataset.blurb = "empty" dataset.flush() diff -r e2be1e679ab1 -r 09763a5f6ac6 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py Fri Apr 03 13:25:01 2009 -0400 +++ b/lib/galaxy/tools/__init__.py Thu Apr 09 09:00:58 2009 -0400 @@ -288,6 +288,8 @@ if not self.version: # For backward compatibility, some tools may not have versions yet. self.version = "1.0.0" + # Support multi-byte tools + self.is_multi_byte = util.string_as_bool( root.get( "is_multi_byte", False ) ) # Type of tool self.tool_type = root.get( "tool_type", None ) # data_source tool diff -r e2be1e679ab1 -r 09763a5f6ac6 lib/galaxy/web/controllers/root.py --- a/lib/galaxy/web/controllers/root.py Fri Apr 03 13:25:01 2009 -0400 +++ b/lib/galaxy/web/controllers/root.py Thu Apr 09 09:00:58 2009 -0400 @@ -104,7 +104,7 @@ if data.state != state: rval[id] = { "state": data.state, - "html": trans.fill_template( "root/history_item.mako", data=data, hid=data.hid ) + "html": unicode( trans.fill_template( "root/history_item.mako", data=data, hid=data.hid ), 'utf-8' ) } return rval
participants (1)
-
Greg Von Kuster