Verified the patch '2849100-51.patch' in #52 on Drupal 8.4.x version.
- Able to reproduce the issue before applying the patch.
- Patch applied successfully without any errors.
- Before applying the patch:
a) The space was appearing before commas for all publishing options (Published, Promoted to front page, Sticky at top of lists, Create new revision).
b) For 'Not published' status, the space was not there before commas. So in this case the issue is already resolved.
- After applying the patch:
a) The space before comma has been removed for all other publishing options (Published, Promoted to front page, Sticky at top of lists, Create new revision).
b) Also after unchecked status and checked sticky its working fine
(Not published, Promoted to front page, Sticky at top of lists, Create new revision)
c) The above patch works fine in all other conditions.
Screen-shots attached