Added translation for countries and etc in AddressSearch

This commit is contained in:
Denis 2015-01-15 13:19:41 +02:00
parent 7eb14d4d04
commit 10535946c1
2 changed files with 5 additions and 3 deletions

View file

@ -8,6 +8,7 @@ import net.osmand.access.AccessibleToast;
import net.osmand.data.LatLon;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.helpers.FileNameTranslationHelper;
import net.osmand.plus.resources.RegionAddressRepository;
import android.app.Activity;
import android.os.Bundle;
@ -47,7 +48,8 @@ public class SearchRegionByNameActivity extends SearchByNameAbstractActivity<Reg
@Override
public String getText(RegionAddressRepository obj) {
return obj.getName().replace('_', ' ');
return FileNameTranslationHelper.getFileName(this,
getMyApplication().getResourceManager().getOsmandRegions(), obj.getName());
}
@Override

View file

@ -3,13 +3,13 @@ package net.osmand.plus.helpers;
import android.content.Context;
import net.osmand.IndexConstants;
import net.osmand.map.OsmandRegions;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import java.lang.reflect.Field;
/**
* Created by Barsik on 07.07.2014.
* Created by Barsik
* on 07.07.2014.
*/
public class FileNameTranslationHelper {