Skip to content

Commit

Permalink
Refactor: update strings translations (@DAnn2012) (#7512)
Browse files Browse the repository at this point in the history
Co-authored-by: DAnn2012 <[email protected]>
Co-authored-by: Kyle B. Johnson <[email protected]>
Co-authored-by: Jon Waldstein <[email protected]>
Co-authored-by: Paulo Iankoski <[email protected]>
  • Loading branch information
5 people authored Aug 26, 2024
1 parent fc25cf7 commit b983c95
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion includes/admin/settings/class-settings-advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function get_settings() {
],
],
[
'name' => 'GiveWP Cache',
'name' => __( 'GiveWP Cache', 'give' ),
'id' => 'give-clear-cache',
'buttonTitle' => __( 'Clear Cache', 'give' ),
'desc' => __( 'Click this button if you want to clear GiveWP\'s cache. The plugin stores common settings and queries in cache to optimize performance. Clearing cache will remove and begin rebuilding these saved queries.', 'give' ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default function DonationFormsListTable() {
className={`button button-secondary ${styles.button} ${styles.buttonSecondary}`}
onClick={showLegacyDonationForms}
>
{__('Switch to Legacy View')}
{__('Switch to Legacy View', 'give')}
</button>
<a
href={'edit.php?post_type=give_forms&page=givewp-form-builder'}
Expand Down
2 changes: 1 addition & 1 deletion src/Donations/DonationsAdminPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private function getForms()
return array_merge([
[
'value' => '0',
'text' => 'Any',
'text' => __('Any', 'give'),
],
], $options);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Donors/DonorsAdminPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function getForms()
return array_merge([
[
'value' => '0',
'text' => 'Any',
'text' => __('Any', 'give'),
],
], $options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export default function EmbedFormModal({handleClose}: EmbedFormModalProps) {
}, []);

const postOptions = [
{label: 'Page', value: 'page'},
{label: 'Post', value: 'post'},
{label: __('Page', 'give'), value: 'page'},
{label: __('Post', 'give'), value: 'post'},
];

const displayStyles = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const RecurringDonationsPromo = () => {
{__('Provide donors the option of making flexible recurring donations.', 'give')}
</div>
<div style={{display: 'flex', justifyContent: 'space-around'}}>
<Button href='https://givewp.com/addons/recurring-donations' target="_blank" rel="noopener noreferrer" variant={'primary'} style={{backgroundColor:'var(--givewp-primary-500)', padding: '4px 8px', height: 'auto'}}>Upgrade your plan</Button>
<Button href='https://givewp.com/addons/recurring-donations' target="_blank" rel="noopener noreferrer" variant={'link'} style={{color: 'var(--givewp-gray-100)'}}>Read more</Button>
<Button href='https://givewp.com/addons/recurring-donations' target="_blank" rel="noopener noreferrer" variant={'primary'} style={{backgroundColor:'var(--givewp-primary-500)', padding: '4px 8px', height: 'auto'}}>{__('Upgrade your plan', 'give')}</Button>
<Button href='https://givewp.com/addons/recurring-donations' target="_blank" rel="noopener noreferrer" variant={'link'} style={{color: 'var(--givewp-gray-100)'}}>{__('Read more', 'give')}</Button>
</div>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const EmailTemplateSettings = ({notification, templateTagsRef, settings, setSett
<PanelRow>
<RadioControl
className="radio-control--email-options"
label={__('Email options', 'givewp')}
label={__('Email options', 'give')}
hideLabelFromVision={true}
selected={option.status ?? 'global'}
options={config.statusOptions}
Expand All @@ -79,17 +79,17 @@ const EmailTemplateSettings = ({notification, templateTagsRef, settings, setSett
>
<PanelRow>
<TextControl
label={__('Email Subject', 'givewp')}
help={__('Enter the email subject line', 'givewp')}
label={__('Email Subject', 'give')}
help={__('Enter the email subject line', 'give')}
onChange={(value) => updateEmailTemplateOption('email_subject', value)}
value={option.email_subject || config.defaultValues.email_subject}
/>
</PanelRow>

<PanelRow>
<TextControl
label={__('Email Header', 'givewp')}
help={__('Enter the email header that appears at the top of the email', 'givewp')}
label={__('Email Header', 'give')}
help={__('Enter the email header that appears at the top of the email', 'give')}
onChange={(value) => updateEmailTemplateOption('email_header', value)}
// @ts-ignore
value={option.email_header || config.defaultValues.email_header}
Expand All @@ -100,12 +100,12 @@ const EmailTemplateSettings = ({notification, templateTagsRef, settings, setSett
<SelectControl
className={'select-control--email-options'}
onChange={(value) => updateEmailTemplateOption('email_content_type', value)}
label={__('Email content type', 'givewp')}
help={__('Choose email type', 'givewp')}
label={__('Email content type', 'give')}
help={__('Choose email type', 'give')}
value={option.email_content_type || config.defaultValues.email_content_type}
options={[
{label: __('HTML', 'givewp'), value: 'text/html'},
{label: __('Plain', 'givewp'), value: 'text/plain'},
{label: __('HTML', 'give'), value: 'text/html'},
{label: __('Plain', 'give'), value: 'text/plain'},
]}
/>
</PanelRow>
Expand Down Expand Up @@ -141,7 +141,7 @@ const EmailTemplateSettings = ({notification, templateTagsRef, settings, setSett
>
{config.supportsRecipients && (
<div className={'email-settings-template__recipient'}>
<BaseControl id={'give-email-template-recipient'} label={__('Email', 'givewp')}>
<BaseControl id={'give-email-template-recipient'} label={__('Email', 'give')}>
{recipients.map((recipientEmail: string, index) => {
return (
<li
Expand Down Expand Up @@ -176,18 +176,18 @@ const EmailTemplateSettings = ({notification, templateTagsRef, settings, setSett
variant={'secondary'}
onClick={() => updateEmailTemplateOption('recipient', [...recipients, ''])}
>
<WPIcon size={17} icon={plus} /> {__('Add email', 'givewp')}
<WPIcon size={17} icon={plus} /> {__('Add email', 'give')}
</Button>
</BaseControl>
</div>
)}
{!config.supportsRecipients && (
<TextControl
disabled={true}
label={__('Email', 'givewp')}
label={__('Email', 'give')}
help={__(
'This email is automatically sent to the individual fundraiser and the recipient cannot be customized.',
'givewp'
'give'
)}
onChange={() => null}
value="{donor_email}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,33 @@ export default function EmailGeneralSettings({ settings, setSettings }) {
>
<PanelRow>
<SelectControl
label={__('Email Template', 'givewp')}
help={__('Choose your template from the available registered template types', 'givewp')}
label={__('Email Template', 'give')}
help={__('Choose your template from the available registered template types', 'give')}
options={[
{label: __('Default template', 'givewp'), value: 'default'},
{label: __('No template, plain text only', 'givewp'), value: 'none'},
{label: __('Default template', 'give'), value: 'default'},
{label: __('No template, plain text only', 'give'), value: 'none'},
]}
value={emailTemplate}
onChange={(emailTemplate) => setSettings({ emailTemplate })}
/>
</PanelRow>
<PanelRow>
<TextControl
label={__('From Name', 'givewp')}
label={__('From Name', 'give')}
help={__(
'The name which appears in the "From" field in all GiveWP donation emails.',
'givewp'
'give'
)}
value={emailFromName}
onChange={(emailFromName) => setSettings({ emailFromName })}
/>
</PanelRow>
<PanelRow>
<TextControl
label={__('From Email', 'givewp')}
label={__('From Email', 'give')}
help={__(
'Email address from which all GiveWP emails are sent from. This will act as the "from" and "reply-to" email address.',
'givewp'
'give'
)}
value={emailFromEmail}
onChange={(emailFromEmail) => setSettings({ emailFromEmail })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const FormSummarySettings = ({settings, setSettings}) => {
<>
<PanelRow>
<TextControl
label={__('Title')}
label={__('Title', 'give')}
value={formTitle}
onChange={(formTitle) => {
!isPublished && setSettings({pageSlug: cleanForSlug(formTitle)});
Expand Down Expand Up @@ -59,7 +59,7 @@ const FormSummarySettings = ({settings, setSettings}) => {
{isExcerptEnabled && (
<PanelRow>
<TextareaControl
label={'Excerpt'}
label={__('Excerpt', 'give')}
help={__(
'The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.',
'give'
Expand Down
2 changes: 1 addition & 1 deletion src/Subscriptions/SubscriptionsAdminPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private function getForms()
return array_merge([
[
'value' => '0',
'text' => 'Any',
'text' => __('Any', 'give'),
]
], $options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function SubscriptionsListTable() {
listTableBlankSlate={ListTableBlankSlate}
>
<button className={tableStyles.addFormButton} onClick={showLegacyDonations}>
{__('Switch to Legacy View')}
{__('Switch to Legacy View', 'give')}
</button>
</ListTablePage>
);
Expand Down

0 comments on commit b983c95

Please sign in to comment.