> 232 + // FIXME: how to represent
> 233 + text: index+":00"
>
> This should be localized, probably something like this (not sure it would work
> for all possible regional settings, but should be better than nothing):
>
> text: i18n.tr("%1:00").arg(index)
>
> What exactly was the FIXME about?
As David suggested, I tried to use code from Clock source code. I am using following code now. Does it looks ok ?
My implementation is only hourToLocaleString() this function. Other are copied from Clock.
function numberToLocaleString(num) {
return Number(num).toLocaleString(Qt.locale(), "f", 0)
}
function zeroleft ( number, zeroCount ) {
var resstring = numberToLocaleString(number.toString());
var numchart = zeroCount;
var numberlength = resstring.length;
for (var i = numberlength; i < numchart; i++) { resstring = numberToLocaleString("0") + resstring;
}
return resstring;
}
function hourToLocaleString(hour) {
return zeroleft(hour,2)+":"+ zeroleft(0,2);
}
> 232 + // FIXME: how to represent "%1:00" ).arg(index)
> 233 + text: index+":00"
>
> This should be localized, probably something like this (not sure it would work
> for all possible regional settings, but should be better than nothing):
>
> text: i18n.tr(
>
> What exactly was the FIXME about?
As David suggested, I tried to use code from Clock source code. I am using following code now. Does it looks ok ?
My implementation is only hourToLocaleStr ing() this function. Other are copied from Clock.
function numberToLocaleS tring(num) { num).toLocaleSt ring(Qt. locale( ), "f", 0)
return Number(
}
function zeroleft ( number, zeroCount ) { tring(number. toString( ));
resstring = numberToLocaleS tring(" 0") + resstring;
var resstring = numberToLocaleS
var numchart = zeroCount;
var numberlength = resstring.length;
for (var i = numberlength; i < numchart; i++) {
}
return resstring;
}
function hourToLocaleStr ing(hour) { hour,2) +":"+ zeroleft(0,2);
return zeroleft(
}