Not all strings in contact form can be translated

I have a multi-lingual installation of ZP 1.4.12 and the "contact_form" plugin activated. While the multi-lingual setting allows me to translate most of the text elements in the contact form, the actual form fields (Name, E-Mail, Phone, Enter CAPTCHA, Subject, ...) maintain their English text (in German as well as in Spanish translation).

Is there a way to also translate these elements?

Comments

  • acrylian Administrator
    Actually this should be covered by the static translation files via gettext. I can reproduce that it doesn't work, too.
  • vlc Member
    I just checked https://raw.githubusercontent.com/zenphoto/zenphoto/master/zp-core/locale/de_DE/LC_MESSAGES/zenphoto.po and in there I find the corresponding strings (at least for German).

    Just look for "zenphoto-dev/zp-core/zp-extensions/contact_form/form.php".
  • vlc Member
    By the way, the same holds true for "Image Info" when viewing a single image. The EXIF names ("Camera Maker", "Camera Model", ...) are still in English while there are obviously translations in the .po file.
  • acrylian Administrator
    Yes, for sure in the German translation files and it did work originally.
  • acrylian Administrator
    Ah, old trap. You are loggedin and have a default language set on your user account. That takes priority over everything as long as you are loggedin. Remove that language or log out and then it will work as expected. So all fine for the actual site visitors which is the most important anyway.
  • vlc Member
    Thanks for the reply!

    German works when I'm logged out, but Spanish .po file needs some updates. There is e.g. a translation for `Enter CAPTCHA*:`, but none for `Enter CAPTCHA*` (without the colon at the end, as used in the contact form).

    Is there already a script available to update the .po file to the latest source code (`xgettext` and `msgmerge` I suppose)? I'm not a native speaker, but I might fix at least some of the missing parts.
  • acrylian Administrator
    Sorry, the Spanish translation is apparently not maintained anymore. See the translation tutorial how to update translations. I use the free tool Poedit to maintain the German translation as does my colleague fretzl with the Dutch one.

    Btw, just to note: fretzl could neither reproduce your or my observation. For him it works as expected.
  • vlc Member
    It seems the Spanish .po file also needs to be updated for the latest sources. The path to the contact form is now `zp-core/zp-extensions/contact_form/form.php`, but in the Spanish .po file they use `themes/garland/contact_form/form.php` (that's at least the closest match I can find).

    Do you know if there is a script to update the .po file to the latest sources (it will most likely use `msgmerge`)?
  • acrylian Administrator
    As mentioned we use Poedit for translation. See the translation tutorial how that works. All translations that are not maintained are not fully compatible. Best would be someone takes them over again. Since it is a lot of work, it is not likely though I fear.
Sign In or Register to comment.