
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
chrome-intl-code-gen
Advanced tools
It provide a webpack plugin for watching chrome extesion's _locales directory, if locale file changed, A typescript file which contains a type-safe version of chrome.i18n.getMessage will be generated at the output path. the file contents includes a default export and multiple exports like this. Also you can customize your own generated content with the template option.
/* eslint-disable */
// This file is generated by chrome-i18n-code-gen, do not edit it
export type ChromeI18nKeys = "extName" | "extDescription"
export default function i18n(key: ChromeI18nKeys): string {
return chrome.i18n.getMessage(key)
}
/**
* extension name
*/
export function extName(): string {
return chrome.i18n.getMessage('extName')
}
/**
* extension description
*/
export function extDescription(): string {
return chrome.i18n.getMessage('extDescription')
}
const ChromeIntlCodeGenPlguin = require('chrome-intl-code-gen').default;
[
new ChromeIntlCodeGenPlguin({
input: "public/_locales",
output: "src/shared/locale.ts"
})
]
Options
interface Options {
/**
* path of `_locales` directory
*/
input: string;
/**
* output typescript file path
*/
output: string;
/**
* base language, defaults to en
*/
base?: string;
/**
* optional custom template function to generate your own output file
* interface Message { [keyName: string]: { "message": string; "description": string; } }
*/
template?: ((data: Message) => string);
}
FAQs
Type safe i18n
The npm package chrome-intl-code-gen receives a total of 2 weekly downloads. As such, chrome-intl-code-gen popularity was classified as not popular.
We found that chrome-intl-code-gen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.