Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2018-03-22 14:37:12 +01:00
commit d2ab7c0477
7 changed files with 68 additions and 4 deletions

View file

@ -7,8 +7,23 @@
android:label="@string/app_name_free"
tools:replace="android:icon, android:label">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:resource="@string/facebook_app_id"/>
<activity android:name="com.facebook.FacebookActivity"/>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:resource="@string/facebook_app_id"/>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name_free"/>
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="@string/fb_login_protocol_scheme"/>
</intent-filter>
</activity>
<activity
android:name="net.osmand.plus.activities.MapActivity"

View file

@ -6,6 +6,7 @@
<!-- Not translatable -->
<string name="facebook_app_id">2057524931189530</string>
<string name="fb_login_protocol_scheme">fb2057524931189530</string>
<string name="full_version_price">€7,99</string>
<string name="osm_live">OsmAnd Live</string>
<string name="ga_api_key">UA-28342846-2</string>

View file

@ -14,6 +14,8 @@
android:background="@null"
android:gravity="center_vertical"
android:hint="@string/search_poi_category_hint"
android:imeOptions="actionSearch"
android:inputType="text"
android:lines="1"
android:singleLine="true"
android:textColor="?attr/searchbar_text"

View file

@ -2487,7 +2487,7 @@
<string name="measurement_tool_action_bar">Просмотрите карту и добавьте точки</string>
<string name="measurement_tool">Измерить расстояние</string>
<string name="none_point_error">Необходимо добавить хотя бы одну точку.</string>
<string name="mapillary_image">Отправить фотографию в Mapillary</string>
<string name="mapillary_image">Фотография Mapillary</string>
<string name="improve_coverage_mapillary">Улучшить фотопокрытие через Mapillary</string>
<string name="hide_from_zoom_level">Скрыть от шкалы приближения</string>
<string name="release_2_2">"\\022 Новый контекстно-зависимый Графический Интерфейс для выделения локаций на карте и других экранов

View file

@ -1,6 +1,7 @@
package net.osmand.plus.mapcontextmenu.controllers;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import net.osmand.data.Amenity;
import net.osmand.data.LatLon;
@ -136,9 +137,17 @@ public class AmenityMenuController extends MenuController {
@Override
public String getNameStr() {
return amenity.getName(
String name = amenity.getName(
amenity.getType().isWiki() ? getPreferredMapAppLang() : getPreferredMapLang(),
isTransliterateNames());
Map<String, String> additionalInfo = amenity.getAdditionalInfo();
if (additionalInfo != null) {
String ref = additionalInfo.get("ref");
if (!TextUtils.isEmpty(ref)) {
return name + " (" + ref + ")";
}
}
return name;
}
@Override

View file

@ -2,6 +2,7 @@ package net.osmand.plus.search;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
@ -25,10 +26,13 @@ import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextWatcher;
import android.text.style.ForegroundColorSpan;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.CheckBox;
import android.widget.EditText;
@ -523,6 +527,18 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
);
searchEditText = (EditText) view.findViewById(R.id.searchEditText);
searchEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
searchQuery += " ";
AndroidUtils.hideSoftKeyboard(getActivity(), searchEditText);
runSearch();
return true;
}
return false;
}
});
searchEditText.addTextChangedListener(
new TextWatcher() {
@Override

View file

@ -229,6 +229,27 @@ public class SampleApplication extends Application {
keyName.replace('_', ' '));
}
@Override
public String getSynonyms(AbstractPoiType type) {
AbstractPoiType baseLangType = type.getBaseLangType();
if (baseLangType != null) {
return getSynonyms(baseLangType);
}
return getSynonyms(type.getIconKeyName());
}
@Override
public String getSynonyms(String keyName) {
try {
Field f = R.string.class.getField("synonyms_poi_" + keyName);
if (f != null) {
Integer in = (Integer) f.get(null);
return getString(in);
}
} catch (Exception e) {
}
return "";
}
});