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

Inline Annotations Alias !!!! #1186

Open
itmanyong opened this issue Jul 21, 2024 · 1 comment
Open

Inline Annotations Alias !!!! #1186

itmanyong opened this issue Jul 21, 2024 · 1 comment

Comments

@itmanyong
Copy link

Is your feature related to a specific framework or general for this extension
false

Is your feature request related to a problem? Please describe.
false

Describe the solution you'd like
Provides a configuration item to configure multiple aliases to support inline annotation, such as inlineAlias

Additional context
In many cases, to prevent duplicative names and semantic customization, inline comments will not take effect if $t and t are already used before i18n-ally is connected, for example

// lang message
{ "app.title":"应用名称" }
// define file
app.config.globalProperties.tx = i18n.global.t
// other file template
tx('app.title')  => tx('app.title')  

After configuration

// vscode i18n-ally settings 
{
...
"i18n-ally.inlineAlias":["tx"]
...
}
// so
tx('app.title') => tx(应用名称)  
@nadihsu
Copy link

nadihsu commented Oct 18, 2024

Maybe you can try configuring i18n-ally.regex.usageMatch to support your alias

"i18n-ally.regex.usageMatch": ["tx\\('([\\w.-]+)'\\)"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants