Skip to content

Commit

Permalink
Fix bug in English translation that was causing other languages to ta…
Browse files Browse the repository at this point in the history
…ke precedence even when browser was configured to accept them with lower precedence.
  • Loading branch information
lstein committed Jun 29, 2011
1 parent 33ae992 commit ac2e1ed
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 17 deletions.
2 changes: 2 additions & 0 deletions Changes
Expand Up @@ -6,6 +6,8 @@
* Fix bug which prevented add tracks from working properly under IE8. * Fix bug which prevented add tracks from working properly under IE8.
* Fix bug which prevented "download all data from this track" from working for BAM/SAM * Fix bug which prevented "download all data from this track" from working for BAM/SAM
tracks. tracks.
* Fix bug in English translation that was causing other languages to take precedence
even when browser was configured to accept them with lower precedence.


2.38 2.38
* Fix more semantic zooming bugs, particularly when zooming out from a BAM track. * Fix more semantic zooming bugs, particularly when zooming out from a BAM track.
Expand Down
59 changes: 46 additions & 13 deletions conf/languages/en.pm
Expand Up @@ -90,21 +90,25 @@ END


DOWNLOAD => 'Download', DOWNLOAD => 'Download',


DISPLAY_SETTINGS => 'Display Settings', DOWNLOAD_ALL => 'Download entire dataset',


TRACKS => 'Tracks', TRACK_ID => 'Track ID=<b>%s</b>',


DISPLAY_SETTINGS => 'Display Settings',


TRACKS => 'Tracks',


# FAVORITE MENU LINKS # FAVORITE MENU LINKS
FAVORITES => 'Show Favorites Only', FAVORITES => 'Show Favorites Only',


SHOWALL => 'Show All', SHOWALL => 'Show All',


REFRESH_FAV => 'Refresh', REFRESH_FAV => 'Refresh Favorites',


CLEAR_FAV => 'Clear All Favorites', CLEAR_FAV => 'Clear All Favorites',


ADDED_TO => 'Add track to favorites', ADDED_TO => 'Add track to favorites',


############# #############


Expand Down Expand Up @@ -149,6 +153,8 @@ END


SELECT_SUBTRACKS => 'showing %d/%d subtracks', SELECT_SUBTRACKS => 'showing %d/%d subtracks',


NO_TRACK_CITATION => 'There is no additional information about this track.',

EDIT => 'Edit File...', EDIT => 'Edit File...',


DELETE => 'Delete File', DELETE => 'Delete File',
Expand Down Expand Up @@ -219,9 +225,7 @@ END


REMOTE_TITLE => 'Add remote annotations', REMOTE_TITLE => 'Add remote annotations',


#ipad IPAD_BALLOON => 'Tap features twice to see more details',
IPAD_BALLOON => 'Tap features twice see more details '
#


REMOTE_URL => 'Enter remote track URL', REMOTE_URL => 'Enter remote track URL',


Expand Down Expand Up @@ -391,6 +395,9 @@ END
ADD_YOUR_OWN_TRACKS => 'Add custom tracks', ADD_YOUR_OWN_TRACKS => 'Add custom tracks',


ADD_DESCRIPTION => 'Click to add a description', ADD_DESCRIPTION => 'Click to add a description',
ADD_TITLE => 'Click to edit the title',
EDIT_LABEL => 'Click to view track. Shift or control-click to edit.',
NO_DESCRIPTION => 'No description',


CONFIGURATION => 'Configuration', CONFIGURATION => 'Configuration',


Expand Down Expand Up @@ -432,6 +439,9 @@ END


SCALE_MAX => 'Maximum scale value', SCALE_MAX => 'Maximum scale value',


MIN => 'Min',
MAX => 'Max',

SHOW_VARIANCE => 'Show variance band', SHOW_VARIANCE => 'Show variance band',


APPLY_CONFIG => 'Apply config when view between', APPLY_CONFIG => 'Apply config when view between',
Expand Down Expand Up @@ -527,6 +537,22 @@ END
SHARE_SHARED_TRACK => <<END, SHARE_SHARED_TRACK => <<END,
This track is another user\'s custom uploads; it is shared under a <b>%s</b> This track is another user\'s custom uploads; it is shared under a <b>%s</b>
policy, so you are free to send the link to other users. policy, so you are free to send the link to other users.
END

