Skip to content

Commit 40677ac

Browse files
fix: add missing translatable strings
1 parent a5d6bac commit 40677ac

File tree

10 files changed

+205
-187
lines changed

10 files changed

+205
-187
lines changed

assets/apps/customizer-controls/src/controls.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* global CustomEvent, NeveReactCustomize, MutationObserver */
22
import './public-path.js';
33
import { render } from '@wordpress/element';
4+
import { __ } from '@wordpress/i18n';
45

56
import { init as initDynamicFields } from './dynamic-fields/index';
67
import { ToggleControl } from './toggle/Control';
@@ -297,8 +298,10 @@ const checkHasElementorTemplates = () => {
297298
'neve-custom-elementor-shop-template',
298299
{
299300
type: 'warning',
300-
message:
301+
message: __(
301302
'Some of the settings might not work as expected because you are using a custom shop template made in Elementor.',
303+
'neve'
304+
),
302305
}
303306
)
304307
);
@@ -312,8 +315,10 @@ const checkHasElementorTemplates = () => {
312315
'neve-custom-elementor-product-template',
313316
{
314317
type: 'warning',
315-
message:
318+
message: __(
316319
'Some of the settings might not work as expected because you are using a custom product template made in Elementor.',
320+
'neve'
321+
),
317322
}
318323
)
319324
);

assets/apps/customizer-controls/src/customizer-search/SearchResults.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { Control } from './SearchComponent';
33
import classnames from 'classnames';
4+
import { __ } from '@wordpress/i18n';
45

56
/**
67
* Type SearchComponentProps
@@ -84,7 +85,9 @@ const SearchResults: React.FC<SearchResultsProps> = ({
8485
{query !== '' && (
8586
<ul id="customizer-search-results">
8687
{matchResults.map((control) => {
87-
if ('' === control.label) return '';
88+
if ('' === control.label) {
89+
return '';
90+
}
8891

8992
let breadcrumbs = control.panelName;
9093
if (breadcrumbs === null) {
@@ -118,8 +121,10 @@ const SearchResults: React.FC<SearchResultsProps> = ({
118121
>
119122
{getHighlightedText(label, query)}
120123
<span className="screen-reader-text">
121-
Press return or enter to open this
122-
section
124+
{__(
125+
'Press return or enter to open this section',
126+
'neve'
127+
)}
123128
</span>
124129
</h3>
125130
<span className="search-setting-path">

assets/apps/dashboard/src/Components/Content/Changelog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const Changelog = () => {
2121
setShowForPro(false);
2222
}}
2323
>
24-
Neve
24+
{__('Neve', 'neve')}
2525
</a>
2626
<a
2727
href="#show-for-pro"
@@ -30,7 +30,7 @@ const Changelog = () => {
3030
setShowForPro(true);
3131
}}
3232
>
33-
Neve Pro
33+
{__('Neve Pro', 'neve')}
3434
</a>
3535
</div>
3636
)}

assets/apps/dashboard/src/Components/Notification.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,13 @@ const Notification = ({ data, slug }) => {
143143
const wrappedButtonContent = !canInstallPlugins ? (
144144
<Tooltip
145145
text={sprintf(
146-
// translators: %s: Plugin and theme names.
147-
__('Ask your admin to update %s on your site', 'neve'),
148-
'Neve and Neve Pro'
146+
// translators: %1$s: theme name (Neve), %2$s: plugin name (Neve Pro).
147+
__(
148+
'Ask your admin to update %1$s and %2$s on your site',
149+
'neve'
150+
),
151+
__('Neve', 'neve'),
152+
__('Neve Pro', 'neve')
149153
)}
150154
position="top center"
151155
style={{
@@ -173,7 +177,7 @@ const Notification = ({ data, slug }) => {
173177
<Dashicon icon="no" />
174178
{errorMessage ||
175179
__(
176-
'An error occured. Please reload the page and try again.',
180+
'An error occurred. Please reload the page and try again.',
177181
'neve'
178182
)}
179183
</p>

header-footer-grid/Core/Builder/Abstract_Builder.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,7 @@ abstract class Abstract_Builder implements Builder {
167167
* @access protected
168168
* @var array $devices
169169
*/
170-
protected $devices = [
171-
'desktop' => 'Desktop',
172-
'mobile' => 'Mobile',
173-
];
170+
protected $devices = [];
174171

