Updated string resources

This commit is contained in:
Pau 2025-05-23 00:29:53 +02:00
parent c22c091469
commit 83a02ba6ed
5 changed files with 33 additions and 27 deletions

View File

@ -203,17 +203,15 @@ public class AddNewPlaceActivity extends AppCompatActivity implements View.OnCli
String filename = json.getJSONObject("file").getString("filename");
imageUrl = BASE_URL + "public/" + filename;
jsonString = "[\"" + imageUrl + "\"]";
Helper.makeSnackBar(rlAddPlace, "Image uploaded successfully");
Helper.makeSnackBar(rlAddPlace, getString(R.string.image_uploaded_successfully));
btnSubmit.setClickable(true);
} else {
Helper.makeSnackBar(rlAddPlace, "Upload failed");
Helper.makeSnackBar(rlAddPlace, getString(R.string.upload_failed));
btnSubmit.setClickable(true);
Log.d(TAG, "btnSubmit : TRUE");
}
} catch (JSONException e) {
Helper.makeSnackBar(rlAddPlace, "Response parsing error");
Helper.makeSnackBar(rlAddPlace, getString(R.string.response_parsing_error));
btnSubmit.setClickable(true);
Log.d(TAG, "btnSubmit : TRUE");
Log.e(TAG, "Failed to parse JSON", e);
}
}
@ -222,7 +220,6 @@ public class AddNewPlaceActivity extends AppCompatActivity implements View.OnCli
public void onError(String message) {
Helper.makeSnackBar(rlAddPlace, "Upload failed: " + message);
btnSubmit.setClickable(true);
Log.d(TAG, "btnSubmit : TRUE");
Log.e(TAG, "Upload error:" + message);
}
});

View File

@ -227,16 +227,15 @@ public class AddReportActivity extends AppCompatActivity implements View.OnClick
String filename = json.getJSONObject("file").getString("filename");
imageUrl = BASE_URL + "public/" + filename;
jsonString = "[\"" + imageUrl + "\"]";
Helper.makeSnackBar(rlAddReport, "Image uploaded successfully");
Helper.makeSnackBar(rlAddReport, getString(R.string.image_uploaded_successfully));
btnSubmit.setClickable(true);
} else {
Helper.makeSnackBar(rlAddReport, "Upload failed");
Helper.makeSnackBar(rlAddReport, getString(R.string.upload_failed));
btnSubmit.setClickable(true);
}
} catch (JSONException e) {
Helper.makeSnackBar(rlAddReport, "Response parsing error");
Helper.makeSnackBar(rlAddReport, getString(R.string.response_parsing_error));
btnSubmit.setClickable(true);
Log.d(TAG, "btnSubmit : TRUE");
Log.e(TAG, "Failed to parse JSON", e);
}
}

View File

