Skip to content

Commit

Permalink
fix: use platform specific path delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
tricoder42 committed Aug 8, 2018
1 parent 2bb5ac4 commit 71f21a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/cli/src/api/formats/lingui.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ export default (config: LinguiConfig): CatalogFormat => ({
},

getLocale(filename) {
const localeRe = `([a-zA-Z-_]+)`
const filenameRe = new RegExp(this.formatFilename(sourceFilename, localeRe))
const localeRe = /([a-zA-Z-_]+)/
const filenameRe = new RegExp(
this.formatFilename(sourceFilename, localeRe.source)
)
const match = filenameRe.exec(filename)
if (!match || !locales.isValid(match[1])) return null
// if (!match || !locales.isValid(match[1])) return null
return match[1]
},

Expand Down

0 comments on commit 71f21a1

Please sign in to comment.