Skip to content

Commit

Permalink
Show percentage of verified places
Browse files Browse the repository at this point in the history
  • Loading branch information
bubelov committed Jul 31, 2023
1 parent 9ac260b commit 5bd5e0d
Show file tree
Hide file tree
Showing 35 changed files with 7 additions and 40 deletions.
10 changes: 5 additions & 5 deletions app/src/main/kotlin/reports/ReportsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class ReportsFragment : Fragment() {
reports.map {
Pair(
it.date.toString(),
it.tags["up_to_date_elements"]?.jsonPrimitive?.longOrNull ?: 0,
(it.tags["up_to_date_elements"]?.jsonPrimitive?.longOrNull ?: 0).toFloat(),
)
},
)
Expand All @@ -92,7 +92,7 @@ class ReportsFragment : Fragment() {
reports.map {
Pair(
it.date.toString(),
it.tags["total_elements"]?.jsonPrimitive?.longOrNull ?: 0,
(it.tags["total_elements"]?.jsonPrimitive?.longOrNull ?: 0).toFloat(),
)
},
)
Expand All @@ -102,7 +102,7 @@ class ReportsFragment : Fragment() {
reports.map {
Pair(
it.date.toString(),
it.tags["legacy_elements"]?.jsonPrimitive?.longOrNull ?: 0,
(it.tags["up_to_date_elements"]?.jsonPrimitive?.longOrNull ?: 0).toFloat() / (it.tags["total_elements"]?.jsonPrimitive?.longOrNull ?: 0).toFloat() * 100,
)
},
)
Expand Down Expand Up @@ -159,15 +159,15 @@ class ReportsFragment : Fragment() {
}
}

private fun show(chart: LineChart, data: List<Pair<String, Long>>) {
private fun show(chart: LineChart, data: List<Pair<String, Float>>) {
val values = mutableListOf<Entry>()

for (item in data) {
values.add(
Entry(
OffsetDateTime.parse(item.first + "T00:00:00Z").toInstant().toEpochMilli()
.toFloat(),
item.second.toFloat(),
item.second,
null,
)
)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_reports.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/legacy_places"
android:text="Percentage of verified places"
android:textAppearance="?attr/textAppearanceHeadline6" />

</LinearLayout>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-af/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-bn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">Nemáš kompatibilní peněženku</string>
<string name="communities">Komunity</string>
<string name="latest_changes">Poslední změny</string>
<string name="legacy_places">Zastaralá místa</string>
<string name="tip">⚡ Spropitné</string>
<string name="osm_copyright">© Přispěvatelé OpenStreetMap</string>
<string name="view_on_osm">Ukaž na OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">Du hast keine kompatible Wallet</string>
<string name="communities">Gemeinschaften</string>
<string name="latest_changes">Letzte Änderungen</string>
<string name="legacy_places">Veraltete Standorte</string>
<string name="tip">⚡ Spenden</string>
<string name="osm_copyright">© OpenStreetMap Mitwirkende</string>
<string name="view_on_osm">In OSM ansehen</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">Δεν διαθέτετε συμβατό πορτοφόλι</string>
<string name="communities">Κοινότητες</string>
<string name="latest_changes">Τελευταίες αλλαγές</string>
<string name="legacy_places">Παλιές τοποθεσίες</string>
<string name="tip">⚡ Φιλοδώρημα</string>
<string name="osm_copyright">© Συνεισφέροντες στο OpenStreetMap </string>
<string name="view_on_osm">Προβολή στο OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">No tienes una cartera compatible</string>
<string name="communities">Comunidades</string>
<string name="latest_changes">Últimos cambios</string>
<string name="legacy_places">Lugares sin actualizar</string>
<string name="tip" tools:ignore="ExtraTranslation">Propina ⚡</string>
<string name="osm_copyright">© Colaboradores de OpenStreetMap</string>
<string name="view_on_osm">Ver en OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">Vous n\'avez pas un porte-feuille compatible</string>
<string name="communities">Communautés</string>
<string name="latest_changes">Derniers changements</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">Voir sur OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-hi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-iw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ko/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-no/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ro/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">У вас не установленно совместимых кошельков</string>
<string name="communities">Сообщества</string>
<string name="latest_changes">Последние правки</string>
<string name="legacy_places">Ненадежные места</string>
<string name="tip">⚡ На чай</string>
<string name="osm_copyright">© Пользователи OpenStreetMap</string>
<string name="view_on_osm">Открыть на OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-sr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-sv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-th/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">คุณไม่มีกระเป๋าเงินที่เข้ากันได้</string>
<string name="communities">ชุมชน</string>
<string name="latest_changes">การเปลี่ยนแปลงล่าสุด</string>
<string name="legacy_places">สถานที่มรดก</string>
<string name="tip">⚡ เคล็ดลับ</string>
<string name="osm_copyright">© OpenStreetMap ผู้ให้ข้อมูล</string>
<string name="view_on_osm">เปิดดู OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">Uyumlu bir cüzdanınız yok</string>
<string name="communities">Topluluklar</string>
<string name="latest_changes">Son değişiklikler</string>
<string name="legacy_places">Eski yerler</string>
<string name="tip">⚡ İpucu</string>
<string name="osm_copyright">© OpenStreetMap katkıda bulunanlar</string>
<string name="view_on_osm">OSM\'de görüntüle</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-uk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ur/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-vi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
<string name="search_here">Search here</string>
<string name="settings">Settings</string>
<string name="trends">Trends</string>
<string name="up_to_date_places">Up-to-date places</string>
<string name="up_to_date_places">Verified places</string>
<string name="total_places">Total places</string>
<string name="pay">Pay</string>
<string name="you_dont_have_a_compatible_wallet">You don\'t have a compatible wallet</string>
<string name="communities">Communities</string>
<string name="latest_changes">Latest changes</string>
<string name="legacy_places">Legacy places</string>
<string name="tip">⚡ Tip</string>
<string name="osm_copyright">© OpenStreetMap contributors</string>
<string name="view_on_osm">View on OSM</string>
Expand Down

0 comments on commit 5bd5e0d

Please sign in to comment.