Improve parsing
This commit is contained in:
parent
df12e39f73
commit
2243426d5a
2 changed files with 7 additions and 5 deletions
|
@ -261,15 +261,17 @@ public class OsmandRegions {
|
||||||
public boolean publish(BinaryMapDataObject object) {
|
public boolean publish(BinaryMapDataObject object) {
|
||||||
initTypes(object);
|
initTypes(object);
|
||||||
String downloadName = getDownloadName(object);
|
String downloadName = getDownloadName(object);
|
||||||
if(downloadName == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
downloadName = downloadName.toLowerCase();
|
|
||||||
String parentFullName = getParentFullName(object);
|
String parentFullName = getParentFullName(object);
|
||||||
String fullName = getFullName(object);
|
String fullName = getFullName(object);
|
||||||
if(!Algorithms.isEmpty(parentFullName)) {
|
if(!Algorithms.isEmpty(parentFullName)) {
|
||||||
parentRelations.put(fullName, parentFullName);
|
parentRelations.put(fullName, parentFullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(downloadName == null) {
|
||||||
|
// continent
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
downloadName = downloadName.toLowerCase();
|
||||||
downloadNames.put(fullName, downloadName);
|
downloadNames.put(fullName, downloadName);
|
||||||
String locName = getLocaleName(object);
|
String locName = getLocaleName(object);
|
||||||
if(locName != null && locName.length() > 0){
|
if(locName != null && locName.length() > 0){
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class FileNameTranslationHelper {
|
||||||
int index = wikiWord.indexOf("(");
|
int index = wikiWord.indexOf("(");
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
//removing word in "()" from recourse file
|
//removing word in "()" from recourse file
|
||||||
return wikiName + wikiWord.substring(0, index);
|
return wikiName + " " + wikiWord.substring(0, index).trim();
|
||||||
}
|
}
|
||||||
return wikiName + " " + ctx.getString(R.string.amenity_type_osmwiki);
|
return wikiName + " " + ctx.getString(R.string.amenity_type_osmwiki);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue