Skip to content

Commit 03796e4

Browse files
authored
fix: transloco translate api not detected properly (#984)
Before: https://regex101.com/r/5VWV8W/1 After: https://regex101.com/r/EK75R6/1
1 parent 6aedf8f commit 03796e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frameworks/transloco.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class TranslocoFramework extends Framework {
2525
// https://ngneat.github.io/transloco/docs/translation-in-the-template#structural-directive
2626
'[^\\w\\d](?:t)\\([\\s\\n]*[\'"`]({key})[\'"`]',
2727
// https://ngneat.github.io/transloco/docs/translation-api
28-
'[^\\w\\d](?:translate|selectTranslate|getTranslateObject|selectTranslateObject|getTranslation|setTranslationKey)\\([\\s\\n]*(.*?)[\\s\\n]*\\)',
28+
'[^\\w\\d](?:translate|selectTranslate|getTranslateObject|selectTranslateObject|getTranslation|setTranslationKey)\\([\\s\\n]*["\'`](.*?)["\'`][\\s\\n]*\\)',
2929
// https://ngneat.github.io/transloco/docs/translation-in-the-template#attribute-directive
3030
'[^*\\w\\d]transloco=[\'"`]({key})[\'"`]',
3131
]

0 commit comments

Comments
 (0)