v0.3.4: improved title case further
This commit is contained in:
parent
f5a5390d61
commit
0b43873d65
|
@ -153,9 +153,7 @@ public class Messages {
|
||||||
private static final HashSet<String> noCaps = new HashSet<>(
|
private static final HashSet<String> noCaps = new HashSet<>(
|
||||||
Arrays.asList(new String[]{
|
Arrays.asList(new String[]{
|
||||||
//English
|
//English
|
||||||
"a", "of", "by",
|
"a", "of", "by", "to",
|
||||||
//German
|
|
||||||
"der", "des", "von",
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -165,9 +163,8 @@ public class Messages {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
//These languages capitalize every word except for a few exceptions
|
//English capitalizes every word except for a few exceptions
|
||||||
//...Yes technically German is just every noun, but this should be close enough.
|
if (lang == Languages.ENGLISH){
|
||||||
if (lang == Languages.ENGLISH || lang == Languages.GERMAN){
|
|
||||||
String result = "";
|
String result = "";
|
||||||
//split by any unicode space character
|
//split by any unicode space character
|
||||||
for (String word : str.split("(?<=\\p{Zs})")){
|
for (String word : str.split("(?<=\\p{Zs})")){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user