Support » Plugin: Membership & Content Restriction - Paid Member Subscriptions » Translation of some keys not working

  • Resolved Gunu

    (@grafcom)


    Hello,

    I edit the .po files in Dutch. This works correct, only this does not work (it is in the .po file):

    __( 'Are you sure you want to cancel your %s subscription? This action will remove the subscription.',

    Also I can not find the word – Unlimited – as used in the change profie page, this is not in the .po file

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Gunu

    (@grafcom)

    Also this line is not in the .po files In both plugins Paid Member Subscriptions and Profile Builder Hobbyist

    You will be able to complete the payment after you have confirmed your e-mail address.

    Thread Starter Gunu

    (@grafcom)

    The list grows, also translation of this is not working because it is not in the .po file.

    $message = __( 'Thank you for upgrading. The changes will take effect after the payment is received.', 'paid-member-subscriptions' );

    Is there a current .pot file?

    Hi,

    Thank you for reaching out to us.

    In what language are you trying to translate PMS? Do you use a translation plugin like WPML for a Multi Language Website?

    If you are trying to translate PMS only in 1 language we’ve setup a new pms environment for making it really easy to translate Paid Member Subscriptions in any language, as well as downloading the translation files.

    For example French translation is already 44% complete, so it would be great if you could help and add your translated strings there, so that other users may benefit from them.

    Then on the page bottom click Export and select the .po and then the .mo files.

    You need to rename them paid-member-subscriptions-fr_FR.mo and paid-member-subscriptions-fr_FR.po and place them in the Translation directory in the plugin.

    Then in the WP back-end UI, under Settings go to Site Language and select French. This way all your Paid Member Subscriptions strings will be in French.

    We’ll also make sure to include all the translations updates in each plugin update.

    Let me know if this information helped you.

    Best regards,

    Thread Starter Gunu

    (@grafcom)

    Thank you for your response. Yes I have found the language files. (Dutch)

    But I use custon texts, specific for the website. These are not suitable for all Dutch users.

    With each change I must check everything again. I can not merge those .po files.

    It would be great if I could download the .pot file to merge them with my .po file.

    Hi,

    Indeed some strings are not in the .po file. I’ve talked with the dev team and they will add them.

    We can use some custom code to translate: Are you sure you want to cancel your %s subscription? This action will remove the subscription.

    1. Create an empty plugin like this: https://gist.github.com/sareiodata/76f701e01db6685829db
    2. Add the following code to the end of it:

    /*
     * Filter to change the cancel confirmation notification in PMS
     */
    
    add_filter( 'pms_cancel_subscription_confirmation_message', 'pmsc_change_cancel_subscription_confirmation_notification', 30, 2 );
    
    function pmsc_change_cancel_subscription_confirmation_notification( $content, $subscription_plan ) {
        $notification = '<p>' . sprintf( __( 'My Custom text %1$s.', 'paid-member-subscriptions' ) . '</p>', $subscription_plan->name );
        return $notification;
    }

    3. Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality

    Since you are using a premium version of PMS please submit a support ticket regarding this issue because we are not allowed to offer support for paid plugins on these free forums.

    We will continue our conversation using the support ticket.

    Best regards,

    Hi,

    The new strings have been added in PMS. In the next update you will be able to translate them appropriately.

    As soon as it is live please update the plugin and let me know the results.

    Best regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Translation of some keys not working’ is closed to new replies.