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
- 8:00 – 15:00 8:00 – 15:00 8:00 – 15:00 8:00 – 15:00 8:00 – 15:00 -
- 16:00 – 17:00 16:00 – 17:00 16:00 – 17:00 16:00 – 17:00 16:00 – 17:00 -

Supporter timezone: Europe/Rome (GMT+01:00)

Tagged: 

This topic contains 22 replies, has 3 voices.

Last updated by larsZ 3 months, 1 week ago.

Assisted by: Alejandro.

Author Posts
July 31, 2024 at 1:42 pm #16025558

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

3) This comes from the same root cause: CRLF. it seems they are removed and for some reason they are changed by "segmenting" the result into small texts since ATE sees it as one big and long string. it's probably a parser issue.

I just got word from our devs that CRLF is not compatible since some third party libraries and parsers have this as a restriction. they mentioned, however they would treat this case as a feature request and try to see how and if they could implement this for the future.

4) The translation memory is handled by segment so if you have a segment "this is a segment" and you changed it to "this is a new segment" then it would be treated as a new segment. With bigger segments you could indeed end up spending more credits for these small typos (in exchange, you'd have a better quality translation). You can turn "bigger segments" off from the gear icon on the top right part of the editor.

5) I don't think it will be shown as a WPML setting, but it's a good idea so I'll send it to our devs as a possible improvement.

6) They are independent by organization so if the websites aren't sharing credits and translation memory then they are going to be treated separately and that means that you'd have to disable the bigger segments, if you wished to do so on all of them.

July 31, 2024 at 2:21 pm #16025797

John-Pierre Cornelissen

Thank you

3. There are two issue with this though. If you look at the following pages:

hidden link
This is the source with the classid TinyMCE editor. 39 sentences in 3 paragraphs.

hidden link
This is the translation, translated as one big sentence. The two issues are:
1/ Paragraphs are lost because CRLF is ignored (as already discussed)
2/ Each sentence in the translation ends with a <br> so each sentence is on it's own line.

6. ah yes, that's another level I didn't even think off 😂 At the moment that's perfect for me. I have all sites connected to share credits. I have switched back to the previous version for now, because the big segments just don't work for me at the moment.

Thank you for your help so far.
JP

August 1, 2024 at 8:12 am #16028084

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Each sentence in the translation ends with a <br> so each sentence is on it's own line.

yes, this is a collateral of that CRLF. see, the CRLF is actually "kept" but the HTML parser, for some reason interprets it super weirdly and the editor DOES remove it, or well, it kind of "moves" it.

when the parser is ran again to transform the content from ATE into the XLIFF, it re-adds it but it sort of segments the content which is at this point a HUGE string, into "mini segments". all this because it doesn't know how to correctly interprets these CRLF.

This is not seen as a bug at this moment only because we do not support CRLF, thus any outcome that comes with it, but it's seen as a feature request which our devs are considering. If it gets accepted, it will probably take a long time before it's implemented because it seems like something "easy" but it requires a LOT of changes in libraries, including the third party ones we use where we do not have much power over.

There isn't much to do here but to either use "small segments", for now which seems like a suitable solution given that you do not want to use bigger segments at all (or at least not for now or not in this project) or disable this new configuration which can both be done in the settings, set in the gear icon on the editor.

August 1, 2024 at 8:59 am #16028536

John-Pierre Cornelissen

No, you misunderstand. Each translated sentence ending with a <br> is definitely a HUGE BUG and it has nothing to do with the CRLF.

Please look again at the two links I have sent to you.

The only place in the source text where there is a CRLF is between the 3 paragraphs. That's issue 1 we discusses before which you see as a feature request. I still call it a bug because the translation is incorrectly formatted, but fine.

Issue 2 is that it adds a <br> after each sentence. That has nothing to do with CRLF because there is no CRLF after each sentence, so it shouldn't add a <BR> either.

--- source without CRLF ---
Iaculis at erat pellentesque adipiscing commodo. Mi quis hendrerit dolor magna. Risus commodo viverra maecenas accumsan lacus. Non quam lacus suspendisse faucibus interdum posuere lorem ipsum. Metus aliquam eleifend mi in nulla posuere sollicitudin. Purus sit amet volutpat consequat mauris nunc.

--- output with <BR> ---
Iaculis at erat pellentesque adipiscing commodo.<BR>
Mi quis hendrerit dolor magna.<BR>
Risus commodo viverra maecenas accumsan lacus.<BR>
Non quam lacus suspendisse faucibus interdum posuere lorem ipsum.<BR>
Metus aliquam eleifend mi in nulla posuere sollicitudin.<BR>
Purus sit amet volutpat consequat mauris nunc.<BR>

--

This is just terribly wrong.

August 1, 2024 at 12:16 pm #16029425

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

hm, you're totally right and i think i couldn't recreate it before because i either had a segment that was not "big" enough OR i had any HTML marker there.

now this is definitely a bug, you're right, and was already sent to our devs.

August 1, 2024 at 12:28 pm #16029438

John-Pierre Cornelissen

Thanks, glad I could convince you 😅

Keep me posted please.

Thanks
JP

August 1, 2024 at 12:53 pm #16029654

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

I'll leave this ticket open but in a different status so i can update you as soon as we have more info on this.

Regards.

August 13, 2024 at 10:37 am #16065721

larsZ

Hello,

wir haben bei uns das gleiche Problem, dass nach jedem Satz ein <br> gesetzt wird. Gibt es hierzu irgendwelche Neuigkeiten?