Custom Framework regular expression
See original GitHub issueHello
I’m trying to make the extention work with sails.js
Using i18n with sails. js is done like this
<%= __("key") %> or <%= i18n("key") %>
I’ve created the yml file as stated here https://github.com/antfu/i18n-ally/blob/master/docs/custom_framework.md
The content of the file is
languageIds:
- javascript
- typescript
- javascriptreact
- typescriptreact
keyMatchReg:
- "(?:i18n)[\\(]['\"`]([\\w\\d\\. \\-\\[\\]]*?)['\"`]"
monopoly: false
The Key exp seems ok https://regexper.com/#(%3F%3Ai18n)[\(][‘"`]([\w\d\. \-\[\]]*%3F)[’"`]
The extension icon is visible on the left but nothing appears on it The settings file contains this code
{
"i18n-ally.localesPaths": "config/locales",
"i18n-ally.sortedKeys": true,
"i18n-ally.keepFulfilled": false,
"i18n-ally.sourceLanguage":"fr",
"i18n-ally.displayLanguage":"fr"
}
And my sails config/I18n.js file contains
/**
* https://sailsjs.com/docs/concepts/internationalization
*/
module.exports.i18n = {
locales: ['fr', 'en'],
defaultLocale: 'fr',
localesDirectory: 'config/locales'
};
Do you have any thoughts? Thanks
EDIT(anfu): format
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Custom Framework regular expression · Issue #168 - GitHub
Hello I'm trying to make the extention work with sails.js Using i18n with sails. js is done like this <%= __("key") %> or...
Read more >Creating a custom regex detector | Data Loss Prevention ...
A regular expression (regex) custom infoType detector allows you to create your own detectors that enable Cloud DLP to detect matches based on...
Read more >RegExr: Learn, Build, & Test RegEx
Regular expression tester with syntax highlighting, PHP / PCRE & JS Support, contextual help, cheat sheet, reference, and searchable community patterns.
Read more >Adding custom validation with a Regular Expression
Regular Expressions are a powerful method for matching the pattern of strings of text. This has particular relevance to text validation.
Read more >Regular Expression Language - Quick Reference
In this quick reference, learn to use regular expression patterns to match input text. A pattern has one or more character literals, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I feel dumb now 😉 Thanks 😃
@hyperobjectsfrance Looks like you are using ejs. You should also add it to the languageIds