Missing strings in FillMenuActivity
This commit is contained in:
parent
ff96770df9
commit
d50f01af3d
|
@ -3,6 +3,7 @@ package info.nightscout.androidaps.interaction.menus;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
import info.nightscout.androidaps.aaps;
|
||||||
import info.nightscout.androidaps.data.ListenerService;
|
import info.nightscout.androidaps.data.ListenerService;
|
||||||
import info.nightscout.androidaps.interaction.actions.FillActivity;
|
import info.nightscout.androidaps.interaction.actions.FillActivity;
|
||||||
import info.nightscout.androidaps.interaction.utils.MenuListActivity;
|
import info.nightscout.androidaps.interaction.utils.MenuListActivity;
|
||||||
|
@ -16,22 +17,22 @@ public class FillMenuActivity extends MenuListActivity {
|
||||||
@Override
|
@Override
|
||||||
protected String[] getElements() {
|
protected String[] getElements() {
|
||||||
return new String[]{
|
return new String[]{
|
||||||
getResources().getString(R.string.action_preset_1),
|
aaps.gs(R.string.action_preset_1),
|
||||||
getResources().getString(R.string.action_preset_2),
|
aaps.gs(R.string.action_preset_2),
|
||||||
getResources().getString(R.string.action_preset_3),
|
aaps.gs(R.string.action_preset_3),
|
||||||
getResources().getString(R.string.action_free_amount)
|
aaps.gs(R.string.action_free_amount)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doAction(String action) {
|
protected void doAction(String action) {
|
||||||
if ("Preset 1".equals(action)) {
|
if (aaps.gs(R.string.action_preset_1).equals(action)) {
|
||||||
ListenerService.initiateAction(this, "fillpreset 1");
|
ListenerService.initiateAction(this, "fillpreset 1");
|
||||||
} else if ("Preset 2".equals(action)) {
|
} else if (aaps.gs(R.string.action_preset_2).equals(action)) {
|
||||||
ListenerService.initiateAction(this, "fillpreset 2");
|
ListenerService.initiateAction(this, "fillpreset 2");
|
||||||
} else if ("Preset 3".equals(action)) {
|
} else if (aaps.gs(R.string.action_preset_3).equals(action)) {
|
||||||
ListenerService.initiateAction(this, "fillpreset 3");
|
ListenerService.initiateAction(this, "fillpreset 3");
|
||||||
} else if ("Free amount".equals(action)) {
|
} else if (aaps.gs(R.string.action_free_amount).equals(action)) {
|
||||||
Intent intent = new Intent(this, FillActivity.class);
|
Intent intent = new Intent(this, FillActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
|
|
|
@ -8,6 +8,7 @@ import android.preference.PreferenceManager;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
import info.nightscout.androidaps.aaps;
|
||||||
import info.nightscout.androidaps.data.ListenerService;
|
import info.nightscout.androidaps.data.ListenerService;
|
||||||
import info.nightscout.androidaps.interaction.AAPSPreferences;
|
import info.nightscout.androidaps.interaction.AAPSPreferences;
|
||||||
import info.nightscout.androidaps.interaction.actions.AcceptActivity;
|
import info.nightscout.androidaps.interaction.actions.AcceptActivity;
|
||||||
|
@ -47,13 +48,13 @@ public class MainMenuActivity extends MenuListActivity {
|
||||||
boolean showWizard = sp.getBoolean("showWizard", true);
|
boolean showWizard = sp.getBoolean("showWizard", true);
|
||||||
|
|
||||||
Vector<String> menuitems = new Vector<String>();
|
Vector<String> menuitems = new Vector<String>();
|
||||||
menuitems.add(getResources().getString(R.string.menu_tempt));
|
menuitems.add(aaps.gs(R.string.menu_tempt));
|
||||||
if(showWizard) menuitems.add(getResources().getString(R.string.menu_wizard));
|
if(showWizard) menuitems.add(aaps.gs(R.string.menu_wizard));
|
||||||
menuitems.add(getResources().getString(R.string.menu_ecarb));
|
menuitems.add(aaps.gs(R.string.menu_ecarb));
|
||||||
menuitems.add(getResources().getString(R.string.menu_bolus));
|
menuitems.add(aaps.gs(R.string.menu_bolus));
|
||||||
menuitems.add(getResources().getString(R.string.menu_settings));
|
menuitems.add(aaps.gs(R.string.menu_settings));
|
||||||
menuitems.add(getResources().getString(R.string.menu_status));
|
menuitems.add(aaps.gs(R.string.menu_status));
|
||||||
if (showPrimeFill) menuitems.add(getResources().getString(R.string.menu_prime_fill));
|
if (showPrimeFill) menuitems.add(aaps.gs(R.string.menu_prime_fill));
|
||||||
|
|
||||||
return menuitems.toArray(new String[menuitems.size()]);
|
return menuitems.toArray(new String[menuitems.size()]);
|
||||||
}
|
}
|
||||||
|
@ -63,33 +64,33 @@ public class MainMenuActivity extends MenuListActivity {
|
||||||
|
|
||||||
Intent intent;
|
Intent intent;
|
||||||
|
|
||||||
if (getResources().getString(R.string.menu_settings).equals(action)) {
|
if (aaps.gs(R.string.menu_settings).equals(action)) {
|
||||||
intent = new Intent(this, AAPSPreferences.class);
|
intent = new Intent(this, AAPSPreferences.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
} else if ("Re-Sync".equals(action)) {
|
} else if ("Re-Sync".equals(action)) {
|
||||||
ListenerService.requestData(this);
|
ListenerService.requestData(this);
|
||||||
} else if (getResources().getString(R.string.menu_tempt).equals(action)) {
|
} else if (aaps.gs(R.string.menu_tempt).equals(action)) {
|
||||||
intent = new Intent(this, TempTargetActivity.class);
|
intent = new Intent(this, TempTargetActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
} else if (getResources().getString(R.string.menu_bolus).equals(action)) {
|
} else if (aaps.gs(R.string.menu_bolus).equals(action)) {
|
||||||
intent = new Intent(this, BolusActivity.class);
|
intent = new Intent(this, BolusActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
} else if (getResources().getString(R.string.menu_wizard).equals(action)) {
|
} else if (aaps.gs(R.string.menu_wizard).equals(action)) {
|
||||||
intent = new Intent(this, WizardActivity.class);
|
intent = new Intent(this, WizardActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
} else if (getResources().getString(R.string.menu_status).equals(action)) {
|
} else if (aaps.gs(R.string.menu_status).equals(action)) {
|
||||||
intent = new Intent(this, StatusMenuActivity.class);
|
intent = new Intent(this, StatusMenuActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
} else if (getResources().getString(R.string.menu_prime_fill).equals(action)) {
|
} else if (aaps.gs(R.string.menu_prime_fill).equals(action)) {
|
||||||
intent = new Intent(this, FillMenuActivity.class);
|
intent = new Intent(this, FillMenuActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
} else if (getResources().getString(R.string.menu_ecarb).equals(action)) {
|
} else if (aaps.gs(R.string.menu_ecarb).equals(action)) {
|
||||||
intent = new Intent(this, ECarbActivity.class);
|
intent = new Intent(this, ECarbActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
|
|
Loading…
Reference in a new issue