Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1440610

    Beim Absenden des Kontaktformulars des Enfold-Themes erscheint eine Fehlermeldung, wenn ein Pflichtfeld nicht ausgefüllt wurde. Diese lautet: Found errors in the following field(s):
    Hierfür würde ich gern eine deutsche Übersetzung erstellen. Wie mache ich das? Ich habe ein Child-Theme generiert und möchte nicht in den Originalfiles des Themes ändern.
    Vielen Dank für die Antwort.

    #1440660

    Hey LoMoe,

    Thank you for the inquiry.

    The text is currently not translatable but we’ll add a fix in the next patch. For now, you can modify the enfold/config-templatebuilder/avia-shortcodes/contact/contact.js file, and edit this code around line 232:

    let msg = msgFieldsWithError ? msgFieldsWithError + ' ' : 'Found errors in the following field(s): ';
    

    Replace it with:

    let msg = msgFieldsWithError ? msgFieldsWithError + ' ' : form.data('fields-with-error');
    

    Best regards,
    Ismael

    #1440676

    Hello Ismael,
    Thank you for your reply. Unfortunately, this does not change the issue. I had hoped that the translated text output would be possible via the “.po” files. It is a pity that this is not the case.
    I have now changed the file “class-form-generator.php:257” accordingly. That seems to work for now.
    I hope that a fix will be created soon, as my change may cause problems elsewhere.
    Best regards
    LoMoe

    #1440741

    Hi,

    Sorry for the confusion. The changes above are not necessary because the error text is already included in the template file and it should be translatable. We added the translation in the enfold/lang/de_AT.po and enfold/lang/de_DE.po files, line 13620:

    #: framework/php/class-form-generator.php:257
    msgid "Found errors in the following field(s):"
    msgstr "Fehler wurden in folgenden Feld(ern) gefunden:"
    

    Thank you for your patience.

    Best regards,
    Ismael

    #1440998

    Hello Ismael,
    yes, I also thought this was the right way to store the translation. But unfortunately it doesn’t work that way. Please try it yourself on your own test installation. For me, the translation only works if I change the text directly in the PHP file (class-form-generator.php).
    Nothing changes for me via the .po file. I have changed the code on line 13620 – 13622 in :

    #: framework/php/class-form-generator.php:257
    msgid "Found errors in the following field(s):"
    msgstr "Fehler wurden in folgenden Feld(ern) gefunden:"

    Unfortunately without success!
    Perhaps the error is elsewhere.
    Best regards
    LoMoe

    #1441030

    Hi,

    I rechecked on my install and it works.

    There are 4 german language files – please follow the steps to download the repo https://github.com/KriesiMedia/enfold-language-files and update all 4 german files. And make sure to select 1 of these german language in WP settings.

    Do not forget to clear server and browser cache.

    Best regards,
    Günter

    #1441268

    Hi Günter,
    Thank you very much,
    I have swapped the files and the translation now works. Thank you also for the link to the article about changing the language files.
    Best regards
    LoMoe

    #1441283

    Hi,

    Awesome! Glad to know that this is working. Let us know if you have more questions.

    Have a nice day.

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Übersetzung Kontaktformular nicht vollständig’ is closed to new replies.