feat: Update Copilot panel title and clear conversation button (#915)

* 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 <amitjoshi@microsoft.com>
This commit is contained in:
amitjoshi438 2024-05-01 16:23:09 +05:30 коммит произвёл GitHub
Родитель 8c25e3a06e
Коммит b5cbd16ffb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 17 добавлений и 4 удалений

Просмотреть файл

@ -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.",

Просмотреть файл

@ -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>
@ -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>

Просмотреть файл

@ -353,7 +353,7 @@
{
"command": "powerpages.copilot.clearConversation",
"category": "Copilot In Power Pages",
"title": "Clear Conversation",
"title": "%powerpages.copilotPanel.clearConversation.title%",
"icon": "$(clear-all)"
},
{
@ -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)"

Просмотреть файл

@ -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)",

Просмотреть файл

@ -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,
@ -210,7 +210,7 @@ export class PowerPagesCopilot implements vscode.WebviewViewProvider {
type: 'copilotStrings',
value: copilotStrings
});
if (this.aibEndpoint === COPILOT_UNAVAILABLE) {
this.sendMessageToWebview({ type: 'Unavailable' });
return;