Skip to content

Commit f1ef2b5

Browse files
committed
chore: address Copilot review
1 parent e16194f commit f1ef2b5

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

assets/src/components/SiteModal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const SiteModal = ( { formData, setFormData, onSubmit, onClose, editing, allGitH
7070
if ( ! healthCheckData.success ) {
7171
setErrors( {
7272
...newErrors,
73-
message: __( 'Health check failed. Please ensure the site is accessible and the api key is correct.', 'oneupdate' ),
73+
message: __( 'Health check failed. Please ensure the site is accessible and the API key is correct.', 'oneupdate' ),
7474
} );
7575
setShowNotice( true );
7676
setIsProcessing( false );
@@ -153,7 +153,7 @@ const SiteModal = ( { formData, setFormData, onSubmit, onClose, editing, allGitH
153153
value={ formData.apiKey }
154154
onChange={ ( value ) => setFormData( { ...formData, apiKey: value } ) }
155155
error={ errors.apiKey }
156-
help={ __( 'This is the api key that will be used to authenticate the site for OneUpdate.', 'oneupdate' ) }
156+
help={ __( 'This is the API key that will be used to authenticate the site for OneUpdate.', 'oneupdate' ) }
157157
/>
158158

159159
<Button

assets/src/components/SiteSettings.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const SiteSettings = () => {
2828
} catch ( error ) {
2929
setNotice( {
3030
type: 'error',
31-
message: __( 'Failed to fetch api key. Please try again later.', 'oneupdate' ),
31+
message: __( 'Failed to fetch API key. Please try again later.', 'oneupdate' ),
3232
} );
3333
} finally {
3434
setIsLoading( false );
@@ -57,13 +57,13 @@ const SiteSettings = () => {
5757
} else {
5858
setNotice( {
5959
type: 'error',
60-
message: __( 'Failed to regenerate api key. Please try again later.', 'oneupdate' ),
60+
message: __( 'Failed to regenerate API key. Please try again later.', 'oneupdate' ),
6161
} );
6262
}
6363
} catch ( error ) {
6464
setNotice( {
6565
type: 'error',
66-
message: __( 'Error regenerating api key. Please try again later.', 'oneupdate' ),
66+
message: __( 'Error regenerating API key. Please try again later.', 'oneupdate' ),
6767
} );
6868
}
6969
}, [] );
@@ -116,7 +116,7 @@ const SiteSettings = () => {
116116
.catch( ( error ) => {
117117
setNotice( {
118118
type: 'error',
119-
message: __( 'Failed to copy api key. Please try again.', 'oneupdate' ) + ' ' + error,
119+
message: __( 'Failed to copy API key. Please try again.', 'oneupdate' ) + ' ' + error,
120120
} );
121121
} );
122122
} }

assets/src/components/SiteTable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const SiteTable = ( { sites, onEdit, onDelete, setFormData, setShowModal } ) =>
6060
<td>
6161
{ site?.githubRepo }
6262
</td>
63-
<td><code>{ site?.apiKey.substring( 0, 10 ) }...</code></td>
63+
<td><code>{ site?.apiKey?.substring( 0, 10 ) }...</code></td>
6464
<td>
6565
<Button
6666
variant="secondary"

docs/INSTALLATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ OneUpdate requires installation on **two types of sites**: one **Governing Site*
3131

3232
1. **Activate Plugin:** Go to WordPress Admin → Plugins and activate OneUpdate on each brand site
3333
2. **Configure Site Type:** Upon activation, select **"Brand Site"** when prompted
34-
3. **Generate API Key:** The plugin will generate a unique api key for secure communication
34+
3. **Generate API Key:** The plugin will generate a unique API key for secure communication
3535
4. **Copy Configuration Details:** Note down:
3636
- Site Name
3737
- Site URL

inc/classes/rest/class-basic-options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function register_routes(): void {
150150
)
151151
);
152152
/**
153-
* Register a route which will store array of sites data like site name, site url, its GitHub repo and api key.
153+
* Register a route which will store array of sites data like site name, site url, its GitHub repo and API key.
154154
*/
155155
register_rest_route(
156156
self::NAMESPACE,

languages/oneupdate.pot

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgstr ""
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2025-08-28T06:33:29+00:00\n"
12+
"POT-Creation-Date: 2025-08-28T11:08:25+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.12.0\n"
1515
"X-Domain: oneupdate\n"
@@ -1374,7 +1374,7 @@ msgstr ""
13741374

13751375
#: assets/build/js/settings.js:1
13761376
#: assets/src/components/SiteModal.js:156
1377-
msgid "This is the api key that will be used to authenticate the site for OneUpdate."
1377+
msgid "This is the API key that will be used to authenticate the site for OneUpdate."
13781378
msgstr ""
13791379

13801380
#: assets/build/js/settings.js:1
@@ -1404,7 +1404,7 @@ msgstr ""
14041404

14051405
#: assets/build/js/settings.js:1
14061406
#: assets/src/components/SiteModal.js:73
1407-
msgid "Health check failed. Please ensure the site is accessible and the api key is correct."
1407+
msgid "Health check failed. Please ensure the site is accessible and the API key is correct."
14081408
msgstr ""
14091409

14101410
#: assets/build/js/settings.js:1
@@ -1586,7 +1586,7 @@ msgstr ""
15861586

15871587
#: assets/build/js/settings.js:1
15881588
#: assets/src/components/SiteSettings.js:31
1589-
msgid "Failed to fetch api key. Please try again later."
1589+
msgid "Failed to fetch API key. Please try again later."
15901590
msgstr ""
15911591

15921592
#: assets/build/js/settings.js:1
@@ -1596,12 +1596,12 @@ msgstr ""
15961596

15971597
#: assets/build/js/settings.js:1
15981598
#: assets/src/components/SiteSettings.js:60
1599-
msgid "Failed to regenerate api key. Please try again later."
1599+
msgid "Failed to regenerate API key. Please try again later."
16001600
msgstr ""
16011601

16021602
#: assets/build/js/settings.js:1
16031603
#: assets/src/components/SiteSettings.js:66
1604-
msgid "Error regenerating api key. Please try again later."
1604+
msgid "Error regenerating API key. Please try again later."
16051605
msgstr ""
16061606

16071607
#: assets/build/js/settings.js:1
@@ -1616,7 +1616,7 @@ msgstr ""
16161616

16171617
#: assets/build/js/settings.js:1
16181618
#: assets/src/components/SiteSettings.js:119
1619-
msgid "Failed to copy api key. Please try again."
1619+
msgid "Failed to copy API key. Please try again."
16201620
msgstr ""
16211621

16221622
#: assets/build/js/settings.js:1

0 commit comments

Comments
 (0)