Skip Navigation

[Escalated to 2nd Tier] missing strings translations after update

This support ticket is created 3 years, 6 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.

Our next available supporter will start replying to tickets in about 4.83 hours from now. Thank you for your understanding.

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: Africa/Casablanca (GMT+01:00)

This topic contains 5 replies, has 2 voices.

Last updated by annaA-2 3 years, 6 months ago.

Assisted by: Jamal.

Author
Posts
#2039217

Hi,
after toolset update, translation missed.
Could you help me please?
Best.
Anna

#2039235
#2039817

I was able to reproduce this issue in a clean install for the Italian language. The last updates seem to be missing language files. I added the Italian language file from the previous version and it fixed it. Check it here hidden link

I am escalating this issue to our 2nd Tier for further analysis to fix the translation for all the labels. I'll get back to you as soon as possible.

In the meantime, you can use a workaround to translate the strings until this gets fixed. I added the following code to a custom code snippet in Toolset->Settings->Custom Code. Please adapt it if you want to change the translations.

add_filter( 'gettext', 'my_translate_login_form', 20, 3 );
function my_translate_login_form( $translated_text, $text, $domain ) {
  if ( $translated_text == 'Username or Email' )
      return 'Nome utente o indirizzo email';
    
  return $translated_text;
}

I based the translation on the default WordPress form hidden link

I hope this helps. Let me know if you have any questions.

#2039943
s.png

Hi Jamal,
first of all, thanks for working on the problem over the weekend, I appreciate it.
For the rest then I could not have solved by myself. I'm waiting the correction of the bug by the technicians hopefully as soon as possible.
Your temporary solution could fix any lost translation? For example, as you can see on attachment:

- any form errors (Error: The username field is empty) - LOGIN (INVIA) - Lost password, etc or others?

If yes I have to create a custom code for each word I have to translate, duplicating your entire code? Could you show me just an example only for (Error: The username field is empty)?

Thanks a lot. Best.

Anna

#2039961

Hello Anna,

No need to have a new snippet for each string, you can add two lines for each string like this:

add_filter( 'gettext', 'my_translate_login_form', 20, 3 );
function my_translate_login_form( $translated_text, $text, $domain ) {
  if ( $translated_text == 'Username or Email' )
      return 'Nome utente o indirizzo email';

  if ( $translated_text == 'Login' )
      return 'Invia';
     
  return $translated_text;
}

For the message error, I think that it will include HTML tags to make the work ERROR bold, I need to test it to be sure. Maybe something like:

 if ( $translated_text == '<strong>ERROR</strong>: The username field is empty.' )
      return '<strong>ERROR</strong>: Translation in Italian.';

I'll get back to you as soon as I tested it.

#2042231

This issue is now escalated to the developers. I'll get back to you as soon as we have something to share.

#2042261

Hi Jamal,
thanks for news. In the meantime, with your advice, I managed to solve many translations.
Thanks again I look forward to news from the development team.
Best.

Anna