mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
merge i18n fixes
This commit is contained in:
@@ -1657,7 +1657,7 @@ class DataSourceTool( Tool ):
|
||||
data.extension = param_dict.get( 'data_type', data.extension )
|
||||
#TODO: these should be possible as part of data_source.py and external set_meta, see the upload tool:
|
||||
if data.extension in [ 'txt', 'tabular' ]:
|
||||
data_type = sniff.guess_ext( data.file_name, sniff_order=app.datatypes_registry.sniff_order )
|
||||
data_type = sniff.guess_ext( data.file_name, sniff_order=app.datatypes_registry.sniff_order, is_multi_byte=self.is_multi_byte )
|
||||
if data.extension != data_type:
|
||||
data.change_datatype( data_type )
|
||||
elif not isinstance( data.datatype, datatypes.interval.Bed ) and isinstance( data.datatype, datatypes.interval.Interval ):
|
||||
|
||||
@@ -27,6 +27,7 @@ import mako.runtime
|
||||
|
||||
pkg_resources.require( "Babel" )
|
||||
from babel.support import Translations
|
||||
from babel import Locale
|
||||
|
||||
pkg_resources.require( "SQLAlchemy >= 0.4" )
|
||||
from sqlalchemy import and_
|
||||
@@ -200,7 +201,7 @@ class GalaxyWebTransaction( base.DefaultWebTransaction ):
|
||||
if 'HTTP_ACCEPT_LANGUAGE' in self.environ:
|
||||
# locales looks something like: ['en', 'en-us;q=0.7', 'ja;q=0.3']
|
||||
locales = self.environ['HTTP_ACCEPT_LANGUAGE'].split( ',' )
|
||||
locales = [ l.split( ';' )[0] for l in locales ]
|
||||
locales = [ Locale.parse(l.split( ';' )[0], sep='-').language for l in locales ]
|
||||
else:
|
||||
# Default to English
|
||||
locales = 'en'
|
||||
|
||||
Reference in New Issue
Block a user