Hi,
after toolset update, translation missed.
Could you help me please?
Best.
Anna
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.
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
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.
This issue is now escalated to the developers. I'll get back to you as soon as we have something to share.
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