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.

Add support for Chrome extension style JSON file

See original GitHub issue

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

CHrome Extension JSON format

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

Accroding to https://developer.chrome.com/extensions/i18n , i18n file for Chrome Extension looks like

{
"msg": { "message": "translate 1", "description": "you should translate it as ..." },
"msg_2": { "message": "translate 2" }
}

It has the shape:

type ChromeExtensionLikeFormat = Record<string, {
    message: string,
    description?: string
}>

Additional context

Current behavior

image

For longer message

image

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
antfucommented, Jan 6, 2020

@Jack-Works The chrome extension is supported as a framework. Please update to v0.10.1 and check it out.

Note you may need to do the following things to make it work

  • remove your custom framework setting
  • set "i18n-ally.enabledFrameworks": "chrome-ext"

My working config for reference

{
  "i18n-ally.enabledFrameworks": "chrome-ext",
  "i18n-ally.localesPaths": "_locales",
  "i18n-ally.dirStructure": "dir",
  "i18n-ally.keystyle": "nested"
}
1reaction
Jack-Workscommented, Jan 7, 2020

Cool! I’ll try it out! Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add support for Chrome extension style JSON file #157 - GitHub
And the json format is described above. chrome.i18n or browser.i18n is a global variable in the chrome extension so there is no need...
Read more >
JSON Formatter - Chrome
Makes JSON easy to read. Open source. The original JSON Formatter, now with dark mode Auto-formats JSON when you load it in a...
Read more >
Manifest file format - Chrome Developers
Every extension requires a JSON-formatted file, named manifest.json , that provides important information. This file must be located in the ...
Read more >
How to get easy-to-read JSON trees with this free Chrome ...
Now, here is a Chrome and Firefox extension that does the formatting and makes your JSONs instantly pretty inside your browser, without having ......
Read more >
Create a Chrome extension to modify a website's HTML or CSS
Introduction · No access is required to the websites source files · The extension shares assets with the page, so matching styling is...
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