Skip to content

Commit

Permalink
fix: suggested changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Anty0 committed Sep 20, 2024
1 parent e22a391 commit 04f5f81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ class GenericSuffixedPluralsPreprocessor(
private fun Map<*, *>.preprocessMap(): Map<*, *> {
return this.groupByPlurals(pluralsViaSuffixesParser).flatMap { (commonKey, values) ->
if (commonKey == null || values.size < 2) {
values.useOriginalKey()
} else {
values.usePluralsKey(commonKey)
return@flatMap values.useOriginalKey()
}
return@flatMap values.usePluralsKey(commonKey)
}.toMap()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class I18nextToIcuPlaceholderConvertor : ToIcuPlaceholderConvertor {
val parsed = parser.parse(matchResult) ?: return matchResult.value.escapeIcu(isInPlural)

if (parsed.nestedKey != null) {
// TODO: nested keys are not yet supported
// Nested keys are not supported
return matchResult.value.escapeIcu(isInPlural)
}

Expand Down

0 comments on commit 04f5f81

Please sign in to comment.