Merge branch 'trial/notifications' into develop
Conflicts: WebContent/main.html
This commit is contained in:
@@ -42,12 +42,16 @@ init: function() {
|
||||
}
|
||||
|
||||
// generate selectors
|
||||
OSRM.GUI.selectorInit("gui-language-toggle", options, selected, OSRM.Localization.setLanguage);
|
||||
OSRM.GUI.selectorInit("gui-language-2-toggle", options_2, selected, OSRM.Localization.setLanguage);
|
||||
OSRM.GUI.selectorInit("gui-language-toggle", options, selected, OSRM.Localization.setLanguageWrapper);
|
||||
OSRM.GUI.selectorInit("gui-language-2-toggle", options_2, selected, OSRM.Localization.setLanguageWrapper);
|
||||
|
||||
// set default language
|
||||
OSRM.Localization.setLanguage( OSRM.DEFAULTS.LANGUAGE );
|
||||
},
|
||||
setLanguageWrapper: function(language) { // wrapping required to correctly prevent localization tooltip from showing
|
||||
OSRM.GUI.deactivateTooltip( "localization" );
|
||||
OSRM.Localization.setLanguage(language);
|
||||
},
|
||||
setLanguage: function(language) {
|
||||
// change value of both language selectors
|
||||
OSRM.GUI.selectorChange( document.getElementById('gui-language-toggle'), language );
|
||||
@@ -100,4 +104,4 @@ translate: function(text) {
|
||||
};
|
||||
|
||||
// shorter call to translate function
|
||||
OSRM.loc = OSRM.Localization.translate;
|
||||
OSRM.loc = OSRM.Localization.translate;
|
||||
|
||||
Reference in New Issue
Block a user