SHARE_GROUP_EMAIL_SUBJECT => <<END,
Track sharing notification from the %s browser
END

SHARE_GROUP_EMAIL => <<END,
The user named %s has shared some tracks with you. They will appear in your "Custom Tracks" section the next time you log into %s. To see the shared track(s) now, click on %s.
Additional information about the shared tracks follows:
Upload name: %s
Upload description: %s
Track names: %s
If you wish to remove these tracks from your session, go to "Custom Tracks" and click on the '[X]' next to the upload name. To add it back to your session, click on %s.
END END


OTHER_SHARE_METHODS => <<END, OTHER_SHARE_METHODS => <<END,
Expand All @@ -535,14 +561,14 @@ You can also share it with another user by setting its permissions to
track by name, or by changing its permissions to <b>group</b> and adding track by name, or by changing its permissions to <b>group</b> and adding
the user you want by username. To do this, select the "Custom Tracks" the user you want by username. To do this, select the "Custom Tracks"
page and choose the sharing policy you want with the drop-down menu in page and choose the sharing policy you want with the drop-down menu in
the "sharing" section, then type the user\'s name or ID in the input the "sharing" section, then type the user's name or ID in the input
field provided. field provided.
END END


CANT_SHARE => <<END, CANT_SHARE => <<END,
Sorry, this track is owned by another user who has only allowed access to Sorry, this track is owned by another user who has only allowed access to
a limited group of other users. Since it\'s not yours, you can\'t share it a limited group of other users. Since it's not yours, you can't share it
with anyone else. In order to share this track, you\'ll have to ask them with anyone else. In order to share this track, you'll have to ask them
for permission. for permission.
END END


Expand All @@ -563,10 +589,11 @@ END
EMAIL_MY_PASSWORD => 'E-mail my password', EMAIL_MY_PASSWORD => 'E-mail my password',
EDIT_ACCOUNT_DETAILS => '%s: Edit account details', EDIT_ACCOUNT_DETAILS => '%s: Edit account details',
CONTINUE => 'Continue', CONTINUE => 'Continue',
HAVE_OPENID => 'Have an OpenID?',
WITH_OPENID => 'with your OpenID', WITH_OPENID => 'with your OpenID',
SIGN_IN => 'Sign in', SIGN_IN => 'Sign in',
OPENID_PROMPT => "Select your OpenID provider's icon from the list below, or type your OpenID into the text box.",
DONT_HAVE_OPENID => 'Don\'t have an OpenID?', DONT_HAVE_OPENID => 'Don\'t have an OpenID?',
OPENID_PROMPT => "Select your OpenID provider\'s icon from the list below, or type your OpenID into the text box.",
GO_BACK => 'Go Back.', GO_BACK => 'Go Back.',
ALL_FIELDS_REQUIRED => 'All fields are required.', ALL_FIELDS_REQUIRED => 'All fields are required.',
PASSWORDS_DO_NOT_MATCH => 'Passwords do not match.', PASSWORDS_DO_NOT_MATCH => 'Passwords do not match.',
Expand Down Expand Up @@ -632,6 +659,7 @@ END
PASSWORD_CHANGE_SUCCESS => 'Your password has been changed successfully.', PASSWORD_CHANGE_SUCCESS => 'Your password has been changed successfully.',
OPENID_ADD_SUCCESS => 'Your OpenID has been added successfully.', OPENID_ADD_SUCCESS => 'Your OpenID has been added successfully.',
OPENID_REMOVE_SUCCESS => 'Your OpenID has been removed successfully.', OPENID_REMOVE_SUCCESS => 'Your OpenID has been removed successfully.',
OPENID_ADD_FAILED => 'The OpenID could not be added: %s',
OPERATION_SUCCESS => 'Operation completed successfully.', OPERATION_SUCCESS => 'Operation completed successfully.',
BACK => 'Back', BACK => 'Back',
CREATE_ACCOUNT => 'Create Account', CREATE_ACCOUNT => 'Create Account',
Expand All @@ -646,13 +674,17 @@ END
'account, please type in your username and click the "Continue" button below.', 'account, please type in your username and click the "Continue" button below.',
MUST_TYPE_USERNAME => 'You must type in your username to continue.', MUST_TYPE_USERNAME => 'You must type in your username to continue.',
INCORRECT_LINK => 'The confirmation code provided is either incorrect or expired.<br> Please click continue to exit.', INCORRECT_LINK => 'The confirmation code provided is either incorrect or expired.<br> Please click continue to exit.',
PENDING => 'pending',

