From 0b43873d65d4769970c2ab253be7c8dbce507812 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 7 Feb 2016 18:23:50 -0500 Subject: [PATCH] v0.3.4: improved title case further --- .../shatteredpixeldungeon/messages/Messages.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java b/src/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java index 8291f6490..daaf0ccba 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java @@ -153,9 +153,7 @@ public class Messages { private static final HashSet noCaps = new HashSet<>( Arrays.asList(new String[]{ //English - "a", "of", "by", - //German - "der", "des", "von", + "a", "of", "by", "to", }) ); @@ -165,9 +163,8 @@ public class Messages { return str; } - //These languages capitalize every word except for a few exceptions - //...Yes technically German is just every noun, but this should be close enough. - if (lang == Languages.ENGLISH || lang == Languages.GERMAN){ + //English capitalizes every word except for a few exceptions + if (lang == Languages.ENGLISH){ String result = ""; //split by any unicode space character for (String word : str.split("(?<=\\p{Zs})")){