Opened 2 years ago
Last modified 9 months ago
#6383 reopened enhancement
Highlight start/end spaces and single space strings
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Translate Site & Plugins | Keywords: | |
Cc: |
Description
Currently it is not properly visible if a start/end space or single space is present, when you are within the editor. It would be great if that position is highlighted within the editor
Change History (5)
#2
follow-up:
↓ 3
@
2 years ago
Hi Dion,
If you are in the editor and use GlotDict, you get a warning for the missing blank. But it would be great if you could see that before saving your suggestion. Showing it in the preview would already help, but in my opinion if it is also shown within the editor in the original it would even be better
#3
in reply to:
↑ 2
@
2 years ago
- Reporter changed from psmits1568 to psmits1567
- Resolution reported-upstream deleted
- Status changed from closed to reopened
Replying to psmits1567:
I agree.
However, the ticket asked for It would be great if that position is highlighted within the editor
which is the Upstream GlotPress ticket - That's why I closed it in favour of that.
Notably though.. There's two areas where we handle leading/trailing new lines but NOT leading/trailing SPACES
- Client-side JS validation for missing new lines: https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-js-warnings/wporg-gp-js-warnings.js?marks=148-179#L134
- the translation fixer fixes singular missing leading/trailing newlines; https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-fixer/wporg-gp-translation-fixer.php?marks=52-64#L48
Adding support for spaces to both of those isn't out of the question at all, but that wasn't what was originally proposed in this ticket.
#4
@
22 months ago
This functionality is being added to the GlotPres core:
- Highlight leading and trailing spaces, and double/multiple spaces in the middle. PR opened.
- Show the exact amount of spaces added or missing on the translation warnings. PR merged.
So I think we will see this soon at https://translate.w.org.
Hi @psmits1568,
This should probably be implemented upstream in GlotPress itself, rather than a translate.WordPress.org-specific thing.
It looks like they've got an open issue for this though:
https://github.com/GlotPress/GlotPress/issues/863