mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-25 16:50:44 +02:00
Translate strings, remove unused variable
This commit is contained in:
parent
193d74879a
commit
d9722c6db2
@ -64,7 +64,6 @@ public class SleepChartFragment extends AbstractChartFragment {
|
||||
List<Integer> colors = new ArrayList<>();
|
||||
int index = 0;
|
||||
for (ActivityAmount amount : amounts.getAmounts()) {
|
||||
long value = amount.getTotalSeconds();
|
||||
entries.add(new Entry(amount.getTotalSeconds(), index++));
|
||||
colors.add(getColorFor(amount.getActivityKind()));
|
||||
data.addXValue(amount.getName(getActivity()));
|
||||
|
@ -2,6 +2,8 @@ package nodomain.freeyourgadget.gadgetbridge.model;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
|
||||
public class ActivityAmount {
|
||||
private int activityKind;
|
||||
private short percent;
|
||||
@ -34,10 +36,10 @@ public class ActivityAmount {
|
||||
public String getName(Context context) {
|
||||
switch (activityKind) {
|
||||
case ActivityKind.TYPE_DEEP_SLEEP:
|
||||
return "Deep Sleep";
|
||||
return context.getString(R.string.abstract_chart_fragment_kind_deep_sleep);
|
||||
case ActivityKind.TYPE_LIGHT_SLEEP:
|
||||
return "Light Sleep";
|
||||
return context.getString(R.string.abstract_chart_fragment_kind_light_sleep);
|
||||
}
|
||||
return "Activity";
|
||||
return context.getString(R.string.abstract_chart_fragment_kind_activity);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user