question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I use chrome-ext support + custom template?

See original GitHub issue

Describe the bug

Extension Version 1.10.2

Framework/i18n package you are using chrome-ext + custom template

To Reproduce It seems like the chrome-ext option is conflict with custom template… I found there is no way to use chrome-ext (with extra “.message” path rewrite) and custom template (geti18nString function call in my project) in the same time…

I’m using chrome-ext format config files but using a custom wrapped function.

{
    "i18n-ally.localesPaths": "src/_locales",
    "i18n-ally.enabledFrameworks": "chrome-ext"
}

And a custom format

# .vscode/i18n-ally-custom-framework.yml

# An array of string which contains Language Ids defined by vscode
# You can check avaliable language ids here: https://code.visualstudio.com/docs/languages/overview#_language-id
languageIds:
    - javascript
    - typescript
    - javascriptreact
    - typescriptreact

# An Array of regex to find the keys usage. **The key should captured in the first match group**.
# You should unescape regex string in order to fit in YAML file
# for that, you can use https://www.freeformatter.com/json-escape.html
keyMatchReg:
    # The following examples show how to detect `t("your.i18n.keys")`
    - "geti18nString\\(['\"`]([a-zA-Z0-9_]+)['\"`]"

# If set to true, only enables custom framework (will disable all built-in frameworks)
monopoly: false

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
antfucommented, Feb 13, 2020

Hi! I found that i18n-ally is no longer works, maybe there is a regression.

What do you mean “no longer works”? Can you share me the output log?

When I use vscode command: i18nally: create a new key, it will not write { “message”: “…” } but “…”.

Good spot! Fixed in v1.12.6. Thanks.

1reaction
Jack-Workscommented, Jan 18, 2020

Thanks for your help, i18n Ally is fully working for my project!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I use chrome-ext support + custom template? #167
I found there is no way to use chrome-ext (with extra ".message" path rewrite) and custom template ( geti18nString function call in my...
Read more >
Chrome Extensions getting started guides
Introduces the extension development workflow by creating a Hello, Extensions example. It walks through loading the extension during development ...
Read more >
create-chrome-ext - npm
Start using create-chrome-ext in your project by running `npm i ... Scaffolding your chrome extension, multiple boilerplates supported!
Read more >
Create and publish custom Chrome apps & extensions
Step 1: Build the app or extension · Using a text editor, create a JavaScript Object Notation (JSON) file. Here is an example...
Read more >
Deploying Google Chrome extensions using Group Policy
To force-install extensions, open your Group Policy Management console (gpmc.msc) and go to User Configuration \ Administrative Templates \ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found