This commit is contained in:
Alexey Kulish 2017-03-26 10:21:47 +03:00
commit 08fa42d78b
8 changed files with 12 additions and 3 deletions

View file

@ -508,7 +508,7 @@ public class SearchUICore {
@Override @Override
public boolean publish(SearchResult object) { public boolean publish(SearchResult object) {
if (!phrase.getNameStringMatcher().matches(object.localeName)) { if (phrase != null && !phrase.getNameStringMatcher().matches(object.localeName)) {
for (String s : object.otherNames) { for (String s : object.otherNames) {
if (phrase.getNameStringMatcher().matches(s)) { if (phrase.getNameStringMatcher().matches(s)) {
object.alternateName = s; object.alternateName = s;

View file

@ -289,7 +289,7 @@ public class SearchPhrase {
} }
public ObjectType[] getSearchTypes() { public ObjectType[] getSearchTypes() {
return settings.getSearchTypes(); return settings == null ? null : settings.getSearchTypes();
} }
public boolean isCustomSearch() { public boolean isCustomSearch() {

View file

@ -15,7 +15,7 @@ import org.junit.Test;
public class LocationSearchTest { public class LocationSearchTest {
private void search(String string, LatLon latLon) throws IOException { private void search(String string, LatLon latLon) throws IOException {
SearchResultMatcher srm = new SearchUICore.SearchResultMatcher(null, 0, null, 100); SearchResultMatcher srm = new SearchUICore.SearchResultMatcher(null, null, 0, null, 100);
new SearchCoreFactory.SearchLocationAndUrlAPI(). new SearchCoreFactory.SearchLocationAndUrlAPI().
search(new SearchPhrase(null, OsmAndCollator.primaryCollator()).generateNewPhrase(string, null), srm); search(new SearchPhrase(null, OsmAndCollator.primaryCollator()).generateNewPhrase(string, null), srm);
Assert.assertEquals(1, srm.getRequestResults().size()); Assert.assertEquals(1, srm.getRequestResults().size());

View file

@ -3095,4 +3095,5 @@ Tidligere destination bliver sidste mellemliggende punkt.</string>
<string name="nearest_cities">Nærmeste byer</string> <string name="nearest_cities">Nærmeste byer</string>
<string name="select_city">Vælg by</string> <string name="select_city">Vælg by</string>
<string name="select_postcode">Vælg postnummer</string> <string name="select_postcode">Vælg postnummer</string>
<string name="type_address">Indtast adresse</string>
</resources> </resources>

View file

@ -2942,4 +2942,5 @@ Fonctionnalités principales :
<string name="nearest_cities">Villes les plus proches</string> <string name="nearest_cities">Villes les plus proches</string>
<string name="select_city">Sélectionnez la ville</string> <string name="select_city">Sélectionnez la ville</string>
<string name="select_postcode">Sélectionnez le code postal</string> <string name="select_postcode">Sélectionnez le code postal</string>
<string name="type_address">Saisissez une adresse</string>
</resources> </resources>

View file

@ -3381,4 +3381,9 @@
<string name="poi_energy_supplier">Biuro dostawcy energii</string> <string name="poi_energy_supplier">Biuro dostawcy energii</string>
<string name="poi_electronics_repair_computer">Naprawa elektroniki: komputery</string>
<string name="poi_electronics_repair_appliance">Naprawa elektroniki: urządzenia</string>
<string name="poi_electronics_repair_phone">Naprawa elektroniki: telefony</string>
<string name="poi_electronics_repair_tv">Naprawa elektroniki: telewizory</string>
</resources> </resources>

View file

@ -3020,4 +3020,5 @@ Pro praghere iscrie su còdighe intreu</string>
<string name="type_city_town">Iscrie sa tzitade o sa bidda</string> <string name="type_city_town">Iscrie sa tzitade o sa bidda</string>
<string name="type_postcode">Iscrie su còdighe postale</string> <string name="type_postcode">Iscrie su còdighe postale</string>
<string name="select_postcode">Issèbera su còdighe postale</string> <string name="select_postcode">Issèbera su còdighe postale</string>
<string name="type_address">Iscrie s\'indiritzu</string>
</resources> </resources>

View file

@ -2865,4 +2865,5 @@ Zodpovedá oblasti: %1$s x %2$s</string>
<string name="nearest_cities">Najbližšie mestá</string> <string name="nearest_cities">Najbližšie mestá</string>
<string name="select_city">Zvoľte mesto</string> <string name="select_city">Zvoľte mesto</string>
<string name="select_postcode">Zvoľte PSČ</string> <string name="select_postcode">Zvoľte PSČ</string>
<string name="type_address">Zadajte adresu</string>
</resources> </resources>