Support » Plugin: WPCasa » Translate via poedit

  • Resolved Dan Stramer

    (@danstramer)


    Hello,
    Thanks for this great plugin!
    I have just installed and started translation via the .po file.
    Most of the strings are getting translated except for a few – I wonder if you can help:
    1. In the search panel – Price (min), Price (max), Date Desc – all these are not translated
    2. In a listing page – “Toggle Map” is not translated – it also doesn’t have a string in the .po file
    3. Per Month / week etc.. not translated.
    4. I have also added another offer type (Commercial) via the function file, and it is not translated too:
    $offers['commercial'] = __( 'Commercial', 'wpcasa' );
    How can the .po file see this new string?

    Thanks,
    Dan

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WPSight

    (@wpsight)

    Hello Dan,

    thank you for your message.

    We’re aware that there are still a few small issues with missing textdomains on some strings and we will fix this with the next update.

    We usually recommend to use Loco Translate to do the translations. This makes it pretty easy to add new translations to your plugins and themes, scan the template files and start translating.

    Especially for the Search by Price I assume you have the WPCasa Advanced Search plugin installed and active. So the translation must be done there.

    The “Toogle Map” and the Rental Periods do not use PO/MO Files for the translation but can be modified from within your WPCasa Settings.

    And as for the custom offer I guess you might need to add a translation for your child theme/theme and make sure to load the translation files. See here for more info: https://codex.wordpress.org/Function_Reference/load_theme_textdomain

    All the best,
    Joe [WPCasa]

    • This reply was modified 3 years, 6 months ago by WPSight. Reason: added link to loco translate

    Thanks for your reply.
    I will try Loco Translate, and wait for your next update.
    Yes, I have the WPCasa Advanced plugin installed.

    Once I am finished with translation – I will be happy to send the .po file.
    Thanks,
    Dan

    Hi, and sorry to bother with your thread, Dan.

    I’m having the same problem with those translations you say in point three, related to rent periods: 3. Per Month / week etc.. not translated.

    I checked the function where they are translated and everything seem to be OK both in class-wpsight-general.php 'rental_period_1' => __( 'per Month', 'wpcasa' ), and in the .po file.

    It is estrange because dumping the filtered function (using ‘wpsight_rental_periods’ filter) it returns the correct translations (in Spanish in this case mes/Month, semana/Week…):
    array(4) { ["rental_period_1"]=> string(7) "por mes" ["rental_period_2"]=> string(10) "por semana" ["rental_period_3"]=> string(8) "por año" ["rental_period_4"]=> string(8) "por día" }

    but the strings doesn’t appear translated neither in the front nor in the backend.

    Looking further i’ve seen that in line 418 in class-wpsight-general.php $rental_periods = self::rental_periods(); doesn’t get translated terms.

    I hope this can help you and you can correct this issue soon.
    Thanks for your great plugin, Paulo.

    • This reply was modified 3 years, 3 months ago by pauloc.
    Plugin Author WPSight

    (@wpsight)

    Hello Paul,

    thanks for chiming in.

    The rental periods can be named to anything from within the WPCasa Settings in WP-Admin > WPCasa > Settings > Listings. The string translation based on PO/MO Files is only relevant for the initial setup. Say your website is setup in spanish and you install and activate WPCasa for the first time, a bunch of default settings will be saved to the Database. In that case the spanish translations for the rental periods are taken from the PO/MO Files. If you need to change the name of those periods later you can do so, as already mentioned, from the WPCasa Settings.

    In case you’re running your site with multiple languages, we’d recommend to use Polylang. Our bridge addon WPCasa Polylang registers a few strings for the Polylang String Translation to make it possible to add translations for each language on each rental period.

    Sorry if that sounds a little bit confusing but I hope you understand what I mean.

    All the best

    Thank you very much, I was getting nuts and was that easy.
    Keep the good work!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Translate via poedit’ is closed to new replies.