default strings.xml is now English, added more string resources
This commit is contained in:
@@ -62,22 +62,18 @@ public class CouponFragment extends Fragment {
|
||||
private void showPopup(Coupon coupon) {
|
||||
AlertDialog.Builder activateBuilder = new AlertDialog.Builder(getContext());
|
||||
AlertDialog.Builder couponCodeBuilder = new AlertDialog.Builder(getContext());
|
||||
// TODO: use string resources instead of hardcoded strings
|
||||
activateBuilder.setMessage("Weet je zeker dat je deze coupon wilt activeren?");
|
||||
activateBuilder.setMessage(getResources().getString(R.string.activate_question));
|
||||
activateBuilder.setCancelable(true);
|
||||
// TODO: use string resources instead of hardcoded strings
|
||||
activateBuilder.setPositiveButton("activeren", (dialog, which) -> {
|
||||
// TODO: use string resources instead of hardcoded strings
|
||||
activateBuilder.setPositiveButton(R.string.activate, (dialog, which) -> {
|
||||
dialog.cancel();
|
||||
couponCodeBuilder.setMessage("Code: " + coupon.getCode());
|
||||
couponCodeBuilder.setPositiveButton("Klaar", (dialog1, which1) -> {
|
||||
couponCodeBuilder.setPositiveButton(R.string.done, (dialog1, which1) -> {
|
||||
dialog.cancel();
|
||||
});
|
||||
AlertDialog couponCodePopup = couponCodeBuilder.create();
|
||||
couponCodePopup.show();
|
||||
});
|
||||
// TODO: use string resources instead of hardcoded strings
|
||||
activateBuilder.setNegativeButton("annuleren", (dialog, which) -> dialog.cancel());
|
||||
activateBuilder.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.cancel());
|
||||
AlertDialog couponPopup = activateBuilder.create();
|
||||
couponPopup.show();
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.Locale;
|
||||
public class SettingsFragment extends Fragment {
|
||||
|
||||
private SharedPreferences.Editor editor;
|
||||
private String language;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
@@ -75,6 +74,7 @@ public class SettingsFragment extends Fragment {
|
||||
|
||||
/**
|
||||
* converts the languageDropdown position to the belonging language
|
||||
*
|
||||
* @param id desired position to convert
|
||||
* @return the language belonging to the position of the languageDropdown
|
||||
*/
|
||||
@@ -91,6 +91,7 @@ public class SettingsFragment extends Fragment {
|
||||
|
||||
/**
|
||||
* converts language to the languageDropdown position
|
||||
*
|
||||
* @param language desired language to convert
|
||||
* @return the position of the language in the languageDropdown
|
||||
*/
|
||||
@@ -118,6 +119,7 @@ public class SettingsFragment extends Fragment {
|
||||
|
||||
/**
|
||||
* changes the current language to the desired language and saves this setting in SharedPreferences
|
||||
*
|
||||
* @param language the desired language to translate to
|
||||
*/
|
||||
private void setLocale(String language) {
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="locations">Location</string>
|
||||
<string name="total_time">Total time:</string>
|
||||
<string name="total_distance">Total distance:</string>
|
||||
<string name="language">Language</string>
|
||||
<string name="statistics">Statistics</string>
|
||||
<string name="start_route">Start Route</string>
|
||||
<string name="routes">Routes</string>
|
||||
<string name="colorblind">Colorblind</string>
|
||||
<string name="settings">Settings</string>
|
||||
<string name="imperial_system">Imperial system</string>
|
||||
<string name="coupons_collected">Coupons collected:</string>
|
||||
<string name="visited_locations">Visited locations:</string>
|
||||
<string name="_65_mode">65+ mode</string>
|
||||
<string name="coupons">Coupons</string>
|
||||
</resources>
|
||||
@@ -16,5 +16,8 @@
|
||||
<string name="coupons_collected">Coupons gespaard:</string>
|
||||
<string name="coupons">Coupons</string>
|
||||
<string name="start_route">Start Route</string>
|
||||
|
||||
<string name="activate_question">Weet je zeker dat je deze coupon wilt activeren?</string>
|
||||
<string name="activate">activeren</string>
|
||||
<string name="done">Klaar</string>
|
||||
<string name="cancel">annuleren</string>
|
||||
</resources>
|
||||
@@ -1,17 +1,21 @@
|
||||
<resources>
|
||||
<string name="app_name" translatable="false">Next Location</string>
|
||||
<string name="locations">Locaties</string>
|
||||
<string name="locations">Location</string>
|
||||
<string name="routes">Routes</string>
|
||||
<string name="statistics">Statistieken</string>
|
||||
<string name="settings">Instellingen</string>
|
||||
<string name="language">Taal</string>
|
||||
<string name="imperial_system">Imperiaal systeem</string>
|
||||
<string name="_65_mode">65+ stand</string>
|
||||
<string name="colorblind">Kleurenblind</string>
|
||||
<string name="total_distance">Totale afstand:</string>
|
||||
<string name="visited_locations">Bezochte locaties:</string>
|
||||
<string name="total_time">Totale tijd:</string>
|
||||
<string name="coupons_collected">Coupons gespaard:</string>
|
||||
<string name="statistics">Statistics</string>
|
||||
<string name="settings">Settings</string>
|
||||
<string name="language">Language</string>
|
||||
<string name="imperial_system">Imperial system</string>
|
||||
<string name="_65_mode">65+ mode</string>
|
||||
<string name="colorblind">Colorblind</string>
|
||||
<string name="total_distance">Total distance:</string>
|
||||
<string name="visited_locations">Visited locations:</string>
|
||||
<string name="total_time">Total time:</string>
|
||||
<string name="coupons_collected">Coupons collected:</string>
|
||||
<string name="coupons">Coupons</string>
|
||||
<string name="start_route">Start Route</string>
|
||||
<string name="activate_question">Are you sure you want to activate this coupon?</string>
|
||||
<string name="activate">activate</string>
|
||||
<string name="done">Done</string>
|
||||
<string name="cancel">cancel</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user