Skip to content

Commit

Permalink
fix: Import collision handling (#1768)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCizmar committed Jun 28, 2023
1 parent 03f82a9 commit 33a05a7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ class CoreImportFilesProcessor(
private fun FileProcessorContext.processTranslations() {
this.translations.forEach { entry ->
val keyEntity = getOrCreateKey(entry.key)
entry.value.forEach { newTranslation ->
entry.value.forEach translationForeach@{ newTranslation ->
val storedTranslations = importDataManager.getStoredTranslations(keyEntity, newTranslation.language)
newTranslation.key = keyEntity
if (storedTranslations.size > 1) {
if (storedTranslations.size > 0) {
storedTranslations.forEach { collidingTranslations ->
fileEntity.addIssue(
FileIssueType.MULTIPLE_VALUES_FOR_KEY_AND_LANGUAGE,
Expand All @@ -159,7 +159,7 @@ class CoreImportFilesProcessor(
)
)
}
return
return@translationForeach
}
this@CoreImportFilesProcessor.addToStoredTranslations(newTranslation)
}
Expand Down

0 comments on commit 33a05a7

Please sign in to comment.