WELCOME => 'Welcome, %s', WELCOME => 'Welcome, %s',
LOG_OUT_DESC => 'Click here to log out from %s', LOG_OUT_DESC => 'Click here to log out from %s',
LOG_OUT => 'Log Out', LOG_OUT => 'Log Out',
CHANGE_SETTINGS_DESC => 'Click here to change your account settings', CHANGE_SETTINGS_DESC => 'Click here to change your account settings',
LOGIN_CREATE_DESC => 'Click here to log in or create a new account. This will allow you to access your settings and uploaded tracks from multiple computers.', LOGIN_CREATE_DESC => 'Click here to log in or create a new account. This will allow you to access your settings and uploaded tracks from multiple computers.',
LOGIN_REQUEST => 'Please log in %s',
LOGIN => 'Log in', LOGIN => 'Log in',
LOGIN_CREATE => 'Log in / create account', LOGIN_CREATE => 'Log in / create account',
LOGIN_REQUIRED => 'You must log in to access this data source',


#------------ #------------
# USER TRACKS # USER TRACKS
Expand All @@ -674,6 +706,7 @@ END
SHARING => 'Sharing:', SHARING => 'Sharing:',
TRACK_IS => 'Track is', TRACK_IS => 'Track is',
SHARED_WITH_YOU => '<b>shared</b> with you', SHARED_WITH_YOU => '<b>shared</b> with you',
SHARING_ADD_USER => 'Add',
SHARING_PRIVATE => 'Private', SHARING_PRIVATE => 'Private',
SHARING_CASUAL => 'Casual', SHARING_CASUAL => 'Casual',
SHARING_GROUP => 'Group', SHARING_GROUP => 'Group',
Expand Down Expand Up @@ -752,8 +785,8 @@ END
CLICK_MODIFY_SUBTRACK_SEL => 'Click to modify subtrack selections.', CLICK_MODIFY_SUBTRACK_SEL => 'Click to modify subtrack selections.',
CLICK_FOR_MORE => 'Click for more', CLICK_FOR_MORE => 'Click for more',
PLUGIN_BASE_CLASS_DUMP => "This is the base class for all GBrowse plugins.\n". PLUGIN_BASE_CLASS_DUMP => "This is the base class for all GBrowse plugins.\n".
"The fact that you\'re seeing this means that the author of ". "The fact that you're seeing this means that the author of ".
"this plugin hasn\'t yet implemented a real dump() method.\n", "this plugin hasn't yet implemented a real dump() method.\n",
PLUGIN_BASE_CLASS_DESC => "This is the base class for all GBrowse plugins.\n". PLUGIN_BASE_CLASS_DESC => "This is the base class for all GBrowse plugins.\n".
"The fact that you're seeing this means that the author of ". "The fact that you're seeing this means that the author of ".
"this plugin hasn't yet entered a real description.\n", "this plugin hasn't yet entered a real description.\n",
Expand Down
8 changes: 4 additions & 4 deletions lib/Bio/Graphics/Browser2/I18n.pm
Expand Up @@ -61,10 +61,10 @@ sub tr_table {
my $self = shift; my $self = shift;
my @languages = @_; my @languages = @_;
my $table; my $table;
for my $lang (@languages) { for my $lang (@languages) {
$self->{tr}{$lang} = $self->read_table($lang) $self->{tr}{$lang} = $self->read_table($lang)
unless exists $self->{tr}{$lang}; unless exists $self->{tr}{$lang};
return $self->{tr}{$lang} if $self->{tr}{$lang}; return $self->{tr}{$lang} if $self->{tr}{$lang};
} }
return {}; # language could not be loaded return {}; # language could not be loaded
} }
Expand Down

0 comments on commit ac2e1ed

Please sign in to comment.