Skip to content

Commit 903cb8e

Browse files
fix: update UI strings for improved CTAs, grammar fixes, and consistency
Fix typos (hight→height, magnifiying→magnifying, maximun→maximum, Candelstick→Candlestick), grammar errors (an user→a user, it working→it work, by change→by changing), and improve UI copy across the plugin: clearer CTAs (Add New→Add New Chart, Insert→Insert Chart), less jargon (Interpolate Nulls→Fill in Missing Values, Residue→Other Slice, Aggregation Target→Group Tooltips By), more concise descriptions, and actionable empty states. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 50b915e commit 903cb8e

21 files changed

Lines changed: 61 additions & 61 deletions

File tree

classes/Visualizer/Gutenberg/src/Components/Charts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class Charts extends Component {
244244

245245
</Fragment> :
246246
<p className="visualizer-no-charts">
247-
{ __( 'No charts found.' ) }
247+
{ __( 'No charts found. Create a chart in the Visualizer dashboard first.' ) }
248248
</p> :
249249
<Placeholder>
250250
<Spinner/>

classes/Visualizer/Module/Admin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public function enqueueMediaScripts() {
399399
'visualizer',
400400
array(
401401
'i10n' => array(
402-
'insert' => __( 'Insert', 'visualizer' ),
402+
'insert' => __( 'Insert Chart', 'visualizer' ),
403403
),
404404
)
405405
);
@@ -430,7 +430,7 @@ public function setupMediaViewStrings( $strings ) {
430430
'title' => esc_html__( 'Visualizations', 'visualizer' ),
431431
),
432432
'routers' => array(
433-
'library' => esc_html__( 'From Library', 'visualizer' ),
433+
'library' => esc_html__( 'Insert from Library', 'visualizer' ),
434434
'create' => esc_html__( 'Create New', 'visualizer' ),
435435
),
436436
'library' => array(

classes/Visualizer/Module/Chart.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ private function _handleDataAndSettingsPage() {
888888
'visualizer',
889889
array(
890890
'l10n' => array(
891-
'invalid_source' => esc_html__( 'You have entered an invalid URL. Please provide a valid URL.', 'visualizer' ),
891+
'invalid_source' => esc_html__( 'The URL you entered is invalid. Please enter a valid URL.', 'visualizer' ),
892892
'loading' => esc_html__( 'Loading...', 'visualizer' ),
893893
'json_error' => esc_html__( 'An error occured in fetching data.', 'visualizer' ),
894894
'select_columns' => esc_html__( 'Please select a few columns to include in the chart.', 'visualizer' ),
@@ -1318,8 +1318,8 @@ public function uploadData() {
13181318
update_post_meta( $chart_id, Visualizer_Plugin::CF_EDITOR, $_POST['editor-type'] );
13191319
} else {
13201320
do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'CSV file with chart data was not uploaded for chart %d.', $chart_id ), 'error', __FILE__, __LINE__ );
1321-
$render->message = esc_html__( 'CSV file with chart data was not uploaded. Please try again.', 'visualizer' );
1322-
update_post_meta( $chart_id, Visualizer_Plugin::CF_ERROR, esc_html__( 'CSV file with chart data was not uploaded. Please try again.', 'visualizer' ) );
1321+
$render->message = esc_html__( 'No CSV file was received. Select a file and try uploading again.', 'visualizer' );
1322+
update_post_meta( $chart_id, Visualizer_Plugin::CF_ERROR, esc_html__( 'No CSV file was received. Select a file and try uploading again.', 'visualizer' ) );
13231323
}
13241324

13251325
do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'Uploaded data for chart %d with source %s', $chart_id, print_r( $source, true ) ), 'debug', __FILE__, __LINE__ );
@@ -1369,7 +1369,7 @@ public function uploadData() {
13691369
} else {
13701370
$error = $source->get_error();
13711371
if ( empty( $error ) ) {
1372-
$error = esc_html__( 'CSV file is broken or invalid. Please try again.', 'visualizer' );
1372+
$error = esc_html__( 'The CSV file couldn\'t be read. Check that it\'s properly formatted and try again.', 'visualizer' );
13731373
}
13741374
$render->message = $error;
13751375
do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( '%s for chart %d.', $error, $chart_id ), 'error', __FILE__, __LINE__ );
@@ -1499,7 +1499,7 @@ private function _handleDataPage() {
14991499
'visualizer',
15001500
array(
15011501
'l10n' => array(
1502-
'invalid_source' => esc_html__( 'You have entered an invalid URL. Please provide a valid URL.', 'visualizer' ),
1502+
'invalid_source' => esc_html__( 'The URL you entered is invalid. Please enter a valid URL.', 'visualizer' ),
15031503
'loading' => esc_html__( 'Loading...', 'visualizer' ),
15041504
'invalid_format' => esc_html__( 'This format pattern is not supported in the series settings field. To display percentages, use the Manual Configuration option instead.', 'visualizer' ),
15051505
),

classes/Visualizer/Render/Library.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected function _toHTML() {
4848
echo '<h2>';
4949
esc_html_e( 'Visualizer Library', 'visualizer' );
5050
echo ' <div class="viz-add-new-group">';
51-
echo '<a href="javascript:;" class="add-new-h2 add-new-chart">', esc_html__( 'Add New', 'visualizer' ), '</a>';
51+
echo '<a href="javascript:;" class="add-new-h2 add-new-chart">', esc_html__( 'Add New Chart', 'visualizer' ), '</a>';
5252
echo '<button type="button" class="viz-add-new-toggle" aria-haspopup="true" aria-expanded="false"><span class="dashicons dashicons-arrow-down-alt2"></span></button>';
5353
echo '<div class="viz-add-new-menu" role="menu" aria-hidden="true">';
5454
echo '<button type="button" class="viz-add-new-item" data-viz-builder="ai">', esc_html__( 'AI Chart Builder', 'visualizer' ), '</button>';
@@ -78,7 +78,7 @@ private function _renderMessages() {
7878
echo '<p>';
7979
printf(
8080
// translators: %s - the name of the option.
81-
esc_html__( '%s option is disabled in your php.ini config. Please, enable it by change its value to 1. This option increases the speed of remote CSV uploading.', 'visualizer' ),
81+
esc_html__( '%s option is disabled in your php.ini config. Please enable it by changing its value to 1. This option increases the speed of remote CSV uploading.', 'visualizer' ),
8282
'<b>allow_url_fopen</b>'
8383
);
8484
echo '</p>';
@@ -347,10 +347,10 @@ private function _renderLibrary() {
347347
echo '<div class="items"><div class="visualizer-chart">';
348348
echo '<div class="visualizer-chart-canvas visualizer-nochart-canvas">';
349349
echo '<div class="visualizer-notfound">';
350-
echo esc_html__( 'No charts found', 'visualizer' );
350+
echo esc_html__( 'No charts found. Click \'Add New Chart\' to create one.', 'visualizer' );
351351
echo '<p><h2>';
352352
echo '<div class="viz-add-new-group">';
353-
echo '<a href="javascript:;" class="add-new-h2 add-new-chart">', esc_html__( 'Add New', 'visualizer' ), '</a>';
353+
echo '<a href="javascript:;" class="add-new-h2 add-new-chart">', esc_html__( 'Add New Chart', 'visualizer' ), '</a>';
354354
echo '<button type="button" class="viz-add-new-toggle" aria-haspopup="true" aria-expanded="false"><span class="dashicons dashicons-arrow-down-alt2"></span></button>';
355355
echo '<div class="viz-add-new-menu" role="menu" aria-hidden="true">';
356356
echo '<button type="button" class="viz-add-new-item" data-viz-builder="ai">', esc_html__( 'AI Chart Builder', 'visualizer' ), '</button>';

classes/Visualizer/Render/Sidebar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ protected static function _renderColorPickerItem( $title, $name, $value, $defaul
341341
echo '<div class="viz-section-item">';
342342
echo '<b>', $title, '</b>';
343343
echo '<div>';
344-
echo '<input type="text" class="color-picker-hex color-picker" data-alpha-enabled="true" name="', $name, '" maxlength="7" placeholder="', esc_attr__( 'Hex Value', 'visualizer' ), '" value="', is_null( $value ) ? $default_color : esc_attr( $value ), '" data-default-color="', $default_color, '">';
344+
echo '<input type="text" class="color-picker-hex color-picker" data-alpha-enabled="true" name="', $name, '" maxlength="7" placeholder="', esc_attr__( 'Hex Color Code', 'visualizer' ), '" value="', is_null( $value ) ? $default_color : esc_attr( $value ), '" data-default-color="', $default_color, '">';
345345
echo '</div>';
346346
echo '</div>';
347347
}
@@ -476,7 +476,7 @@ protected function _renderFormatField( $index = 0 ) {
476476
isset( $this->series[ $index ]['format'] ) ? $this->series[ $index ]['format'] : '',
477477
sprintf(
478478
// translators: %1$s - HTML link tag, %2$s - HTML closing link tag.
479-
esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %1$sICU pattern set%2$s. Use something like #,### to get 1,234 as output, or $# to add dollar sign before digits. Pay attention that if you use &#37; percentage format then your values will be multiplied by 100.', 'visualizer' ),
479+
esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %1$sICU pattern set%2$s. Use something like #,### to get 1,234 as output, or $# to add dollar sign before digits. Note: Using the &#37; percentage format will multiply your values by 100.', 'visualizer' ),
480480
'<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
481481
'</a>'
482482
),

classes/Visualizer/Render/Sidebar/ChartJS.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ protected function _renderGeneralSettings() {
206206
self::_renderSectionStart( esc_html__( 'Font Styles', 'visualizer' ), false );
207207
echo '<div class="viz-section-item">';
208208
echo '<a class="more-info" href="javascript:;">[?]</a>';
209-
echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
209+
echo '<b>', esc_html__( 'Font Family And Size', 'visualizer' ), '</b>';
210210

211211
echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
212212
echo '<tr>';
@@ -244,7 +244,7 @@ protected function _renderGeneralSettings() {
244244
// let's have a default otherwise the chart behaves weird when hovering in edit mode
245245
isset( $this->legend['position'] ) ? $this->legend['position'] : 'top',
246246
$this->_legendPositions,
247-
esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' )
247+
esc_html__( 'Sets the legend position relative to the chart.', 'visualizer' )
248248
);
249249

250250
self::_renderCheckboxItem(
@@ -257,7 +257,7 @@ protected function _renderGeneralSettings() {
257257

258258
echo '<div class="viz-section-item">';
259259
echo '<a class="more-info" href="javascript:;">[?]</a>';
260-
echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
260+
echo '<b>', esc_html__( 'Font Family And Size', 'visualizer' ), '</b>';
261261

262262
echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
263263
echo '<tr>';

classes/Visualizer/Render/Sidebar/Columnar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected function _renderColumnarSettings() {
6060
'isStacked',
6161
$this->isStacked,
6262
$this->_yesno,
63-
esc_html__( 'If set to yes, series elements are stacked.', 'visualizer' )
63+
esc_html__( 'When enabled, series elements are stacked.', 'visualizer' )
6464
);
6565

6666
echo '<div class="viz-section-delimiter"></div>';

classes/Visualizer/Render/Sidebar/Google.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ protected function _renderGeneralSettings() {
181181
self::_renderSectionStart( esc_html__( 'Font Styles', 'visualizer' ), false );
182182
echo '<div class="viz-section-item">';
183183
echo '<a class="more-info" href="javascript:;">[?]</a>';
184-
echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
184+
echo '<b>', esc_html__( 'Font Family And Size', 'visualizer' ), '</b>';
185185

186186
echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
187187
echo '<tr>';
@@ -218,7 +218,7 @@ protected function _renderGeneralSettings() {
218218
'legend[position]',
219219
isset( $this->legend['position'] ) ? $this->legend['position'] : '',
220220
$this->_legendPositions,
221-
esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' )
221+
esc_html__( 'Sets the legend position relative to the chart.', 'visualizer' )
222222
);
223223

224224
self::_renderSelectItem(
@@ -324,10 +324,10 @@ protected function _renderTooltipSettigns() {
324324
array(
325325
'' => esc_html__( 'Default', 'visualizer' ),
326326
'focus' => esc_html__( 'The tooltip will be displayed when the user hovers over an element', 'visualizer' ),
327-
'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', 'visualizer' ),
327+
'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element.', 'visualizer' ),
328328
'none' => esc_html__( 'The tooltip will not be displayed', 'visualizer' ),
329329
),
330-
esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', 'visualizer' )
330+
esc_html__( 'Controls when the tooltip appears.', 'visualizer' )
331331
);
332332

333333
self::_renderSelectItem(
@@ -373,7 +373,7 @@ protected function _renderViewSettings() {
373373

374374
echo '<div class="viz-section-delimiter"></div>';
375375

376-
self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', 'visualizer' ) );
376+
self::_renderSectionDescription( esc_html__( 'Set the chart\'s background color, border width, and border color.', 'visualizer' ) );
377377

378378
self::_renderTextItem(
379379
esc_html__( 'Stroke Width', 'visualizer' ),
@@ -447,7 +447,7 @@ protected function _renderViewSettings() {
447447
echo '</table>';
448448

449449
echo '<p class="viz-section-description">';
450-
esc_html_e( 'Determines the width and hight of the chart area.', 'visualizer' );
450+
esc_html_e( 'Determines the width and height of the chart area.', 'visualizer' );
451451
echo '</p>';
452452
echo '</div>';
453453
self::_renderSectionEnd();

classes/Visualizer/Render/Sidebar/Graph.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ protected function _renderHorizontalAxisGeneralSettings() {
192192
isset( $this->hAxis['direction'] ) ? $this->hAxis['direction'] : '',
193193
array(
194194
'' => '',
195-
'1' => esc_html__( 'Identical Direction', 'visualizer' ),
195+
'1' => esc_html__( 'Default Direction', 'visualizer' ),
196196
'-1' => esc_html__( 'Reverse Direction', 'visualizer' ),
197197
),
198198
esc_html__( 'The direction in which the values along the horizontal axis grow.', 'visualizer' )
@@ -307,7 +307,7 @@ protected function _renderVerticalAxisGeneralSettings() {
307307
isset( $this->vAxis['direction'] ) ? $this->vAxis['direction'] : '',
308308
array(
309309
'' => '',
310-
'1' => esc_html__( 'Identical Direction', 'visualizer' ),
310+
'1' => esc_html__( 'Default Direction', 'visualizer' ),
311311
'-1' => esc_html__( 'Reverse Direction', 'visualizer' ),
312312
),
313313
esc_html__( 'The direction in which the values along the vertical axis grow.', 'visualizer' )
@@ -479,7 +479,7 @@ protected function _renderHorizontalAxisFormatField() {
479479
esc_html__( 'Enter custom format pattern to apply to horizontal axis labels.', 'visualizer' ),
480480
sprintf(
481481
// translators: %1$s - HTML link tag, %2$s - HTML closing link tag.
482-
esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #&#37;&#37; percentage format then your values will be multiplied by 100.', 'visualizer' ),
482+
esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Note: Using the #&#37;&#37; percentage format will multiply your values by 100.', 'visualizer' ),
483483
'<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
484484
'</a>'
485485
),
@@ -510,7 +510,7 @@ protected function _renderVerticalAxisFormatField() {
510510
esc_html__( 'Enter custom format pattern to apply to vertical axis labels.', 'visualizer' ),
511511
sprintf(
512512
// translators: %1$s - HTML link tag, %2$s - HTML closing link tag.
513-
esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #&#37;&#37; percentage format then your values will be multiplied by 100.', 'visualizer' ),
513+
esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Note: Using the #&#37;&#37; percentage format will multiply your values by 100.', 'visualizer' ),
514514
'<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
515515
'</a>'
516516
),

classes/Visualizer/Render/Sidebar/Linear.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ protected function _renderLineSettingsItems() {
185185
'single' => esc_html__( 'Single data point', 'visualizer' ),
186186
'multiple' => esc_html__( 'Multiple data points', 'visualizer' ),
187187
),
188-
esc_html__( 'Determines how many data points an user can select on a chart.', 'visualizer' )
188+
esc_html__( 'Determines how many data points a user can select on a chart.', 'visualizer' )
189189
);
190190

191191
self::_renderSelectItem(
192-
esc_html__( 'Aggregation Target', 'visualizer' ),
192+
esc_html__( 'Group Tooltips By', 'visualizer' ),
193193
'aggregationTarget',
194194
$this->aggregationTarget,
195195
array(
@@ -199,7 +199,7 @@ protected function _renderLineSettingsItems() {
199199
'auto' => esc_html__( 'Group selected data by x-value if all selections have the same x-value, and by series otherwise', 'visualizer' ),
200200
'none' => esc_html__( 'Show only one tooltip per selection', 'visualizer' ),
201201
),
202-
esc_html__( 'Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element.', 'visualizer' )
202+
esc_html__( 'Determines how multiple data selections are rolled up into tooltips. To make it work, you need to set multiple selection mode and tooltip trigger to display it when a user selects an element.', 'visualizer' )
203203
);
204204

205205
echo '<div class="viz-section-delimiter"></div>';

0 commit comments

Comments
 (0)