LINT: locale
This commit is contained in:
parent
73e63615ae
commit
a06c21b585
|
@ -45,6 +45,7 @@ import org.slf4j.LoggerFactory;
|
|||
import java.text.DecimalFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
@ -1458,7 +1459,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
if (sensitivityView != null) {
|
||||
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensData("Overview");
|
||||
if (autosensData != null)
|
||||
sensitivityView.setText(String.format("%.0f%%", autosensData.autosensResult.ratio * 100));
|
||||
sensitivityView.setText(String.format(Locale.ENGLISH, "%.0f%%", autosensData.autosensResult.ratio * 100));
|
||||
else
|
||||
sensitivityView.setText("");
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
|
@ -66,7 +67,7 @@ public class AutosensData implements DataPointWithLabelInterface {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("CarbsInPast: time: %s carbs: %.02f min5minCI: %.02f remaining: %.2f", new Date(time).toLocaleString(), carbs, min5minCarbImpact, remaining);
|
||||
return String.format(Locale.ENGLISH, "CarbsInPast: time: %s carbs: %.02f min5minCI: %.02f remaining: %.2f", new Date(time).toLocaleString(), carbs, min5minCarbImpact, remaining);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,7 +102,7 @@ public class AutosensData implements DataPointWithLabelInterface {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("AutosensData: %s pastSensitivity=%s delta=%.02f avgDelta=%.02f bgi=%.02f deviation=%.02f avgDeviation=%.02f absorbed=%.02f carbsFromBolus=%.02f cob=%.02f autosensRatio=%.02f slopeFromMaxDeviation=%.02f slopeFromMinDeviation=%.02f activeCarbsList=%s",
|
||||
return String.format(Locale.ENGLISH, "AutosensData: %s pastSensitivity=%s delta=%.02f avgDelta=%.02f bgi=%.02f deviation=%.02f avgDeviation=%.02f absorbed=%.02f carbsFromBolus=%.02f cob=%.02f autosensRatio=%.02f slopeFromMaxDeviation=%.02f slopeFromMinDeviation=%.02f activeCarbsList=%s",
|
||||
new Date(time).toLocaleString(), pastSensitivity, delta, avgDelta, bgi, deviation, avgDeviation, absorbed, carbsFromBolus, cob, autosensResult.ratio, slopeFromMaxDeviation, slopeFromMinDeviation, activeCarbsList.toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||
|
@ -31,7 +33,7 @@ public class MsgSettingBasal extends MessageBase {
|
|||
|
||||
if (L.isEnabled(L.PUMPCOMM))
|
||||
for (int index = 0; index < 24; index++) {
|
||||
log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
||||
log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||
|
||||
|
@ -55,7 +57,7 @@ public class MsgSettingBasalProfileAll extends MessageBase {
|
|||
for (int profile = 0; profile < 4; profile++) {
|
||||
for (int index = 0; index < 48; index++) {
|
||||
try {
|
||||
log.debug("Basal profile " + profile + ": " + String.format("%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
|
||||
log.debug("Basal profile " + profile + ": " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
|
||||
} catch (Exception e){
|
||||
log.error("Unhandled exception" , e);
|
||||
}
|
||||
|
@ -67,8 +69,8 @@ public class MsgSettingBasalProfileAll extends MessageBase {
|
|||
//this is absurd pump.pumpProfiles[profile][index] returns nullPointerException
|
||||
try {
|
||||
log.debug("Basal profile " + profile + ": " +
|
||||
String.format("%02d", (index / 2)) +
|
||||
":" + String.format("%02d", (index % 2) * 30) + " : " +
|
||||
String.format(Locale.ENGLISH, "%02d", (index / 2)) +
|
||||
":" + String.format(Locale.ENGLISH, "%02d", (index % 2) * 30) + " : " +
|
||||
pump.pumpProfiles[profile][index]);
|
||||
} catch (Exception e){
|
||||
log.error("Unhandled exception" , e);
|
||||
|
|
|
@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
|
||||
|
@ -55,15 +57,15 @@ public class MsgSettingBasalProfileAll_k extends MessageBase {
|
|||
if (pump.basal48Enable) {
|
||||
for (int profile = 0; profile < 4; profile++) {
|
||||
for (int index = 0; index < 24; index++) {
|
||||
log.debug("Basal profile " + profile + ": " + String.format("%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
|
||||
log.debug("Basal profile " + profile + ": " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int profile = 0; profile < 4; profile++) {
|
||||
for (int index = 0; index < 48; index++) {
|
||||
log.debug("Basal profile " + profile + ": " +
|
||||
String.format("%02d", (index / 2)) +
|
||||
":" + String.format("%02d", (index % 2) * 30) + " : " +
|
||||
String.format(Locale.ENGLISH, "%02d", (index / 2)) +
|
||||
":" + String.format(Locale.ENGLISH, "%02d", (index % 2) * 30) + " : " +
|
||||
pump.pumpProfiles[profile][index]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
|
||||
|
@ -32,7 +34,7 @@ public class MsgSettingBasal_k extends MessageBase {
|
|||
|
||||
if (L.isEnabled(L.PUMPCOMM))
|
||||
for (int index = 0; index < 24; index++) {
|
||||
log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
||||
log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import com.cozmo.danar.util.BleCommandUtil;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
|
@ -49,7 +51,7 @@ public class DanaRS_Packet_Basal_Get_Basal_Rate extends DanaRS_Packet {
|
|||
log.debug("Max basal: " + pump.maxBasal + " U");
|
||||
log.debug("Basal step: " + pump.basalStep + " U");
|
||||
for (int index = 0; index < 24; index++)
|
||||
log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
||||
log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
||||
}
|
||||
|
||||
if (pump.basalStep != 0.01d) {
|
||||
|
|
|
@ -5,6 +5,8 @@ import com.cozmo.danar.util.BleCommandUtil;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||
|
||||
|
@ -51,7 +53,7 @@ public class DanaRS_Packet_Basal_Get_Profile_Basal_Rate extends DanaRS_Packet {
|
|||
}
|
||||
if (L.isEnabled(L.PUMPCOMM)) {
|
||||
for (int index = 0; index < 24; index++)
|
||||
log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[profileNumber][index]);
|
||||
log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[profileNumber][index]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.monkey.d.ruffy.ruffy.driver.display.menu;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by fishermen21 on 24.05.17.
|
||||
*/
|
||||
|
@ -30,6 +32,6 @@ public class MenuDate {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return day+"."+String.format("%02d",month)+".";
|
||||
return day+"."+String.format(Locale.ENGLISH, "%02d",month)+".";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.monkey.d.ruffy.ruffy.driver.display.menu;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by fishermen21 on 22.05.17.
|
||||
*/
|
||||
|
@ -31,6 +33,6 @@ public class MenuTime {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return hour+":"+String.format("%02d",minute);
|
||||
return hour+":"+String.format(Locale.ENGLISH, "%02d",minute);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue