• Resolved Bastian Fie?inger

    (@bastianfiessinger)


    Hey Advanced Forms Team,

    the error message Validation failed. %d fields require attention are not translatable. Though in ACF both strings “Validation failed.” and “%d fields require attention” are already translated in the .pot files.

    Why AF does not take these translated strings?

    Thanks in advance

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have the exact same problem and am searching for a solution…

    The problem is that translated terms are not loading in the correct order when form is displayed outside of admin.

    I’ve found a really poor way to fix this.

    In you functions.php, paste this :

    add_action('acf/enqueue_scripts', 'af_translation_fix', 10, 0);
    
    function af_translation_fix()
    {
    	if(!is_admin())
    	{
    		acf_localize_text(array(
    				
    			// unload
    			'The changes you made will be lost if you navigate away from this page'	=> __('The changes you made will be lost if you navigate away from this page', 'acf'),
    			
    			// media
    			'Select.verb'			=> _x('Select', 'verb', 'acf'),
    			'Edit.verb'				=> _x('Edit', 'verb', 'acf'),
    			'Update.verb'			=> _x('Update', 'verb', 'acf'),
    			'Uploaded to this post'	=> __('Uploaded to this post', 'acf'),
    			'Expand Details' 		=> __('Expand Details', 'acf'),
    			'Collapse Details' 		=> __('Collapse Details', 'acf'),
    			'Restricted'			=> __('Restricted', 'acf'),
    			'All images'			=> __('All images', 'acf'),
    			
    			// validation
    			'Validation successful'			=> __('Validation successful', 'acf'),
    			'Validation failed'				=> __('Validation failed', 'acf'),
    			'1 field requires attention'	=> __('1 field requires attention', 'acf'),
    			'%d fields require attention'	=> __('%d fields require attention', 'acf'),
    			
    			// tooltip
    			'Are you sure?'			=> __('Are you sure?','acf'),
    			'Yes'					=> __('Yes','acf'),
    			'No'					=> __('No','acf'),
    			'Remove'				=> __('Remove','acf'),
    			'Cancel'				=> __('Cancel','acf'),
    			
    			// conditions
    			'Has any value'				=> __('Has any value', 'acf'),
    			'Has no value'				=> __('Has no value', 'acf'),
    			'Value is equal to'			=> __('Value is equal to', 'acf'),
    			'Value is not equal to'		=> __('Value is not equal to', 'acf'),
    			'Value matches pattern'		=> __('Value matches pattern', 'acf'),
    			'Value contains'			=> __('Value contains', 'acf'),
    			'Value is greater than'		=> __('Value is greater than', 'acf'),
    			'Value is less than'		=> __('Value is less than', 'acf'),
    			'Selection is greater than'	=> __('Selection is greater than', 'acf'),
    			'Selection is less than'	=> __('Selection is less than', 'acf'),
    			
    			// misc
    			'Edit field group'	=> __('Edit field group', 'acf'),
    		));
    	}
    }
    Thread Starter Bastian Fie?inger

    (@bastianfiessinger)

    @christophekonig Thanks for your help.

    Plugin Author fabianlindfors

    (@fabianlindfors)

    Hi!

    I had another user run into this issue last week as well and I put together a fix. Could you try installing the plugin from Github: https://github.com/advancedforms/advanced-forms and see if that fixes it?

    Thanks!

    Thread Starter Bastian Fie?inger

    (@bastianfiessinger)

    Hi @fabianlindfors at the moment there is the PRO Version of Advanced Forms installed on the page.

    So downloading and installing the master release from Github won’t be the best idea.

    At the moment the fix from @christophekonig does the trick.
    Will there be an update soon?

    Plugin Author fabianlindfors

    (@fabianlindfors)

    I see! I hope to release 1.6.5 in the next few days which will include this fix.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error Message: Validation failed. %d fields require attention not translated’ is closed to new replies.