Tagged: translation
-
AuthorPosts
-
April 23, 2024 at 4:03 pm #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.April 24, 2024 at 8:32 am #1440660Hey 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,
IsmaelApril 24, 2024 at 10:34 am #1440676Hello 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
LoMoeApril 25, 2024 at 2:31 am #1440741Hi,
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,
IsmaelApril 26, 2024 at 5:33 pm #1440998Hello 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
LoMoeApril 27, 2024 at 11:49 am #1441030Hi,
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ünterApril 29, 2024 at 8:59 am #1441268Hi 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
LoMoeApril 29, 2024 at 11:19 am #1441283 -
AuthorPosts
- The topic ‘Übersetzung Kontaktformular nicht vollständig’ is closed to new replies.