Merge pull request #1055 from TomHennen/fix_time_string_names
Changed string names relating to time units.
This commit is contained in:
commit
86f4d244d8
|
@ -480,7 +480,7 @@ public abstract class MediaplayerActivity extends ActionBarActivity
|
||||||
checked = i;
|
checked = i;
|
||||||
}
|
}
|
||||||
choices[i] = String.valueOf(values[i]) + " "
|
choices[i] = String.valueOf(values[i]) + " "
|
||||||
+ getString(R.string.time_unit_seconds);
|
+ getString(R.string.time_seconds);
|
||||||
}
|
}
|
||||||
choice = values[checked];
|
choice = values[checked];
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(MediaplayerActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(MediaplayerActivity.this);
|
||||||
|
@ -528,7 +528,7 @@ public abstract class MediaplayerActivity extends ActionBarActivity
|
||||||
checked = i;
|
checked = i;
|
||||||
}
|
}
|
||||||
choices[i] = String.valueOf(values[i]) + " "
|
choices[i] = String.valueOf(values[i]) + " "
|
||||||
+ getString(R.string.time_unit_seconds);
|
+ getString(R.string.time_seconds);
|
||||||
}
|
}
|
||||||
choice = values[checked];
|
choice = values[checked];
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(MediaplayerActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(MediaplayerActivity.this);
|
||||||
|
|
|
@ -39,9 +39,9 @@ public abstract class TimeDialog extends Dialog {
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
String[] spinnerContent = new String[]{context.getString(R.string.time_unit_seconds),
|
String[] spinnerContent = new String[]{context.getString(R.string.time_seconds),
|
||||||
context.getString(R.string.time_unit_minutes),
|
context.getString(R.string.time_minutes),
|
||||||
context.getString(R.string.time_unit_hours)};
|
context.getString(R.string.time_hours)};
|
||||||
|
|
||||||
setContentView(R.layout.time_dialog);
|
setContentView(R.layout.time_dialog);
|
||||||
etxtTime = (EditText) findViewById(R.id.etxtTime);
|
etxtTime = (EditText) findViewById(R.id.etxtTime);
|
||||||
|
|
|
@ -36,12 +36,9 @@ import de.danoeh.antennapod.activity.MainActivity;
|
||||||
import de.danoeh.antennapod.activity.PreferenceActivity;
|
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||||
import de.danoeh.antennapod.activity.PreferenceActivityGingerbread;
|
import de.danoeh.antennapod.activity.PreferenceActivityGingerbread;
|
||||||
import de.danoeh.antennapod.asynctask.OpmlExportWorker;
|
import de.danoeh.antennapod.asynctask.OpmlExportWorker;
|
||||||
import de.danoeh.antennapod.core.asynctask.FlattrClickWorker;
|
|
||||||
import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
|
import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
|
||||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||||
import de.danoeh.antennapod.core.util.flattr.FlattrStatus;
|
|
||||||
import de.danoeh.antennapod.core.util.flattr.FlattrUtils;
|
import de.danoeh.antennapod.core.util.flattr.FlattrUtils;
|
||||||
import de.danoeh.antennapod.core.util.flattr.SimpleFlattrThing;
|
|
||||||
import de.danoeh.antennapod.dialog.AuthenticationDialog;
|
import de.danoeh.antennapod.dialog.AuthenticationDialog;
|
||||||
import de.danoeh.antennapod.dialog.AutoFlattrPreferenceDialog;
|
import de.danoeh.antennapod.dialog.AutoFlattrPreferenceDialog;
|
||||||
import de.danoeh.antennapod.dialog.GpodnetSetHostnameDialog;
|
import de.danoeh.antennapod.dialog.GpodnetSetHostnameDialog;
|
||||||
|
@ -431,7 +428,7 @@ public class PreferenceController {
|
||||||
entries[x] = res.getString(R.string.pref_smart_mark_as_played_disabled);
|
entries[x] = res.getString(R.string.pref_smart_mark_as_played_disabled);
|
||||||
} else {
|
} else {
|
||||||
Integer v = Integer.parseInt(values[x]);
|
Integer v = Integer.parseInt(values[x]);
|
||||||
entries[x] = res.getQuantityString(R.plurals.time_unit_seconds, v);
|
entries[x] = res.getQuantityString(R.plurals.time_seconds_quantified, v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pref.setEntries(entries);
|
pref.setEntries(entries);
|
||||||
|
|
|
@ -111,10 +111,10 @@ public final class Converter {
|
||||||
|
|
||||||
String result = "";
|
String result = "";
|
||||||
if(h > 0) {
|
if(h > 0) {
|
||||||
String hours = context.getResources().getQuantityString(R.plurals.time_unit_hours, h, h);
|
String hours = context.getResources().getQuantityString(R.plurals.time_hours_quantified, h, h);
|
||||||
result += hours + " ";
|
result += hours + " ";
|
||||||
}
|
}
|
||||||
String minutes = context.getResources().getQuantityString(R.plurals.time_unit_minutes, m, m);
|
String minutes = context.getResources().getQuantityString(R.plurals.time_minutes_quantified, m, m);
|
||||||
result += minutes;
|
result += minutes;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -384,18 +384,18 @@
|
||||||
<string name="sleep_timer_label">Sleep timer</string>
|
<string name="sleep_timer_label">Sleep timer</string>
|
||||||
<string name="time_left_label">Time left:\u0020</string>
|
<string name="time_left_label">Time left:\u0020</string>
|
||||||
<string name="time_dialog_invalid_input">Invalid input, time has to be an integer</string>
|
<string name="time_dialog_invalid_input">Invalid input, time has to be an integer</string>
|
||||||
<string name="time_unit_seconds">seconds</string>
|
<string name="time_seconds">seconds</string>
|
||||||
<string name="time_unit_minutes">minutes</string>
|
<string name="time_minutes">minutes</string>
|
||||||
<string name="time_unit_hours">hours</string>
|
<string name="time_hours">hours</string>
|
||||||
<plurals name="time_unit_seconds">
|
<plurals name="time_seconds_quantified">
|
||||||
<item quantity="one">1 second</item>
|
<item quantity="one">1 second</item>
|
||||||
<item quantity="other">%d seconds</item>
|
<item quantity="other">%d seconds</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<plurals name="time_unit_minutes">
|
<plurals name="time_minutes_quantified">
|
||||||
<item quantity="one">1 minute</item>
|
<item quantity="one">1 minute</item>
|
||||||
<item quantity="other">%d minutes</item>
|
<item quantity="other">%d minutes</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<plurals name="time_unit_hours">
|
<plurals name="time_hours_quantified">
|
||||||
<item quantity="one">1 hour</item>
|
<item quantity="one">1 hour</item>
|
||||||
<item quantity="other">%d hours</item>
|
<item quantity="other">%d hours</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
|
Loading…
Reference in New Issue