Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add next-intl framework #934

Merged
merged 9 commits into from
Aug 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add preferred keystyle
amannn committed May 22, 2023
commit c1bbb77fbcfc0c7cbd2ee25c83c74f5aace652d2
3 changes: 2 additions & 1 deletion src/frameworks/next-intl.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { TextDocument } from 'vscode'
import { Framework, ScopeRange } from './base'
import { LanguageId } from '~/utils'
import { RewriteKeySource, RewriteKeyContext } from '~/core'
import { RewriteKeySource, RewriteKeyContext, KeyStyle } from '~/core'

class NextIntlFramework extends Framework {
id = 'next-intl'
display = 'next-intl'
namespaceDelimiter = '.'
perferredKeystyle?: KeyStyle = 'nested'

namespaceDelimiters = ['.']
namespaceDelimitersRegex = /[\.]/g