@ -450,11 +450,11 @@ public class MapFragment extends Fragment {
} else {
// No close places found
if (isAdded() && getContext() != null) {
Helper.makeSnackBar(rlMap, "No places found near this location");
Helper.makeSnackBar(rlMap, getString(R.string.no_places_found_near_this_location));
}
}
} else {
Helper.makeSnackBar(rlMap, "Location not found");
Helper.makeSnackBar(rlMap, getString(R.string.location_not_found));
}
} catch (IOException e) {
Log.d(TAG, getString(R.string.Something_went_wrong_Try_again));

View File

@ -165,6 +165,11 @@
<string name="tap_to_add_photo">Toca para añadir foto</string>
<string name="location_details">Más información</string>
<string name="additional_information">Más información</string>
<string name="image_uploaded_successfully">Imagen subida con éxito</string>
<string name="upload_failed">Subida de archivo fallida</string>
<string name="response_parsing_error">Error de análisis</string>
<string name="no_places_found_near_this_location">Ningún lugar encontrado cerca de esta dirección</string>
<string name="location_not_found">Lugar no encontrado</string>
</resources>

View File

@ -76,64 +76,64 @@
<string name="Login_failed">Login failed</string>
<string name="Invalid_Credentials_Please_try_again">Invalid Credentials. Please try again.</string>
<string name="Login_Successful">Login Successful</string>
<string name="Please_wait">Please wait...</string>
<string name="Please_wait">Please wait…</string>
<string name="User_already_exists_Please_login">"User already exists. Please login.</string>
<string name="Profile_Updated_Successfully">Profile Updated Successfully!</string>
<string name="Registration_Successful">Registration Successful</string>
<string name="Try_again_later">Try again later</string>
<string name="Update_Failed">Update Failed </string>
<string name="Something_went_wrong_Try_again">Something went wrong. Try again.</string>
<string name="Updating">Updating...</string>
<string name="Updating">Updating…</string>
<string name="Invalid_old_password">Invalid old password</string>
<string name="Network_error_Try_again">Network error. Try again.</string>
<string name="Changing_password">Changing password...</string>
<string name="Changing_password">Changing password…</string>
<string name="Password_updated_successfully">Password updated successfully!</string>
<string name="Password_update_failed">Password update failed.</string>
<string name="Verifying_old_password">Verifying old password...</string>
<string name="Verifying_old_password">Verifying old password…</string>
<string name="Change_Role_to">change Role to </string>
<string name="Updating_Role">Updating Roles...</string>
<string name="Updating_Role">Updating Roles…</string>
<string name="User_Role_update_successfully">User Role updated successfully!</string>
<string name="Update_failed_Server_error_Try_again">Update failed. Server error. Try again</string>
<string name="Rating_BAD">Rating: BAD</string>
<string name="Rating_AVERAGE">Rating: AVERAGE</string>
<string name="Rating_GOOD">Rating: GOOD</string>
<string name="Delete_report">Delete report</string>
<string name="Removing_Report">Removing Report...</string>
<string name="Removing_Report">Removing Report…</string>
<string name="Report_removed">Report removed!</string>
<string name="Failed_to_remove_report">Failed to remove report</string>
<string name="Removing_from_favorites">Removing from favorites...</string>
<string name="Removing_from_favorites">Removing from favorites…</string>
<string name="Favorite_removed">Favorite removed</string>
<string name="Failed_to_remove_Favorite">Failed to remove Favorite</string>
<string name="Loading_Favorites">Loading favorites...</string>
<string name="Loading_Favorites">Loading favorites…</string>
<string name="No_Favorite_found">No Favorite found.</string>
<string name="Failed_to_load_favorite_Try_again">Failed to load favorite. Try again.</string>
<string name="Location_permission_is_required">Location permission is required</string>
<string name="Failed_to_load_places">Failed to load places</string>
<string name="Loading_reports">Loading reports...</string>
<string name="Loading_reports">Loading reports…</string>
<string name="No_reports_found">No reports found.</string>
<string name="Failed_to_load_reports_Try_again.">Failed to load reports. Try again.</string>
<string name="Place_updated_successfully">Place updated successfully!</string>
<string name="Updating_place">Updating place...</string>
<string name="Updating_place">Updating place…</string>
<string name="Place_inserted_successfully">Place inserted successfully!</string>
<string name="Failed_to_extract_place_Try_again">Failed to extract place.Try again</string>
<string name="Insert_failed_Server_error">Insert failed. Server error.</string>
<string name="Report_submission_failed_Try_again">Report submission failed. Try again</string>
<string name="Report_submitted_successfully">Report submitted successfully!</string>
<string name="Please_select_rating">Please select rating!</string>
<string name="Updating_report">Updating report...</string>
<string name="Updating_report">Updating report…</string>
<string name="Report_updated_successfully">Report updated successfully!</string>
<string name="Failed_to_load_users_Try_again">Failed to load users. Try again.</string>
<string name="No_users_found">No users found</string>
<string name="Loading_users">Loading users...</string>
<string name="Adding_to_favorites">Adding to favorites...</string>
<string name="Loading_users">Loading users…</string>
<string name="Adding_to_favorites">Adding to favorites…</string>
<string name="Place_added_to_favorites">Place added to favorites!</string>
<string name="Failed_to_add_favorite_Server_error">Failed to add favorite. Server error.</string>
<string name="Restoring_favorite">Restoring favorite...</string>
<string name="Restoring_favorite">Restoring favorite…</string>
<string name="Place_restored_to_favorites">Place restored to favorites!</string>
<string name="Failed_to_restore_favorite">Failed to restore favorite.</string>
<string name="Removed_from_favorites">Removed from favorites</string>
<string name="Failed_to_remove_from_favorites">Failed to remove from favorites</string>
<string name="Checking_favorite_status">Checking favorite status...</string>
<string name="Checking_favorite_status">Checking favorite status…</string>
<!-- <string name="Logout">Logout</string>-->
<!-- <string name="Logout">Logout</string>-->
<!-- <string name="Logout">Logout</string>-->
@ -168,6 +168,11 @@
<string name="no_reports_yet">No reports about this place yet</string>
<string name="details">Details</string>
<string name="add_to_favorites">Add to favorites</string>
<string name="image_uploaded_successfully">Image uploaded successfully</string>
<string name="upload_failed">Upload failed</string>
<string name="response_parsing_error">Response parsing error</string>
<string name="no_places_found_near_this_location">No places found near this location</string>
<string name="location_not_found">Location not found</string>
</resources>