mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Compare commits
4 commits
f32fcd5b38
...
bb3ef131bc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb3ef131bc | ||
|
|
fdfd7781e9 | ||
|
|
6e090c8d7a | ||
|
|
64882ca27c |
4 changed files with 41 additions and 4 deletions
|
|
@ -708,8 +708,17 @@ public class ExploreMapFragment extends CommonsDaggerSupportFragment
|
|||
GeoPoint point = new GeoPoint(
|
||||
nearbyBaseMarker.getPlace().location.getLatitude(),
|
||||
nearbyBaseMarker.getPlace().location.getLongitude());
|
||||
OverlayItem item = new OverlayItem(nearbyBaseMarker.getPlace().name, null,
|
||||
point);
|
||||
|
||||
Media markerMedia = this.getMediaFromImageURL(nearbyBaseMarker.getPlace().pic);
|
||||
String authorUser = null;
|
||||
if (markerMedia != null) {
|
||||
authorUser = markerMedia.getAuthorOrUser();
|
||||
// HTML text is sometimes part of the author string and needs to be removed
|
||||
authorUser = Html.fromHtml(authorUser, Html.FROM_HTML_MODE_LEGACY).toString();
|
||||
}
|
||||
|
||||
OverlayItem item = new OverlayItem(nearbyBaseMarker.getPlace().name,
|
||||
authorUser, point);
|
||||
item.setMarker(d);
|
||||
items.add(item);
|
||||
ItemizedOverlayWithFocus overlay = new ItemizedOverlayWithFocus(items,
|
||||
|
|
@ -740,6 +749,26 @@ public class ExploreMapFragment extends CommonsDaggerSupportFragment
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the specific Media object from the mediaList field.
|
||||
* @param url The specific Media's image URL.
|
||||
* @return The Media object that matches the URL or null if it could not be found.
|
||||
*/
|
||||
private Media getMediaFromImageURL(String url) {
|
||||
if (mediaList == null || url == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (int i = 0; i < mediaList.size(); i++) {
|
||||
if (mediaList.get(i) != null && mediaList.get(i).getImageUrl() != null
|
||||
&& mediaList.get(i).getImageUrl().equals(url)) {
|
||||
return mediaList.get(i);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a marker from the map based on the specified NearbyBaseMarker.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package fr.free.nrw.commons.nearby.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import java.util.Locale
|
||||
|
||||
class ResultTuple {
|
||||
@SerializedName("xml:lang")
|
||||
|
|
@ -15,7 +16,7 @@ class ResultTuple {
|
|||
}
|
||||
|
||||
constructor() {
|
||||
language = "bug" // Basa Ugi language - TODO Respect the `Default description language` setting.
|
||||
language = Locale.getDefault().language
|
||||
type = ""
|
||||
value = ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -853,8 +853,14 @@
|
|||
<string name="usages_on_other_wikis_heading">Autres wikis</string>
|
||||
<string name="bullet_point">•</string>
|
||||
<string name="file_usages_container_heading">Utilisations du fichier</string>
|
||||
<string name="title_activity_single_web_view">SingleWebViewActivity</string>
|
||||
<string name="account">Compte</string>
|
||||
<string name="vanish_account">Faire disparaître le compte</string>
|
||||
<string name="account_vanish_request_confirm_title">Avertissement de disparition du compte</string>
|
||||
<string name="account_vanish_request_confirm">La disparition est un <b>dernier recours</b> et ne devrait être <b>utilisée que quand vous voulez arrêter d’éditer pour toujours</b> et aussi pour cacher autant que possible vos associations passées.<br/><br/>La suppression de compte sur Wikimedia Commons se fait en changeant le nom de votre compte de sorte que les autres ne peuvent pas identifier vos contributions, lors d’un processus appelé disparition du compte. <b>La disparition ne garantit pas l’anonymat complet ni ne supprime les contributions de vos projets</b>.</string>
|
||||
<string name="caption">Légende</string>
|
||||
<string name="caption_copied_to_clipboard">Légende copiée dans le presse-papier</string>
|
||||
<string name="congratulations_all_pictures_in_this_album_have_been_either_uploaded_or_marked_as_not_for_upload">Félicitations, toutes les images dans cet album ont été soit téléchargées soit marquées comme non téléchargeables.</string>
|
||||
<string name="show_in_explore">Afficher dans Explorer</string>
|
||||
<string name="show_in_nearby">Afficher à proximité</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Authors:
|
||||
* AguzulH
|
||||
* Brahim-essaidi
|
||||
* Hakim1bal
|
||||
-->
|
||||
|
|
@ -79,7 +80,7 @@
|
|||
<string name="Profile">ⵉⴼⵔⵙ</string>
|
||||
<string name="statistics">ⵉⵙⵉⴹⵏⵏ</string>
|
||||
<string name="title_app_shortcut_setting">ⵜⵉⵙⵖⴰⵍ</string>
|
||||
<string name="leaderboard_column_user">ⴰⵏⵙⵙⵎⵔⵙ</string>
|
||||
<string name="leaderboard_column_user">ⴰⵏⵙⵎⵔⴰⵙ</string>
|
||||
<string name="leaderboard_column_count">ⵙⵙⵉⴹⵏ</string>
|
||||
<string name="leaderboard_yearly">ⴰⵙⴳⵯⵙⴰⵏ</string>
|
||||
<string name="leaderboard_weekly">ⴰⵏⵎⵍⴰⵙⵙ</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue