From bab02a6d5493901fc3832769e20038bd2644c137 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Sat, 19 Dec 2020 23:07:31 +0200 Subject: [PATCH 01/78] Add show saved articles without obf file --- .../plus/wikivoyage/data/TravelArticle.java | 1 + .../data/TravelLocalDataHelper.java | 33 +++++++++++++++---- .../plus/wikivoyage/data/TravelObfHelper.java | 5 ++- .../explore/SavedArticlesTabFragment.java | 5 +-- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java index a559f3cf0f..22fe357fcf 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java @@ -33,6 +33,7 @@ public class TravelArticle { String lang; String contentsJson; String aggregatedPartOf; + String fullContent; public String getTitle() { diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java index d64bed4ebe..881f6cba02 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java @@ -9,7 +9,6 @@ import net.osmand.plus.api.SQLiteAPI.SQLiteConnection; import net.osmand.plus.api.SQLiteAPI.SQLiteCursor; import net.osmand.plus.wikipedia.WikiArticleHelper; -import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -119,6 +118,7 @@ public class TravelLocalDataHelper { saved.lat = article.lat; saved.lon = article.lon; saved.routeId = article.routeId; + saved.fullContent = article.getContent(); savedArticles.add(saved); dbHelper.addSavedArticle(saved); notifySavedUpdated(); @@ -162,6 +162,17 @@ public class TravelLocalDataHelper { return null; } + @Nullable + public TravelArticle getSavedArticle(String routeId) { + for (TravelArticle article : savedArticles) { + if (article.routeId != null && article.routeId.equals(routeId)) { + article.content = article.fullContent; + return article; + } + } + return null; + } + public interface Listener { void savedArticlesUpdated(); @@ -169,7 +180,7 @@ public class TravelLocalDataHelper { private static class WikivoyageLocalDataDbHelper { - private static final int DB_VERSION = 5; + private static final int DB_VERSION = 6; private static final String DB_NAME = "wikivoyage_local_data"; private static final String HISTORY_TABLE_NAME = "wikivoyage_search_history"; @@ -204,6 +215,7 @@ public class TravelLocalDataHelper { private static final String BOOKMARKS_COL_LAT = "lat"; private static final String BOOKMARKS_COL_LON = "lon"; private static final String BOOKMARKS_COL_ROUTE_ID = "route_id"; + private static final String BOOKMARKS_COL_CONTENT = "content"; private static final String BOOKMARKS_TABLE_CREATE = "CREATE TABLE IF NOT EXISTS " + BOOKMARKS_TABLE_NAME + " (" + @@ -215,7 +227,8 @@ public class TravelLocalDataHelper { BOOKMARKS_COL_TRAVEL_BOOK + " TEXT, " + BOOKMARKS_COL_LAT + " double, " + BOOKMARKS_COL_LON + " double, " + - BOOKMARKS_COL_ROUTE_ID + " TEXT" + ");"; + BOOKMARKS_COL_ROUTE_ID + " TEXT, " + + BOOKMARKS_COL_CONTENT + " TEXT" + ");"; private static final String BOOKMARKS_TABLE_SELECT = "SELECT " + BOOKMARKS_COL_ARTICLE_TITLE + ", " + @@ -225,7 +238,8 @@ public class TravelLocalDataHelper { BOOKMARKS_COL_PARTIAL_CONTENT + ", " + BOOKMARKS_COL_LAT + ", " + BOOKMARKS_COL_LON + ", " + - BOOKMARKS_COL_ROUTE_ID + + BOOKMARKS_COL_ROUTE_ID + ", " + + BOOKMARKS_COL_CONTENT + " FROM " + BOOKMARKS_TABLE_NAME; private final OsmandApplication context; @@ -278,6 +292,9 @@ public class TravelLocalDataHelper { if (oldVersion < 5) { conn.execSQL("ALTER TABLE " + BOOKMARKS_TABLE_NAME + " ADD " + BOOKMARKS_COL_ROUTE_ID + " TEXT"); } + if (oldVersion < 6) { + conn.execSQL("ALTER TABLE " + BOOKMARKS_TABLE_NAME + " ADD " + BOOKMARKS_COL_CONTENT + " TEXT"); + } } @NonNull @@ -428,11 +445,12 @@ public class TravelLocalDataHelper { BOOKMARKS_COL_TRAVEL_BOOK + ", " + BOOKMARKS_COL_LAT + ", " + BOOKMARKS_COL_LON + ", " + - BOOKMARKS_COL_ROUTE_ID + - ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"; + BOOKMARKS_COL_ROUTE_ID + ", " + + BOOKMARKS_COL_CONTENT + + ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; conn.execSQL(query, new Object[]{article.title, article.lang, article.aggregatedPartOf, article.imageTitle, article.content, - travelBook, article.lat, article.lon, article.routeId}); + travelBook, article.lat, article.lon, article.routeId, article.fullContent}); } finally { conn.close(); } @@ -484,6 +502,7 @@ public class TravelLocalDataHelper { res.lat = cursor.getDouble(cursor.getColumnIndex(BOOKMARKS_COL_LAT)); res.lon = cursor.getDouble(cursor.getColumnIndex(BOOKMARKS_COL_LON)); res.routeId = cursor.getString(cursor.getColumnIndex(BOOKMARKS_COL_ROUTE_ID)); + res.fullContent = cursor.getString(cursor.getColumnIndex(BOOKMARKS_COL_CONTENT)); return res; } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java index c760baa04b..2ff29d1a33 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java @@ -169,9 +169,12 @@ public class TravelObfHelper implements TravelHelper { TravelArticle article = cachedArticles.get(routeId); if (article != null) { return article; - } else { + } + article = getArticleByIdFromTravelBooks(routeId, lang); + if (article != null) { return getArticleByIdFromTravelBooks(routeId, lang); } + return localDataHelper.getSavedArticle(routeId); } public TravelArticle getArticleByIdFromTravelBooks(final String routeId, final String lang) { diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java index 3bcb969f47..bb058c04e0 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java @@ -50,7 +50,7 @@ public class SavedArticlesTabFragment extends BaseOsmAndFragment implements Trav public void openArticle(TravelArticle article) { FragmentManager fm = getFragmentManager(); if (fm != null) { - WikivoyageArticleDialogFragment.showInstanceByTitle(app, fm, article.getTitle(), article.getLang()); + WikivoyageArticleDialogFragment.showInstance(app, fm, article.getRouteId(), article.getLang()); } } }); @@ -161,7 +161,8 @@ public class SavedArticlesTabFragment extends BaseOsmAndFragment implements Trav } TravelArticle oldArticle = (TravelArticle) oldItem; TravelArticle newArticle = (TravelArticle) newItem; - return oldArticle.getRouteId().equals(newArticle.getRouteId()) + return oldArticle.getRouteId() != null && newArticle.getRouteId() != null && + oldArticle.getRouteId().equals(newArticle.getRouteId()) && oldArticle.getLang().equals(newArticle.getLang()); } return false; From a06749b0e397bda55b74cee994b9575cc06c5239 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Mon, 21 Dec 2020 11:02:45 +0200 Subject: [PATCH 02/78] Add language show saved articles --- .../osmand/plus/wikivoyage/data/TravelLocalDataHelper.java | 5 +++-- .../src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java | 2 +- .../plus/wikivoyage/explore/SavedArticlesTabFragment.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java index 881f6cba02..26e6b06582 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java @@ -163,9 +163,10 @@ public class TravelLocalDataHelper { } @Nullable - public TravelArticle getSavedArticle(String routeId) { + public TravelArticle getSavedArticle(String routeId, String lang) { for (TravelArticle article : savedArticles) { - if (article.routeId != null && article.routeId.equals(routeId)) { + if (article.routeId != null && article.routeId.equals(routeId) + && article.lang != null && article.lang.equals(lang)) { article.content = article.fullContent; return article; } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java index 2ff29d1a33..1b94b138ac 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java @@ -174,7 +174,7 @@ public class TravelObfHelper implements TravelHelper { if (article != null) { return getArticleByIdFromTravelBooks(routeId, lang); } - return localDataHelper.getSavedArticle(routeId); + return localDataHelper.getSavedArticle(routeId, lang); } public TravelArticle getArticleByIdFromTravelBooks(final String routeId, final String lang) { diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java index bb058c04e0..14790abfec 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java @@ -161,7 +161,7 @@ public class SavedArticlesTabFragment extends BaseOsmAndFragment implements Trav } TravelArticle oldArticle = (TravelArticle) oldItem; TravelArticle newArticle = (TravelArticle) newItem; - return oldArticle.getRouteId() != null && newArticle.getRouteId() != null && + return oldArticle.getRouteId() != null && oldArticle.getLang() != null && oldArticle.getRouteId().equals(newArticle.getRouteId()) && oldArticle.getLang().equals(newArticle.getLang()); } From 01ea9d599842ba9f5862f45d1b6531e1e4dd3742 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Mon, 21 Dec 2020 15:30:57 +0200 Subject: [PATCH 03/78] Fix check empty first paragraph in the wiki article --- OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java index 9caf70d5b9..b4f21895f4 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java @@ -301,7 +301,7 @@ public class WikiArticleHelper { return null; } String firstParagraphHtml = content.substring(firstParagraphStart, firstParagraphEnd + P_CLOSED.length()); - while (firstParagraphHtml.length() == (P_OPENED.length() + P_CLOSED.length()) + while (firstParagraphHtml.substring(P_OPENED.length(), firstParagraphHtml.length() - P_CLOSED.length()).trim().isEmpty() && (firstParagraphEnd + P_CLOSED.length()) < content.length()) { firstParagraphStart = content.indexOf(P_OPENED, firstParagraphEnd); firstParagraphEnd = firstParagraphStart == -1 ? -1 : content.indexOf(P_CLOSED, firstParagraphStart); From 7944fc3a2b504b06796b095ad93e22ada12f36e5 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Tue, 22 Dec 2020 19:23:32 +0200 Subject: [PATCH 04/78] Fix Wikivoyage Card to suggest download maps --- .../net/osmand/plus/download/DownloadResources.java | 2 +- .../net/osmand/plus/wikipedia/WikiArticleHelper.java | 2 +- .../osmand/plus/wikivoyage/data/TravelDbHelper.java | 6 ++++++ .../osmand/plus/wikivoyage/data/TravelHelper.java | 2 ++ .../osmand/plus/wikivoyage/data/TravelObfHelper.java | 11 +++++++++-- .../plus/wikivoyage/explore/ExploreTabFragment.java | 12 +----------- .../explore/WikivoyageExploreActivity.java | 7 ++++++- 7 files changed, 26 insertions(+), 16 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java index 2bff73d7b2..b66ca9c467 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java @@ -80,7 +80,7 @@ public class DownloadResources extends DownloadResourceGroup { List items = getWikivoyageItems(); if (items != null) { for (IndexItem ii : items) { - if (ii.getFileName().equals(fileName)) { + if (ii.getTargetFile(app).getName().equals(fileName)) { return ii; } } diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java index 9caf70d5b9..b4f21895f4 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikiArticleHelper.java @@ -301,7 +301,7 @@ public class WikiArticleHelper { return null; } String firstParagraphHtml = content.substring(firstParagraphStart, firstParagraphEnd + P_CLOSED.length()); - while (firstParagraphHtml.length() == (P_OPENED.length() + P_CLOSED.length()) + while (firstParagraphHtml.substring(P_OPENED.length(), firstParagraphHtml.length() - P_CLOSED.length()).trim().isEmpty() && (firstParagraphEnd + P_CLOSED.length()) < content.length()) { firstParagraphStart = content.indexOf(P_OPENED, firstParagraphEnd); firstParagraphEnd = firstParagraphStart == -1 ? -1 : content.indexOf(P_CLOSED, firstParagraphStart); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelDbHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelDbHelper.java index d50d05e42b..ef6dbd921e 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelDbHelper.java @@ -46,6 +46,7 @@ public class TravelDbHelper implements TravelHelper { private static final Log LOG = PlatformUtil.getLog(TravelDbHelper.class); + private static final String WORLD_WIKIVOYAGE_FILE_NAME = "World_wikivoyage.sqlite"; private static final String ARTICLES_TABLE_NAME = "travel_articles"; private static final String POPULAR_TABLE_NAME = "popular_articles"; private static final String ARTICLES_POP_INDEX = "popularity_index"; @@ -185,6 +186,11 @@ public class TravelDbHelper implements TravelHelper { return null; } + @Override + public String getWikivoyageFileName() { + return WORLD_WIKIVOYAGE_FILE_NAME; + } + public List getExistingTravelBooks() { return existingTravelBooks; } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelHelper.java index b55c398817..d8112cee0c 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelHelper.java @@ -49,4 +49,6 @@ public interface TravelHelper { // For TravelOBFHelper it could always return "" and should be no problem // Bookmarks should be refactored properly to support multiple files String getSelectedTravelBookName(); + + String getWikivoyageFileName(); } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java index e1dc65ebfd..94d342ddc6 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java @@ -37,8 +37,10 @@ import static net.osmand.CollatorStringMatcher.StringMatcherMode.CHECK_EQUALS_FR public class TravelObfHelper implements TravelHelper { private static final Log LOG = PlatformUtil.getLog(TravelObfHelper.class); - public static final String ROUTE_ARTICLE = "route_article"; - public static final int SEARCH_RADIUS = 100000; + + private static final String WORLD_WIKIVOYAGE_FILE_NAME = "World_wikivoyage.travel.obf"; + private static final String ROUTE_ARTICLE = "route_article"; + private static final int SEARCH_RADIUS = 100000; private final OsmandApplication app; private final Collator collator; @@ -392,4 +394,9 @@ public class TravelObfHelper implements TravelHelper { public String getSelectedTravelBookName() { return ""; } + + @Override + public String getWikivoyageFileName() { + return WORLD_WIKIVOYAGE_FILE_NAME; + } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java index 22310e4292..c53027fb7a 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java @@ -45,8 +45,6 @@ import java.util.List; public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadEvents, TravelLocalDataHelper.Listener { - private static final String WORLD_WIKIVOYAGE_FILE_NAME = "World_wikivoyage.sqlite"; - private static boolean SHOW_TRAVEL_UPDATE_CARD = true; private static boolean SHOW_TRAVEL_NEEDED_MAPS_CARD = true; @@ -342,14 +340,6 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadEv return res.toArray(new IndexItem[0]); } - @NonNull - private String getWikivoyageFileName() { -// OsmandApplication app = getMyApplication(); -// File selectedTravelBook = app != null ? app.getTravelDbHelper().getSelectedTravelBook() : null; -// return selectedTravelBook == null ? WORLD_WIKIVOYAGE_FILE_NAME : selectedTravelBook.getName(); - return WORLD_WIKIVOYAGE_FILE_NAME; - } - private void removeDownloadUpdateCard() { if (adapter != null) { adapter.removeDownloadUpdateCard(); @@ -379,7 +369,7 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadEv ProcessIndexItemsTask(ExploreTabFragment fragment) { app = fragment.getMyApplication(); weakFragment = new WeakReference<>(fragment); - fileName = fragment.getWikivoyageFileName(); + fileName = app.getTravelHelper().getWikivoyageFileName(); } @Override diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java index 45047e2e1c..a3522a8329 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java @@ -61,6 +61,7 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv protected List> fragments = new ArrayList<>(); private LockableViewPager viewPager; + private boolean finishDownloading = false; @Override public void onCreate(Bundle savedInstanceState) { @@ -313,10 +314,12 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv public void populateData() { switchProgressBarVisibility(true); + finishDownloading = false; new LoadWikivoyageData(this).execute(); } private void onDataLoaded() { + finishDownloading = true; switchProgressBarVisibility(false); updateSearchBarVisibility(); updateFragments(); @@ -353,7 +356,9 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv } public void onTabFragmentResume(Fragment fragment) { - updateFragments(); + if(finishDownloading) { + updateFragments(); + } } @Override From ca9d2a03f5c2fef3801ad93fe6a20016b4c2291e Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Wed, 23 Dec 2020 15:16:09 +0200 Subject: [PATCH 05/78] Fix bookmark contents --- .../plus/wikivoyage/data/TravelLocalDataHelper.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java index 26e6b06582..3cb7cf776e 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java @@ -119,6 +119,7 @@ public class TravelLocalDataHelper { saved.lon = article.lon; saved.routeId = article.routeId; saved.fullContent = article.getContent(); + saved.contentsJson = article.contentsJson; savedArticles.add(saved); dbHelper.addSavedArticle(saved); notifySavedUpdated(); @@ -216,6 +217,7 @@ public class TravelLocalDataHelper { private static final String BOOKMARKS_COL_LAT = "lat"; private static final String BOOKMARKS_COL_LON = "lon"; private static final String BOOKMARKS_COL_ROUTE_ID = "route_id"; + private static final String BOOKMARKS_COL_CONTENT_JSON = "content_json"; private static final String BOOKMARKS_COL_CONTENT = "content"; private static final String BOOKMARKS_TABLE_CREATE = "CREATE TABLE IF NOT EXISTS " + @@ -229,6 +231,7 @@ public class TravelLocalDataHelper { BOOKMARKS_COL_LAT + " double, " + BOOKMARKS_COL_LON + " double, " + BOOKMARKS_COL_ROUTE_ID + " TEXT, " + + BOOKMARKS_COL_CONTENT_JSON + " TEXT, " + BOOKMARKS_COL_CONTENT + " TEXT" + ");"; private static final String BOOKMARKS_TABLE_SELECT = "SELECT " + @@ -240,6 +243,7 @@ public class TravelLocalDataHelper { BOOKMARKS_COL_LAT + ", " + BOOKMARKS_COL_LON + ", " + BOOKMARKS_COL_ROUTE_ID + ", " + + BOOKMARKS_COL_CONTENT_JSON + ", " + BOOKMARKS_COL_CONTENT + " FROM " + BOOKMARKS_TABLE_NAME; @@ -294,6 +298,7 @@ public class TravelLocalDataHelper { conn.execSQL("ALTER TABLE " + BOOKMARKS_TABLE_NAME + " ADD " + BOOKMARKS_COL_ROUTE_ID + " TEXT"); } if (oldVersion < 6) { + conn.execSQL("ALTER TABLE " + BOOKMARKS_TABLE_NAME + " ADD " + BOOKMARKS_COL_CONTENT_JSON + " TEXT"); conn.execSQL("ALTER TABLE " + BOOKMARKS_TABLE_NAME + " ADD " + BOOKMARKS_COL_CONTENT + " TEXT"); } } @@ -447,11 +452,13 @@ public class TravelLocalDataHelper { BOOKMARKS_COL_LAT + ", " + BOOKMARKS_COL_LON + ", " + BOOKMARKS_COL_ROUTE_ID + ", " + + BOOKMARKS_COL_CONTENT_JSON + ", " + BOOKMARKS_COL_CONTENT + - ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; conn.execSQL(query, new Object[]{article.title, article.lang, article.aggregatedPartOf, article.imageTitle, article.content, - travelBook, article.lat, article.lon, article.routeId, article.fullContent}); + travelBook, article.lat, article.lon, article.routeId, article.contentsJson, + article.fullContent}); } finally { conn.close(); } @@ -503,6 +510,7 @@ public class TravelLocalDataHelper { res.lat = cursor.getDouble(cursor.getColumnIndex(BOOKMARKS_COL_LAT)); res.lon = cursor.getDouble(cursor.getColumnIndex(BOOKMARKS_COL_LON)); res.routeId = cursor.getString(cursor.getColumnIndex(BOOKMARKS_COL_ROUTE_ID)); + res.contentsJson = cursor.getString(cursor.getColumnIndex(BOOKMARKS_COL_CONTENT_JSON)); res.fullContent = cursor.getString(cursor.getColumnIndex(BOOKMARKS_COL_CONTENT)); return res; From f2492b2cbe3471122e0ad8e133c01e3f7adfa75b Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 24 Dec 2020 16:11:01 +0200 Subject: [PATCH 06/78] custom tabs in opr login --- OsmAnd/AndroidManifest.xml | 9 ++++++ OsmAnd/res/layout/activity_opr_webview.xml | 1 + .../net/osmand/plus/helpers/IntentHelper.java | 23 ++++++++++++-- .../openplacereviews/OPRWebviewActivity.java | 21 +++++++++++-- .../openplacereviews/OprStartFragment.java | 31 +++++++++++++------ 5 files changed, 71 insertions(+), 14 deletions(-) diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index 025b1ce53c..2c85514de8 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -475,6 +475,15 @@ + + + + + + + + + diff --git a/OsmAnd/res/layout/activity_opr_webview.xml b/OsmAnd/res/layout/activity_opr_webview.xml index 9e32d56df4..c013975c31 100644 --- a/OsmAnd/res/layout/activity_opr_webview.xml +++ b/OsmAnd/res/layout/activity_opr_webview.xml @@ -24,6 +24,7 @@ + Date: Fri, 25 Dec 2020 11:05:01 +0300 Subject: [PATCH 08/78] Add strings --- OsmAnd/res/values/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 95fc35bcd4..a78818557b 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,11 @@ Thx - Hardy --> + + Allow intermittent water ways + Allow intermittent water ways + Allow streams and drains + Allow streams and drains Prefer hiking routes Prefer hiking routes Last used From f59422728e71e0215a47c952a582755b5e06dba2 Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Fri, 25 Dec 2020 20:46:01 +0000 Subject: [PATCH 09/78] Translated using Weblate (French) Currently translated at 99.9% (3583 of 3584 strings) --- OsmAnd/res/values-fr/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index fc753fd72b..0d6dea35ff 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -3774,7 +3774,7 @@ Indiquez la longueur de votre véhicule, certaines restrictions d\'itinéraire peuvent s\'appliquer aux véhicules longs. Supprimer le prochain point Merci de renseigner un nom pour le point - Utilisez le guide Wikipédia hors ligne. Activez le plugin Wikipédia : des points d\'intérêt seront affichés, ils vous permettrons d\'obtenir des informations sur les lieux qui vous entourent. + Obtenez des informations sur les points d\'intérêt avec les articles Wikipédia, un guide disponible hors-ligne. Télécharger les cartes Wikipédia Scooter Moto enduro @@ -3998,4 +3998,6 @@ Profil OsmAnd Profil utilisateur Inverser tous les points + Sélectionnez le profil utilisé au démarrage de l\'application. + Dernier utilisé \ No newline at end of file From aba009886b72f43bfc107e9322a56ef619f50c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Babos=20G=C3=A1bor?= Date: Thu, 24 Dec 2020 16:29:05 +0000 Subject: [PATCH 10/78] Translated using Weblate (Hungarian) Currently translated at 100.0% (3584 of 3584 strings) --- OsmAnd/res/values-hu/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index ad8a1e9fa4..c081ed7a39 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -4010,4 +4010,7 @@ OsmAnd profil Felhasználói profil Összes pont megfordítása + Rés + Jelölje ki az alkalmazás elindításakor használandó profilt. + Utoljára használt \ No newline at end of file From 3c41e4c037e8a4fa751ce9a3bd756d076f495f22 Mon Sep 17 00:00:00 2001 From: Tymofij Lytvynenko Date: Fri, 25 Dec 2020 17:22:18 +0000 Subject: [PATCH 11/78] Translated using Weblate (Ukrainian) Currently translated at 100.0% (3584 of 3584 strings) --- OsmAnd/res/values-uk/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 72b06030df..a37f617b68 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -3185,7 +3185,7 @@ Дім на колесах Показати на мапі зони низьких викидів. Не впливає на маршрутизацію. Показати зони низьких викидів - Враховувати тимчасові обмеження + Враховувати часові обмеження Усталений Маршрут: відстань %s, час навігації %s \nРозрахунок: %.1f с, %d доріг, %d тайлів) From 0b713effe052076f1fc1328f9dce7bb056ac79c9 Mon Sep 17 00:00:00 2001 From: ace shadow Date: Thu, 24 Dec 2020 14:08:26 +0000 Subject: [PATCH 12/78] Translated using Weblate (Slovak) Currently translated at 100.0% (3584 of 3584 strings) --- OsmAnd/res/values-sk/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index 422e385aca..216eebcf1d 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -4019,4 +4019,6 @@ Profil OsmAnd Profil používateľa Otočiť všetky body + Zvoľte profil, ktorý bude použitý pri štarte aplikácie. + Naposledy použité \ No newline at end of file From 1fdab2ebe05da5ac2e0dbd7afbd0bfe456c0e4a6 Mon Sep 17 00:00:00 2001 From: Ahmad Alfrhood Date: Thu, 24 Dec 2020 10:14:47 +0000 Subject: [PATCH 13/78] Translated using Weblate (Arabic) Currently translated at 100.0% (3584 of 3584 strings) --- OsmAnd/res/values-ar/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml index 54a8a6f3dd..31907c0417 100644 --- a/OsmAnd/res/values-ar/strings.xml +++ b/OsmAnd/res/values-ar/strings.xml @@ -4006,4 +4006,6 @@ ملف تعريف أوسماند ملف تعريف المستخدم عكس جميع النقاط + حدد ملف التعريف، الذي سيتم استخدامه في بدء التطبيق. + آخر استخدام \ No newline at end of file From 706142aada9ae53206bc0167c15c3ffc4b1c1cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Thu, 24 Dec 2020 08:56:51 +0000 Subject: [PATCH 14/78] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 58.6% (2103 of 3584 strings) --- OsmAnd/res/values-nb/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml index aa5dcb1a44..a23068442d 100644 --- a/OsmAnd/res/values-nb/strings.xml +++ b/OsmAnd/res/values-nb/strings.xml @@ -3940,4 +3940,7 @@ OsmAnd-profil Brukerprofil Bedøm + Ressurser + Velg profilen som skal brukes når programmet starter. + Sist brukt \ No newline at end of file From 0d424092b2e73a34e3ba7bb3cb32ccebfba706a0 Mon Sep 17 00:00:00 2001 From: ikmaak Date: Fri, 25 Dec 2020 08:28:25 +0000 Subject: [PATCH 15/78] Translated using Weblate (Dutch) Currently translated at 96.1% (3728 of 3877 strings) --- OsmAnd/res/values-nl/phrases.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-nl/phrases.xml b/OsmAnd/res/values-nl/phrases.xml index 2d1342523a..9f5c6f77d7 100644 --- a/OsmAnd/res/values-nl/phrases.xml +++ b/OsmAnd/res/values-nl/phrases.xml @@ -1267,7 +1267,7 @@ Moeilijk Beginner Expert - Freeride + Gratis rit Klassiek Klassiek en skating Uithoek From fe2d912c641eaf847a73f5cffe0da454ac3f9ac9 Mon Sep 17 00:00:00 2001 From: Eduardo Addad de Oliveira Date: Fri, 25 Dec 2020 02:18:27 +0000 Subject: [PATCH 16/78] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (3584 of 3584 strings) --- OsmAnd/res/values-pt-rBR/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index af7e266361..225a8a8416 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -4014,4 +4014,6 @@ Perfil do OsmAnd Perfil de usuário Reverter todos os pontos + Selecione o perfil que será utilizado na inicialização do aplicativo. + Usado por último \ No newline at end of file From 8430174caef3c200240b7790b160cf4b65512819 Mon Sep 17 00:00:00 2001 From: Eduardo Addad de Oliveira Date: Fri, 25 Dec 2020 02:20:13 +0000 Subject: [PATCH 17/78] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (3877 of 3877 strings) --- OsmAnd/res/values-pt-rBR/phrases.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-pt-rBR/phrases.xml b/OsmAnd/res/values-pt-rBR/phrases.xml index cea52cd7ef..d675321fc8 100644 --- a/OsmAnd/res/values-pt-rBR/phrases.xml +++ b/OsmAnd/res/values-pt-rBR/phrases.xml @@ -3897,4 +3897,5 @@ Balança Posto de guarda florestal Estação de transferência de resíduos + Lavandaria pública \ No newline at end of file From 94dfd675777e746f5f524b4f14d5d7384f015ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 24 Dec 2020 11:42:40 +0000 Subject: [PATCH 18/78] Translated using Weblate (Estonian) Currently translated at 100.0% (3584 of 3584 strings) --- OsmAnd/res/values-et/strings.xml | 44 +++++++++++++++++--------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/OsmAnd/res/values-et/strings.xml b/OsmAnd/res/values-et/strings.xml index 840a2cf452..9a77791b43 100644 --- a/OsmAnd/res/values-et/strings.xml +++ b/OsmAnd/res/values-et/strings.xml @@ -3856,31 +3856,31 @@ \n \nKui see on lubatud, kasutab OsmAnd süsteemi ajalõpu sätet. Kasutage süsteemi ekraani ajalõppu - "• Profiilid: nüüd saate muuta järjestust, määrata kaardi ikooni, muuta kõiki põhiprofiilide sätteid ja taastada need vaikeseadetesse + • Profiilid: nüüd saate muuta järjestust, määrata kaardi ikooni, muuta kõiki põhiprofiilide sätteid ja taastada need vaikeseadetesse \n \n • Navigatsioonis on lisatud väljumisnumber \n -\n • Ümber töötatud pistikprogrammi seaded +\n • Ümber töötatud pistikprogrammi seaded \n -\n • Kõigile profiilidele kiireks juurdepääsuks kuvatakse ümbertöödeldud seadete ekraan +\n • Kõigile profiilidele kiireks juurdepääsuks kuvatakse ümbertöödeldud seadete ekraan \n -\n • Lisatud võimalus seadete kopeerimiseks teiselt profiililt +\n • Lisatud võimalus seadete kopeerimiseks teisest profiilist \n -\n • Lisatud võime muuta järjestust või peita HP kategooriaid otsingus +\n • Lisatud võime muuta järjestust või peita HP kategooriaid otsingus \n -\n • POI ikoonid kaardil õigesti joondatud +\n • POI ikoonid on kaardil õigesti joondatud \n -\n • Kaardi seadistamiseks on lisatud päikeseloojangu / päikesetõusu andmed +\n • Kaardi seadistamiseks on lisatud päikeseloojangu / päikesetõusu andmed \n -\n • Lisatud kaardil kodu / töökoha ikoonid +\n • Kaardile on lisatud kodu / töökoha ikoonid \n -\n • Lisatud seadetes mitmerealise kirjelduse tugi +\n • Seadetesse on lisatud mitmerealise kirjelduse tugi \n -\n • Lisas Jaapani kaardile õige transliteratsiooni +\n • Jaapani kaardile on lisatud õige transliteratsioon \n -\n • Lisatud Antarktika kaart +\n • Lisatud on Antarktika kaart \n -\n" +\n Teekond arvutatakse ümber, kui vahemaa teekonnani on suurem kui määratud parameeter See pistikprogramm on eraldi rakendus, peate selle eraldi eemaldama, kui te ei kavatse seda enam kasutada. \n @@ -3892,25 +3892,25 @@ Sahtli osad, kontekstimenüü Sahtel Ühendage erinevate kategooriate HP-de tüübid. Kõigi valimiseks puudutage lülitit, kategooria valimiseks puudutage vasakut serva. - "• Uued võrguühenduseta nõlvakaardid + • Uued võrguühenduseta nõlvakaardid \n \n • Lemmikute ja GPX-teekonnapunktide täielik kohandamine - kohandatud värvid, ikoonid, kujundid \n -\n • Kohandatud üksuste järjekorda jaotistes \"Kontekstimenüü\", \"Kaardi seadistamine\" ja \"Sahtel\" +\n • Kohandatud üksuste järjekorda jaotistes \"Kontekstimenüü\", \"Kaardi seadistamine\" ja \"Sahtel\" \n -\n • Vikipeedia eraldi kihina jaotises Kaardi seadistamine valige ainult vajalikud keeled +\n • Vikipeedia eraldi kihina jaotises Kaardi seadistamine valige ainult vajalikud keeled \n -\n • Loodud oma HP-de filter / kaardid täieliku paindlikkusega +\n • Loodud oma HP-de filter / kaardid täieliku paindlikkusega \n -\n • Lisatud valikud kohandatud profiilide sätete taastamiseks +\n • Lisatud valikud kohandatud profiilide sätete taastamiseks \n -\n • Täielikud GPX-marsruudid navigeerimisest toetavad liiklusradasid ja täitke pööramisjuhised +\n • Täielikud GPX-marsruudid navigeerimisest toetavad liiklusradasid ja täitke pööramisjuhised \n -\n • Parandatud tahvelarvutite kasutajaliidese suurused +\n • Parandatud tahvelarvutite kasutajaliidese suurused \n -\n • Parandatud vead RTL-iga +\n • Parandatud vead RTL-iga \n -\n" +\n Lülitab ekraani välja vastavalt süsteemi ekraani aegumisele. Kasuta süsteemi ekraani ajalõppu Valige ekraani äratussuvandid (veenduge, et seadme lukustamisel oleks esiplaanil OsmAnd): @@ -3948,4 +3948,6 @@ \n \n Pööra kõik punktid ümber + Vali rakenduse käivitamisel kasutatav profiil. + Viimati kasutatud \ No newline at end of file From 56e621e635abb0bb47fc7093c70b132574d22087 Mon Sep 17 00:00:00 2001 From: Verdulo Date: Fri, 25 Dec 2020 22:55:34 +0000 Subject: [PATCH 19/78] Translated using Weblate (Esperanto) Currently translated at 100.0% (3584 of 3584 strings) --- OsmAnd/res/values-eo/strings.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml index 09a2f3363d..14b1b8e998 100644 --- a/OsmAnd/res/values-eo/strings.xml +++ b/OsmAnd/res/values-eo/strings.xml @@ -517,7 +517,7 @@ Usona voja maparo Sen v1.9 kursaj reguloj Ne uzi regulojn por difini kurson enkondukitajn en v1.9. - Ĉu elŝuti eksterretajn mapojn? + Ĉu elŝuti malkonektajn mapojn\? Vi elŝutis %1$s mapojn Elŝuti novan mapon Administri @@ -1606,7 +1606,7 @@ Registrita voĉo Voĉaj anoncoj Ne ŝargis vektorajn mapojn - Eksterretaj vektoraj mapoj + Malkonektaj vektoraj mapoj Serĉi transporton ĉe haltejo Modifi interesejon Forigi interesejon @@ -1867,7 +1867,8 @@ Langeto kaŝita Malfari Transsalti - Mapoj eksterretaj\nkaj navigado + Malkonektaj mapoj +\nkaj navigado Enmeti interesejon Bazaj Altnivelaj @@ -4006,16 +4007,18 @@ Dividi antaŭ Dividi post Aldoni novan segmenton - • aldonita agordo por el-/en-porti ĉiujn datumojn, inkluzivante agordojn, map‑datumojn kaj miajn lokojn + • eblo el-/en-porti ĉiujn datumojn, inkluzivante agordojn, map‑datumojn kaj miajn lokojn \n \n • plani kurson: diagramoj por segmentoj kun la kurso, aldonita eblo por krei kaj redakti plurajn segmentojn de kurso -\n +\n \n • aldonita aŭtentiga metodo OAuth por OpenStreetMap, plibonigita fasado de OSM‑rilataj dialogujoj -\n +\n \n • propraj koloroj por ŝatataj ejoj kaj navigadpunktoj de spuro \n \n OsmAnd‑profilo Profilo de uzanto Inversigi ĉiujn punktojn + Elekti profolin, kiu estos uzita je starto de la aplikaĵo. + Antaŭe uzita \ No newline at end of file From bd835c97c77a6f86621c45cf79693f68cdd63b28 Mon Sep 17 00:00:00 2001 From: abdullah abdulrhman Date: Thu, 24 Dec 2020 20:26:56 +0000 Subject: [PATCH 20/78] Translated using Weblate (Arabic) Currently translated at 92.7% (3597 of 3877 strings) --- OsmAnd/res/values-ar/phrases.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/res/values-ar/phrases.xml b/OsmAnd/res/values-ar/phrases.xml index a369c15aab..77ca89347a 100644 --- a/OsmAnd/res/values-ar/phrases.xml +++ b/OsmAnd/res/values-ar/phrases.xml @@ -3672,4 +3672,8 @@ منصة الانقاذ صفارت إنذار نوع المجتمع: مختلط + مكان لغسل الملابس يدويا + محطة نقل نفايات + ميزان المركبات + مكتب الحارس \ No newline at end of file From 4df44402517b4ca2e72f1ca589daa5b58e2517c9 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 24 Dec 2020 01:30:46 +0000 Subject: [PATCH 21/78] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3584 of 3584 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index dfbbb9bb93..28a6ff15b6 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -4014,4 +4014,6 @@ OsmAnd 設定檔 使用者設定檔 反轉所有點 + 選取要在應用程式啟動時使用的設定檔。 + 最後使用 \ No newline at end of file From 09b8729e1897fa6f4c967a4ec277a9307e665b42 Mon Sep 17 00:00:00 2001 From: ikmaak Date: Fri, 25 Dec 2020 08:27:54 +0000 Subject: [PATCH 22/78] Translated using Weblate (Dutch) Currently translated at 94.1% (3376 of 3584 strings) --- OsmAnd/res/values-nl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml index 30cff055ce..88fcee0486 100644 --- a/OsmAnd/res/values-nl/strings.xml +++ b/OsmAnd/res/values-nl/strings.xml @@ -3271,7 +3271,7 @@ Middelmatig Gevorderd Expert - Gratische rit + Gratis rit Extreem Ongedefinieerd Moeilijkheidsgraad piste From c866d47d9584b32419db12244fcc826fc48ff2b5 Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Sat, 26 Dec 2020 13:39:15 +0000 Subject: [PATCH 23/78] Translated using Weblate (French) Currently translated at 99.8% (3586 of 3590 strings) --- OsmAnd/res/values-fr/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 0d6dea35ff..3e52b62a0e 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -4000,4 +4000,6 @@ Inverser tous les points Sélectionnez le profil utilisé au démarrage de l\'application. Dernier utilisé + Pirivilégier les itinéraires de randonnée + Pirivilégier les itinéraires de randonnée \ No newline at end of file From dc54034dc55520df8e8dfb3b9f6d6c9e988ca66f Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 26 Dec 2020 18:56:46 +0000 Subject: [PATCH 24/78] Translated using Weblate (German) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-de/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index c5e4bb3130..47098cf9fb 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -4025,4 +4025,10 @@ Alle Punkte umkehren Wählen Sie das Profil, das beim Start der Anwendung verwendet werden soll. Zuletzt verwendet + Wanderwege bevorzugen + Wanderwege bevorzugen + Bäche und Entwässerungsgräben erlauben + Bäche und Entwässerungsgräben erlauben + Gewässer erlauben, die nicht ständig Wasser führen + Gewässer erlauben, die nicht ständig Wasser führen \ No newline at end of file From 9ee1c08d00854ebfba00c47464b125bce2eda5f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Sat, 26 Dec 2020 10:31:53 +0000 Subject: [PATCH 25/78] Translated using Weblate (Turkish) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-tr/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index 91c6567731..76669e85df 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -3976,4 +3976,10 @@ Tüm noktaları tersine çevir Uygulama başlangıcında kullanılacak profili seçin. Son kullanılan + Yürüyüş güzergahlarını tercih edin + Yürüyüş güzergahlarını tercih et + Dere ve kanalizasyonlara izin verin + Dere ve kanalizasyonlara izin ver + Aralıklı su yollarına izin verin + Aralıklı su yollarına izin ver \ No newline at end of file From d5b1f7182526c04a9259cf7c92315735194f5ac7 Mon Sep 17 00:00:00 2001 From: Athoss Date: Sat, 26 Dec 2020 12:10:15 +0000 Subject: [PATCH 26/78] Translated using Weblate (Hungarian) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-hu/strings.xml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index c081ed7a39..0ddc2b3f86 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -2277,7 +2277,7 @@ \n \nÉlvezd a hangalapú és vizuális navigációs szolgáltatást, tekints meg érdekes helyeket (POI-kat), hozz létre és kezelj GPX nyomvonalakat, szintvonalak és magasságinformációk használatával (egy plugin segítségével), válassz az autós, kerékpáros és gyalogos üzemmód közül, szerkessz OSM-et és használd ki a számos egyéb lehetőséget. A név túl sok nagybetűt tartalmaz. Folytatja\? - A célpont korlátozott hozzáférésű területen található. Engedélyezed a magánutak használatát ennél az útvonaltervnél\? + A célpont korlátozott hozzáférésű területen található. Engedélyezi a magánutak használatát ennél az útvonaltervnél\? Keresés újraindítása Keresett terület szélesítése Nincs találat @@ -3422,7 +3422,7 @@ Felhasználónév és jelszó Ezek a bővítménybeállítások globálisak, és minden profilra vonatkoznak OSM-szerkesztés - "A még fel nem töltött szerkesztéseket vagy OSM-hibákat megtekintheti itt: %1$s. A már feltöltött módosítások nem jelennek meg." + A még fel nem töltött szerkesztéseket vagy OSM-hibákat megtekintheti itt: %1$s. A már feltöltött módosítások nem jelennek meg. OSM Navigáció vagy haladás közben megjelenő ikon. Álló helyzetben megjelenő ikon. @@ -3998,19 +3998,25 @@ Elvágás utána Szakaszok egyesítése Új szakasz hozzáadása - "• Lehetőség az összes adat exportálására és importálására, beleértve a beállításokat, erőforrásokat és a saját helyeket is + • Lehetőség az összes adat exportálására és importálására, beleértve a beállításokat, erőforrásokat és a saját helyeket is \n -\n • Útvonaltervezés: grafikonok a nyomvonalszakaszokhoz útvonallal, valamint lehetőség több nyomvonalszakasz létrehozására és szerkesztésére +\n • Útvonaltervezés: grafikonok a nyomvonalszakaszokhoz útvonallal, valamint lehetőség több nyomvonalszakasz létrehozására és szerkesztésére \n -\n • OAuth hitelesítési módszer az OpenStreetMap-hez, az OSM párbeszédpanelek felhasználói felületének javítása +\n • OAuth hitelesítési módszer az OpenStreetMap-hez, az OSM párbeszédpanelek felhasználói felületének javítása \n -\n • Egyéni színek támogatása a kedvenceknél és a nyomvonalak útpontjainál +\n • Egyéni színek támogatása a kedvenceknél és a nyomvonalak útpontjainál \n -\n" +\n OsmAnd profil Felhasználói profil Összes pont megfordítása Rés Jelölje ki az alkalmazás elindításakor használandó profilt. Utoljára használt + Túraútvonalak előnyben részesítése + Túraútvonalak előnyben részesítése + Patakok és csatornák engedélyezése + Patakok és csatornák engedélyezése + Időszakos vízfolyások engedélyezése + Időszakos vízfolyások engedélyezése \ No newline at end of file From 377b82c82c683e2ed9ec1e09cdd763861abb6e98 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Sat, 26 Dec 2020 18:27:48 +0000 Subject: [PATCH 27/78] Translated using Weblate (Ukrainian) Currently translated at 99.8% (3586 of 3590 strings) --- OsmAnd/res/values-uk/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index a37f617b68..16ab9db234 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -4017,4 +4017,6 @@ Повернути назад всі точки Виберіть профіль, який застосовуватиметься під час запуску. Востаннє використовувалось + Дозволити переривчасті водні шляхи + Дозволити переривчасті водні шляхи \ No newline at end of file From 46127c5b2ee677244579955a31ffd5b6ed818423 Mon Sep 17 00:00:00 2001 From: Michal L Date: Sat, 26 Dec 2020 11:40:03 +0000 Subject: [PATCH 28/78] Translated using Weblate (Polish) Currently translated at 99.4% (3569 of 3590 strings) --- OsmAnd/res/values-pl/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-pl/strings.xml b/OsmAnd/res/values-pl/strings.xml index f3ca626e16..c6616b7b1e 100644 --- a/OsmAnd/res/values-pl/strings.xml +++ b/OsmAnd/res/values-pl/strings.xml @@ -3549,7 +3549,7 @@ Szybka czynność Zatrzymaj oba Styl renderowania - Możesz wyświetlić wszystkie swoje jeszcze nie przesłane edycje lub błędy OSM w %1$s. Przesłane punkty nie są wyświetlane w OsmAnd. + Wyświetl wszystkie jeszcze nie przesłane swoje edycje lub błędy OSM w %1$s. Przesłane już zmiany nie będą wyświetlane. Importowanie pliku renderowania Przywrócić wszystkie ustawienia profilu\? Zapisywanie nowego profilu @@ -3926,7 +3926,7 @@ Routing złożony Dwufazowe wyznaczanie tras do nawigacji samochodowej. Rozwój rodzimego transportu publicznego - Przejdź do (bezpiecznego) obliczania tras transportu publicznego w języku Java + Przejdź do (bezpiecznego) obliczania trasy transportu publicznego w języku Java Zaloguj się za pomocą protokołu OAuth, aby korzystać z funkcji osmedit Zaloguj się przez OAuth Wyczyść token OpenStreetMap OAuth From 57e696b18826ccdaa95adc57e53a9cba971d311f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Kotr=C4=8D?= Date: Sat, 26 Dec 2020 10:17:51 +0000 Subject: [PATCH 29/78] Translated using Weblate (Czech) Currently translated at 96.0% (3447 of 3590 strings) --- OsmAnd/res/values-cs/strings.xml | 41 ++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml index b1e9c9f6d5..6cbc3a9714 100644 --- a/OsmAnd/res/values-cs/strings.xml +++ b/OsmAnd/res/values-cs/strings.xml @@ -272,7 +272,7 @@ Průhlednost překryvu Upravit průhlednost základní mapy. Průhlednost základní mapy - Upravit průhlednost + Nastavte průhlednost (0 - průhledný, 255 - neprůhledný) Podkladová mapa… Podkresová mapa Vyberte podkladovou mapu. @@ -350,7 +350,7 @@ vyhledat Vysoké rozlišení Použít mapu s vysokým rozlišením pro jemné displeje. - Pozice ještě není známa + Pozice ještě není známa. Hledat veřejnou dopravu Hledání dopravy (žádný cíl): Hledání dopravy (cíl vzdálen {0}): @@ -642,14 +642,14 @@ Off-line navigace OsmAnd je dočasně nedostupná. Levostranný provoz Pro země, kde se jezdí po levé straně cesty. - Startovní bod navigace není ještě zvolen - Přerušit stahování souboru\? + Výchozí bod navigace ještě nebyl zjištěn. + Zrušit stahování\? Základní mapa byla vybrána ke stažení. Je potřeba pro správnou funkci aplikace. Pro výběr různých zdrojů map povolte modul \'Online mapy\' On-line mapy a dlaždice Používat on-line mapy (ukládat dlaždice do mezipaměti na paměťové kartě). On-line mapy - Nastavení rastrových překryvných nebo podkresových map. + Zvolit online nebo uložené dlaždicové mapové zdroje. Získejte přístup k mnoha druhům on-line map (tzv. dlaždicové nebo rastrové mapy), od předdefinovaných OpenStreetMap dlaždic (jako Mapnik) až po satelitní snímky a speciální vrstvy jako mapy počasí, klimatické mapy, geologické mapy, stínované svahy, atd. \n \n Všechny tyto mapy mohou být použity jako hlavní (základní) mapa na obrazovce OsmAnd nebo jako překryvná popř. podkladová mapa k jiné základní mapě (např. standardní OsmAnd off-line mapě). Pro zlepšení viditelnosti podkladových map je možné vypnout některé objekty z vektorových map OsmAnd, přes menu \'Nastavení mapy\'. @@ -663,7 +663,7 @@ Moduly Po zadání svých přihlašovacích údajů můžete přispívat do OSM - například vytvářením nebo úpravami bodů zájmu, otevíráním nebo komentováním OSM poznámek a přidáváním zaznamenanými GPX soubory. OSM je celosvětový komunitní projekt mapování. Akcelerace vykreslování pomocí \'Android native\' knihovny. Vektorové mapy se zpravidla vykreslují rychleji, pokud je tato možnost zaškrtnuta. Avšak na některých zařízeních tato funkce nemusí fungovat. - Přehrát hlasové pokyny zvoleným hlasem + Zvolte hlas a otestujte ho přehráním oznámení: Vývoj a ladění OsmAnd Akcelerace vykreslování Test hlasových pokynů @@ -1919,7 +1919,7 @@ Délka %2$s Zobrazit trasy pro horská kola Aplikace nyní smí zapisovat na externí úložiště, ale je potřeba její restart. Název souboru obsahuje nepovolené znaky - Cíl není nastaven + Modul usnadnění: Cíl není nastaven Magnetické směrování Relativní směrování Nepřepočítávat trasu, pokud se od ní odchýlíte @@ -2701,7 +2701,7 @@ Zobrazená oblast: %1$s x %2$s Prozkoumat Obsah Celosvětové články Wikivoyage - Vrstevnice & stínování terénu + Vrstevnice & stínování svahů Restartovat aplikaci Zobrazit obrázky Obnovte předplatné, abyste nadále mohli využívat všechny funkce: @@ -3299,7 +3299,7 @@ Zobrazená oblast: %1$s x %2$s Stínované svahy používají tmavé odstíny pro vyjádření svahů, vrcholů a nížin. Svahy využívají barvy k vizualizaci strmosti terénu. Nastavte minimální a maximální úroveň přiblížení, při které bude vrstva zobrazená. - Pro zobrazení stínování kopců jsou potřeba další mapy. + Pro zobrazení stínování svahů jsou potřeba další mapy. Pro zobrazení svahů jsou potřeba další mapy. O svazích si můžete přečíst více na %1$s. Průhlednost @@ -3499,9 +3499,9 @@ Zobrazená oblast: %1$s x %2$s Vyberte stopu k otevření. Hotovo Zadejte prosím název bodu - Současný cílový bod na trase bude smazán. Jestliže to je poslední cíl, navigace se zastaví. + Vymaže následující cíl na trase. Jestliže to je poslední cíl, navigace se zastaví. Stáhnout Wikipedia mapy - Získejte informace o zájmových bodech z Wikipedie. Je to váš offline kapesní průvodce - zapněte modul Wikipedia a užívejte si články o objektech okolo vás. + Získejte informace o zájmových bodech z Wikipedie, offline kapesního průvodce obsahujícího články o místech a destinacích. Přidaný bod nebude na mapě vidět, protože vybraná skupina je skrytá. Můžete jej najít v \"%s\". Enduro motorka Motorový skútr @@ -3549,7 +3549,7 @@ Zobrazená oblast: %1$s x %2$s Navigační profil Vyberte soubor stopy, do níž se nový úsek přidá. Snímky z úrovně ulice - Opravdu chcete zavřít plánovanou trasu a zahodit tak všechny změny\? + Opravdu chcete zahodit všechny změny v plánované trase\? V případě opačného směru Uložit jako nový soubor stopy Přidat do souboru stopy @@ -3564,7 +3564,7 @@ Zobrazená oblast: %1$s x %2$s Název souboru %s vybraných souborů stop REC - Pozastaví záznam trasy, pokud je aplikace ukončena (přes nedávné aplikace). (Ikona režimu na pozadí zmizí z notifikační oblasti Androidu.) + Záznam trasy bude pozastaven, když je aplikace ukončena (přes nedávné aplikace). (Ikona režimu na pozadí zmizí z notifikační oblasti Androidu.) Pozastavit záznam trasy Pokračovat v záznamu trasy Výchozí @@ -3744,7 +3744,7 @@ Zobrazená oblast: %1$s x %2$s Zvolte časový limit vypnutí obrazovky po probuzení (\"%1$s\" znamená bez časového limitu.) Přidejte aspoň dva body Spravovat předplatné - S vaším předplatným je problém. Klepněte na tlačítko pro přechod do nastavení předplatného v Google Play a opravte způsob platby. + Pro opravu vašeho předplatného klepněte na tlačítko pro nastavení způsobu platby v Google Play. Předplatné OsmAnd Live skončilo Předplatné OsmAnd Live je pozastaveno Předplatné OsmAnd Live je zablokované @@ -3914,7 +3914,7 @@ Zobrazená oblast: %1$s x %2$s Přihlásit se do OpenStreetMap Přihlásit se do OpenStreetMap.org Zaregistrovat se do OpenStreetMap - Můžete zobrazit své dosud neodeslané změny či chyby v OSM v %1$s. Odeslané body se již v OsmAnd nezobrazují. + Zobrazte své dosud neodeslané změny či chyby v OSM v %1$s. Odeslané změny se již v OsmAnd nezobrazují. Abyste mohli odesílat nová nebo změněná data, musíte se přihlásit. \n \nPřihlásit se můžete pomocí bezpečné metody OAuth nebo jménem a heslem. @@ -4003,4 +4003,15 @@ Zobrazená oblast: %1$s x %2$s \n• Podpora pro vlastní barvy u oblíbených bodů a mezicílů trasy \n \n + Profil OsmAnd + Uživatelský profil + Otočit všechny body + Vyberte profil, který bude použitý při startu aplikace. + Naposledy použito + Upřednostňovat turistické trasy + Upřednostňovat turistické trasy + Povolit říčky a stoky + Povolit říčky a stoky + Povolit občasné vodní cesty + Povolit občasné vodní cesty \ No newline at end of file From a20e4e1f63f74fe5b876566d1afc4122b48ed919 Mon Sep 17 00:00:00 2001 From: Ajeje Brazorf Date: Sat, 26 Dec 2020 16:49:18 +0000 Subject: [PATCH 30/78] Translated using Weblate (Sardinian) Currently translated at 99.8% (3583 of 3590 strings) --- OsmAnd/res/values-sc/strings.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index 44d5d37f94..764c40e408 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -4016,4 +4016,12 @@ Profilu de OsmAnd Profilu de s\'impreadore Fùrria totu sos puntos + Ischerta su profilu de impreare a s\'allughìngiu de s\'aplicatzione. + Ùrtimu impreu + Preferi sas àndalas pro s\'escursionismu + Preferi sas àndalas pro s\'escursionismu + Permite flussos e iscàrrigos + Permite flussos e iscàrrigos + Permite caminos de abba intermitentes + Permite caminos de abba intermitentes \ No newline at end of file From 29d829b5f001d6bd69a34fbab2618b96f36c67f9 Mon Sep 17 00:00:00 2001 From: Michal L Date: Sat, 26 Dec 2020 12:02:46 +0000 Subject: [PATCH 31/78] Translated using Weblate (Polish) Currently translated at 99.3% (3850 of 3877 strings) --- OsmAnd/res/values-pl/phrases.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-pl/phrases.xml b/OsmAnd/res/values-pl/phrases.xml index 60610a6de4..1c3724bfe8 100644 --- a/OsmAnd/res/values-pl/phrases.xml +++ b/OsmAnd/res/values-pl/phrases.xml @@ -3624,7 +3624,7 @@ Dostęp dla pojazdów: dla wojska Dostęp dla pojazdów: dla dostaw Dostęp dla pojazdów: dla leśnictwa - Dostęp dla samochodów: + Dostęp dla samochodów: tak Dostęp dla samochodów: prywatny Dostęp dla samochodów: nie Dostęp dla samochodów: do celu podróży @@ -3872,4 +3872,12 @@ Wizy nieimigracyjne Konsulat Ambasada + Pielęgniarka + Syrena + Zbiornik wodny + Studnia + Jezioro + Rzeka + Szczepienia: COVID19 + Szczepienia \ No newline at end of file From 51365e85428919a98ab829aef2d6f8ecde27023a Mon Sep 17 00:00:00 2001 From: Eduardo Addad de Oliveira Date: Sat, 26 Dec 2020 15:21:11 +0000 Subject: [PATCH 32/78] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-pt-rBR/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index 225a8a8416..e39bfa1ccb 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -4016,4 +4016,10 @@ Reverter todos os pontos Selecione o perfil que será utilizado na inicialização do aplicativo. Usado por último + Percursos de caminhada preferidos + Percursos de caminhada preferidos + Permitir riachos e drenos + Permitir riachos e drenos + Permitir vias de água intermitentes + Permitir vias de água intermitentes \ No newline at end of file From 76f0a762fdf82e9fb8f7b8cbcf93a5b41fdaab63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Sat, 26 Dec 2020 10:34:26 +0000 Subject: [PATCH 33/78] Translated using Weblate (Turkish) Currently translated at 80.6% (3125 of 3877 strings) --- OsmAnd/res/values-tr/phrases.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/values-tr/phrases.xml b/OsmAnd/res/values-tr/phrases.xml index d8ae73c8b3..6fef6292b4 100644 --- a/OsmAnd/res/values-tr/phrases.xml +++ b/OsmAnd/res/values-tr/phrases.xml @@ -13,7 +13,7 @@ Bisiklet taşıma Askılı taşıma Yürüyüş/bisiklet ağ noktaları - Yürüyüş rotaları + Yürüyüş güzergahları Trafik uygulama İnsan yapımı Ulaştırma inşaatı @@ -938,10 +938,10 @@ Ulusal giden ağ düğümü Bölgesel giden ağ düğümü Yerel yürüyüş ağ düğümü - Uluslararası yürüyüş izleği - Ulusal yürüyüş izleği - Bölgesel yürüyüş izleği - Yerel yürüyüş izleği + Uluslararası yürüyüş güzergahı + Ulusal yürüyüş güzergahı + Bölgesel yürüyüş güzergahı + Yerel yürüyüş güzergahı Yürüyüş yolu başvurusu Çalışma saatleri Koleksiyon kez @@ -3135,4 +3135,6 @@ Vatandaş hizmetleri Göçmen vizeleri Göçmen olmayan vizeleri + Askeri denetim noktası + Yürüyüş denetim noktası \ No newline at end of file From 748e159fe7f5a14059d672dec786bd71c12398ff Mon Sep 17 00:00:00 2001 From: Verdulo Date: Sat, 26 Dec 2020 19:28:02 +0000 Subject: [PATCH 34/78] Translated using Weblate (Esperanto) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-eo/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml index 14b1b8e998..32dfa4de74 100644 --- a/OsmAnd/res/values-eo/strings.xml +++ b/OsmAnd/res/values-eo/strings.xml @@ -4021,4 +4021,10 @@ Inversigi ĉiujn punktojn Elekti profolin, kiu estos uzita je starto de la aplikaĵo. Antaŭe uzita + Preferi piediradajn kursojn + Preferi piediradajn kursojn + Permesi navigi per riveretoj kaj fosaĵoj defluigaj + Permesi riveretojn kaj fosaĵojn + Permesi navigi per periode sekiĝantaj akvovojoj + Permesi sezonajn akvovojojn \ No newline at end of file From c51d8cfcc7f554bfbeaaddc3d15a45eacf5a16cd Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Sun, 27 Dec 2020 23:23:57 +0200 Subject: [PATCH 35/78] Reverse all point --- .../net/osmand/plus/TargetPointsHelper.java | 16 +++++ .../plus/helpers/WaypointDialogHelper.java | 68 +++++++++---------- .../AddPointBottomSheetDialog.java | 9 ++- .../MapRouteInfoMenu.java | 11 ++- 4 files changed, 59 insertions(+), 45 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java index 2d46b63fd1..63d82ecc26 100644 --- a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java +++ b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java @@ -556,6 +556,22 @@ public class TargetPointsHelper { updateRouteAndRefresh(updateRoute); } + public void reorderIntermediatePoints(List points, boolean updateRoute) { + cancelAllIntermediatePointsAddressRequests(); + if (points.size() > 0) { + ArrayList names = new ArrayList<>(points.size()); + ArrayList ls = new ArrayList<>(points.size()); + for (int i = 0; i < points.size(); i++) { + names.add(PointDescription.serializeToString(points.get(i).pointDescription)); + ls.add(points.get(i).point); + } + settings.saveIntermediatePoints(ls, names); + } else { + settings.clearIntermediatePoints(); + } + readFromSettings(); + updateRouteAndRefresh(updateRoute); + } public boolean hasTooLongDistanceToNavigate() { if (routingHelper.getAppMode().getRouteService() != RouteService.OSMAND) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 8d0d8210c1..91440912d2 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -242,43 +242,45 @@ public class WaypointDialogHelper { } } - // switch start & finish - public static void switchStartAndFinish(TargetPointsHelper targetPointsHelper, TargetPoint finish, - Activity ctx, TargetPoint start, OsmandApplication app, - WaypointDialogHelper helper) { + public static void switchStartAndFinish(OsmandApplication app, Activity ctx, WaypointDialogHelper helper, boolean updateRoute) { + TargetPointsHelper targetsHelper = app.getTargetPointsHelper(); + TargetPoint finish = targetsHelper.getPointToNavigate(); + TargetPoint start = targetsHelper.getPointToStart(); if (finish == null) { app.showShortToastMessage(R.string.mark_final_location_first); } else { - targetPointsHelper.setStartPoint(new LatLon(finish.getLatitude(), - finish.getLongitude()), false, finish.getPointDescription(ctx)); - if (start == null) { - Location loc = app.getLocationProvider().getLastKnownLocation(); - if (loc != null) { - targetPointsHelper.navigateToPoint(new LatLon(loc.getLatitude(), - loc.getLongitude()), true, -1); - } - } else { - targetPointsHelper.navigateToPoint(new LatLon(start.getLatitude(), - start.getLongitude()), true, -1, start.getPointDescription(ctx)); - } + switchStartAndFinish(app, start, finish, updateRoute); updateControls(ctx, helper); } } - public static void reverseAllPoints(OsmandApplication app, Activity ctx, - WaypointDialogHelper helper) { - TargetPointsHelper targets = app.getTargetPointsHelper(); - if (!targets.getAllPoints().isEmpty()) { - List points = targets.getAllPoints(); - Collections.reverse(points); - TargetPoint start = points.get(0); - targets.setStartPoint(start.point, false, start.getOriginalPointDescription()); - points.remove(start); - targets.reorderAllTargetPoints(points, true); - updateControls(ctx, helper); + private static void switchStartAndFinish(OsmandApplication app, TargetPoint start, TargetPoint finish, boolean updateRoute) { + TargetPointsHelper targetsHelper = app.getTargetPointsHelper(); + targetsHelper.setStartPoint(new LatLon(finish.getLatitude(), finish.getLongitude()), + false, finish.getPointDescription(app)); + if (start == null) { + Location loc = app.getLocationProvider().getLastKnownLocation(); + if (loc != null) { + targetsHelper.navigateToPoint(new LatLon(loc.getLatitude(), + loc.getLongitude()), updateRoute, -1); + } + } else { + targetsHelper.navigateToPoint(new LatLon(start.getLatitude(), + start.getLongitude()), updateRoute, -1, start.getPointDescription(app)); } } + public static void reverseAllPoints(OsmandApplication app, Activity ctx, WaypointDialogHelper helper) { + TargetPointsHelper targetsHelper = app.getTargetPointsHelper(); + TargetPoint finish = targetsHelper.getPointToNavigate(); + TargetPoint start = targetsHelper.getPointToStart(); + switchStartAndFinish(app, start, finish, false); + List points = targetsHelper.getIntermediatePoints(); + Collections.reverse(points); + targetsHelper.reorderIntermediatePoints(points, true); + updateControls(ctx, helper); + } + public static void updateControls(Activity ctx, WaypointDialogHelper helper) { if (helper != null && helper.helperCallbacks != null) { for (WaypointDialogHelperCallback callback : helper.helperCallbacks) { @@ -492,15 +494,7 @@ public class WaypointDialogHelper { MapActivity mapActivity = getMapActivity(); if (mapActivity != null) { OsmandApplication app = mapActivity.getMyApplication(); - TargetPointsHelper targetsHelper = app.getTargetPointsHelper(); - WaypointDialogHelper.switchStartAndFinish( - targetsHelper, - targetsHelper.getPointToNavigate(), - mapActivity, - targetsHelper.getPointToStart(), - app, - mapActivity.getDashboard().getWaypointDialogHelper() - ); + switchStartAndFinish(app, mapActivity, mapActivity.getDashboard().getWaypointDialogHelper(), true); } dismiss(); } @@ -528,7 +522,7 @@ public class WaypointDialogHelper { }) .create(); int intermediateSize = targetsHelper.getIntermediatePoints().size(); - if (intermediateSize > 2) { + if (intermediateSize > 1) { items.add(reorderAllItems); } diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java index 7c70ba8dfb..22016f6c9b 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/AddPointBottomSheetDialog.java @@ -27,8 +27,6 @@ import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.FavouritesDbHelper; -import net.osmand.plus.mapmarkers.MapMarkersHelper; -import net.osmand.plus.mapmarkers.MapMarker; import net.osmand.plus.OsmAndLocationProvider; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; @@ -46,6 +44,8 @@ import net.osmand.plus.helpers.FontCache; import net.osmand.plus.helpers.MapMarkerDialogHelper; import net.osmand.plus.helpers.WaypointDialogHelper; import net.osmand.plus.mapcontextmenu.other.FavouritesBottomSheetMenuFragment; +import net.osmand.plus.mapmarkers.MapMarker; +import net.osmand.plus.mapmarkers.MapMarkersHelper; import net.osmand.plus.routepreparationmenu.MapRouteInfoMenu.PointType; import net.osmand.plus.search.QuickSearchDialogFragment; import net.osmand.plus.widgets.style.CustomTypefaceSpan; @@ -348,9 +348,8 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment { mapActivity.getMyApplication().showShortToastMessage(R.string.route_add_start_point); return; } - WaypointDialogHelper.switchStartAndFinish(targetsHelper, targetsHelper.getPointToNavigate(), - mapActivity, targetsHelper.getPointToStart(), mapActivity.getMyApplication(), - mapActivity.getDashboard().getWaypointDialogHelper()); + WaypointDialogHelper.switchStartAndFinish(mapActivity.getMyApplication(), mapActivity, + mapActivity.getDashboard().getWaypointDialogHelper(), true); } dismiss(); } diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java index 9903d1e77d..a6b69ba124 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java @@ -65,6 +65,7 @@ import net.osmand.plus.base.ContextMenuFragment.MenuState; import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo; import net.osmand.plus.helpers.GpxUiHelper; +import net.osmand.plus.helpers.WaypointDialogHelper; import net.osmand.plus.helpers.WaypointHelper; import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenuFragment; import net.osmand.plus.mapmarkers.MapMarker; @@ -1853,9 +1854,13 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener new PointDescription(PointDescription.POINT_TYPE_MY_LOCATION, mapActivity.getString(R.string.shared_string_my_location))); } if (startPoint != null) { - targetPointsHelper.navigateToPoint(startPoint.point, false, -1, startPoint.getPointDescription(mapActivity)); - targetPointsHelper.setStartPoint(endPoint.point, false, endPoint.getPointDescription(mapActivity)); - targetPointsHelper.updateRouteAndRefresh(true); + int intermediateSize = targetPointsHelper.getIntermediatePoints().size(); + if (intermediateSize > 1) { + WaypointDialogHelper.reverseAllPoints(app, mapActivity, mapActivity.getDashboard().getWaypointDialogHelper()); + } else { + WaypointDialogHelper.switchStartAndFinish(mapActivity.getMyApplication(), + mapActivity, mapActivity.getDashboard().getWaypointDialogHelper(), true); + } } else { app.showShortToastMessage(R.string.route_add_start_point); } From 33dec4240421b5cc43a601b49b334ae416895afd Mon Sep 17 00:00:00 2001 From: Michel GERDAY Date: Sun, 27 Dec 2020 17:17:29 +0000 Subject: [PATCH 36/78] Translated using Weblate (French) Currently translated at 99.9% (3588 of 3590 strings) --- OsmAnd/res/values-fr/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 3e52b62a0e..b52ca23ec8 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -4002,4 +4002,6 @@ Dernier utilisé Pirivilégier les itinéraires de randonnée Pirivilégier les itinéraires de randonnée + Autoriser les voies navigables intermittentes + Autoriser les voies navigables intermittentes \ No newline at end of file From ba388b318cfedbb6548d7c39dc3eb7397e501af4 Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Mon, 28 Dec 2020 01:29:31 +0000 Subject: [PATCH 37/78] Translated using Weblate (German) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 47098cf9fb..13db3f7737 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -3181,7 +3181,7 @@ %s ist gespeichert Track öffnen Track %s ist gespeichert - Keine + Keines WunderLINQ Parrot Ein externes Steuergerät, wie beispielsweise eine Tastatur oder ein WunderLINQ, wählen. From 03081ecb64e6d84d4e9568f8719a7b1585d64e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=2E=20R=C3=BCdinger?= Date: Mon, 28 Dec 2020 01:27:18 +0000 Subject: [PATCH 38/78] Translated using Weblate (German) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 13db3f7737..95344ac93f 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -2418,7 +2418,7 @@ Ermöglicht schnelle Beiträge zu Mapillary. Fotos von der Straße aus dem Netz für jeden. Orte entdecken, mitwirken und die Welt in Bildern festhalten. Mapillary - Mit Mapillary Bilder dieses Orts beitragen. + Mit Mapillary Bilder von diesem Ort beisteuern. Installieren Online-Fotos Keine Fotos hier. @@ -3839,7 +3839,7 @@ Nächstes Segment Navigationsprofil Wählen Sie eine Trackdatei, für die ein neues Segment hinzugefügt werden soll. - Track auswählen, der verfolgt werden soll + Track auswählen, dem gefolgt werden soll Adresse löschen Adresse hinzufügen Adresse eingeben From ad7db9b438ec6ab86686267534d53e45acc05bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Babos=20G=C3=A1bor?= Date: Sun, 27 Dec 2020 13:52:57 +0000 Subject: [PATCH 39/78] Translated using Weblate (Hungarian) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-hu/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index 0ddc2b3f86..2142695973 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -1621,7 +1621,7 @@ Kihagyás OsmAnd Offline térképek\nés navigáció - Tovább + Következő Műszerfal beállításai Veszély törlés @@ -4015,8 +4015,8 @@ Utoljára használt Túraútvonalak előnyben részesítése Túraútvonalak előnyben részesítése - Patakok és csatornák engedélyezése - Patakok és csatornák engedélyezése + Patakok és vízelvezető árkok engedélyezése + Patakok és vízelvezető árkok engedélyezése Időszakos vízfolyások engedélyezése Időszakos vízfolyások engedélyezése \ No newline at end of file From 011c1ad78e14cfd16e77999f06e5f4b0acba14de Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Mon, 28 Dec 2020 01:13:47 +0000 Subject: [PATCH 40/78] Translated using Weblate (Ukrainian) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-uk/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 16ab9db234..5fecd504a6 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -4019,4 +4019,8 @@ Востаннє використовувалось Дозволити переривчасті водні шляхи Дозволити переривчасті водні шляхи + Надавати перевагу пішохідним маршрутам + Надавати перевагу пішохідним маршрутам + Дозволити потоки та стічні канали + Дозволити потоки та стічні канали \ No newline at end of file From d3dc64732190108256a87471fc9fb6ef445c66e3 Mon Sep 17 00:00:00 2001 From: ace shadow Date: Sat, 26 Dec 2020 23:32:32 +0000 Subject: [PATCH 41/78] Translated using Weblate (Slovak) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-sk/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index 216eebcf1d..ca4436bcc3 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -4021,4 +4021,10 @@ Otočiť všetky body Zvoľte profil, ktorý bude použitý pri štarte aplikácie. Naposledy použité + Uprednostniť turistické trasy + Uprednostniť turistické trasy + Povoliť potoky a odtokové kanály + Povoliť potoky a odtokové kanály + Povoliť dočasné vodné toky + Povoliť dočasné vodné toky \ No newline at end of file From bf4684795447fcd511cf46a969a32f9a13b795f9 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Sun, 27 Dec 2020 09:40:28 +0000 Subject: [PATCH 42/78] Translated using Weblate (Hebrew) Currently translated at 99.8% (3585 of 3590 strings) --- OsmAnd/res/values-iw/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-iw/strings.xml b/OsmAnd/res/values-iw/strings.xml index 0faf759a72..97db038f97 100644 --- a/OsmAnd/res/values-iw/strings.xml +++ b/OsmAnd/res/values-iw/strings.xml @@ -3913,7 +3913,7 @@ תודה לך על רכישת ‚קווי מתאר’ הימנעות משבילי הולכי רגל הימנעות משבילי הולכי רגל - המינוי חויב לתקופה הנבחרת. ניתן לבטל דרך ה־AppGallery בכל עת. + המינוי מחויב לפי התקופה הנבחרת. ניתן לבטל אותו דרך ה־AppGallery בכל עת. חשבון ה־AppGallery שלך יחויב עם אישור הרכישה. \n \nתוקף המינוי מתארך אוטומטי אלא אם כן בוטל בטרם תאריך החידוש. החשבון שלך יחויב על תקופת החידוש (חודש/שלושה חודשים/שנה) רק בתאריך החידוש. @@ -4023,4 +4023,10 @@ להפוך את כל הנקודות נא לבחור את הפרופיל בו יעשה שימוש עם הפעלת היישומון. שימוש אחרון + להעדיף מסלולי הליכה + להעדיף מסלולי הליכה + לאפשר נחלים וניקוזים + לאפשר נחלים וניקוזים + לאפשר מקטעים עם דרכי מים עונתיים + לאפשר מקטעים עם דרכי מים עונתיים \ No newline at end of file From 597f54e7d130cc5a02a177064339e899d1db66c6 Mon Sep 17 00:00:00 2001 From: Softmap Date: Sun, 27 Dec 2020 20:20:46 +0000 Subject: [PATCH 43/78] Translated using Weblate (Arabic) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-ar/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml index 31907c0417..ebc6a7b115 100644 --- a/OsmAnd/res/values-ar/strings.xml +++ b/OsmAnd/res/values-ar/strings.xml @@ -4008,4 +4008,10 @@ عكس جميع النقاط حدد ملف التعريف، الذي سيتم استخدامه في بدء التطبيق. آخر استخدام + تفضيل طرق التنزه + تفضيل طرق التنزه + السماح بالتيارات والمصارف + السماح بالتيارات والمصارف + السماح بالممرات المائية المتقطعة + السماح بالممرات المائية المتقطعة \ No newline at end of file From 29db0daa014aba81cdbd0f5e9ac1e1aee2e36a10 Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Mon, 28 Dec 2020 01:39:25 +0000 Subject: [PATCH 44/78] Translated using Weblate (German) Currently translated at 100.0% (3877 of 3877 strings) --- OsmAnd/res/values-de/phrases.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index e39de1583c..216951a62c 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -3832,7 +3832,7 @@ kein Vibrieren Pfeil Vibrieren - Give box + Tauschbox Stadtteil Bezirk Aufzug @@ -3848,7 +3848,7 @@ Kleine Elektrogeräte Nussladen Flüssigerdgas - Rastplatz + Parkbucht Überdachter Parkplatz Dachparkplätze GPX-Wegpunkt From f8dd7a2391373db10e03bf59c0f84a43ede833b4 Mon Sep 17 00:00:00 2001 From: syl Date: Sun, 27 Dec 2020 19:13:25 +0000 Subject: [PATCH 45/78] Translated using Weblate (French) Currently translated at 99.8% (3873 of 3877 strings) --- OsmAnd/res/values-fr/phrases.xml | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/OsmAnd/res/values-fr/phrases.xml b/OsmAnd/res/values-fr/phrases.xml index 5371880ddc..92e6a64d53 100644 --- a/OsmAnd/res/values-fr/phrases.xml +++ b/OsmAnd/res/values-fr/phrases.xml @@ -1128,7 +1128,7 @@ Autorisés en été seulement Entrée uniquement Sortie uniquement - Entrée et Sortie + Entrée et sortie Accès d\'été : entrée uniquement Accès d\'été : sortie uniquement Accès d\'été : entrée et sortie @@ -3559,7 +3559,7 @@ Trail (moto) Institution pour les transports Point d\'eau pour poids lourds - Multi-famille + Multi-familles Magasin de parquet Point de livraison Service des eaux @@ -3625,7 +3625,7 @@ Accès véhicules : militaires Accès véhicules : livraisons Accès véhicules : foresterie - Accès véhicules à moteur : non + Accès véhicule motorisé : non Accès motoneige : non Oui Livraison @@ -3633,22 +3633,22 @@ Indiqué Oui suspendu - Accès véhicules : oui - accès-voiture : privé - accès-voiture : impossible - accès-voiture : possible - Accès aux automobiles:forestiers - accès-voiture : autorisé - Accès-voiture : privé - Accès aux véhicules à moteur : livraison - Accès-véhicules : agricoles - Accès aux automobiles:riverains - Accès aux automobiles:forestiers - Accès aux véhicules à moteurs:riverains - Accès véhicule à moteur:toléré - Accès au véhicule à moteur:clients - Accès aux véhicules à moteur:militaires - Accès aux véhicules à moteurs:forestiers + Accès voiture : oui + Accès voiture : privé + Accès voiture : non + Accès voiture : permis + Accès voiture : clientèle + Accès véhicule motorisé : oui + Accès véhicule motorisé : privé + Accès véhicule motorisé : livraison + Accès véhicule motorisé : agricole + Accès voiture : riverains + Accès voiture : forestier + Accès véhicule motorisé : riverains + Accès véhicule motorisé : toléré + Accès véhicule motorisé : clientèle + Accès véhicule motorisé : militaire + Accès véhicule motorisé : forestier Entrée de cave Magasin de diététique Constructeur @@ -3688,7 +3688,7 @@ Type Plein-air Lac - Accès à cheval : forestiers seuls + Accès à cheval : forestier Accès piétonnier : riverains Accès aux remorques : non Accès aux transports publics ou taxis : oui From 63dfe5dd8aca207774c1a5fb85f08f8760f1d040 Mon Sep 17 00:00:00 2001 From: Franco Date: Sat, 26 Dec 2020 22:53:39 +0000 Subject: [PATCH 46/78] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index 01a7bc425a..101029bd57 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -3935,7 +3935,7 @@ El archivo ya fue importado en OsmAnd Usar el algoritmo de navegación A* bifásica Gráfico - Hay %1$s datos disponibles sólo en los caminos, calcular una ruta usando «Ruta entre puntos» para ver los gráficos. + Los datos de «%1$s» sólo están disponibles con los caminos, calcula una ruta usando «Ruta entre puntos» para ver los gráficos. Ten paciencia. \nEl gráfico estará disponible al recalcular la ruta. %1$s — %2$s @@ -4024,4 +4024,12 @@ Perfil de OsmAnd Perfil de usuario Invertir todos los puntos + Elige el perfil que será usado al iniciar la aplicación. + Usado por última vez + Prefiere rutas de senderismo + Preferir rutas de senderismo + Permite arroyos y desagües + Permitir arroyos y desagües + Permite cursos de agua intermitentes + Permitir cursos de agua intermitentes \ No newline at end of file From 56f3eacde90a115f4f9f115840c98116c18fbb8c Mon Sep 17 00:00:00 2001 From: Franco Date: Sat, 26 Dec 2020 22:59:20 +0000 Subject: [PATCH 47/78] Translated using Weblate (Spanish (American)) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-es-rUS/strings.xml | 31 +++++++++++++++++++--------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index e5909587a9..311a2c875c 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -1952,7 +1952,7 @@ Lapso de tiempo mínimo entre avisos. Rumbo relativo Rumbo magnético - Destino indefinido + Complemento de accesibilidad: Destino indefinido Activa la navegación para cambios en vivo de OsmAnd. Navegación con OsmAnd Live Síguenos @@ -2396,7 +2396,7 @@ Descarga el mapa de «Curvas de nivel» para usarlas en esta región. Complemento Compra e instala el complemento «Curvas de nivel» para mostrar áreas verticales graduadas. - Descarga el mapa «Superposición de sombreado» para mostrar el sombreado vertical. + Descarga la capa superpuesta del mapa «Sombreado» para mostrar el sombreado vertical. Instala el complemento «Curvas de nivel» para mostrar las áreas verticales graduadas. Ocultar desde el nivel de zoom Mostrar u ocultar notas de OSM @@ -3432,7 +3432,7 @@ Nombre de usuario y contraseña Los ajustes de este complemento son globales y se aplican a todos los perfiles Edición de OSM - Puedes ver todas tus ediciones aún no subidas o errores de OSM en «%1$s». Los puntos subidos no se muestran en OsmAnd. + Vea todas las ediciones aún no subidas o errores de OSM en «%1$s». Los cambios ya cargados no se mostrarán más. OSM El icono se muestra mientras se navega o se mueve. El icono se muestra en reposo. @@ -3794,9 +3794,9 @@ Controla el nivel de zoom del mapa usando los botones de volumen del dispositivo. Botones de volumen como zoom Descargar datos de Wikipedia - El punto de destino actual de la ruta será borrado. Si será el destino, la navegación se detendrá. + Quita el siguiente destino de la ruta. Si es el destino final, la navegación se detendrá. Borrar el punto de destino más cercano - Obtén información sobre los puntos de interés de Wikipedia. Es tu guía de bolsillo sin conexión - sólo activa el complemento de Wikipedia y disfruta los artículos sobre los objetos de alrededor. + Obtén información sobre los puntos de interés de Wikipedia, una guía de bolsillo sin conexión que incluye artículos sobre objetos y destinos. Proporciona un nombre para el punto Proporciona la longitud del vehículo, se pueden aplicar algunas restricciones de rutas para vehículos largos. Motoneta (motor) @@ -3851,7 +3851,7 @@ Abrir traza existente Última edición Importar traza - ¿Cerrar el plan de ruta sin guardar\?, se descartarán todos los cambios. + ¿Descartar todos los cambios en la ruta planificada\? Crear nueva ruta Cambiar el tipo de ruta anterior Cambiar el tipo de ruta posterior @@ -3908,12 +3908,12 @@ Último modificado Iconos de inicio y fin Gracias por comprar las «Curvas de nivel» - La suscripción se cobra por el período elegido. Puedes cancelarlo en cualquier momento en AppGallery. + La suscripción se cobra por el período elegido. Puedes cancelarlo en AppGallery en cualquier momento. El pago será cargado a la cuenta de AppGallery al confirmar la compra. \n \nLa suscripción se renueva automáticamente a menos que se cancele antes de la fecha de renovación. La cuenta será cargada por el período de renovación (mes/trimestre/año) sólo en la fecha de renovación. \n -\nPuedes administrar y cancelar las suscripciones accediendo a los ajustes de AppGallery. +\nPuedes administrar y cancelar las suscripciones en los ajustes de AppGallery. Evita pasar por aceras o veredas Evitar aceras Novedades @@ -3935,8 +3935,8 @@ MGRS MGRS OsmAnd usa MGRS, similar al formato UTM de la OTAN. - Hay %1$s datos disponibles sólo en los caminos, calcular una ruta usando «Ruta entre puntos» para ver los gráficos. - Ten paciencia + Los datos de «%1$s» sólo están disponibles con los caminos, calcula una ruta usando «Ruta entre puntos» para ver los gráficos. + Ten paciencia. \nEl gráfico estará disponible al recalcular la ruta. %1$s — %2$s Viaje @@ -4018,4 +4018,15 @@ Alemán (casual) Puedes usar los datos de elevación para tener en cuenta el ascenso y descenso del viaje Avión ligero + Usado por última vez + Preferir rutas de senderismo + Prefiere rutas de senderismo + Permitir arroyos y desagües + Permite arroyos y desagües + Permitir cursos de agua intermitentes + Permite cursos de agua intermitentes + Invertir todos los puntos + Perfil de usuario + Perfil de OsmAnd + Elige el perfil que será usado al iniciar la aplicación. \ No newline at end of file From 5c30ce696f1048d5e7e6123ac1b2612d214eec56 Mon Sep 17 00:00:00 2001 From: Franco Date: Sat, 26 Dec 2020 23:06:39 +0000 Subject: [PATCH 48/78] Translated using Weblate (Spanish (American)) Currently translated at 100.0% (3877 of 3877 strings) --- OsmAnd/res/values-es-rUS/phrases.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/OsmAnd/res/values-es-rUS/phrases.xml b/OsmAnd/res/values-es-rUS/phrases.xml index ca1d54f2d3..b46dce884c 100644 --- a/OsmAnd/res/values-es-rUS/phrases.xml +++ b/OsmAnd/res/values-es-rUS/phrases.xml @@ -3893,4 +3893,16 @@ Agente de dinero móvil Vacunación: COVID19 Vacunación + Lavadero público de ropa + Estación de transferencia de residuos + Báscula puente + Estación de guardabosque + Lago + Río + Pozo + Bomba accionada + Tanque de agua + Grifo + Planta potabilizadora + Pozo entubado \ No newline at end of file From 729b88516bc11df33ff3af1caef15f40543f49fe Mon Sep 17 00:00:00 2001 From: abdullah abdulrhman Date: Sun, 27 Dec 2020 08:54:48 +0000 Subject: [PATCH 49/78] Translated using Weblate (Arabic) Currently translated at 92.7% (3597 of 3877 strings) --- OsmAnd/res/values-ar/phrases.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-ar/phrases.xml b/OsmAnd/res/values-ar/phrases.xml index 77ca89347a..da2bfb09a0 100644 --- a/OsmAnd/res/values-ar/phrases.xml +++ b/OsmAnd/res/values-ar/phrases.xml @@ -2510,7 +2510,7 @@ بتروجليف مقبرة كبيرة قديمة دائرة الكوخ - مستعمرة + مستوطنة/هجرة حصن تومولوس المغليث حجر ضخم From a8dfe2cf4c01e2dbe850ce13a5bc447af3916a02 Mon Sep 17 00:00:00 2001 From: ssantos Date: Sun, 27 Dec 2020 09:03:56 +0000 Subject: [PATCH 50/78] Translated using Weblate (Portuguese) Currently translated at 99.8% (3873 of 3877 strings) --- OsmAnd/res/values-pt/phrases.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-pt/phrases.xml b/OsmAnd/res/values-pt/phrases.xml index f523f432af..a1ee9f3b00 100644 --- a/OsmAnd/res/values-pt/phrases.xml +++ b/OsmAnd/res/values-pt/phrases.xml @@ -3878,4 +3878,5 @@ Tanque de água Torneira Estação de tratamento de água + Posto de guarda florestal \ No newline at end of file From 46791d9cdddd8e5a0ed981c74e2088855b642e94 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Mon, 28 Dec 2020 02:02:41 +0000 Subject: [PATCH 51/78] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 28a6ff15b6..17c657df59 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -4016,4 +4016,10 @@ 反轉所有點 選取要在應用程式啟動時使用的設定檔。 最後使用 + 偏好遠足路線 + 偏好遠足路線 + 允許溪流與水溝 + 允許溪流與水溝 + 允許間歇水路 + 允許間歇水路 \ No newline at end of file From 807f56a05e0b0f27ee3d6b6044b834374abb35dd Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 28 Dec 2020 12:56:00 +0200 Subject: [PATCH 52/78] custom tabs in opr finishing --- OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java | 10 +++++++--- .../osmand/plus/settings/backend/OsmandSettings.java | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java b/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java index a7e1cdf320..5bacc2d60b 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java @@ -315,9 +315,13 @@ public class IntentHelper { if (intent != null && intent.getData() != null) { Uri uri = intent.getData(); if (uri.toString().startsWith(OPRWebviewActivity.OPR_OAUTH_PREFIX)) { - //android.util.Log.d("TAG", "parseOprOAuthIntent: " + uri.toString()); - //D/TAG: parseOprOAuthIntent: opr-oauth://osmand_opr_auth - String oauthVerifier = uri.getQueryParameter("oauth_verifier"); + String token = uri.getQueryParameter("token"); + String username = uri.getQueryParameter("username"); + //TODO + android.util.Log.d("TAG", "parseOprOAuthIntent: " + uri.toString()); + android.util.Log.d("TAG", "parseOprOAuthIntent: " + token); + android.util.Log.d("TAG", "parseOprOAuthIntent: " + username); + app.getSettings().OPR_ACCESS_TOKEN.set(token); mapActivity.setIntent(null); return true; } diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java index b3cd8fb9a6..e026f20e2f 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java @@ -1163,6 +1163,9 @@ public class OsmandSettings { public final OsmandPreference USER_ACCESS_TOKEN_SECRET = new StringPreference(this, "user_access_token_secret", "").makeGlobal(); + public final OsmandPreference OPR_ACCESS_TOKEN = + new StringPreference(this, "opr_user_access_token_secret", "").makeGlobal(); + // this value boolean is synchronized with settings_pref.xml preference offline POI/Bugs edition public final OsmandPreference OFFLINE_EDITION = new BooleanPreference(this, "offline_osm_editing", true).makeGlobal().makeShared(); public final OsmandPreference USE_DEV_URL = new BooleanPreference(this, "use_dev_url", false).makeGlobal().makeShared(); From 777d93f69612a4057ca16feba3a49ea13651f827 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 28 Dec 2020 13:27:16 +0200 Subject: [PATCH 53/78] Add logs for index item update --- .../plus/download/DownloadResources.java | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java index 2bff73d7b2..c8951b29f7 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java @@ -8,9 +8,9 @@ import net.osmand.PlatformUtil; import net.osmand.data.LatLon; import net.osmand.map.OsmandRegions; import net.osmand.map.WorldRegion; +import net.osmand.plus.CustomRegion; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; -import net.osmand.plus.CustomRegion; import net.osmand.plus.download.DownloadOsmandIndexesHelper.AssetIndexItem; import net.osmand.plus.inapp.InAppPurchaseHelper; import net.osmand.util.Algorithms; @@ -21,6 +21,7 @@ import java.io.File; import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStream; +import java.text.DateFormat; import java.text.ParseException; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -177,6 +178,8 @@ public class DownloadResources extends DownloadResourceGroup { } } if (date != null && !date.equals(indexActivatedDate) && !date.equals(indexFilesDate)) { + long oldItemSize = 0; + long itemSize = item.getContentSize(); if ((item.getType() == DownloadActivityType.NORMAL_FILE && !item.extra) || item.getType() == DownloadActivityType.ROADS_FILE || item.getType() == DownloadActivityType.WIKIPEDIA_FILE @@ -185,15 +188,12 @@ public class DownloadResources extends DownloadResourceGroup { outdated = true; } else if (item.getType() == DownloadActivityType.WIKIVOYAGE_FILE || item.getType() == DownloadActivityType.TRAVEL_FILE) { - long itemSize = item.getContentSize(); - long oldItemSize = app.getAppPath(IndexConstants.WIKIVOYAGE_INDEX_DIR + + oldItemSize = app.getAppPath(IndexConstants.WIKIVOYAGE_INDEX_DIR + item.getTargetFileName()).length(); if (itemSize != oldItemSize) { outdated = true; } } else { - long itemSize = item.getContentSize(); - long oldItemSize = 0; if (parsed && item.getTimestamp() > item.getLocalTimestamp()) { outdated = true; } else if (item.getType() == DownloadActivityType.VOICE_FILE) { @@ -223,12 +223,23 @@ public class DownloadResources extends DownloadResourceGroup { outdated = true; } } + if (outdated) { + logItemUpdateInfo(item, format, itemSize, oldItemSize); + } } item.setOutdated(outdated); return outdated; } - + private void logItemUpdateInfo(IndexItem item, DateFormat format, long itemSize, long oldItemSize) { + String date = item.getDate(format); + String sfName = item.getTargetFileName(); + String indexActivatedDate = indexActivatedFileNames.get(sfName); + String indexFilesDate = indexFileNames.get(sfName); + LOG.info("timestamp " + item.timestamp + " localTimestamp " + item.localTimestamp + " date " + date + + " indexActivatedDate " + indexActivatedDate + " indexFilesDate " + indexFilesDate + + " itemSize " + itemSize + " oldItemSize " + oldItemSize); + } protected void updateFilesToUpdate() { initAlreadyLoadedFiles(); From 8375f7f107b71aefc0ccaeac20a2677f4841436a Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Mon, 28 Dec 2020 14:09:06 +0200 Subject: [PATCH 54/78] One inter --- OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 91440912d2..de373ce221 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -522,7 +522,7 @@ public class WaypointDialogHelper { }) .create(); int intermediateSize = targetsHelper.getIntermediatePoints().size(); - if (intermediateSize > 1) { + if (intermediateSize >= 1) { items.add(reorderAllItems); } From bd0ee52f913ddfa91efdb2f975ea9db88c5f68f2 Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Mon, 28 Dec 2020 14:17:13 +0200 Subject: [PATCH 55/78] Fix --- OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index de373ce221..59d0c90026 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -521,8 +521,7 @@ public class WaypointDialogHelper { } }) .create(); - int intermediateSize = targetsHelper.getIntermediatePoints().size(); - if (intermediateSize >= 1) { + if (!Algorithms.isEmpty(targetsHelper.getIntermediatePoints())) { items.add(reorderAllItems); } From e968a030063940678750ddfbcbe5ceb16a80b574 Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Mon, 28 Dec 2020 14:19:03 +0200 Subject: [PATCH 56/78] Update WaypointDialogHelper.java --- .../plus/helpers/WaypointDialogHelper.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 59d0c90026..112364a6ba 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -502,26 +502,26 @@ public class WaypointDialogHelper { .create(); items.add(reorderStartAndFinishItem); - BaseBottomSheetItem reorderAllItems = new SimpleBottomSheetItem.Builder() - .setIcon(getContentIcon(R.drawable.ic_action_sort_reverse_order)) - .setTitle(getString(R.string.reverse_all_points)) - .setLayoutId(R.layout.bottom_sheet_item_simple) - .setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - MapActivity mapActivity = getMapActivity(); - if (mapActivity != null) { - WaypointDialogHelper.reverseAllPoints( - app, - mapActivity, - mapActivity.getDashboard().getWaypointDialogHelper() - ); - } - dismiss(); - } - }) - .create(); if (!Algorithms.isEmpty(targetsHelper.getIntermediatePoints())) { + BaseBottomSheetItem reorderAllItems = new SimpleBottomSheetItem.Builder() + .setIcon(getContentIcon(R.drawable.ic_action_sort_reverse_order)) + .setTitle(getString(R.string.reverse_all_points)) + .setLayoutId(R.layout.bottom_sheet_item_simple) + .setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + MapActivity mapActivity = getMapActivity(); + if (mapActivity != null) { + WaypointDialogHelper.reverseAllPoints( + app, + mapActivity, + mapActivity.getDashboard().getWaypointDialogHelper() + ); + } + dismiss(); + } + }) + .create(); items.add(reorderAllItems); } From 144f812f40dfc8c8b9075f0d5776361f17dcafa1 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Mon, 28 Dec 2020 17:14:18 +0200 Subject: [PATCH 57/78] Fix review --- .../osmand/plus/wikivoyage/explore/ExploreRvAdapter.java | 1 + .../plus/wikivoyage/explore/WikivoyageExploreActivity.java | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java index 29951db19a..c0ab357e0c 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java @@ -182,6 +182,7 @@ public class ExploreRvAdapter extends RecyclerView.Adapter> fragments = new ArrayList<>(); private LockableViewPager viewPager; - private boolean finishDownloading = false; @Override public void onCreate(Bundle savedInstanceState) { @@ -314,12 +313,10 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv public void populateData() { switchProgressBarVisibility(true); - finishDownloading = false; new LoadWikivoyageData(this).execute(); } private void onDataLoaded() { - finishDownloading = true; switchProgressBarVisibility(false); updateSearchBarVisibility(); updateFragments(); @@ -356,9 +353,7 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv } public void onTabFragmentResume(Fragment fragment) { - if(finishDownloading) { - updateFragments(); - } + updateFragments(); } @Override From 12a5f4f3aebbb2ca3d8f38bba58fbcc8a1b01c70 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 28 Dec 2020 17:29:22 +0200 Subject: [PATCH 58/78] fixes in oauth opr --- OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java b/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java index 5bacc2d60b..066db62593 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java @@ -315,8 +315,8 @@ public class IntentHelper { if (intent != null && intent.getData() != null) { Uri uri = intent.getData(); if (uri.toString().startsWith(OPRWebviewActivity.OPR_OAUTH_PREFIX)) { - String token = uri.getQueryParameter("token"); - String username = uri.getQueryParameter("username"); + String token = uri.getQueryParameter("opr-token"); + String username = uri.getQueryParameter("opr-nickname"); //TODO android.util.Log.d("TAG", "parseOprOAuthIntent: " + uri.toString()); android.util.Log.d("TAG", "parseOprOAuthIntent: " + token); From d638709240f803d9c922473a4f38c10589be2a9f Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 28 Dec 2020 18:45:02 +0200 Subject: [PATCH 59/78] custom tabs reimplemented --- OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java | 5 +---- OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java | 6 +++--- OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java | 1 + .../net/osmand/plus/settings/backend/OsmandSettings.java | 3 +++ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java b/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java index 066db62593..b19ce451b4 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/IntentHelper.java @@ -317,11 +317,8 @@ public class IntentHelper { if (uri.toString().startsWith(OPRWebviewActivity.OPR_OAUTH_PREFIX)) { String token = uri.getQueryParameter("opr-token"); String username = uri.getQueryParameter("opr-nickname"); - //TODO - android.util.Log.d("TAG", "parseOprOAuthIntent: " + uri.toString()); - android.util.Log.d("TAG", "parseOprOAuthIntent: " + token); - android.util.Log.d("TAG", "parseOprOAuthIntent: " + username); app.getSettings().OPR_ACCESS_TOKEN.set(token); + app.getSettings().OPR_USERNAME.set(username); mapActivity.setIntent(null); return true; } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java index 3a34e262fc..1f772966fa 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java @@ -383,9 +383,9 @@ public class MenuBuilder { } else { registerResultListener(view); final String baseUrl = OPRWebviewActivity.getBaseUrl(app); - final String name = OPRWebviewActivity.getUsernameFromCookie(app); - final String privateKey = OPRWebviewActivity.getPrivateKeyFromCookie(app); - if (privateKey == null || privateKey.isEmpty()) { + final String name = app.getSettings().OPR_USERNAME.get(); + final String privateKey = app.getSettings().OPR_ACCESS_TOKEN.get(); + if (Algorithms.isBlank(privateKey) || Algorithms.isBlank(name)) { OprStartFragment.showInstance(mapActivity.getSupportFragmentManager()); return; } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java b/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java index 36d6e82b11..22ebd7220d 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java @@ -54,6 +54,7 @@ public class OpenDBAPI { String url = null; try { url = baseUrl + checkLoginEndpoint + + "purpose=opr-android&" + "name=" + username + "&" + diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java index e026f20e2f..44f948d651 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java @@ -1166,6 +1166,9 @@ public class OsmandSettings { public final OsmandPreference OPR_ACCESS_TOKEN = new StringPreference(this, "opr_user_access_token_secret", "").makeGlobal(); + public final OsmandPreference OPR_USERNAME = + new StringPreference(this, "opr_username_secret", "").makeGlobal(); + // this value boolean is synchronized with settings_pref.xml preference offline POI/Bugs edition public final OsmandPreference OFFLINE_EDITION = new BooleanPreference(this, "offline_osm_editing", true).makeGlobal().makeShared(); public final OsmandPreference USE_DEV_URL = new BooleanPreference(this, "use_dev_url", false).makeGlobal().makeShared(); From cb5e2f0a8e49b1fda6793b6962136b963af2645c Mon Sep 17 00:00:00 2001 From: Kseniia Date: Mon, 28 Dec 2020 21:05:54 +0200 Subject: [PATCH 60/78] #10230 Change leftTurn --- .../java/net/osmand/router/GeneralRouter.java | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java b/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java index e6d19c1d58..29490a748b 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java @@ -63,9 +63,9 @@ public class GeneralRouter implements VehicleRouter { // cached values private boolean restrictionsAware = true; - private float leftTurn; + private float sharpTurn; private float roundaboutTurn; - private float rightTurn; + private float slightTurn; // speed in m/s private float minSpeed = 0.28f; // speed in m/s @@ -222,10 +222,10 @@ public class GeneralRouter implements VehicleRouter { attributes.put(k, v); if(k.equals("restrictionsAware")) { restrictionsAware = parseSilentBoolean(v, restrictionsAware); - } else if(k.equals("leftTurn")) { - leftTurn = parseSilentFloat(v, leftTurn); - } else if(k.equals("rightTurn")) { - rightTurn = parseSilentFloat(v, rightTurn); + } else if(k.equals("sharpTurn")) { + sharpTurn = parseSilentFloat(v, sharpTurn); + } else if(k.equals("slightTurn")) { + slightTurn = parseSilentFloat(v, slightTurn); } else if(k.equals("roundaboutTurn")) { roundaboutTurn = parseSilentFloat(v, roundaboutTurn); } else if(k.equals("minDefaultSpeed") || k.equals("defaultSpeed")) { @@ -605,11 +605,11 @@ public class GeneralRouter implements VehicleRouter { } public double getLeftTurn() { - return leftTurn; + return sharpTurn; } public double getRightTurn() { - return rightTurn; + return slightTurn; } public double getRoundaboutTurn() { @@ -620,9 +620,7 @@ public class GeneralRouter implements VehicleRouter { public double calculateTurnTime(RouteSegment segment, int segmentEnd, RouteSegment prev, int prevSegmentEnd) { float ts = getPenaltyTransition(segment.getRoad()); float prevTs = getPenaltyTransition(prev.getRoad()); - if(prevTs != ts) { - return Math.abs(ts - prevTs) / 2; - } + // int[] pt = prev.getRoad().getPointTypes(prevSegmentEnd); // if(pt != null) { // RouteRegion reg = prev.getRoad().region; @@ -654,6 +652,11 @@ public class GeneralRouter implements VehicleRouter { } return 0; } + + if (ts != prevTs) { + return prevTs + ts; + + } return 0; } From 75afb2b2270204e30ed30f1a1f034eeda808d119 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Tue, 29 Dec 2020 10:17:41 +0200 Subject: [PATCH 61/78] Fix review --- .../src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java | 1 - .../plus/wikivoyage/explore/WikivoyageExploreActivity.java | 1 - 2 files changed, 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java index c0ab357e0c..29951db19a 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java @@ -182,7 +182,6 @@ public class ExploreRvAdapter extends RecyclerView.Adapter Date: Tue, 29 Dec 2020 10:36:20 +0200 Subject: [PATCH 62/78] Add file name --- OsmAnd/src/net/osmand/plus/download/DownloadResources.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java index c8951b29f7..648d3d3a00 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java @@ -236,7 +236,7 @@ public class DownloadResources extends DownloadResourceGroup { String sfName = item.getTargetFileName(); String indexActivatedDate = indexActivatedFileNames.get(sfName); String indexFilesDate = indexFileNames.get(sfName); - LOG.info("timestamp " + item.timestamp + " localTimestamp " + item.localTimestamp + " date " + date + LOG.info("name " + item.getFileName() + " timestamp " + item.timestamp + " localTimestamp " + item.localTimestamp + " date " + date + " indexActivatedDate " + indexActivatedDate + " indexFilesDate " + indexFilesDate + " itemSize " + itemSize + " oldItemSize " + oldItemSize); } From 8716d49a25a1aa3efc008d744e114d80beb5ed20 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Tue, 29 Dec 2020 11:16:11 +0200 Subject: [PATCH 63/78] Fix ExploreRvAdapter --- .../osmand/plus/wikivoyage/explore/ExploreRvAdapter.java | 8 ++++++-- .../wikivoyage/explore/WikivoyageExploreActivity.java | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java index 29951db19a..a95614bdb8 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java @@ -142,7 +142,9 @@ public class ExploreRvAdapter extends RecyclerView.Adapter Date: Tue, 29 Dec 2020 11:49:02 +0200 Subject: [PATCH 64/78] change default settings for the "Close changeset" switch --- .../dialogs/SendPoiBottomSheetFragment.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiBottomSheetFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiBottomSheetFragment.java index a715c33354..21b61d1fe3 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiBottomSheetFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/SendPoiBottomSheetFragment.java @@ -72,20 +72,13 @@ public class SendPoiBottomSheetFragment extends MenuBottomSheetDialogFragment { String userNameOpenID = settings.USER_NAME.get(); String userName = isLoginOAuth(settings) ? userNameOAuth : userNameOpenID; accountName.setText(userName); - closeChangeSet.setBackgroundResource(isNightMode ? R.drawable.layout_bg_dark : R.drawable.layout_bg); final int paddingSmall = app.getResources().getDimensionPixelSize(R.dimen.content_padding_small); - closeChangeSet.setPadding(paddingSmall, 0, paddingSmall, 0); + closeChangeSet.setChecked(true); + setCloseChangeSet(isNightMode, paddingSmall); closeChangeSet.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - if (isNightMode) { - closeChangeSet.setBackgroundResource( - isChecked ? R.drawable.layout_bg_dark_solid : R.drawable.layout_bg_dark); - } else { - closeChangeSet.setBackgroundResource( - isChecked ? R.drawable.layout_bg_solid : R.drawable.layout_bg); - } - closeChangeSet.setPadding(paddingSmall, 0, paddingSmall, 0); + setCloseChangeSet(isNightMode, paddingSmall); } }); LinearLayout account = sendOsmPoiView.findViewById(R.id.account_container); @@ -254,5 +247,16 @@ public class SendPoiBottomSheetFragment extends MenuBottomSheetDialogFragment { } return comment; } + + private void setCloseChangeSet(boolean isNightMode, int paddingSmall) { + if (isNightMode) { + closeChangeSet.setBackgroundResource( + closeChangeSet.isChecked() ? R.drawable.layout_bg_dark_solid : R.drawable.layout_bg_dark); + } else { + closeChangeSet.setBackgroundResource( + closeChangeSet.isChecked() ? R.drawable.layout_bg_solid : R.drawable.layout_bg); + } + closeChangeSet.setPadding(paddingSmall, 0, paddingSmall, 0); + } } From 01bf8f0ba38618a07fbc100e2b018451115f8ef3 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 29 Dec 2020 12:41:22 +0200 Subject: [PATCH 65/78] opr purpose fix --- OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java b/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java index 22ebd7220d..edce712a1a 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java @@ -40,6 +40,7 @@ public class OpenDBAPI { private static final Log log = PlatformUtil.getLog(SecUtils.class); private static final String checkLoginEndpoint = "api/auth/user-check-loginkey?"; private static final String LOGIN_SUCCESS_MESSAGE = "{\"result\":\"OK\"}"; + private static final String PURPOSE = "opr-android"; private static final int THREAD_ID = 11200; /* @@ -54,7 +55,7 @@ public class OpenDBAPI { String url = null; try { url = baseUrl + checkLoginEndpoint + - "purpose=opr-android&" + + "purpose=" + PURPOSE + "&" + "name=" + username + "&" + @@ -75,7 +76,7 @@ public class OpenDBAPI { Security.addProvider(new BouncyCastleProvider()); } KeyPair kp = SecUtils.getKeyPair(ALGO_EC, privateKey, null); - String signed = username + ":opr-web"; + String signed = username + ":" + PURPOSE; JsonFormatter formatter = new JsonFormatter(); OPRImage oprImage = new GsonBuilder().create().fromJson(image, OPRImage.class); From becc44a1484ec4982e5d49ae2367a8096bb20fda Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 29 Dec 2020 13:24:01 +0200 Subject: [PATCH 66/78] update opr constants --- OsmAnd/AndroidManifest.xml | 1 - .../net/osmand/plus/helpers/IntentHelper.java | 4 +- .../plus/mapcontextmenu/MenuBuilder.java | 18 +- .../builders/cards/ImageCard.java | 4 +- .../plus/openplacereviews/OPRConstants.java | 38 +++++ .../openplacereviews/OPRWebviewActivity.java | 160 ------------------ .../openplacereviews/OprStartFragment.java | 4 +- .../osmand/plus/osmedit/opr/OpenDBAPI.java | 8 +- 8 files changed, 58 insertions(+), 179 deletions(-) create mode 100644 OsmAnd/src/net/osmand/plus/openplacereviews/OPRConstants.java delete mode 100644 OsmAnd/src/net/osmand/plus/openplacereviews/OPRWebviewActivity.java diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index 2c85514de8..67709531f9 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -65,7 +65,6 @@ - > 1; - String baseUrl = OPRWebviewActivity.getBaseUrl(app); + String baseUrl = OPRConstants.getBaseUrl(app); String url = baseUrl + "api/objects-by-index?type=opr.place&index=osmid&key=" + amenityId; String response = AndroidNetworkUtils.sendRequest(app, url, Collections.emptyMap(), "Requesting location images...", false, false); diff --git a/OsmAnd/src/net/osmand/plus/openplacereviews/OPRConstants.java b/OsmAnd/src/net/osmand/plus/openplacereviews/OPRConstants.java new file mode 100644 index 0000000000..a329e48235 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/openplacereviews/OPRConstants.java @@ -0,0 +1,38 @@ +package net.osmand.plus.openplacereviews; + + +import android.content.Context; + +import net.osmand.plus.R; +import net.osmand.plus.osmedit.opr.OpenDBAPI; + +public class OPRConstants { + public static final String OPR_OAUTH_PREFIX = "opr-oauth"; + private static final String PURPOSE = OpenDBAPI.PURPOSE; + private static final String CALLBACK_URL = OPR_OAUTH_PREFIX + "://osmand_opr_auth"; + + public static String getBaseUrl(Context ctx) { + return ctx.getString(R.string.opr_base_url); + } + + + public static String getLoginUrl(Context ctx) { + return getBaseUrl(ctx) + "login" + getQueryString(ctx); + } + + public static String getRegisterUrl(Context ctx) { + return getBaseUrl(ctx) + "signup" + getQueryString(ctx); + } + + public static String getQueryString(Context ctx) { + return "?" + getPurposeParam(ctx) + "&" + getCallbackParam(ctx); + } + + public static String getPurposeParam(Context ctx) { + return "purpose=" + PURPOSE; + } + + public static String getCallbackParam(Context ctx) { + return "callback=" + CALLBACK_URL; + } +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/openplacereviews/OPRWebviewActivity.java b/OsmAnd/src/net/osmand/plus/openplacereviews/OPRWebviewActivity.java deleted file mode 100644 index 266aabe78e..0000000000 --- a/OsmAnd/src/net/osmand/plus/openplacereviews/OPRWebviewActivity.java +++ /dev/null @@ -1,160 +0,0 @@ -package net.osmand.plus.openplacereviews; - - -import android.content.Context; -import android.graphics.PorterDuff; -import android.graphics.drawable.ColorDrawable; -import android.graphics.drawable.Drawable; -import android.os.Bundle; -import android.view.View; -import android.webkit.CookieManager; -import android.webkit.WebView; -import android.webkit.WebViewClient; -import android.widget.TextView; - -import androidx.appcompat.widget.Toolbar; -import androidx.core.content.ContextCompat; - -import net.osmand.AndroidUtils; -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.R; -import net.osmand.plus.activities.OsmandActionBarActivity; -import net.osmand.plus.settings.backend.OsmandSettings; - -import java.util.ArrayList; -import java.util.List; - -public class OPRWebviewActivity extends OsmandActionBarActivity { - public static final String KEY_LOGIN = "LOGIN_KEY"; - public static final String KEY_TITLE = "TITLE_KEY"; - public static final String OPR_OAUTH_PREFIX = "opr-oauth"; - private static final String USER_AGENT = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko)"; - private static final String PURPOSE = "opr-android"; - private static final String CALLBACK_URL = OPR_OAUTH_PREFIX + "://osmand_opr_auth"; - private WebView webView; - private boolean isLogin = false; - - public static String getBaseUrl(Context ctx) { - return ctx.getString(R.string.opr_base_url); - } - - public static String getCookieUrl(Context ctx) { - return getBaseUrl(ctx) + "profile"; - } - - public static String getLoginUrl(Context ctx) { - return getBaseUrl(ctx) + "login" + getQueryString(ctx); - } - - public static String getRegisterUrl(Context ctx) { - return getBaseUrl(ctx) + "signup" + getQueryString(ctx); - } - - public static String getQueryString(Context ctx) { - return "?" + getPurposeParam(ctx) + "&" + getCallbackParam(ctx); - } - - public static String getPurposeParam(Context ctx) { - return "purpose=" + PURPOSE; - } - - public static String getCallbackParam(Context ctx) { - return "callback=" + CALLBACK_URL; - } - - public static List getFinishUrls(Context ctx) { - String googleOAuthFinishUrl = getBaseUrl(ctx) + "auth?code=4"; - String profileUrl = getCookieUrl(ctx); - List urls = new ArrayList<>(); - urls.add(googleOAuthFinishUrl); - urls.add(profileUrl); - return urls; - } - - public void onCreate(Bundle savedInstanceState) { - OsmandApplication app = getMyApplication(); - OsmandSettings settings = app.getSettings(); - boolean nightMode = !settings.isLightContent(); - int themeId = nightMode ? R.style.OsmandDarkTheme_NoActionbar : R.style.OsmandLightTheme_NoActionbar_LightStatusBar; - setTheme(themeId); - getWindow().setStatusBarColor(ContextCompat.getColor(this, nightMode - ? R.color.list_background_color_dark : R.color.list_background_color_light)); - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_opr_webview); - Bundle bundle = getIntent().getExtras(); - Toolbar toolbar = findViewById(R.id.toolbar); - if (bundle != null) { - TextView titleView = findViewById(R.id.toolbar_text); - String title = bundle.getString(KEY_TITLE, ""); - titleView.setText(title); - } - toolbar.setBackgroundDrawable(new ColorDrawable(AndroidUtils.getColorFromAttr(this, R.attr.bg_color))); - final Drawable upArrow = app.getUIUtilities().getIcon(AndroidUtils.getNavigationIconResId(this)); - upArrow.setColorFilter(ContextCompat.getColor(this, R.color.color_favorite_gray), PorterDuff.Mode.SRC_ATOP); - toolbar.setNavigationIcon(upArrow); - toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up); - toolbar.setNavigationOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - onBackPressed(); - } - }); - webView = findViewById(R.id.printDialogWebview); - webView.getSettings().setUserAgentString(USER_AGENT); - webView.setWebViewClient(new CloseOnSuccessWebViewClient()); - webView.getSettings().setJavaScriptEnabled(true); - WebView.setWebContentsDebuggingEnabled(true); - if (bundle != null) { - isLogin = bundle.getBoolean(KEY_LOGIN); - if (isLogin) { - webView.loadUrl(getLoginUrl(this)); - } else { - webView.loadUrl(getRegisterUrl(this)); - } - } - } - - @Override - public boolean onSupportNavigateUp() { - onBackPressed(); - return true; - } - - public static String getPrivateKeyFromCookie(Context ctx) { - return returnCookieByKey(ctx, "opr-token"); - } - - public static String getUsernameFromCookie(Context ctx) { - return returnCookieByKey(ctx, "opr-nickname"); - } - - private static String returnCookieByKey(Context ctx, String key) { - String CookieValue = null; - CookieManager cookieManager = CookieManager.getInstance(); - String cookies = cookieManager.getCookie(getCookieUrl(ctx)); - if (cookies == null || cookies.isEmpty()) { - return ""; - } - String[] temp = cookies.split(";"); - for (String ar1 : temp) { - if (ar1.contains(key)) { - String[] temp1 = ar1.split("="); - CookieValue = temp1[1]; - break; - } - } - return CookieValue; - } - - public class CloseOnSuccessWebViewClient extends WebViewClient { - @Override - public void onPageFinished(WebView view, String url) { - for (String furl : getFinishUrls(OPRWebviewActivity.this)) { - if (url.contains(furl) && isLogin) { - finish(); - } - } - super.onPageFinished(view, url); - } - } -} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/openplacereviews/OprStartFragment.java b/OsmAnd/src/net/osmand/plus/openplacereviews/OprStartFragment.java index da2959efc4..1b435654ef 100644 --- a/OsmAnd/src/net/osmand/plus/openplacereviews/OprStartFragment.java +++ b/OsmAnd/src/net/osmand/plus/openplacereviews/OprStartFragment.java @@ -70,14 +70,14 @@ public class OprStartFragment extends BaseOsmAndFragment { } private void handleHaveAccount() { - String url = OPRWebviewActivity.getLoginUrl(requireContext()); + String url = OPRConstants.getLoginUrl(requireContext()); CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); CustomTabsIntent customTabsIntent = builder.build(); customTabsIntent.launchUrl(requireContext(), Uri.parse(url)); } private void handleCreateAccount() { - String url = OPRWebviewActivity.getRegisterUrl(requireContext()); + String url = OPRConstants.getRegisterUrl(requireContext()); CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); CustomTabsIntent customTabsIntent = builder.build(); customTabsIntent.launchUrl(requireContext(), Uri.parse(url)); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java b/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java index edce712a1a..faaeaa61e8 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java @@ -37,16 +37,16 @@ import static org.openplacereviews.opendb.SecUtils.signMessageWithKeyBase64; public class OpenDBAPI { + public static final String PURPOSE = "opr-android"; private static final Log log = PlatformUtil.getLog(SecUtils.class); private static final String checkLoginEndpoint = "api/auth/user-check-loginkey?"; private static final String LOGIN_SUCCESS_MESSAGE = "{\"result\":\"OK\"}"; - private static final String PURPOSE = "opr-android"; private static final int THREAD_ID = 11200; /* * method for check if user is loggined in blockchain * params - * - username: blockchain username in format "openplacereviews:test_1" + * - username: blockchain username in format "openplacereviews" * - privatekey: "base64:PKCS#8:actualKey" * Need to encode key * Do not call on mainThread @@ -54,8 +54,8 @@ public class OpenDBAPI { public boolean checkPrivateKeyValid(String baseUrl, String username, String privateKey) { String url = null; try { - url = baseUrl + checkLoginEndpoint + - "purpose=" + PURPOSE + "&" + + String purposeParam = "purpose=" + PURPOSE; + url = baseUrl + checkLoginEndpoint + purposeParam + "&" + "name=" + username + "&" + From f3e408c782b9e0ab8e3096bada17f775932b6f5c Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 29 Dec 2020 13:33:03 +0200 Subject: [PATCH 67/78] cleanup --- OsmAnd/res/layout/activity_opr_webview.xml | 32 ---------------------- 1 file changed, 32 deletions(-) delete mode 100644 OsmAnd/res/layout/activity_opr_webview.xml diff --git a/OsmAnd/res/layout/activity_opr_webview.xml b/OsmAnd/res/layout/activity_opr_webview.xml deleted file mode 100644 index c013975c31..0000000000 --- a/OsmAnd/res/layout/activity_opr_webview.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file From a94e3ace11eff11b5775e64035343e51d7fc74d3 Mon Sep 17 00:00:00 2001 From: Kseniia Date: Tue, 29 Dec 2020 14:31:08 +0200 Subject: [PATCH 68/78] #10230 Change leftTurn --- .../java/net/osmand/router/GeneralRouter.java | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java b/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java index 29490a748b..fad98d466d 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java @@ -220,19 +220,19 @@ public class GeneralRouter implements VehicleRouter { public void addAttribute(String k, String v) { attributes.put(k, v); - if(k.equals("restrictionsAware")) { + if (k.equals("restrictionsAware")) { restrictionsAware = parseSilentBoolean(v, restrictionsAware); - } else if(k.equals("sharpTurn")) { + } else if (k.equals("sharpTurn") || k.equals("leftTurn")) { sharpTurn = parseSilentFloat(v, sharpTurn); - } else if(k.equals("slightTurn")) { + } else if (k.equals("slightTurn") || k.equals("rightTurn")) { slightTurn = parseSilentFloat(v, slightTurn); - } else if(k.equals("roundaboutTurn")) { + } else if (k.equals("roundaboutTurn")) { roundaboutTurn = parseSilentFloat(v, roundaboutTurn); - } else if(k.equals("minDefaultSpeed") || k.equals("defaultSpeed")) { + } else if (k.equals("minDefaultSpeed") || k.equals("defaultSpeed")) { defaultSpeed = parseSilentFloat(v, defaultSpeed * 3.6f) / 3.6f; - } else if( k.equals("minSpeed")) { + } else if (k.equals("minSpeed")) { minSpeed = parseSilentFloat(v, minSpeed * 3.6f) / 3.6f; - } else if(k.equals("maxDefaultSpeed") || k.equals("maxSpeed")) { + } else if (k.equals("maxDefaultSpeed") || k.equals("maxSpeed")) { maxSpeed = parseSilentFloat(v, maxSpeed * 3.6f) / 3.6f; } } @@ -621,6 +621,12 @@ public class GeneralRouter implements VehicleRouter { float ts = getPenaltyTransition(segment.getRoad()); float prevTs = getPenaltyTransition(prev.getRoad()); + float totalPenalty = 0; + + if (prevTs != ts) { + totalPenalty += Math.abs(ts - prevTs) / 2; + } + // int[] pt = prev.getRoad().getPointTypes(prevSegmentEnd); // if(pt != null) { // RouteRegion reg = prev.getRoad().region; @@ -633,31 +639,25 @@ public class GeneralRouter implements VehicleRouter { // } // } - if(segment.getRoad().roundabout() && !prev.getRoad().roundabout()) { double rt = getRoundaboutTurn(); if(rt > 0) { - return rt; + totalPenalty += rt; } - } - if (getLeftTurn() > 0 || getRightTurn() > 0) { - double a1 = segment.getRoad().directionRoute(segment.getSegmentStart(), segment.getSegmentStart() < segmentEnd); + } else if (getLeftTurn() > 0 || getRightTurn() > 0) { + double a1 = segment.getRoad().directionRoute(segment.getSegmentStart(), + segment.getSegmentStart() < segmentEnd); double a2 = prev.getRoad().directionRoute(prevSegmentEnd, prevSegmentEnd < prev.getSegmentStart()); double diff = Math.abs(MapUtils.alignAngleDifference(a1 - a2 - Math.PI)); // more like UT if (diff > 2 * Math.PI / 3) { - return getLeftTurn(); + totalPenalty += getLeftTurn(); } else if (diff > Math.PI / 3) { - return getRightTurn(); + totalPenalty += getRightTurn(); } - return 0; } - if (ts != prevTs) { - return prevTs + ts; - - } - return 0; + return totalPenalty; } From 93878fd07464d2a91d1d59c55db60eb30c13188e Mon Sep 17 00:00:00 2001 From: vshcherb Date: Tue, 29 Dec 2020 14:55:07 +0100 Subject: [PATCH 69/78] Update OpenDBAPI.java --- OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java b/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java index faaeaa61e8..a16361c8bd 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/opr/OpenDBAPI.java @@ -37,7 +37,7 @@ import static org.openplacereviews.opendb.SecUtils.signMessageWithKeyBase64; public class OpenDBAPI { - public static final String PURPOSE = "opr-android"; + public static final String PURPOSE = "osmand-android"; private static final Log log = PlatformUtil.getLog(SecUtils.class); private static final String checkLoginEndpoint = "api/auth/user-check-loginkey?"; private static final String LOGIN_SUCCESS_MESSAGE = "{\"result\":\"OK\"}"; From d3d79b25aaf99d4c753fec4f6d706dcd6b49f422 Mon Sep 17 00:00:00 2001 From: xmd5a Date: Tue, 29 Dec 2020 22:03:31 +0300 Subject: [PATCH 70/78] Add synonyms --- OsmAnd/res/values/phrases.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values/phrases.xml b/OsmAnd/res/values/phrases.xml index 28c17c4a5d..c69f7860f3 100644 --- a/OsmAnd/res/values/phrases.xml +++ b/OsmAnd/res/values/phrases.xml @@ -384,7 +384,7 @@ Electricity Aircraft fuel station Gas station for boats - Charging station + Charging station;Electric vehicle charging station;EV charging station;Electric recharging point;Charge point;Electronic charging station;Electric vehicle supply equipment Fuel: wood Fuel: charcoal Fuel: coal @@ -4326,5 +4326,8 @@ Lavoir + Swimming area + + From c1ee9dec982ce6aafce9b836a3c3aa83cfcb10ce Mon Sep 17 00:00:00 2001 From: Tobias Henricsson Date: Tue, 29 Dec 2020 19:25:43 +0000 Subject: [PATCH 71/78] Translated using Weblate (Swedish) Currently translated at 60.7% (2181 of 3590 strings) --- OsmAnd/res/values-sv/strings.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index c6cd3aca26..80d752ea56 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -2915,4 +2915,22 @@ Vänligen tillhandahåll fullständig kod Språk Språk Alla språk + • La till inställning för att exportera och importera all data, inklusive inställningar, resurser, mina platser +\n +\n • Planera rutt: Grafer för seggraphs for track segments with route, and added the ability to create and edit multiple track segments +\n +\n • Added OAuth authentication method for OpenStreetMap, improved UI of OSM dialogs +\n +\n • Support custom colors for favorites and track waypoints +\n +\n + Vänd alla punkter + Välj den profil som ska användas när appen startas. + Senast använd + Föredra vandringsleder + Föredra vandringsleder + Tillåt strömmar och torrläggningar + Tillåt strömmar och torrläggningar + Tillåt vägar över vatten + Tillåt vägar över vatten \ No newline at end of file From 32e55e62af80ad3e4605f97a954e819b6ac0e616 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Mon, 28 Dec 2020 20:36:05 +0000 Subject: [PATCH 72/78] Translated using Weblate (French) Currently translated at 100.0% (3590 of 3590 strings) --- OsmAnd/res/values-fr/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index b52ca23ec8..3cd132f82a 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -4004,4 +4004,6 @@ Pirivilégier les itinéraires de randonnée Autoriser les voies navigables intermittentes Autoriser les voies navigables intermittentes + Autoriser les cours d’eau et les drains + Autoriser les cours d’eau et les drains \ No newline at end of file From 599c99023a0fa7ae53537cf35075859deab5da23 Mon Sep 17 00:00:00 2001 From: Artem Date: Tue, 29 Dec 2020 14:45:42 +0000 Subject: [PATCH 73/78] Translated using Weblate (Russian) Currently translated at 99.6% (3576 of 3590 strings) --- OsmAnd/res/values-ru/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index c7dbab21d9..59bc5514c9 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -4001,4 +4001,8 @@ Разделить после Профиль пользователя Профиль OsmAnd + Выберите профиль, который будет использоваться при запуске приложения. + Последний раз использовалось + Разрешить прерывистые водные пути + Разрешить прерывистые водные пути \ No newline at end of file From c9a36c274e3a0e8f17bd50c5c7fa0105fcbaca76 Mon Sep 17 00:00:00 2001 From: WaldiS Date: Mon, 28 Dec 2020 17:16:43 +0000 Subject: [PATCH 74/78] Translated using Weblate (Polish) Currently translated at 99.6% (3577 of 3590 strings) --- OsmAnd/res/values-pl/strings.xml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values-pl/strings.xml b/OsmAnd/res/values-pl/strings.xml index c6616b7b1e..2fcf1a61c4 100644 --- a/OsmAnd/res/values-pl/strings.xml +++ b/OsmAnd/res/values-pl/strings.xml @@ -3793,7 +3793,7 @@ Podaj nazwę punktu Usuwa następny cel na trasie. Jeśli jest to miejsce docelowe, nawigacja zostanie zatrzymana. Pobierz mapy Wikipedii - Uzyskaj informacje o ciekawych miejscach z Wikipedii, kieszonkowego przewodnika offline zawierającego artykuły o miejscach i celach. + Uzyskaj informacje o ciekawych miejscach z Wikipedii, kieszonkowego przewodnika offline zawierającego artykuły o miejscach i celach podróży. Motocykl Enduro Skuter Określ długość pojazdu dozwoloną na trasach. @@ -3913,11 +3913,11 @@ Ikony startu i końca Dziękujemy za zakup \"Linii konturowych\" Subskrypcja jest naliczana za wybrany okres. Anuluj go w AppGallery w dowolnym momencie. - Płatność zostanie pobrana z konta AppGallery po potwierdzeniu zakupu. + Twoje konto AppGallery jest obciążane po potwierdzeniu zakupu. \n -\nSubskrypcja jest automatycznie odnawiana, chyba że zostanie anulowana przed datą odnowienia. Twoje konto zostanie obciążone opłatą za okres odnowienia (miesiąc/trzy miesiące/rok) tylko w dniu odnowienia. +\nSubskrypcja przedłuża się automatycznie, chyba że zostanie anulowana przed datą odnowienia. Twoje konto zostanie obciążone za okres odnowienia (miesiąc/trzy miesiące/rok) tylko w dniu odnowienia. \n -\nMożesz zarządzać subskrypcjami i anulować je, przechodząc do ustawień Galerii aplikacji. +\nMożesz zarządzać swoimi subskrypcjami i anulować je w ustawieniach AppGallery. Unikaj chodników Unikaj chodników Rozwój @@ -4024,4 +4024,12 @@ Profil OsmAnd Profil użytkownika Odwróć wszystkie punkty + Wybierz profil, który będzie używany przy uruchomieniu aplikacji. + Ostatnio używane + Preferowane szlaki turystyczne + Preferuj szlaki turystyczne + Zezwalaj na strumienie i dreny + Zezwalaj na strumienie i dreny + Zezwalaj na przerywane drogi wodne + Zezwalaj na przerywane drogi wodne \ No newline at end of file From 54c0270cbee37150eb6c939d9e6dbdaa4a6ce260 Mon Sep 17 00:00:00 2001 From: abdullah abdulrhman Date: Tue, 29 Dec 2020 08:24:38 +0000 Subject: [PATCH 75/78] Translated using Weblate (Arabic) Currently translated at 92.7% (3597 of 3877 strings) --- OsmAnd/res/values-ar/phrases.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-ar/phrases.xml b/OsmAnd/res/values-ar/phrases.xml index da2bfb09a0..19039d722a 100644 --- a/OsmAnd/res/values-ar/phrases.xml +++ b/OsmAnd/res/values-ar/phrases.xml @@ -2374,7 +2374,7 @@ نوع الكبينة/الخزانة: خدمة بريدية نوع الكبينة/الخزانة: غاز نوع الكبينة/الخزانة: اتصالات - نوع الكبينة/الخزانة: طاقة + نوع الكبينة/الخزانة: كهرباء في الخدمة: نعم صهريج مجرى From d2b0b3895b6cc2079a45830932cc59f0b020896f Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 30 Dec 2020 12:57:53 +0100 Subject: [PATCH 76/78] Fix #9704 --- OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java b/OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java index 5c4c24ee68..280d75cebe 100644 --- a/OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java +++ b/OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java @@ -764,6 +764,7 @@ public class CommonWords { addFrequentlyUsed("martiri"); addFrequentlyUsed("verdi"); addFrequentlyUsed("augusta"); + addFrequentlyUsed("neuberger"); From 72a67ed8a560f075c954bb998edf9db9b98a7730 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Wed, 30 Dec 2020 14:06:06 +0200 Subject: [PATCH 77/78] Fix #9946 Current road ref not showing during navigation --- OsmAnd/src/net/osmand/plus/routing/CurrentStreetName.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/CurrentStreetName.java b/OsmAnd/src/net/osmand/plus/routing/CurrentStreetName.java index c984fb9119..c21679ead3 100644 --- a/OsmAnd/src/net/osmand/plus/routing/CurrentStreetName.java +++ b/OsmAnd/src/net/osmand/plus/routing/CurrentStreetName.java @@ -43,7 +43,7 @@ public class CurrentStreetName { String rf = n.directionInfo.getRef(); String dn = n.directionInfo.getDestinationName(); isSet = !(Algorithms.isEmpty(nm) && Algorithms.isEmpty(rf) && Algorithms.isEmpty(dn)); - streetName.text = RoutingHelperUtils.formatStreetName(nm, null, dn, "»"); + streetName.text = RoutingHelperUtils.formatStreetName(nm, rf, dn, "»"); streetName.turnType = n.directionInfo.getTurnType(); streetName.shieldObject = n.directionInfo.getRouteDataObject(); if (streetName.turnType == null) { @@ -62,7 +62,8 @@ public class CurrentStreetName { if (rs != null) { streetName.text = getRouteSegmentStreetName(routingHelper, rs, false); if (Algorithms.isEmpty(streetName.text)) { - isSet = !Algorithms.isEmpty(getRouteSegmentStreetName(routingHelper, rs, true)); + streetName.text = getRouteSegmentStreetName(routingHelper, rs, true); + isSet = !Algorithms.isEmpty(streetName.text); } else { isSet = true; } From e32591c99e08d7c59a58e56c5e0e04b158f903d9 Mon Sep 17 00:00:00 2001 From: Kseniia Date: Wed, 30 Dec 2020 14:19:28 +0200 Subject: [PATCH 78/78] add frequantly word --- OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java b/OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java index 280d75cebe..74571665df 100644 --- a/OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java +++ b/OsmAnd-java/src/main/java/net/osmand/binary/CommonWords.java @@ -764,7 +764,7 @@ public class CommonWords { addFrequentlyUsed("martiri"); addFrequentlyUsed("verdi"); addFrequentlyUsed("augusta"); - addFrequentlyUsed("neuberger"); + addFrequentlyUsed("neuburger");