Sauter la navigation

Ce sujet est résolu. Voici une description du problème et de la solution.

Problem:
The customer is experiencing issues with automatic translation in WPML. The translations for products and pages are not being processed, and there are no error messages displayed.
TM always showing 12 pending translations
and ACF labels are displaying under TM
Solution:
For ACF labels :

/**
 * Filters out the ACF Field Group Labels packages in the WPML Translation Dashboard.
 *
 * @see https://wpml.org/de/forums/topic/field-group-labels-in-uebersetzungsliste-aber-nicht-uebersetzbar/
 * @see https://onthegosystems.myjetbrains.com/youtrack/issue/acfml-765
 */
add_filter( 'wpml_tm_dashboard_documents', function( $documents ) {
    return array_filter( $documents, function( $doc ) {
        return $doc->translation_element_type !== 'package_acf-field-group';
    } );
} );

For Automatic translation :
At present, WPML’s automatic string translation feature only works for content that matches the default language of the website. If you attempt to use the Translate Everything Automatically mode or send strings for automatic translation that do not match the default language, they will instead be added to the Translations Queue.

For 12 ghost pending translation :
This is a known issue that should be fixed in WPML 4.6.5 version

Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.

Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe du WPML répond sur le forum 6 jours par semaine, 22 heures par jour.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum French. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Marqué : ,

Ce sujet contient 28 réponses, a 2 voix.

Dernière mise à jour par nicolasF-24 Il y a 1 année et 5 mois.

Assisté par: Ilyes.

Auteur Articles
mai 17, 2023 à 2:22 pm #13665117

nicolasF-24

Automatic translation is not working

mai 17, 2023 à 5:39 pm #13667163

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello,

Thank you for contacting WPML support team,

Could you please explain the issue with automatic translation in more details?

- What are you trying to translate?
- Is there an error message that you face?
- What is the status of the translation?
- Go to WPML > support > error log : lien caché and do a screenshot if there are any errors saved there

Screenshots and video recording are also a helpful way to share what you are experiencing.

Looking forward to your reply,

mai 18, 2023 à 6:18 am #13669099

nicolasF-24

Hi,
In fact nothing happen, all the product and pages to be translated go in the queue like before, no error message, i can give you an access, i think that it will be easier for you to see the problem, can you send me a private box ?
Thanks

mai 18, 2023 à 8:11 am #13669833

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello again,

I will make your next reply as private to share access,

Could you please share a step-by-step guide on how to replicate the issue? which tools are you using, and what are you trying to translate?

Looking forward to your reply,

mai 19, 2023 à 10:46 am #13678337

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello,

I do see the 12 missing translation notification and then it disappears, allow me to walk you through some initial debugging steps. This will help speed up the support process and remove WPML cached data.

Can you please try to do a backup of your site and go to WPML > Support > troubleshooting and try all the following buttons: lien caché

You can refer to this documentation on how to do it : https://wpml.org/documentation/support/wpml-troubleshooting-options/

Then go to WooCommerce > WooCommerce Multilingual > Settings > troubleshooting (bottom of the page) and try all the options there.

Please share the results with me. And tell me which strings/jobs are stuck after doing these steps,

Best,

mai 19, 2023 à 12:38 pm #13679227

nicolasF-24

Hi,
I made all these steps, but it does not work
To be honest, i already tried all of them yesterday 😉 I'm a developper so i know all your debug process

mai 22, 2023 à 9:03 am #13687497

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello,

Thank you for your patience,

Based on the error logs I found under your Advanced Translation Editor's error logs,

Some pages are flagged as "Communication Started attempt to download xliff file. The process did not finish"

The translation status of these pages shows delivered in our system, which means the translation is completed, and the translated content is ready to appear in the front end.

So this could be explained by an issue in connection with our servers:

1- There is an issue with the connectivity itself :

I have re-checked the direct connection using this tool : lien caché
But this doesn't seem to be the cause.

2- Another plugin (most likely a caching plugin) is conflicting with this connection :

In this case, would it be possible to :

- Run a backup of your site
- Disable any caching plugins.
- Disable Security plugins.
- Try completing the translation job.
- If this doesn't change anything > Disable all plugins and use a default wordpress Theme
- Only keep WPML enabled
- Create and Publish a new simple post/page
- See if the translation goes through for that page

Looking forward to the results,

Best,

mai 29, 2023 à 7:25 am #13729313

nicolasF-24

Hi,
I tried to disable everything, even the theme, and publish a new page, but i still have these 12 translations pending then disapear that make the automatic translation not work correctly at all ...

mai 29, 2023 à 12:33 pm #13732351

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello again,

Thank you for your patience,

I need one last thing from you in order to properly escalate this to our developers,

