Commit 2025-11-12 23:50 c52e083d

View on Github →

refactor: simplify dictionary in fixAbbreviation (#29352)

  • Improve capitalization algorithm: you now don't have to give entries twice in fixAbbreviation (now abbreviationDict).
  • The new algorithm uses the fact that we can easily find the lowerCamelCase name from the UpperCamelCase name, namely by applying String.decapitalizeSeq. This means that both nameDict and abbreviationDict have as input lowerCamelCase and as output UpperCamelCase.
  • This removes the need to especially fix NSMul/ZSMul and similar.
  • abbreviationDict still needs two entries if both snake_case and either camelCase need to be translated.

Estimated changes