mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
intl dom refresh when locale changes final push for Issue #42
This commit is contained in:
parent
1b0d836a42
commit
bd62fa735e
9 changed files with 55 additions and 8 deletions
|
@ -40,10 +40,21 @@ var init = function() {
|
|||
wait: true
|
||||
});
|
||||
|
||||
events.on('localeChanged', intlRefresh);
|
||||
|
||||
initRootEvents(eventBaton);
|
||||
initDemo(sandbox);
|
||||
};
|
||||
|
||||
var intlRefresh = function() {
|
||||
if (!window.$) { return; }
|
||||
$('span.intl-aware').each(function(i, el) {
|
||||
var intl = require('../intl');
|
||||
var key = $(el).attr('data-intl');
|
||||
$(el).text(intl.str(key).toUpperCase());
|
||||
});
|
||||
};
|
||||
|
||||
var initRootEvents = function(eventBaton) {
|
||||
// we always want to focus the text area to collect input
|
||||
var focusTextArea = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue