Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 23 replies, has 2 voices.

Last updated by kristoferS-2 2 years, 1 month ago.

Assisted by: Andreas W..

Author Posts
June 22, 2022 at 8:48 am #11517239

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?

June 23, 2022 at 9:19 am #11527775

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

width.jpg
June 23, 2022 at 9:46 am #11528053

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.

June 23, 2022 at 10:24 am #11528697

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

June 23, 2022 at 5:41 pm #11532501

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

June 24, 2022 at 2:03 am #11534489

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

&nbsp;

inside the original HTML of this block set

Workaround:
Add the

&nbsp;

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

July 9, 2022 at 6:37 pm #11635763

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

October 6, 2022 at 11:56 am #12193499

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?

November 14, 2022 at 8:36 am #12451609

kristoferS-2

Bump