• Strings ‘d’ and ‘days’ are hardcoded in .js files.

    Hours, minutes, and seconds are displayed without leading zero. Please find below a suggested fix. I edited the do_it() function and added an utility function pad():

    function pad(num, size){ return ('00' + num).substr(-size); }
    
    function do_it() {
    		timestamp--;
    
    	var days    = component(timestamp, 24 * 60 * 60),
    		hours   = component(timestamp,      60 * 60) % 24,
    		minutes = component(timestamp,           60) % 60,
    		seconds = component(timestamp,            1) % 60;
    
    	if ( curr.hasClass('isb_scheduled_compact') ) {
    		$div.html( ( days !== 0 ? days + '<span>gg</span>' : '' ) + pad(hours) + ':' + pad(minutes) + ':' + pad(seconds));
    	}
    	else {
    		$div.html( ( days !== 0 ? days + ' giorni, ' : '' ) + pad(hours) + ':' + pad(minutes) + ':' + pad(seconds));
    	}
    
    }
    • This topic was modified 7 years, 5 months ago by marco.marsala. Reason: patch
    • This topic was modified 7 years, 5 months ago by marco.marsala. Reason: patch
  • The topic ‘Hardcoded strings are not translatable’ is closed to new replies.