Skip to content

Commit 35cc511

Browse files
committed
remove localization from integration webview as it is not available
1 parent 0ac510e commit 35cc511

File tree

5 files changed

+28
-33
lines changed

5 files changed

+28
-33
lines changed

src/webviews/webview-side/integrations/BigQueryForm.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
import { l10n } from 'vscode';
32

43
import { BigQueryIntegrationConfig } from './types';
54

@@ -28,7 +27,7 @@ export const BigQueryForm: React.FC<IBigQueryFormProps> = ({ integrationId, exis
2827

2928
const validateCredentials = (value: string): boolean => {
3029
if (!value.trim()) {
31-
setCredentialsError(l10n.t('Credentials are required'));
30+
setCredentialsError('Credentials are required');
3231
return false;
3332
}
3433

@@ -38,7 +37,7 @@ export const BigQueryForm: React.FC<IBigQueryFormProps> = ({ integrationId, exis
3837
return true;
3938
} catch (error) {
4039
const errorMessage = error instanceof Error ? error.message : 'Invalid JSON format';
41-
setCredentialsError(l10n.t('Invalid JSON: {0}', errorMessage));
40+
setCredentialsError(`Invalid JSON: ${errorMessage}`);
4241
return false;
4342
}
4443
};
@@ -59,7 +58,7 @@ export const BigQueryForm: React.FC<IBigQueryFormProps> = ({ integrationId, exis
5958

6059
const config: BigQueryIntegrationConfig = {
6160
id: integrationId,
62-
name: name || l10n.t('Unnamed BigQuery Integration ({0})', integrationId),
61+
name: name || `Unnamed BigQuery Integration (${integrationId})`,
6362
type: 'bigquery',
6463
projectId,
6564
credentials
@@ -71,7 +70,7 @@ export const BigQueryForm: React.FC<IBigQueryFormProps> = ({ integrationId, exis
7170
return (
7271
<form onSubmit={handleSubmit}>
7372
<div className="form-group">
74-
<label htmlFor="name">{l10n.t('Name (optional)')}</label>
73+
<label htmlFor="name">Name (optional)</label>
7574
<input
7675
type="text"
7776
id="name"
@@ -84,7 +83,7 @@ export const BigQueryForm: React.FC<IBigQueryFormProps> = ({ integrationId, exis
8483

8584
<div className="form-group">
8685
<label htmlFor="projectId">
87-
{l10n.t('Project ID')} <span className="required">*</span>
86+
Project ID <span className="required">*</span>
8887
</label>
8988
<input
9089
type="text"
@@ -99,7 +98,7 @@ export const BigQueryForm: React.FC<IBigQueryFormProps> = ({ integrationId, exis
9998

10099
<div className="form-group">
101100
<label htmlFor="credentials">
102-
{l10n.t('Service Account Credentials (JSON)')} <span className="required">*</span>
101+
Service Account Credentials (JSON) <span className="required">*</span>
103102
</label>
104103
<textarea
105104
id="credentials"
@@ -124,10 +123,10 @@ export const BigQueryForm: React.FC<IBigQueryFormProps> = ({ integrationId, exis
124123

125124
<div className="form-actions">
126125
<button type="submit" className="primary">
127-
{l10n.t('Save')}
126+
Save
128127
</button>
129128
<button type="button" className="secondary" onClick={onCancel}>
130-
{l10n.t('Cancel')}
129+
Cancel
131130
</button>
132131
</div>
133132
</form>

src/webviews/webview-side/integrations/IntegrationItem.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22
import { IntegrationWithStatus } from './types';
3-
import { l10n } from 'vscode';
43

54
export interface IIntegrationItemProps {
65
integration: IntegrationWithStatus;
@@ -10,8 +9,8 @@ export interface IIntegrationItemProps {
109

1110
export const IntegrationItem: React.FC<IIntegrationItemProps> = ({ integration, onConfigure, onDelete }) => {
1211
const statusClass = integration.status === 'connected' ? 'status-connected' : 'status-disconnected';
13-
const statusText = integration.status === 'connected' ? l10n.t('Connected') : l10n.t('Not Configured');
14-
const configureText = integration.config ? l10n.t('Reconfigure') : l10n.t('Configure');
12+
const statusText = integration.status === 'connected' ? 'Connected' : 'Not Configured';
13+
const configureText = integration.config ? 'Reconfigure' : 'Configure';
1514
const displayName = integration.config?.name || integration.id;
1615

1716
return (
@@ -26,7 +25,7 @@ export const IntegrationItem: React.FC<IIntegrationItemProps> = ({ integration,
2625
</button>
2726
{integration.config && (
2827
<button type="button" className="secondary" onClick={() => onDelete(integration.id)}>
29-
{l10n.t('Reset')}
28+
Reset
3029
</button>
3130
)}
3231
</div>

src/webviews/webview-side/integrations/IntegrationList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as React from 'react';
22
import { IntegrationItem } from './IntegrationItem';
33
import { IntegrationWithStatus } from './types';
4-
import { l10n } from 'vscode';
54

65
export interface IIntegrationListProps {
76
integrations: IntegrationWithStatus[];
@@ -11,7 +10,7 @@ export interface IIntegrationListProps {
1110

1211
export const IntegrationList: React.FC<IIntegrationListProps> = ({ integrations, onConfigure, onDelete }) => {
1312
if (integrations.length === 0) {
14-
return <p className="no-integrations">{l10n.t('No integrations found in this project.')}</p>;
13+
return <p className="no-integrations">No integrations found in this project.</p>;
1514
}
1615

1716
return (

src/webviews/webview-side/integrations/IntegrationPanel.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { IVsCodeApi } from '../react-common/postOffice';
33
import { IntegrationList } from './IntegrationList';
44
import { ConfigurationForm } from './ConfigurationForm';
55
import { IntegrationWithStatus, WebviewMessage, IntegrationConfig } from './types';
6-
import { l10n } from 'vscode';
76

87
export interface IIntegrationPanelProps {
98
baseTheme: string;
@@ -130,7 +129,7 @@ export const IntegrationPanel: React.FC<IIntegrationPanelProps> = ({ baseTheme,
130129

131130
return (
132131
<div className={`integration-panel theme-${baseTheme}`}>
133-
<h1>{l10n.t('Deepnote Integrations')}</h1>
132+
<h1>Deepnote Integrations</h1>
134133

135134
{message && <div className={`message message-${message.type}`}>{message.text}</div>}
136135

@@ -149,20 +148,20 @@ export const IntegrationPanel: React.FC<IIntegrationPanelProps> = ({ baseTheme,
149148
<div className="configuration-form-overlay">
150149
<div className="configuration-form-container" style={{ maxWidth: '400px' }}>
151150
<div className="configuration-form-header">
152-
<h2>{l10n.t('Confirm Reset')}</h2>
151+
<h2>Confirm Reset</h2>
153152
</div>
154153
<div className="configuration-form-body">
155-
<p>{l10n.t('Are you sure you want to reset this integration configuration?')}</p>
154+
<p>Are you sure you want to reset this integration configuration?</p>
156155
<p style={{ marginTop: '10px', fontSize: '0.9em', opacity: 0.8 }}>
157-
{l10n.t('This will remove the stored credentials. You can reconfigure it later.')}
156+
This will remove the stored credentials. You can reconfigure it later.
158157
</p>
159158
</div>
160159
<div className="form-actions">
161160
<button type="button" className="primary" onClick={handleConfirmDelete}>
162-
{l10n.t('Reset')}
161+
Reset
163162
</button>
164163
<button type="button" className="secondary" onClick={handleCancelDelete}>
165-
{l10n.t('Cancel')}
164+
Cancel
166165
</button>
167166
</div>
168167
</div>

src/webviews/webview-side/integrations/PostgresForm.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22
import { PostgresIntegrationConfig } from './types';
3-
import { l10n } from 'vscode';
43

54
export interface IPostgresFormProps {
65
integrationId: string;
@@ -36,7 +35,7 @@ export const PostgresForm: React.FC<IPostgresFormProps> = ({ integrationId, exis
3635

3736
const config: PostgresIntegrationConfig = {
3837
id: integrationId,
39-
name: name || l10n.t('Unnamed PostgreSQL Integration ({0})', integrationId),
38+
name: name || `Unnamed PostgreSQL Integration (${integrationId})`,
4039
type: 'postgres',
4140
host,
4241
port: parseInt(port, 10),
@@ -52,7 +51,7 @@ export const PostgresForm: React.FC<IPostgresFormProps> = ({ integrationId, exis
5251
return (
5352
<form onSubmit={handleSubmit}>
5453
<div className="form-group">
55-
<label htmlFor="name">{l10n.t('Name (optional)')}</label>
54+
<label htmlFor="name">Name (optional)</label>
5655
<input
5756
type="text"
5857
id="name"
@@ -65,7 +64,7 @@ export const PostgresForm: React.FC<IPostgresFormProps> = ({ integrationId, exis
6564

6665
<div className="form-group">
6766
<label htmlFor="host">
68-
{l10n.t('Host')} <span className="required">*</span>
67+
Host <span className="required">*</span>
6968
</label>
7069
<input
7170
type="text"
@@ -80,7 +79,7 @@ export const PostgresForm: React.FC<IPostgresFormProps> = ({ integrationId, exis
8079

8180
<div className="form-group">
8281
<label htmlFor="port">
83-
{l10n.t('Port')} <span className="required">*</span>
82+
Port <span className="required">*</span>
8483
</label>
8584
<input
8685
type="number"
@@ -98,7 +97,7 @@ export const PostgresForm: React.FC<IPostgresFormProps> = ({ integrationId, exis
9897

9998
<div className="form-group">
10099
<label htmlFor="database">
101-
{l10n.t('Database')} <span className="required">*</span>
100+
Database <span className="required">*</span>
102101
</label>
103102
<input
104103
type="text"
@@ -113,7 +112,7 @@ export const PostgresForm: React.FC<IPostgresFormProps> = ({ integrationId, exis
113112

114113
<div className="form-group">
115114
<label htmlFor="username">
116-
{l10n.t('Username')} <span className="required">*</span>
115+
Username <span className="required">*</span>
117116
</label>
118117
<input
119118
type="text"
@@ -128,7 +127,7 @@ export const PostgresForm: React.FC<IPostgresFormProps> = ({ integrationId, exis
128127

129128
<div className="form-group">
130129
<label htmlFor="password">
131-
{l10n.t('Password')} <span className="required">*</span>
130+
Password <span className="required">*</span>
132131
</label>
133132
<input
134133
type="password"
@@ -144,16 +143,16 @@ export const PostgresForm: React.FC<IPostgresFormProps> = ({ integrationId, exis
144143
<div className="form-group checkbox-group">
145144
<label>
146145
<input type="checkbox" checked={ssl} onChange={(e) => setSsl(e.target.checked)} />
147-
{l10n.t('Use SSL')}
146+
Use SSL
148147
</label>
149148
</div>
150149

151150
<div className="form-actions">
152151
<button type="submit" className="primary">
153-
{l10n.t('Save')}
152+
Save
154153
</button>
155154
<button type="button" className="secondary" onClick={onCancel}>
156-
{l10n.t('Cancel')}
155+
Cancel
157156
</button>
158157
</div>
159158
</form>

0 commit comments

Comments
 (0)