Homescreen: Indicator labels i18n (https://github.com/woocommerce/woocommerce-admin/pull/5405)
* Just remove . from description * Use trim instead ht Jeff. Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
This commit is contained in:
parent
91e3e7336d
commit
146f22aabe
|
@ -167,11 +167,10 @@ class Controller extends \WC_REST_Reports_Controller {
|
|||
continue;
|
||||
}
|
||||
|
||||
$stat = $prefix . '/' . $property_key;
|
||||
$this->allowed_stats[] = $stat;
|
||||
$stat_label = empty( $schema_info['title'] ) ? $schema_info['description'] : $schema_info['title'];
|
||||
|
||||
$this->labels[ $stat ] = trim( preg_replace( '/\W+/', ' ', $stat_label ) );
|
||||
$stat = $prefix . '/' . $property_key;
|
||||
$this->allowed_stats[] = $stat;
|
||||
$stat_label = empty( $schema_info['title'] ) ? $schema_info['description'] : $schema_info['title'];
|
||||
$this->labels[ $stat ] = trim( $stat_label, '.' );
|
||||
$this->formats[ $stat ] = isset( $schema_info['format'] ) ? $schema_info['format'] : 'number';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue