Skip to content

Commit

Permalink
feat: Update Copilot panel title and clear conversation button (#915)
Browse files Browse the repository at this point in the history
* feat: Update Copilot panel title and clear conversation button

The code changes update the Copilot panel title and clear conversation button text to use localized strings. This improves the user experience by providing clear and localized labels for these elements.

Note: This commit message follows the convention used in recent repository commits.

* Update localization strings and add new translation for "PREVIEW"

---------

Co-authored-by: amitjoshi <[email protected]>
  • Loading branch information
amitjoshi438 and amitjoshi authored May 1, 2024
1 parent 8c25e3a commit b5cbd16
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"Enter the environment URL": "Enter the environment URL",
"Active auth profile is not found or has expired. To create a new auth profile, enter the environment URL.": "Active auth profile is not found or has expired. To create a new auth profile, enter the environment URL.",
"Selection is empty.": "Selection is empty.",
"PREVIEW": "PREVIEW",
"Explain the following code snippet:": "Explain the following code snippet:",
"Selection is too large. Try making a shorter selection.": "Selection is too large. Try making a shorter selection.",
"Feature is not enabled for this geo.": "Feature is not enabled for this geo.",
Expand Down
9 changes: 9 additions & 0 deletions loc/translations-export/vscode-powerplatform.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<trans-unit id="++CODE++aba96e0c43da62e6c721a35c5d5eb5ffecaf8316ddea5379049172acfe6c7152">
<source xml:lang="en">PAC Telemetry enabled</source>
</trans-unit>
<trans-unit id="++CODE++59e1f415bf9d7761b450dcb4785daac53307323451bc453bfaa06a46d4649e2a">
<source xml:lang="en">PREVIEW</source>
</trans-unit>
<trans-unit id="++CODE++1514b12ec249ca33bc0568c872840126e82cc964aaa7f028393674c17d554444">
<source xml:lang="en">Page Template name cannot be empty.</source>
</trans-unit>
Expand Down Expand Up @@ -389,6 +392,12 @@ The fifth line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.s
<trans-unit id="pacCLI.authPanel.clearAuthProfile.title">
<source xml:lang="en">Clear Auth Profiles</source>
</trans-unit>
<trans-unit id="powerpages.copilotPanel.clearConversation.title">
<source xml:lang="en">Clear Conversation</source>
</trans-unit>
<trans-unit id="powerpages.copilotPanel.title">
<source xml:lang="en">Copilot In Power Pages</source>
</trans-unit>
<trans-unit id="pacCLI.envAndSolutionsPanel.copyDisplayName.title">
<source xml:lang="en">Copy Display Name</source>
</trans-unit>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
{
"command": "powerpages.copilot.clearConversation",
"category": "Copilot In Power Pages",
"title": "Clear Conversation",
"title": "%powerpages.copilotPanel.clearConversation.title%",
"icon": "$(clear-all)"
},
{
Expand Down Expand Up @@ -937,7 +937,7 @@
{
"type": "webview",
"id": "powerpages.copilot",
"name": "Copilot In Power Pages",
"name": "%powerpages.copilotPanel.title%",
"initialSize": 6,
"visibility": "visible",
"when": "(!virtualWorkspace && powerpages.websiteYmlExists && config.powerPlatform.experimental.copilotEnabled) || (isWeb && config.powerPlatform.experimental.enableWebCopilot)"
Expand Down
3 changes: 3 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

"power-platform-activitybar.title": "Power Platform",

"powerpages.copilotPanel.title": "Copilot In Power Pages",
"powerpages.copilotPanel.clearConversation.title": "Clear Conversation",

"pacCLI.authPanel.title": "Auth Profiles",
"pacCLI.authPanel.welcome.whenInteractiveSupported": {
"message": "No auth profiles found on this computer.\n[Add Auth Profile](command:pacCLI.authPanel.newAuthProfile)",
Expand Down
4 changes: 2 additions & 2 deletions src/common/copilot/PowerPagesCopilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class PowerPagesCopilot implements vscode.WebviewViewProvider {
this._view = webviewView;

webviewView.title = "Copilot In Power Pages" + (IS_DESKTOP ? "" : " [PREVIEW]");
webviewView.description = "PREVIEW";
webviewView.description = vscode.l10n.t("PREVIEW");
webviewView.webview.options = {
// Allow scripts in the webview
enableScripts: true,
Expand Down Expand Up @@ -210,7 +210,7 @@ export class PowerPagesCopilot implements vscode.WebviewViewProvider {
type: 'copilotStrings',
value: copilotStrings
});

if (this.aibEndpoint === COPILOT_UNAVAILABLE) {
this.sendMessageToWebview({ type: 'Unavailable' });
return;
Expand Down

0 comments on commit b5cbd16

Please sign in to comment.