- Go to WPML -> Translation Management -> Jobs tab, and cancel the stuck job
- Then make a small modification to the page (like an extra space, to update the translation status)
- Back to WPML -> Translation Management , send this job for translation and try to open it with ATE

If the problem persists after this procedure, I would appreciate your help in enabling debug mode. Please add the following code in your wp-config.php file:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
      
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
      
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
      
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

Check the following links to read more about debugging with WordPress.
- https://codex.wordpress.org/Debugging_in_WordPress
- https://codex.wordpress.org/Debugging_in_WordPress#Example_wp-config.php_for_Debugging

After adding the above code, try to reproduce the issue again and check if you can find a debug.log file inside the wp-content folder. If you find it there, please send us the last few lines here in the ticket.

Your cooperation is really appreciated,

Best regards,

mai 29, 2023 à 12:44 pm #13732459

nicolasF-24

Hi,
I tried but doesn't change anything ...

Here's what i have on the debug file :

[29-May-2023 12:43:48 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:43:48 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488
[29-May-2023 12:44:05 UTC] PHP Warning: Array to string conversion in /vhosts/www.gladiatorfit.ch/html/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 488

mai 30, 2023 à 2:11 pm #13740639

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello,

After further verification, here are two things that explains what you are facing :

1) String not being translated automatically

At present, WPML’s automatic string translation feature only works for content that matches the default language of the website. If you attempt to use the Translate Everything Automatically mode or send strings for automatic translation that do not match the default language, they will instead be added to the Translations Queue.

In your case, I see you have mixed strings (French and German...)

Please refer to this workaround : https://wpml.org/errata/automatic-translation-for-strings-in-non-default-language-is-still-not-implemented/

2) For the 12 "Stuck" pending translations

We assume that it is related to problem "1)", it is referring to the strings that weren't automatically translated, once you translate them using the workaround, it should fix this.

3) ACF field group translation

Referring to your screenshot : lien caché
Translating these groups' labels is not recommended, as these are the Custom Field's admin strings (only visible from the backend)
Usually you do not have to translate them, unless you have developers that use different languages and want these admin “labels” to be in their language.

If that is the case, you can only translate them Manually.

I hope this made things clearer,

Best,

mai 30, 2023 à 7:17 pm #13742055

nicolasF-24

Hi,

1) I don't see which strings you speaking of ..., for example i have the one in attachment that i want to translate, but i don't have your option, i only have the big blue button "Translate"
2) So i don't think that this problem is linked, because i don't see pending translations in other languages
3) I don't want to translate these fields, and honestly i would want to erase them of the list, how can i do ?

Thanks !

Capture d’écran 2023-05-30 à 21.12.16.png
mai 31, 2023 à 10:07 am #13745497

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello,

I have recorded a video to better explain and show you how to translate those strings and how to remove the ACF labels from the translation manager : lien caché

Here is the documentation you could refer to : https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#faq

You could also try deleting the pending translations that you do not plan to translate from the same area (WPML > Translations) by clicking on the "Resign/Renoncer" button

Best regards!

juin 2, 2023 à 7:53 am #13758847
nicolasF-24

Many thanks for your video ! It really helps

For ACF labels, i have added your code on the wp-config.php but i still see theme ...

For the translation, i'm gonna do them, one question, how can i remove translations inside ? The products has been removed but we still have translation on the queue as you can see on screenshot

Many thanks

Les nouveaux fils créés par Ilyes et associés à celui-ci sont repris ci-dessous :

https://wpml.org/fr/forums/topic/split-delete-translation-of-products/

Capture d’écran 2023-06-02 à 09.48.05.png
juin 2, 2023 à 9:07 am #13759913

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello again,

For the ACF labels, since the issue persists on your end, here are two possible reasons why this happened, it is related to the pages sent to translation using these fields:

- https://wpml.org/documentation/support/wpml-coding-api/wpml-constants/#advanced-custom-fields-multilingual-constants:~:text=define(%20%27ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS%27%2C%20true%20)%3B-,Note%201%3A,-If%20a%20translation

If you haven't done that yet, then please try the following:

- Make a small change on the page using these ACF groups in default language and save the changes. (add a dot or slight change in title)
- If you notice the update icon after saving, update the translation.
- This should refresh the detection of these fields from the translation management

I hope you'll see what you're expecting after that. But, if you need further assistance even after that, please let me know. I will be glad to help you.

---

For your new question about deleting translation, as part of our support policy, we recommend having one request per ticket, it would be better if we open a new ticket under our support forum as this is a separate request.

You can expect my reply there : https://wpml.org/fr/forums/topic/split-delete-translation-of-products/

Thank you again for your understanding,