names update
This commit is contained in:
parent
d8ed8388cf
commit
75e93d6ec7
1 changed files with 9 additions and 10 deletions
|
@ -91,21 +91,20 @@ public abstract class MapObject implements Comparable<MapObject> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getNamesMap(boolean includeEn) {
|
public Map<String, String> getNamesMap(boolean includeEn) {
|
||||||
if (!includeEn || Algorithms.isEmpty(enName)) {
|
if ((!includeEn || Algorithms.isEmpty(enName)) && names == null) {
|
||||||
if (names == null) {
|
return Collections.emptyMap();
|
||||||
return Collections.emptyMap();
|
|
||||||
}
|
|
||||||
return names;
|
|
||||||
}
|
}
|
||||||
Map<String, String> mp = new HashMap<String, String>();
|
Map<String, String> mp = new HashMap<String, String>();
|
||||||
if (names != null) {
|
if (names != null) {
|
||||||
Iterator<Entry<String, String>> it = mp.entrySet().iterator();
|
Iterator<Entry<String, String>> it = names.entrySet().iterator();
|
||||||
while(it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
Entry<String, String> e = it.next();
|
Entry<String, String> e = it.next();
|
||||||
mp.put(e.getKey(), unzipContent(e.getValue()));
|
mp.put(e.getKey(), unzipContent(e.getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mp.put("en", unzipContent(enName));
|
if (includeEn && !Algorithms.isEmpty(enName)) {
|
||||||
|
mp.put("en", unzipContent(enName));
|
||||||
|
}
|
||||||
return mp;
|
return mp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +114,7 @@ public abstract class MapObject implements Comparable<MapObject> {
|
||||||
l.add(unzipContent(enName));
|
l.add(unzipContent(enName));
|
||||||
}
|
}
|
||||||
if (names != null) {
|
if (names != null) {
|
||||||
for(String nm : names.values()) {
|
for (String nm : names.values()) {
|
||||||
l.add(unzipContent(nm));
|
l.add(unzipContent(nm));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue