work in progress

This commit is contained in:
madwasp79 2019-02-08 14:47:53 +02:00
parent 914cbd7568
commit 2c97a83e1a
3 changed files with 3 additions and 14 deletions

View file

@ -191,6 +191,7 @@ public abstract class MapObject implements Comparable<MapObject> {
}
public String getEnName(boolean transliterate) {
System.out.println("Get name");
if (!Algorithms.isEmpty(enName)) {
return this.enName;
} else if (!Algorithms.isEmpty(getName()) && transliterate) {

View file

@ -138,14 +138,7 @@ public class NominatimPoiFilter extends PoiUIFilter {
a.setId(Long.parseLong(parser.getAttributeValue("", "place_id"))); //$NON-NLS-1$ //$NON-NLS-2$
String name = parser.getAttributeValue("", "display_name"); //$NON-NLS-1$//$NON-NLS-2$
a.setName(name);
log.debug("Setting english name:");
log.debug("is CJK sign? : " + CustomTransliterationHelper.isCharCJK(name.charAt(0)));
if (CustomTransliterationHelper.isCharCJK(name.charAt(0))) {
a.setEnName(CustomTransliterationHelper.japanese2Romaji(name));
} else {
a.setEnName(Junidecode.unidecode(name));
}
a.setEnName(Junidecode.unidecode(name));
a.setSubType(parser.getAttributeValue("", "type")); //$NON-NLS-1$//$NON-NLS-2$
PoiType pt = poiTypes.getPoiTypeByKey(a.getSubType());
a.setType(pt != null ? pt.getCategory() : poiTypes.getOtherPoiCategory());

View file

@ -237,12 +237,7 @@ public class TextRenderer {
TextDrawInfo text = rc.textToDraw.get(i);
if (text.text != null && text.text.length() > 0) {
if (preferredLocale.length() > 0) {
if (CustomTransliterationHelper.isCharCJK(text.text.charAt(0))) {
text.text = CustomTransliterationHelper.japanese2Romaji(text.text);
} else {
text.text = Junidecode.unidecode(text.text);
}
text.text = Junidecode.unidecode(text.text);
}