kristoferS-2
|
I expect "Så lyckas du med dokumenthantering i Office 365" (which has non breaking space before 365) to be show as "Document management best practices in Office<wpml_nbsp>365" in the ATE. You can see the non breaking space in the original's HTML and that it is removed from the translation.
Can I insert a non breaking space manually in the ATE?
|
Andreas W.
Supporter
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Hello,
The issue is not the non-breaking space, it is the width limit of this list element that causes the line break.
I already explained this here:
https://wpml.org/forums/topic/is-removed-from-translation/#post-10862145
See the screenshot to see what happens if I set the width to 500px.
Best regards
Andreas
|
kristoferS-2
|
I do not want to change the width. I want it to be as it is and line breaking should be according to what is specified the text content. The issue is still that ATE strips away the non breaking space character that exists in the original from the translation.
It not just this particular line that I want help with. I need to be able to trust that WPML does not remove whitespace characters that make sure that text render nicely regardless of width, which is variable always because of different devices.
|
Andreas W.
Supporter
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Hello,
"Office 365" is breaking because of the CSS rule of this list item.
"365" is moving here to the next line, as the end of the line is reached.
You can see this very well when inspecting the site with Firefox Dev Tools.
If you switch to mobile view you will not see this line break.
Also, you will not see this line break, if you change the with of this HTML element.
If you have still doubts about my findings please feel free to open a new ticket and consult another supporter on this forum, but I do sadly not see any issue or WPML error here.
Best regards
Andreas
|
kristoferS-2
|
There are two causes to why "Office 365" is breaking. One is the CSS width of the container as you say. The second is the missing non breaking space character. The second I think is a WPML issue since I do not expect it to delete whitespace characters.
To clarify, if the non breaking space character was intact it would look like this:
Document management best practices in
Office 365
Instead of:
Document management best practices in Office
365
|
Andreas W.
Supporter
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Hello,
Thank you for the example and my apologies for the delay in handling this issue.
I actually now was able to see the real issue!
Sidenote about your site:
1) The WPML translation status is not updating when I edit and save the original page
I had to cancel the ongoing translation job, as it appears to have been stuck.
2) There was not any
inside the original HTML of this block set
Workaround:
Add the
manually on the translated page.
The issue:
Anyhow, I can confirm that this marker will still not appear on ATE when used on Gutenberg and I recreated this here:
hidden link
I also can confirm that due to that missing marker, the nbsp indeed is missing in the translated source code.
I am escalating this once more to second-tier and let you know once I have further feedback.
Best regards
Andreas
|
Andreas W.
Supporter
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Hello,
Please take note that the ATE-Team has been informed about the issue now.
Aas a workaround they can wrap the text in span tag like this:
<span class="custom-nbsp">Office 365</span>
and add this CSS to the theme options page, style sheet or unter Customizer > Custom CSS:
.custom-nbsp {
white-space: pre;
}
It is in general a better practice for nbsp, as CSS always will overrule any HTML.
Best regards
Andreas
|
kristoferS-2
|
Has there been work done on this issue? I was working with some new content and saw <wpml_nbsp> marker in the ATE. They are strill trimmed from old content though. Is it possible that there is some equality comparision that does not differentiate between space and non breaking space?
|