diff --git a/src/frameworks/next-intl.ts b/src/frameworks/next-intl.ts index 5a628545..7be9cd66 100644 --- a/src/frameworks/next-intl.ts +++ b/src/frameworks/next-intl.ts @@ -79,10 +79,10 @@ class NextIntlFramework extends Framework { const ranges: ScopeRange[] = [] const text = document.getText() - // Find matches of `useTranslations` and `getTranslator`. Later occurences will + // Find matches of `useTranslations` and `getTranslations`. Later occurences will // override previous ones (this allows for multiple components with different // namespaces in the same file). - const regex = /(useTranslations\(\s*|getTranslator\(.*,\s*)(['"`](.*?)['"`])?/g + const regex = /(useTranslations\(\s*|getTranslations\(.*,\s*)(['"`](.*?)['"`])?/g let prevGlobalScope = false for (const match of text.matchAll(regex)) { if (typeof match.index !== 'number')