Yoast / yoast-components

Accessible React components by Yoast
GNU General Public License v3.0
21 stars 6 forks source link

Consider to avoid spaces at the end of translatable strings. #132

Open afercia opened 7 years ago

afercia commented 7 years ago

Not sure if there's already a convention about this, however there are some cases where translatable strings have an intentional space at the end. Mostly used when the strings ends with a colon : and they're supposed to be followed by other strings or values.

This can easily lead to two issues:

Example:

screen shot 2017-02-10 at 18 10 04

Reference:

// Reference: node_modules/yoastseo/js/snippetPreview.js:377
__( 'SEO title preview:', 'wordpress-seo' ),

// Reference: node_modules/yoastseo/js/snippetPreview.js:378
__( 'Slug preview:', 'wordpress-seo' ),

// Reference: yoast-components/composites/SearchResultForm/SearchResultForm.js:42
// Reference: yoast-components/composites/SearchResultPreview/SearchResultPreview.js:41
__( 'SEO title preview: ', 'wordpress-seo' ),

// Reference: yoast-components/composites/SearchResultForm/SearchResultForm.js:44
__( 'Slug preview: ', 'wordpress-seo' ),
afercia commented 7 years ago

Just checked this again and found 6 occurrences of : " ) see below:

screen shot 2017-09-08 at 11 50 13