PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.03k stars 346 forks source link

[BUG] displayName cannot be dynamically replaced from locales. #860

Closed jsonchou closed 7 months ago

jsonchou commented 7 months ago

Hi,

displayName cannot be dynamically replaced from locales.

Doc:

https://docs.plasmo.com/framework/locales

// src/newtab/index.html
<title>__plasmo_static_index_title__</title>

// package.json
"displayName": "__MSG_extensionName__",
"manifest": {
    "default_locale": "en",
    "name": "__MSG_extensionName__",
}

// locales/en 
"extensionName": {
  "message": "test123",
  "description": "test123"
},

Showed the correct locale name and locale sub title at chrome://extensions/.

But at .plasmo/newtab|popup|options|sidepanel.html

showed the not replaced title: <title>__MSG_extensionName__</title>

If the displayName is set as a specific name like:

"displayName": "aaa"

everything works fine <title>aaa</title> but no dynamic locale title.

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome Firefox Edge

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

jsonchou commented 7 months ago

Suddenly, I understood the purpose of this field displayName.