Quelques chaines ne sont pas internationalise

This commit is contained in:
Hugo 2015-06-13 13:55:04 +02:00
parent 07c4b3290a
commit 5f0eb67380
5 changed files with 11 additions and 5 deletions

View File

@ -56,7 +56,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();
@ -68,7 +68,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();
}
}
});

View File

@ -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();
}
}
}

View File

@ -66,7 +66,7 @@ class UpdateAdapter extends ArrayAdapter<Horaires> {
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<Horaires> {
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);

View File

@ -26,6 +26,9 @@
<string name="changelog_ok_button">OK</string>
<string name="changelog_show_full">Plus…</string>
<string name="contact">Contacter le dev</string>
<string name="time_slot_error">Merci d'utiliser des tranches de 5 minutes maximum</string>
<string name="success_update_shop">Mise à jour effectuée!</string>
<string name="fail_localize_user">Petit soucis lors de la localisation</string>
<string-array name="days_arrays">
<item>Lundi</item>
<item>Mardi</item>

View File

@ -25,6 +25,9 @@
<string name="changelog_ok_button">OK</string>
<string name="changelog_show_full">Plus…</string>
<string name="contact">Contacter le dev</string>
<string name="time_slot_error">Merci d'utiliser des tranches de 5 minutes maximum</string>
<string name="success_update_shop">Mise à jour effectuée!</string>
<string name="fail_localize_user">Petit soucis lors de la localisation</string>
<string-array name="days_arrays">
<item>Lundi</item>
<item>Mardi</item>