From: "Enrico Weigelt, metux IT consult" <enrico.weig...@gr13.net>
--- src/net/sf/freecol/common/i18n/Messages.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/net/sf/freecol/common/i18n/Messages.java b/src/net/sf/freecol/common/i18n/Messages.java index ccb51e2284f..e0d5978bea8 100644 --- a/src/net/sf/freecol/common/i18n/Messages.java +++ b/src/net/sf/freecol/common/i18n/Messages.java @@ -422,9 +422,11 @@ public class Messages { } public static String getBestDescription(String id) { - String key = find(map(DESCRIPTION_KEYS, s -> id + s), - k -> containsKey(k)); - return (key == null) ? id : message(key); + for (String walk : DESCRIPTION_KEYS) + if (containsKey(id + walk)) + return message(id + walk); + + return id; } /** -- 2.11.0.rc0.7.gbe5a750 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers