allow better translation of min ago
This commit is contained in:
parent
0059266791
commit
8e46a55e48
10 changed files with 6 additions and 12 deletions
|
@ -200,7 +200,7 @@ public class DanaRFragment extends Fragment implements FragmentBase {
|
||||||
if (DanaRPlugin.getDanaRPump().lastConnection.getTime() != 0) {
|
if (DanaRPlugin.getDanaRPump().lastConnection.getTime() != 0) {
|
||||||
Long agoMsec = new Date().getTime() - DanaRPlugin.getDanaRPump().lastConnection.getTime();
|
Long agoMsec = new Date().getTime() - DanaRPlugin.getDanaRPump().lastConnection.getTime();
|
||||||
int agoMin = (int) (agoMsec / 60d / 1000d);
|
int agoMin = (int) (agoMsec / 60d / 1000d);
|
||||||
lastConnectionView.setText(formatTime.format(DanaRPlugin.getDanaRPump().lastConnection) + " (" + agoMin + " " + MainApp.sResources.getString(R.string.minago) + ")");
|
lastConnectionView.setText(formatTime.format(DanaRPlugin.getDanaRPump().lastConnection) + " (" + String.format(MainApp.sResources.getString(R.string.minago), agoMin) + ")");
|
||||||
SetWarnColor.setColor(lastConnectionView, agoMin, 16d, 31d);
|
SetWarnColor.setColor(lastConnectionView, agoMin, 16d, 31d);
|
||||||
}
|
}
|
||||||
if (DanaRPlugin.getDanaRPump().lastBolusTime.getTime() != 0) {
|
if (DanaRPlugin.getDanaRPump().lastBolusTime.getTime() != 0) {
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class DanaRKoreanFragment extends Fragment implements FragmentBase {
|
||||||
if (DanaRKoreanPlugin.getDanaRPump().lastConnection.getTime() != 0) {
|
if (DanaRKoreanPlugin.getDanaRPump().lastConnection.getTime() != 0) {
|
||||||
Long agoMsec = new Date().getTime() - DanaRKoreanPlugin.getDanaRPump().lastConnection.getTime();
|
Long agoMsec = new Date().getTime() - DanaRKoreanPlugin.getDanaRPump().lastConnection.getTime();
|
||||||
int agoMin = (int) (agoMsec / 60d / 1000d);
|
int agoMin = (int) (agoMsec / 60d / 1000d);
|
||||||
lastConnectionView.setText(formatTime.format(DanaRKoreanPlugin.getDanaRPump().lastConnection) + " (" + agoMin + " " + MainApp.sResources.getString(R.string.minago) + ")");
|
lastConnectionView.setText(formatTime.format(DanaRKoreanPlugin.getDanaRPump().lastConnection) + " (" + String.format(MainApp.sResources.getString(R.string.minago), agoMin) + ")");
|
||||||
SetWarnColor.setColor(lastConnectionView, agoMin, 16d, 31d);
|
SetWarnColor.setColor(lastConnectionView, agoMin, 16d, 31d);
|
||||||
}
|
}
|
||||||
// if (DanaRKoreanPlugin.getDanaRPump().lastBolusTime.getTime() != 0) {
|
// if (DanaRKoreanPlugin.getDanaRPump().lastBolusTime.getTime() != 0) {
|
||||||
|
|
|
@ -82,7 +82,6 @@ import info.nightscout.utils.DateUtil;
|
||||||
import info.nightscout.utils.DecimalFormatter;
|
import info.nightscout.utils.DecimalFormatter;
|
||||||
import info.nightscout.utils.Round;
|
import info.nightscout.utils.Round;
|
||||||
import info.nightscout.utils.SafeParse;
|
import info.nightscout.utils.SafeParse;
|
||||||
import info.nightscout.utils.ToastUtils;
|
|
||||||
|
|
||||||
|
|
||||||
public class OverviewFragment extends Fragment {
|
public class OverviewFragment extends Fragment {
|
||||||
|
@ -590,7 +589,7 @@ public class OverviewFragment extends Fragment {
|
||||||
|
|
||||||
Long agoMsec = new Date().getTime() - lastBG.timeIndex;
|
Long agoMsec = new Date().getTime() - lastBG.timeIndex;
|
||||||
int agoMin = (int) (agoMsec / 60d / 1000d);
|
int agoMin = (int) (agoMsec / 60d / 1000d);
|
||||||
timeAgoView.setText(agoMin + " " + getString(R.string.minago));
|
timeAgoView.setText(String.format(MainApp.sResources.getString(R.string.minago), agoMin));
|
||||||
|
|
||||||
// iob
|
// iob
|
||||||
MainApp.getConfigBuilder().getActiveTreatments().updateTotalIOB();
|
MainApp.getConfigBuilder().getActiveTreatments().updateTotalIOB();
|
||||||
|
|
|
@ -16,7 +16,6 @@ import java.text.Normalizer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
import info.nightscout.androidaps.Constants;
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
|
@ -212,7 +211,7 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
if (actualBG != null) {
|
if (actualBG != null) {
|
||||||
reply = MainApp.sResources.getString(R.string.actualbg) + " " + actualBG.valueToUnitsToString(units) + ", ";
|
reply = MainApp.sResources.getString(R.string.actualbg) + " " + actualBG.valueToUnitsToString(units) + ", ";
|
||||||
} else if (lastBG != null) {
|
} else if (lastBG != null) {
|
||||||
reply = MainApp.sResources.getString(R.string.lastbg) + " " + lastBG.valueToUnitsToString(units) + " " + agoMin + MainApp.sResources.getString(R.string.minago) + ", ";
|
reply = MainApp.sResources.getString(R.string.lastbg) + " " + lastBG.valueToUnitsToString(units) + " " + String.format(MainApp.sResources.getString(R.string.minago), agoMin) + ", ";
|
||||||
}
|
}
|
||||||
DatabaseHelper.GlucoseStatus glucoseStatus = MainApp.getDbHelper().getGlucoseStatusData();
|
DatabaseHelper.GlucoseStatus glucoseStatus = MainApp.getDbHelper().getGlucoseStatusData();
|
||||||
if (glucoseStatus != null)
|
if (glucoseStatus != null)
|
||||||
|
|
|
@ -193,7 +193,6 @@
|
||||||
<string name="openapsma_maxbasal_summary">Макс. лимит на временен базал [Е/ч] </string>
|
<string name="openapsma_maxbasal_summary">Макс. лимит на временен базал [Е/ч] </string>
|
||||||
<string name="bg_lang">Български</string>
|
<string name="bg_lang">Български</string>
|
||||||
<string name="openapsma_maxiob_summary">Макс. лимит на не болус IOB подаван от openAPS</string>
|
<string name="openapsma_maxiob_summary">Макс. лимит на не болус IOB подаван от openAPS</string>
|
||||||
<string name="minago">min ago</string>
|
|
||||||
<string name="connected">Свързан</string>
|
<string name="connected">Свързан</string>
|
||||||
<string name="devicenotfound">Избраното устройство не съществува</string>
|
<string name="devicenotfound">Избраното устройство не съществува</string>
|
||||||
<string name="disconnected">Прекъснат</string>
|
<string name="disconnected">Прекъснат</string>
|
||||||
|
|
|
@ -73,7 +73,6 @@
|
||||||
<string name="loop_setbypump_label">Nastaveno pumpou</string>
|
<string name="loop_setbypump_label">Nastaveno pumpou</string>
|
||||||
<string name="loopdisabled">SMYČKA ZAKÁZÁNA OMEZENÍM</string>
|
<string name="loopdisabled">SMYČKA ZAKÁZÁNA OMEZENÍM</string>
|
||||||
<string name="objectives_manualenacts">Ručně spuštěno</string>
|
<string name="objectives_manualenacts">Ručně spuštěno</string>
|
||||||
<string name="minago">m zpět</string>
|
|
||||||
<string name="objectives_minimalduration">Minimální trvání</string>
|
<string name="objectives_minimalduration">Minimální trvání</string>
|
||||||
<string name="nav_backup">Záloha</string>
|
<string name="nav_backup">Záloha</string>
|
||||||
<string name="nav_exit">Ukončit</string>
|
<string name="nav_exit">Ukončit</string>
|
||||||
|
@ -376,4 +375,5 @@
|
||||||
<string name="mdi">Pera</string>
|
<string name="mdi">Pera</string>
|
||||||
<string name="actualbg">Glykémie:</string>
|
<string name="actualbg">Glykémie:</string>
|
||||||
<string name="lastbg">Poslední glykémie:</string>
|
<string name="lastbg">Poslední glykémie:</string>
|
||||||
|
<string name="minago">před %d min</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -176,7 +176,6 @@
|
||||||
<string name="carbsconstraintapplied">Carbs constraint applied</string>
|
<string name="carbsconstraintapplied">Carbs constraint applied</string>
|
||||||
<string name="nav_resetdb">Reset Datenbanken</string>
|
<string name="nav_resetdb">Reset Datenbanken</string>
|
||||||
<string name="objectives_minimalduration">Minimale Dauer</string>
|
<string name="objectives_minimalduration">Minimale Dauer</string>
|
||||||
<string name="minago">min ago</string>
|
|
||||||
<string name="nav_refreshtreatments">Erneure treatments von NS</string>
|
<string name="nav_refreshtreatments">Erneure treatments von NS</string>
|
||||||
<string name="nav_exit">Exit</string>
|
<string name="nav_exit">Exit</string>
|
||||||
<string name="missing">Fehlend</string>
|
<string name="missing">Fehlend</string>
|
||||||
|
|
|
@ -74,7 +74,6 @@
|
||||||
<string name="glucose">Glucosa</string>
|
<string name="glucose">Glucosa</string>
|
||||||
<string name="delta">Delta</string>
|
<string name="delta">Delta</string>
|
||||||
<string name="avgdelta">Avg. delta</string>
|
<string name="avgdelta">Avg. delta</string>
|
||||||
<string name="minago">min antes</string>
|
|
||||||
|
|
||||||
<string name="configbuilder">Config Builder</string>
|
<string name="configbuilder">Config Builder</string>
|
||||||
<string name="objectives">Objetivos</string>
|
<string name="objectives">Objetivos</string>
|
||||||
|
|
|
@ -75,7 +75,6 @@
|
||||||
<string name="glucose">혈당</string>
|
<string name="glucose">혈당</string>
|
||||||
<string name="delta">Delta</string>
|
<string name="delta">Delta</string>
|
||||||
<string name="avgdelta">Avg. delta</string>
|
<string name="avgdelta">Avg. delta</string>
|
||||||
<string name="minago">분 전</string>
|
|
||||||
|
|
||||||
<string name="configbuilder">Config Builder</string>
|
<string name="configbuilder">Config Builder</string>
|
||||||
<string name="objectives">목표</string>
|
<string name="objectives">목표</string>
|
||||||
|
|
|
@ -76,7 +76,6 @@
|
||||||
<string name="glucose">Glucose</string>
|
<string name="glucose">Glucose</string>
|
||||||
<string name="delta">Delta</string>
|
<string name="delta">Delta</string>
|
||||||
<string name="avgdelta">Avg. delta</string>
|
<string name="avgdelta">Avg. delta</string>
|
||||||
<string name="minago">m ago</string>
|
|
||||||
|
|
||||||
<string name="configbuilder">Config Builder</string>
|
<string name="configbuilder">Config Builder</string>
|
||||||
<string name="objectives">Objectives</string>
|
<string name="objectives">Objectives</string>
|
||||||
|
@ -389,4 +388,5 @@
|
||||||
<string name="mdi">MDI</string>
|
<string name="mdi">MDI</string>
|
||||||
<string name="ongoingnotificaction">Ongoing Notification</string>
|
<string name="ongoingnotificaction">Ongoing Notification</string>
|
||||||
<string name="old_data">OLD DATA</string>
|
<string name="old_data">OLD DATA</string>
|
||||||
|
<string name="minago">%dmin ago</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue