Fundrainsing prepared for POEDIT

I can translate fundraising easily in a couple of days I would believe.

But for this I Need the plugin to be translatable.

At the moment it is not;

I am using poedit pro and normally premium plugins are compatible. Not fundraising.
There is a couple of code lines to make the plugin compatiblle but I am not a dev. So I rely on you to do this.

I have a php script that a dev has prepared for me to make one of your plugin translatable ( buddypress activity plus...). I expect to see fundraising complient for poedit translation as well.

So please let me know your email and I will send you the file.

Best regards,


  • Kasia Swiderska

    Hello Hervé,

    Fundraising is prepared for translations, as you can see here there is list for languages, so you can download there .po file and go with further translations in Poedit.
    Also - our plugins have languages folder inside, where you will find empty .po file which you can translate to your language using Poedit.
    I'm not quite understand what this php file will do exactly.
    Can you attach it to your post?

    Kind regards,

  • Hervé

    Hello Kasia,
    attached you will find the file.
    I have taken the French Po file for fundraising. Thank you.
    The issue for me is not to translate the remaining 400 strings. I can do it.
    The problem is that I have no garantee the po file will be enough to get the fundraising translated.
    If you try to open fundraising in POEDIT, normally the software will make everything ready for you. AND THEN you are safe working translating because you know it will work.
    Here poedit reject this plugin, saying it is not ready for translation...
    So I need the developper of the plugin to make sure he makes the plugin translatable.
    See the code hereby :
    Hest regards,



    Plugin Name: BuddyPress Activity Plus

    Plugin URI:

    Description: A Facebook-style media sharing improvement for the activity box.

    Version: 1.6.2

    Author: WPMU DEV

    Author URI:

    WDP ID: 232

    Copyright 2009-2011 Incsub (

    Author - Ve Bailovity (Incsub)

    Designed by Brett Sirianni (The Edge)

    This program is free software; you can redistribute it and/or modify

    it under the terms of the GNU General Public License (Version 2 - GPLv2) as published by

    the Free Software Foundation.

    This program is distributed in the hope that it will be useful,

    but WITHOUT ANY WARRANTY; without even the implied warranty of


    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License

    along with this program; if not, write to the Free Software

    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


    define ('BPFB_PLUGIN_SELF_DIRNAME', basename(dirname(__FILE__)));

    define ('BPFB_PROTOCOL', (is_ssl() ? 'https://' : 'http://'));

    //Setup proper paths/URLs and load text domains

    if (is_multisite() && defined('WPMU_PLUGIN_URL') && defined('WPMU_PLUGIN_DIR') && file_exists(WPMU_PLUGIN_DIR . '/' . basename(__FILE__))) {

    define ('BPFB_PLUGIN_LOCATION', 'mu-plugins');


    define ('BPFB_PLUGIN_URL', str_replace('http://', BPFB_PROTOCOL, WPMU_PLUGIN_URL));

    $textdomain_handler = 'load_muplugin_textdomain';

    } else if (defined('WP_PLUGIN_URL') && defined('WP_PLUGIN_DIR') && file_exists(WP_PLUGIN_DIR . '/' . BPFB_PLUGIN_SELF_DIRNAME . '/' . basename(__FILE__))) {

    define ('BPFB_PLUGIN_LOCATION', 'subfolder-plugins');


    define ('BPFB_PLUGIN_URL', str_replace('http://', BPFB_PROTOCOL, WP_PLUGIN_URL) . '/' . BPFB_PLUGIN_SELF_DIRNAME);

    $textdomain_handler = 'load_plugin_textdomain';

    } else if (defined('WP_PLUGIN_URL') && defined('WP_PLUGIN_DIR') && file_exists(WP_PLUGIN_DIR . '/' . basename(__FILE__))) {

    define ('BPFB_PLUGIN_LOCATION', 'plugins');


    define ('BPFB_PLUGIN_URL', str_replace('http://', BPFB_PROTOCOL, WP_PLUGIN_URL));

    $textdomain_handler = 'load_plugin_textdomain';

    } else {

    // No textdomain is loaded because we can't determine the plugin location.

    // No point in trying to add textdomain to string and/or localizing it.

    wp_die(__('There was an issue determining where BuddyPress Activity Plus plugin is installed. Please reinstall.'));


    $textdomain_handler('bpfb', false, BPFB_PLUGIN_SELF_DIRNAME . '/languages/');

    // Override oEmbed width in wp-config.php

    //if (!defined('BPFB_OEMBED_WIDTH')) define('BPFB_OEMBED_WIDTH', 450, true); // Don't define by default

    // Override image limit in wp-config.php

    if (!defined('BPFB_IMAGE_LIMIT')) define('BPFB_IMAGE_LIMIT', 5);

    // Override link target preference in wp-config.php

    if (!defined('BPFB_LINKS_TARGET')) define('BPFB_LINKS_TARGET', false);

    $wp_upload_dir = wp_upload_dir();

    define('BPFB_TEMP_IMAGE_DIR', $wp_upload_dir['basedir'] . '/bpfb/tmp/');

    define('BPFB_TEMP_IMAGE_URL', $wp_upload_dir['baseurl'] . '/bpfb/tmp/');

    define('BPFB_BASE_IMAGE_DIR', $wp_upload_dir['basedir'] . '/bpfb/');

    define('BPFB_BASE_IMAGE_URL', $wp_upload_dir['baseurl'] . '/bpfb/');

    // Hook up the installation routine and check if we're really, really set to go

    require_once BPFB_PLUGIN_BASE_DIR . '/lib/class_bpfb_installer.php';

    register_activation_hook(__FILE__, array('BpfbInstaller', 'install'));


    // Require the data wrapper

    require_once BPFB_PLUGIN_BASE_DIR . '/lib/class_bpfb_data.php';


    * Helper functions for going around the fact that

    * BuddyPress is NOT multisite compatible.


    function bpfb_get_image_url ($blog_id) {

    if (!defined('BP_ENABLE_MULTIBLOG') || !BP_ENABLE_MULTIBLOG) return str_replace('http://', BPFB_PROTOCOL, BPFB_BASE_IMAGE_URL);

    if (!$blog_id) return str_replace('http://', BPFB_PROTOCOL, BPFB_BASE_IMAGE_URL);


    $wp_upload_dir = wp_upload_dir();


    return str_replace('http://', BPFB_PROTOCOL, $wp_upload_dir['baseurl']) . '/bpfb/';


    function bpfb_get_image_dir ($blog_id) {


    if (!$blog_id) return BPFB_BASE_IMAGE_DIR;


    $wp_upload_dir = wp_upload_dir();


    return $wp_upload_dir['basedir'] . '/bpfb/';



    * Includes the core requirements and serves the improved activity box.


    function bpfb_plugin_init () {

    require_once(BPFB_PLUGIN_BASE_DIR . '/lib/class_bpfb_binder.php');

    require_once(BPFB_PLUGIN_BASE_DIR . '/lib/class_bpfb_codec.php');

    // Group Documents integration


    require_once(BPFB_PLUGIN_BASE_DIR . '/lib/bpfb_group_documents.php');


    if (is_admin()) {

    if (file_exists(BPFB_PLUGIN_BASE_DIR . '/lib/external/wpmudev-dash-notification.php')) {

    global $wpmudev_notices;

    if (!is_array($wpmudev_notices)) $wpmudev_notices = array();

    $wpmudev_notices[] = array(

    'id' => 232,

    'name' => 'BuddyPress Activity Plus',

    'screens' => array(




    require_once BPFB_PLUGIN_BASE_DIR . '/lib/external/wpmudev-dash-notification.php';


    require_once BPFB_PLUGIN_BASE_DIR . '/lib/class_bpfb_admin_pages.php';






    // Only fire off if BP is actually loaded.

    add_action('bp_loaded', 'bpfb_plugin_init');

    function my_plugin_load_plugin_textdomain() {

    load_plugin_textdomain( 'bpfb', false, dirname(plugin_basename(__FILE__)) . '/languages/' );


    add_action( 'plugins_loaded', 'my_plugin_load_plugin_textdomain' );

  • Hervé

    what you are demonstrating here is that POEDIT can open the fundraising PO file. Of course he can ! It is a po file so he can open and you can tranlate.
    But will fundraiser plugin will be able to make that french po file work ?
    The response is no unfortunately.
    I lost 2 days in trying to uderstand why "buddypress activity plus" wasn't translating itself with the proper french po fully translated. If you look at your own ressources, you will understand there are several steps for the plugins to be translated :
    1) the plugin nedds to be inter internationationalized.
    2) you need the po tranlated;
    Again I can deal with translating the PO, but not makjing your plugins internationalized !

    Please do me a favour, open the FOLDER IN POEDIT PRO. Choose file and select option "make a new translation"...If the plugin is internationalized, then POEDIT will create the files for you. Here he rejects the plugin ...
    So whatever I will translate, even if you have a po already prepared, the plugin will not get tranlated.
    So I have tested in many other plugins and POEDIT doesn't lie. If he says he will not work, then it will not work for sure; If he lets you translate by opening a complete folde plugin, it will work.

    Please check by yourself and advise .

    PS :Not my idea. i am just reading your own stuff :
    Internationalizing a Plugin

    Internationalizing a plugin essentially means making it ready for translations. This involves wrapping translatable strings in special functions which will be used later to load the correct translations.

    There are a number of internationalization functions, but for our simple plugin we’ll take a look at just one and then talk about the others later once we understand the example.

    The function we’ll be using is __(). This function takes two arguments: the text to translate and the text domain, it looks something like this in action:

    <?php $greeting = __( 'Hello There!', 'text-domain' ); ?>

    view raw
    __.php hosted with ? by GitHub

    The function returns the translation for the marked string if it exists. If it doesn’t, the original string is returned.

    It uses the current language to determine the needed translation. You can switch languages in WordPress in the Settings section, whatever setting is selected there will be applied to all translations.

    The text domain is the final missing piece of the puzzle. A text domain is a way to group translations that belong together. The theme you are running will have its own text domain and so will all your plugins. This makes it easy to differentiate between them.

    Note that for plugins the text domain should be the name of the plugin’s folder. In our example this means the text domain should be wp-admin-motivation. To internationalize our plugin all we need to do is wrap our strings in the __() function.
    1 2 3 4 5 6

    $motivation = array(
    __( 'You are awesome', 'wp-admin-motivation'),
    __( 'This website is boss', 'wp-admin-motivation'),
    __( 'You look great today', 'wp-admin-motivation'),
    __( 'Your earlobes are well rounded, good job!, 'wp-admin-motivation')'

    view raw
    translated-array.php hosted with ? by GitHub

  • Hervé

    After 4 days of no feed back. I was obliged to get a developper makes the change for me and get this plugin internationalized trough some lines of code.
    I have other plugins I would like to internationalize and they might be in the same state.
    So, what will you do for me and other international customers that need to have your plugins translated, ( and are ready to carry on the tranlation job) ?
    Will you be ready to help us ?

  • Kasia Swiderska

    Hello Hervé,

    I'm sorry for delay!

    I'm working with the free version of the Poedit, because I only need it to translate .po files - so I'm not sure how this function "upload plugin file to Poedit" works.
    So I'm going to refer only to translating plugins using .po/.pot because this is way that it should be done if there is access to .po/.pot files.
    Also - I've tested free plugin that allows me to translate plugins and themes inside the WordPress Dashboard.

    You wrote that "BuddyPress Activity+" had to have code change to be internationalized. I've tested that plugin with Loco Translate and without any changes in code I was able to translate it (this plugin works on .po/.mo files). Only thing this plugin get wrong, was .po file name. I've change it to proper one and translation is working (please see the screens - one is from my Dashboard and one is open .po file generated in Loco Translation).
    Wrong .po file name is most often cause of not working translation.

    For translating Fundraiser I use only Poedit and default files from language folder that came with plugin.
    And yes, the default .po files has wrong name - I had to change it to get it work (this is what I've reported to plugin developer and this will be fixed).
    However - I found out that the key words like "Fundraising" and "Pledges" are not translated - where the "Add new", "Settings" and others are.
    This because this words are handled in "Fundraising settings" in "Presentation Tab" (see screen).

    There are few causes why the translation from .po file don't work:
    1) Wrong name of the files
    2) Wrong location
    3) Wrong file permissions
    4) Corrupted file

    When you tried to translate the plugins through the po files, what was the names of the files of your translation? Where did you upload them?

    WPMU DEV plugins are ready to translation. See the last screen - this is from fundraiser.php - I've marked the text strings in proper functions _e() and __() - that are for translating.

    So I have tested in many other plugins and POEDIT doesn't lie. If he says he will not work, then it will not work for sure;

    And with this I have to strongly disagree. I've translated our plugins only using Poedit with .po files and it was working.

    Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.