dweiss commented on a change in pull request #2253:
URL: https://github.com/apache/lucene-solr/pull/2253#discussion_r566653084



##########
File path: 
lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Dictionary.java
##########
@@ -370,7 +370,7 @@ private void readAffixFile(InputStream affixStream, 
CharsetDecoder decoder)
         fullStrip = true;
       } else if ("LANG".equals(firstWord)) {
         language = singleArgument(reader, line);
-        alternateCasing = "tr_TR".equals(language) || "az_AZ".equals(language);

Review comment:
       Locale reflects what those iso codes are in the wild... That's why I'm a 
bit uneasy about using a simple prefix... It should at least be something like 
this: language.equalsIgnoreCase("tr") || 
language.toLowerCase(Locale.ROOT).startsWith("tr_")




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to