175172
/**
176173
* Default colors for rows.
@@ -243,6 +240,11 @@ public function __construct() {
243240

244241
add_filter( 'hfg_header_row_classes', [ $this, 'add_header_row_utility_classes' ], 10, 2 );
245242
add_filter( 'hfg_page_header_row_classes', [ $this, 'add_header_row_utility_classes' ], 10, 2 );
243+
244+
$this->devices = [
245+
'desktop' => __( 'Desktop', 'neve' ),
246+
'mobile' => __( 'Mobile', 'neve' ),
247+
];
246248
}
247249

248250
/**

header-footer-grid/Core/Builder/Header.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -498,37 +498,37 @@ protected function get_rows() {
498498
private function get_header_presets() {
499499
$presets = [
500500
[
501-
'label' => 'Classic',
501+
'label' => __( 'Classic', 'neve' ),
502502
'image' => NEVE_ASSETS_URL . 'img/header-presets/Classic.jpg',
503503
'setup' => '{"hfg_header_layout_v2":"{\"desktop\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"logo\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"primary-menu\"},{\"id\":\"header_search_responsive\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]}},\"mobile\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"logo\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"nav-icon\"},{\"id\":\"header_search_responsive\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"sidebar\":[{\"id\":\"primary-menu\"}]}}"}',
504504
],
505505
[
506-
'label' => 'Inverted',
507-
'image' => NEVE_ASSETS_URL . 'img/header-presets/Inverted.jpg',
506+
'label' => __( 'Inverted', 'neve' ),
507+
'image' => NEVE_ASSETS_URL . 'img/header-presets/Inverted.jpg',
508508
'setup' => '{"hfg_header_layout_v2":"{\"desktop\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"primary-menu\"},{\"id\":\"header_search_responsive\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"logo\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]}},\"mobile\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"nav-icon\"},{\"id\":\"header_search_responsive\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"logo\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"sidebar\":[{\"id\":\"primary-menu\"}]}}","logo_component_align":{"mobile":"right","tablet":"right","desktop":"right"}}',
509509
],
510510
[
511-
'label' => 'Centered',
511+
'label' => __( 'Centered', 'neve' ),
512512
'image' => NEVE_ASSETS_URL . 'img/header-presets/Centered.jpg',
513513
'setup' => '{"hfg_header_layout_v2":"{\"desktop\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[],\"c-left\":[],\"center\":[{\"id\":\"logo\"}],\"c-right\":[],\"right\":[]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[{\"id\":\"primary-menu\"}],\"c-right\":[],\"right\":[]}},\"mobile\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[],\"c-left\":[],\"center\":[{\"id\":\"logo\"}],\"c-right\":[],\"right\":[]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[{\"id\":\"nav-icon\"}],\"c-right\":[],\"right\":[]},\"sidebar\":[{\"id\":\"primary-menu\"}]}}","logo_component_align":{"mobile":"center","tablet":"center","desktop":"center"}}',
514514
],
515515
[
516-
'label' => 'Spaced',
516+
'label' => __( 'Spaced', 'neve' ),
517517
'image' => NEVE_ASSETS_URL . 'img/header-presets/Spaced.jpg',
518518
'setup' => '{"hfg_header_layout_v2":"{\"desktop\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"header_search_responsive\"}],\"c-left\":[],\"center\":[{\"id\":\"logo\"}],\"c-right\":[],\"right\":[{\"id\":\"nav-icon\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]}},\"mobile\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"header_search_responsive\"}],\"c-left\":[],\"center\":[{\"id\":\"logo\"}],\"c-right\":[],\"right\":[{\"id\":\"nav-icon\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"sidebar\":[{\"id\":\"primary-menu\"}]}}","logo_component_align":{"mobile":"center","tablet":"center","desktop":"center"}}',
519519
],
520520
[
521-
'label' => 'Collapsed',
521+
'label' => __( 'Collapsed', 'neve' ),
522522
'image' => NEVE_ASSETS_URL . 'img/header-presets/ClassicCollapsed.jpg',
523523
'setup' => '{"hfg_header_layout_v2":"{\"desktop\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"logo\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"header_search_responsive\"},{\"id\":\"nav-icon\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]}},\"mobile\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"logo\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"header_search_responsive\"},{\"id\":\"nav-icon\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"sidebar\":[{\"id\":\"primary-menu\"}]}}"}',
524524
],
525525
[
526-
'label' => 'Search Field',
526+
'label' => __( 'Search Field', 'neve' ),
527527
'image' => NEVE_ASSETS_URL . 'img/header-presets/SearchField.jpg',
528528
'setup' => '{"hfg_header_layout_v2":"{\"desktop\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"logo\"},{\"id\":\"primary-menu\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"header_search\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]}},\"mobile\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"logo\"},{\"id\":\"nav-icon\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"header_search_responsive\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"sidebar\":[{\"id\":\"primary-menu\"}]}}"}',
529529
],
530530
[
531-
'label' => 'Button Item',
531+
'label' => __( 'Button Item', 'neve' ),
532532
'image' => NEVE_ASSETS_URL . 'img/header-presets/ButtonItem.jpg',
533533
'setup' => '{"hfg_header_layout_v2":"{\"desktop\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"logo\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"primary-menu\"},{\"id\":\"button_base\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]}},\"mobile\":{\"top\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"main\":{\"left\":[{\"id\":\"logo\"}],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[{\"id\":\"nav-icon\"}]},\"bottom\":{\"left\":[],\"c-left\":[],\"center\":[],\"c-right\":[],\"right\":[]},\"sidebar\":[{\"id\":\"primary-menu\"},{\"id\":\"button_base\"}]}}"}',
534534
],

header-footer-grid/Core/Components/MenuIcon.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -544,13 +544,13 @@ public function add_settings() {
544544
'default' => 'default',
545545
'options' => [
546546
'options' => [
547-
'default' => 'Default',
548-
'arrow' => 'Arrow',
549-
'donner' => 'Donner',
550-
'dots' => 'Dots',
551-
'minus' => 'Minus',
552-
'vortex' => 'Vortex',
553-
'squeeze' => 'Squeeze',
547+
'default' => __( 'Default', 'neve' ),
548+
'arrow' => __( 'Arrow', 'neve' ),
549+
'donner' => __( 'Donner', 'neve' ),
550+
'dots' => __( 'Dots', 'neve' ),
551+
'minus' => __( 'Minus', 'neve' ),
552+
'vortex' => __( 'Vortex', 'neve' ),
553+
'squeeze' => __( 'Squeeze', 'neve' ),
554554
],
555555
'default' => 'default',
556556
],

header-footer-grid/templates/components/component-footer-sidebar.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
/* translators: %s - customizer link */
3131
__( 'Replace this widget content by going to %s and add widgets into this widget area.', 'neve' ), //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
3232
sprintf(
33-
/* translators: %1$s - link %2$s - name %3$s - label */
3433
'<a href="%1$s"><strong>%2$s %3$s</strong></a>',
3534
esc_url( admin_url( 'customize.php?autofocus[section]=sidebar-widgets-footer-' . $_id ) ),
3635
/* translators: %1$s - &rarr; symbol %2$s - &rarr; symbol %3$s - &rarr; symbol */

0 commit comments

Comments
 (0)