Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 39 additions & 9 deletions microsoft-edge/extensions/publish/publish-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ If you have an existing Chrome extension and you want to release it for Microsof
* [Fix any form field errors](#fix-any-form-field-errors)
* [Step 7: Provide testing notes and submit the extension](#step-7-provide-testing-notes-and-submit-the-extension)
* [Resolve any Partner Center errors](#resolve-any-partner-center-errors)
* [If a single locale appears but the package includes multiple languages](#if-a-single-locale-appears-but-the-package-includes-multiple-languages)
* [If the extension is flagged as potentially malware](#if-the-extension-is-flagged-as-potentially-malware)
* [Support](#support)
* [Responsible AI for the AI-generated description of an extension](#responsible-ai-for-the-ai-generated-description-of-an-extension)
* [Process of using the AI-generated description feature](#process-of-using-the-ai-generated-description-feature)
* [Inputs used for the AI-generated description](#inputs-used-for-the-ai-generated-description)
* [How the AI-generated description feature was evaluated](#how-the-ai-generated-description-feature-was-evaluated)
* [Safeguards for the AI-generated description](#safeguards-for-the-ai-generated-description)
* [Support](#support)
* [See also](#see-also)


Expand Down Expand Up @@ -459,21 +460,40 @@ For such errors, try the following fixes:


<!-- ========================================================================== -->
## If the extension is flagged as potentially malware
## If a single locale appears, but the package includes multiple languages

If the extension is flagged as malware or a potentially unwanted application (PUA), review [1.2.2 Unwanted and malicious software](/legal/microsoft-edge/extensions/developer-policies#122-unwanted-and-malicious-software) in _Developer policies for the Microsoft Edge Add-ons store_.
Sometimes only one locale appears in the **Store Listings** tab at Partner Center, even though an extension's package includes multiple languages. This happens when the manifest file uses hardcoded strings instead of localized message references.

Make sure that your extension's code and functionality complies with all requirements and guidelines. For security reasons, Microsoft doesn't disclose exact triggers.
To ensure that all supported locales are detected:

* Update your `manifest.json` file by replacing the `name` and `description` fields with i18n placeholders:

<!-- ========================================================================== -->
## Support
```
{
"manifest_version": 3,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__"
}
```

If you experience issues when registering as an extension developer or when submitting an extension, you can:
* Include a `default_locale` in your manifest, such as `"default_locale": "en"`.

* Enter a support ticket through [Extensions New Support Request](https://support.microsoft.com/supportrequestform/e7a381be-9c9a-fafb-ed76-262bc93fd9e4).
* Make sure your `_locales` folder contains a properly structured `messages.json` file for each language. Partner Center uses these message references to identify available languages. If these message references are missing, the language will be skipped.

* [Contact the Microsoft Edge extensions team](../contact.md).
The message references are the i18n `"name"` and `"description"` keys in each `/_locales/messages.json` file. These message references (i18n keys) correspond to the `"__MSG_extensionName__"` and `"__MSG_extensionDescription__"` placeholders that are used in the `"name"` and `"description"` fields of the `manifest.json` file. Partner Center uses these message references to determine which languages are available.

See also:
* [chrome.i18n](https://developer.chrome.com/docs/extensions/reference/api/i18n) - API to implement internationalization throughout an app or extension.
* [Manifest file format for extensions](../getting-started/manifest-format.md)
* [Manifest file format](https://developer.chrome.com/docs/extensions/reference/manifest) in Chrome docs.


<!-- ========================================================================== -->
## If the extension is flagged as potentially malware

If the extension is flagged as malware or a potentially unwanted application (PUA), review [1.2.2 Unwanted and malicious software](/legal/microsoft-edge/extensions/developer-policies#122-unwanted-and-malicious-software) in _Developer policies for the Microsoft Edge Add-ons store_.

Make sure that your extension's code and functionality complies with all requirements and guidelines. For security reasons, Microsoft doesn't disclose exact triggers.


<!-- ========================================================================== -->
Expand Down Expand Up @@ -534,6 +554,16 @@ The following safeguards are in place for the AI-generated description:
* You have full control over the AI-generated description, and can choose to use it as-is, edit it, or discard it.


<!-- ========================================================================== -->
## Support

If you experience issues when registering as an extension developer or when submitting an extension, you can:

* Enter a support ticket through [Extensions New Support Request](https://support.microsoft.com/supportrequestform/e7a381be-9c9a-fafb-ed76-262bc93fd9e4).

* [Contact the Microsoft Edge extensions team](../contact.md).


<!-- ========================================================================== -->
## See also
<!-- all links in article -->
Expand Down
37 changes: 25 additions & 12 deletions scripts/web-platform-release-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ import fs from "fs/promises";
import playwright from "playwright";
import { execSync } from 'child_process';

// If the number of days before the next Beta is lower or equal to DAYS_NUMBER_BEFORE_RELNOTES_NOTICE
// then we start generating the Beta release notes.
// This gives us time to edit, review, and publish the Beta release notes before Beta comes out.
// This number used to be 15, which was too much because features were still moving in and out of
// the next Beta milestone on chromestatus.com.
// The number is now set to 7 days, which should reduce the number of last-minute changes we need to do.
const DAYS_NUMBER_BEFORE_RELNOTES_NOTICE = 7;

// Where to find Edge-only origin trials info.
const EDGE_OT_ROOT = "https://developer.microsoft.com/en-us";
const EDGE_OT_PAGE = `${EDGE_OT_ROOT}/microsoft-edge/origin-trials/trials`;
// If Beta becomes stable within the next N coming days, generate the release notes for Canary.
// This way, the release notes are ready for when Canary becomes Beta.
const DAYS_NUMBER_BEFORE_RELNOTES_NOTICE = 15;

// The prefix to use when creating a new git branch for the release notes draft.
const BRANCH_NAME_PREFIX = "web-platform-release-notes-";

// Call a chromestatus.com API endpoint and return the parsed JSON data.
async function fetchChromeStatusAPI(url) {
const response = await fetch(url);
let text = await response.text();
Expand All @@ -24,6 +31,7 @@ async function fetchChromeStatusAPI(url) {
return data;
}

// Format a date string as "Month Day, Year", e.g., "January 15, 2024".
function longDate(dateString) {
const date = new Date(dateString);
return date.toLocaleString("en-US", {
Expand All @@ -33,6 +41,7 @@ function longDate(dateString) {
});
}

// Execute a shell command and return the stdout as a string.
async function execute(cmd) {
try {
const stdout = await execSync(cmd);
Expand All @@ -44,7 +53,8 @@ async function execute(cmd) {
}
}

async function releaseNotesAlreadyExists(version) {
// Check if the release notes for the given version already exist in the main branch.
async function doesReleaseNotesAlreadyExist(version) {
const response = await fetch(`https://raw.githubusercontent.com/MicrosoftDocs/edge-developer/refs/heads/main/microsoft-edge/web-platform/release-notes/${version}.md`);

// Github.com normally responds with 404 if the file doesn't exist. So this should catch it.
Expand All @@ -57,7 +67,8 @@ async function releaseNotesAlreadyExists(version) {
return text.includes(`Microsoft Edge ${version} web platform release notes`);
}

async function releaseNotesDraftAlreadyExists(version, branchName) {
// Check if a draft release notes for the given version already exist in the given branch.
async function doesReleaseNotesDraftExist(version, branchName) {
const response = await fetch(`https://raw.githubusercontent.com/MicrosoftDocs/edge-developer/refs/heads/${branchName}/microsoft-edge/web-platform/release-notes/${version}.md`);

// Github.com normally responds with 404 if the file doesn't exist. So this should catch it.
Expand All @@ -70,10 +81,7 @@ async function releaseNotesDraftAlreadyExists(version, branchName) {
return text.includes(`Microsoft Edge ${version} web platform release notes`);
}

function getReleaseNoteMDFilePath(version, branchName) {
return `https://github.com/MicrosoftDocs/edge-developer/blob/${branchName}/microsoft-edge/web-platform/release-notes/${version}.md`;
}

// Get the list of currently active Edge-only origin trials by scraping the Edge OT page.
async function getActiveEdgeOTs() {
const scrapingBrowser = await playwright.chromium.launch({ headless: true });
const context = await scrapingBrowser.newContext();
Expand Down Expand Up @@ -158,6 +166,7 @@ async function getActiveEdgeOTs() {
return ots;
}

// Main entry point to this script.
async function main() {
// --------------------------------------------------
// 1. Check which is the next release (first date that's in the future compared to today).
Expand Down Expand Up @@ -212,13 +221,13 @@ async function main() {
// 2. Check if there isn't already a published or draft release notes for the next beta version.
// --------------------------------------------------

const alreadyExists = await releaseNotesAlreadyExists(nextBetaVersion);
const alreadyExists = await doesReleaseNotesAlreadyExist(nextBetaVersion);
if (alreadyExists) {
console.error(`Release notes for the next beta version ${nextBetaVersion} already exist.`);
process.exit(0);
}

const draftAlreadyExists = await releaseNotesDraftAlreadyExists(nextBetaVersion, branchName);
const draftAlreadyExists = await doesReleaseNotesDraftExist(nextBetaVersion, branchName);
if (draftAlreadyExists) {
console.error(`Draft release notes for the next beta version ${nextBetaVersion} already exist on the ${branchName} branch.`);
process.exit(0);
Expand Down Expand Up @@ -363,8 +372,12 @@ async function main() {
// --------------------------------------------------

console.log("Opening an issue to notify the team about the new release notes draft.");

const fileSourceLink = `https://github.com/MicrosoftDocs/edge-developer/blob/${branchName}/microsoft-edge/web-platform/release-notes/${nextBetaVersion}.md`;

const title = `Microsoft Edge Beta ${nextBetaVersion} web platform release notes ready for review`;
const body = `The release notes draft for the next Microsoft Edge beta version ${nextBetaVersion} has been generated in [${nextBetaVersion}.md](${getReleaseNoteMDFilePath(nextBetaVersion, branchName)}) on the ${branchName} branch.\n\nPlease [create a pull request](https://github.com/MicrosoftDocs/edge-developer/compare/main...${branchName}), update the content as needed, and close this issue.`;
let body = `The release notes draft for the next Microsoft Edge beta version ${nextBetaVersion} has been generated in [${nextBetaVersion}.md](${fileSourceLink}) on the ${branchName} branch.\n\n`;
body += `Please [create a pull request](https://github.com/MicrosoftDocs/edge-developer/compare/main...${branchName}), update the content as needed, and then close this issue.`;

const octokit = github.getOctokit(process.env.token);
await octokit.rest.issues.create({
Expand Down