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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-08:00)

This topic contains 22 replies, has 2 voices.

Last updated by Bobby 1 year, 11 months ago.

Assisted by: Bobby.

Author Posts
December 8, 2022 at 10:19 am #12613849

hubertP

We were looking for why this is happening, there must be something wrong with the paths because of wpml, why practically every plugin looks for some translation paths that it doesn't have. What are these translations generated for?
E.g.
[pid 2890633] access(“/home/webdev/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/languages/woocommerce-pl_PL-aa7a3480f33a5581acfa9234d6a753d5.json”, R_OK) = -1 ENOENT (No such file or directory)

There isn't even a directory like 'languages' w '/home/webdev/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/'

These files are searched by about 10,000 from each plugin, several hundred each plus some singles

I found such an option in the wp panel 'localization of the theme and plugins', I'm sending a screenshot, maybe something is wrong here since it shows me a lot of phrases to be translated, but why the hell should I translate phrases from inside the plugin?

If he can't help me, maybe ask your wpml friends.

December 8, 2022 at 10:20 am #12613851

hubertP

Photo

1.png
Screenshot_8.png
December 11, 2022 at 5:23 pm #12629911

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

What you are displaying on the second screenshot is from within WPML->Theme and plugins localization.

These are 'strings' that have been registered for translation in your theme and plugins. Both themes and plugins register strings (texts from their code) that way it can be translated.

This is standard WordPress practice.
https://make.wordpress.org/polyglots/handbook/plugin-theme-authors-guide/gettext/

IF the .mo file exists WPML will add the translation automatically, IF it does not then you can add translation to these strings manually using String Translation.

https://wpml.org/documentation/getting-started-guide/string-translation/

----------------------------------------

Regarding the access(“/home/webdev/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/languages/woocommerce-pl_PL-aa7a3480f33a5581acfa9234d6a753d5.json”, R_OK) = -1 ENOENT (No such file or directory) notices , these are notices most likely due to certain .mo files not existing after a check from our plugin as mentioned in the previous reply.

"this is expected as what happens is WPML will check for the .mo files and if they exist they will get pulled for translations. All themes and plugins are checked for this. WordPress itself does a similar check as well when using a different language."

I have opened a discussion with our dev team regarding this and will update you once I have some feedback.

December 12, 2022 at 6:51 am #12631827

hubertP

I checked it and the file I indicated, i.e. "https://cdn.wpml.org/woocommerce-pl_PL-aa7a3480f33a5581acfa9234d6a753d5.json" is in the /wp-content/languages/plugins/ directory. The path to its translation is wrong and that is the biggest problem

December 14, 2022 at 2:17 pm #12650785

hubertP

is there anything else going on in this thread? although from what I can see you probably checked something in the admin panel?

December 14, 2022 at 7:01 pm #12652959

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

Yes, we are internally working on this issue. Once there are news you will be updated here.

December 15, 2022 at 1:49 pm #12658289

hubertP

Ok, I will just add that errors during php trace will appear all the time. In that case, we do not move anything in the admin panel and wait for good information.

December 19, 2022 at 6:22 pm #12679141

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

I have done some tests on a staging environment and discussed this with our dev team, which confirmed the following:

- the list you see with “Not founds” is not an issue. Let me explain why.
WordPress seeks .mo files in different places if they exist or not

The places can be for example wp-content/languages/plugins/ or the plugin folder itself
wp-content/plugins/test-plugin/ or if the plugin has a separate directory that is used for files: wp-content/plugins/test-plugin/translations/
So it is normal to make a check, to see if a file exists or not and to load it.

Query Monitor can show you the requests as it logs everything and shows that the request to a specific location for a particular filename is not existing.

The above case is normal and will not pose any threats to your site. To also add to this there is no way around this check at the moment or a feature that would disable the checks for the .mo files.

The topic ‘[Closed] .mo files not found’ is closed to new replies.