Translate TT_Reason (UserEntry and csv export)
This commit is contained in:
parent
919a718a81
commit
2b6f060eae
2 changed files with 2 additions and 2 deletions
|
@ -128,7 +128,7 @@ class TreatmentsUserEntryFragment : DaggerFragment() {
|
||||||
when (v.unit) {
|
when (v.unit) {
|
||||||
Units.Timestamp -> valuesWithUnitString += dateUtil.dateAndTimeAndSecondsString(v.lValue) + separator
|
Units.Timestamp -> valuesWithUnitString += dateUtil.dateAndTimeAndSecondsString(v.lValue) + separator
|
||||||
Units.CPEvent -> valuesWithUnitString += translator.translate(v.sValue) + separator
|
Units.CPEvent -> valuesWithUnitString += translator.translate(v.sValue) + separator
|
||||||
Units.TT_Reason -> valuesWithUnitString += v.sValue + separator
|
Units.TT_Reason -> valuesWithUnitString += translator.translate(v.sValue) + separator
|
||||||
Units.R_String -> {
|
Units.R_String -> {
|
||||||
rStringParam = v.lValue.toInt()
|
rStringParam = v.lValue.toInt()
|
||||||
when (rStringParam) { //
|
when (rStringParam) { //
|
||||||
|
|
|
@ -113,7 +113,7 @@ class ClassicPrefsFormat @Inject constructor(
|
||||||
return when (v.unit) {
|
return when (v.unit) {
|
||||||
Units.Timestamp -> dateUtil.dateAndTimeAndSecondsString(v.lValue) + ";" + csvString(R.string.date)
|
Units.Timestamp -> dateUtil.dateAndTimeAndSecondsString(v.lValue) + ";" + csvString(R.string.date)
|
||||||
Units.CPEvent -> csvString(translator.translate(v.sValue)) + ";"
|
Units.CPEvent -> csvString(translator.translate(v.sValue)) + ";"
|
||||||
Units.TT_Reason -> csvString(v.sValue) + ";"
|
Units.TT_Reason -> csvString(translator.translate(v.sValue)) + ";"
|
||||||
Units.R_String -> if (v.lValue.toInt() == 0) csvString(v.iValue) + ";" else ";" //If lValue > 0 it's a formated string, so hidden for
|
Units.R_String -> if (v.lValue.toInt() == 0) csvString(v.iValue) + ";" else ";" //If lValue > 0 it's a formated string, so hidden for
|
||||||
Units.Mg_Dl -> if (profileFunction.getUnits()==Constants.MGDL) DecimalFormatter.to0Decimal(v.dValue) + ";" + csvString(Units.Mg_Dl) else DecimalFormatter.to1Decimal(v.dValue/Constants.MMOLL_TO_MGDL) + ";" + csvString(Units.Mmol_L)
|
Units.Mg_Dl -> if (profileFunction.getUnits()==Constants.MGDL) DecimalFormatter.to0Decimal(v.dValue) + ";" + csvString(Units.Mg_Dl) else DecimalFormatter.to1Decimal(v.dValue/Constants.MMOLL_TO_MGDL) + ";" + csvString(Units.Mmol_L)
|
||||||
Units.Mmol_L -> if (profileFunction.getUnits()==Constants.MGDL) DecimalFormatter.to0Decimal(v.dValue*Constants.MMOLL_TO_MGDL) + ";" + csvString(Units.Mg_Dl) else DecimalFormatter.to1Decimal(v.dValue) + ";" + csvString(Units.Mmol_L)
|
Units.Mmol_L -> if (profileFunction.getUnits()==Constants.MGDL) DecimalFormatter.to0Decimal(v.dValue*Constants.MMOLL_TO_MGDL) + ";" + csvString(Units.Mg_Dl) else DecimalFormatter.to1Decimal(v.dValue) + ";" + csvString(Units.Mmol_L)
|
||||||
|
|
Loading…
Reference in a new issue