Skip to content

Commit

Permalink
add namespace to duplicate warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
janpaepke committed Nov 28, 2024
1 parent 69a25da commit 3252e5e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,16 @@ export default class i18nTransform extends Transform {
if (conflict === 'key') {
this.warn(
`Found translation key already mapped to a map or parent of ` +
`new key already mapped to a string: ${entry.key}`
`new key already mapped to a string: ${
entry.namespace + this.options.namespaceSeparator + entry.key
}`
)
} else if (conflict === 'value') {
this.warn(`Found same keys with different values: ${entry.key}`)
this.warn(
`Found same keys with different values: ${
entry.namespace + this.options.namespaceSeparator + entry.key
}`
)
}
} else {
uniqueCount[entry.namespace] += 1
Expand Down

0 comments on commit 3252e5e

Please sign in to comment.