insulincurves - i18n

This commit is contained in:
AdrianLxM 2017-08-14 15:17:07 +02:00
parent 13cd7dbda1
commit ced1da09cf
5 changed files with 17 additions and 9 deletions

View file

@ -83,7 +83,7 @@ public abstract class InsulinOrefBasePlugin implements PluginBase, InsulinInterf
String comment = commentStandardText();
double userDia = getUserDefinedDia();
if(userDia < MIN_DIA){
comment += "\n" + String.format("DIA of %s too short - using %s instead!", userDia, MIN_DIA);
comment += "\n" + String.format(MainApp.sResources.getString(R.string.dia_too_short), userDia, MIN_DIA);
}
return comment;
}

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.plugins.InsulinOrefCurves;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.utils.SP;
@ -21,7 +22,7 @@ public class InsulinOrefFreePeakPlugin extends InsulinOrefBasePlugin {
@Override
public String getName() {
return "Free-Peak Oref";
return MainApp.sResources.getString(R.string.free_peak_oref);
}
@Override
@ -31,12 +32,12 @@ public class InsulinOrefFreePeakPlugin extends InsulinOrefBasePlugin {
@Override
public String getFriendlyName() {
return "Free-Peak Oref";
return MainApp.sResources.getString(R.string.free_peak_oref);
}
@Override
public String commentStandardText() {
return "Fiasp";
return MainApp.sResources.getString(R.string.insulin_peak) + ": " + getPeak();
}
@Override

View file

@ -21,7 +21,7 @@ public class InsulinOrefRapidActingPlugin extends InsulinOrefBasePlugin {
@Override
public String getName() {
return "Rapid-Acting Oref";
return MainApp.sResources.getString(R.string.rapid_acting_oref);
}
@Override
@ -31,7 +31,7 @@ public class InsulinOrefRapidActingPlugin extends InsulinOrefBasePlugin {
@Override
public String getFriendlyName() {
return "Rapid-Acting Oref";
return MainApp.sResources.getString(R.string.rapid_acting_oref);
}
@Override

View file

@ -21,7 +21,7 @@ public class InsulinOrefUltraRapidActingPlugin extends InsulinOrefBasePlugin {
@Override
public String getName() {
return "Ultra-Rapid-Acting Oref";
return MainApp.sResources.getString(R.string.ultrarapid_oref);
}
@Override
@ -31,12 +31,12 @@ public class InsulinOrefUltraRapidActingPlugin extends InsulinOrefBasePlugin {
@Override
public String getFriendlyName() {
return "Ultra-Rapid-Acting Oref";
return MainApp.sResources.getString(R.string.ultrarapid_oref);
}
@Override
public String commentStandardText() {
return "Fiasp";
return MainApp.sResources.getString(R.string.ultrafastactinginsulincomment);
}
@Override

View file

@ -580,6 +580,7 @@
<string name="configbuilder_insulin">Insulin</string>
<string name="fastactinginsulin">Fast Acting Insulin</string>
<string name="fastactinginsulincomment">Novorapid, Novolog, Humalog</string>
<string name="ultrafastactinginsulincomment">Fiasp</string>
<string name="insulin_shortname">INS</string>
<string name="fastactinginsulinprolonged">Fast Acting Insulin Prolonged</string>
<string name="key_usesuperbolus" translatable="false">key_usersuperbolus</string>
@ -692,6 +693,12 @@
<string name="key_insulin_oref_peak" translatable="false">insulin_oref_peak</string>
<string name="insulin_oref_peak">IOB Curve Peak</string>
<string name="insulin_peak">Peak [min]</string>
<string name="free_peak_oref">Free-Peak Oref</string>
<string name="rapid_acting_oref">Rapid-Acting Oref</string>
<string name="ultrarapid_oref">Ultra-Rapid Oref</string>
<string name="dia_too_short" formatted="false">"DIA of %s too short - using %s instead!"</string>
</resources>