Skip Navigation

[Resolved] Traducir “Permission denied”

This thread is resolved. Here is a description of the problem and solution.

Problem:

How could I translate the "Permission denied" message that appears when Access does not allow a user to use a form?

Solution:

The client has submitted a feature request for it.

Relevant Documentation:

This support ticket is created 5 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 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: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Luo Yang 5 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#1221944

Hola:

¿Cómo podría traducir el mensaje "Permission denied" que aparece cuando Access no permite que un usuario use un formulario?

Gracias.

#1222177

Hello,

This is English support forum, please create the thread in English.

I have translated your question with google:

How could I translate the "Permission denied" message that appears when Access does not allow a user to use a form?

I have searched it in Toolset form core codes, that message is hard-coded in Toolset Forms plugin file \cred-frontend-editor\application\models\form\post.php

Line 259:

return new WP_Error( 'cred-permission', 'Permission denied' );

There isn't available way to translate it without hack the codes, the text 'Permission denied' should be wrapped with WordPress gettxt function, for example:

return new WP_Error( 'cred-permission',  __( 'Permission denied', 'wp-cred'));

Then you will be able to translate it with gettext filter hook, for example:

add_filter('gettext', 'my_cred_trans_func', 10, 3);
function my_cred_trans_func($translated, $text, $domain) {
    if ($text == 'Permission denied' && $domain == 'wp-cred'){
        $translated = 'My own Permission denied';
    }
    return $translated;
}

Can you confirm it in your website? check if it is the text you want to translate, then I will escalate this ticket to our developers

#1222962

Hello,

Sorry. I have wrote other tickets in Spanish and the replay was in Spanish too. But I don't mind Spanish or English.

Your solution isn't practical. If I modify the plugin, I'll lose all changes when updated.

What I have done is hidding the message.

I submitted this in "Suggest a New Feature for Toolset".

Thanks.

#1222964

My issue is resolved now. Thank you!

#1241330

Hello, here is the update:
This issue is fixed in feature version of Toolset Form plugin 2.4, which will be released soon.