diff --git a/Les Horaires/src/main/java/com/amine/horaires/ShopSearch.java b/Les Horaires/src/main/java/com/amine/horaires/ShopSearch.java index 0935c04..9bde0b8 100644 --- a/Les Horaires/src/main/java/com/amine/horaires/ShopSearch.java +++ b/Les Horaires/src/main/java/com/amine/horaires/ShopSearch.java @@ -57,7 +57,7 @@ public class ShopSearch extends OptionsActivity { @Override public void gotLocation(Location location) { if (location == null) { - Toast.makeText(getApplicationContext(), "Petit soucis lors de la localisation", Toast.LENGTH_SHORT).show(); + Toast.makeText(getApplicationContext(), getResources().getString(R.string.fail_localize_user), Toast.LENGTH_SHORT).show(); } else { URL url = Utils.generateUrlForLatLng(name.getText().toString(), location.getLatitude() + "", location.getLongitude() + ""); SearchTask s = new SearchTask(); @@ -69,7 +69,7 @@ public class ShopSearch extends OptionsActivity { boolean gotLocation = myLocation.getLocation(getApplicationContext(), locationResult); if (!gotLocation) { - Toast.makeText(getApplicationContext(), "Erreur de localisation.", Toast.LENGTH_SHORT).show(); + Toast.makeText(getApplicationContext(), getResources().getString(R.string.fail_localize_user), Toast.LENGTH_SHORT).show(); } } }); diff --git a/Les Horaires/src/main/java/com/amine/horaires/ShopUpdate.java b/Les Horaires/src/main/java/com/amine/horaires/ShopUpdate.java index a735c4f..09c35e1 100644 --- a/Les Horaires/src/main/java/com/amine/horaires/ShopUpdate.java +++ b/Les Horaires/src/main/java/com/amine/horaires/ShopUpdate.java @@ -138,7 +138,7 @@ public class ShopUpdate extends OptionsActivity { protected void onPostExecute(String string) { loading.setVisibility(View.GONE); super.onPostExecute(string); - Toast.makeText(getApplicationContext(), "Mise à jour effectuée!", Toast.LENGTH_SHORT).show(); + Toast.makeText(getApplicationContext(), getResources().getString(R.string.success_update_shop), Toast.LENGTH_SHORT).show(); } } } diff --git a/Les Horaires/src/main/java/com/amine/horaires/UpdateAdapter.java b/Les Horaires/src/main/java/com/amine/horaires/UpdateAdapter.java index e0c9681..db21536 100644 --- a/Les Horaires/src/main/java/com/amine/horaires/UpdateAdapter.java +++ b/Les Horaires/src/main/java/com/amine/horaires/UpdateAdapter.java @@ -66,7 +66,7 @@ class UpdateAdapter extends ArrayAdapter { h.setFrom_h(hours); h.setFrom_m(minutes); } else { - Toast.makeText(context, "Merci d'utiliser des tranches de 5 minutes maximum", Toast.LENGTH_SHORT).show(); + Toast.makeText(context, getContext().getResources().getString(R.string.time_slot_error), Toast.LENGTH_SHORT).show(); } } }, h.getFrom_h(), h.getFrom_m(), true); @@ -85,7 +85,7 @@ class UpdateAdapter extends ArrayAdapter { h.setTo_h(hours); h.setTo_m(minutes); } else { - Toast.makeText(context, "Merci d'utiliser des tranches de 5 minutes maximum", Toast.LENGTH_SHORT).show(); + Toast.makeText(context, getContext().getResources().getString(R.string.time_slot_error), Toast.LENGTH_SHORT).show(); } } }, h.getTo_h(), h.getTo_m(), true); diff --git a/Les Horaires/src/main/res/values-v21/strings.xml b/Les Horaires/src/main/res/values-v21/strings.xml index 646775c..e7c14bd 100644 --- a/Les Horaires/src/main/res/values-v21/strings.xml +++ b/Les Horaires/src/main/res/values-v21/strings.xml @@ -26,6 +26,9 @@ OK Plus… Contacter le dev + Merci d'utiliser des tranches de 5 minutes maximum + Mise à jour effectuée! + Petit soucis lors de la localisation Lundi Mardi diff --git a/Les Horaires/src/main/res/values/strings.xml b/Les Horaires/src/main/res/values/strings.xml index d8ce2bb..4902855 100644 --- a/Les Horaires/src/main/res/values/strings.xml +++ b/Les Horaires/src/main/res/values/strings.xml @@ -25,6 +25,9 @@ OK Plus… Contacter le dev + Merci d'utiliser des tranches de 5 minutes maximum + Mise à jour effectuée! + Petit soucis lors de la localisation Lundi Mardi