Skip to content

Commit

Permalink
feat: move extension name & description into locales
Browse files Browse the repository at this point in the history
Refs: #287
  • Loading branch information
romaindequidt authored and romain-dequidt-enedis committed Dec 27, 2023
1 parent c580f70 commit 48e35f9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ This boilerplate is made for creating chrome extensions using React and Typescri
## Procedures: <a name="procedures"></a>

1. Clone this repository.
2. Change `name` and `description` in package.json => **Auto synchronize with manifest**
2. Change `extensionDescription` and `extensionName` in messages.json
3. Install pnpm globally: `npm install -g pnpm` (check your node version >= 16.6, recommended >= 18)
4. Run `pnpm install`

Expand Down
9 changes: 7 additions & 2 deletions manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ import packageJson from './package.json' assert { type: 'json' };
*/
const manifest = {
manifest_version: 3,
name: packageJson.name,
default_locale: 'en',
/**
* if you want to support multiple languages, you can use the following reference
* https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization
*/
name: '__MSG_extensionName__',
version: packageJson.version,
description: packageJson.description,
description: '__MSG_extensionDescription__',
permissions: ['storage', 'sidePanel'],
side_panel: {
default_path: 'src/pages/sidepanel/index.html',
Expand Down
10 changes: 10 additions & 0 deletions public/_locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extensionDescription": {
"description": "Extension description",
"message": "Chrome extension boilerplate developed with Vite, React and Typescript"
},
"extensionName": {
"description": "Extension name",
"message": "Chrome extension boilerplate"
}
}

0 comments on commit 48e35f9

Please sign in to comment.