WordPress.org

Ready to get started?Download WordPress

Forums

Calendar
Translation (3 posts)

  1. Deamon77
    Member
    Posted 1 year ago #

    Hi Kieran,

    Thanks for the new version of your plugin!

    I would like to share with you an improvement about the translation, maybe can I commit it directly but it is as you prefer.

    It is a good practice to place translations file into a folder named languages so to correct this, you can

    replace l29-30

    $plugin_dir = basename(dirname(__FILE__));
    load_plugin_textdomain( 'calendar','wp-content/plugins/'.$plugin_dir, $plugin_dir);

    by

    $plugin_dir =  dirname(plugin_basename( __FILE__ ) );
    load_plugin_textdomain( 'calendar','wp-content/plugins/'.$plugin_dir.'/languages/', $plugin_dir.'/languages/');

    to improve translation, there is some lines where the domain is missing :

    replace l1033-1037

    <option class="input" <?php echo $selected_s; ?> value="S"><?php _e('None') ?></option>
    <option class="input" <?php echo $selected_w; ?> value="W"><?php _e('Weeks') ?></option>
    <option class="input" <?php echo $selected_m; ?> value="M"><?php _e('Months (date)') ?></option>
    <option class="input" <?php echo $selected_u; ?> value="U"><?php _e('Months (day)') ?></option>
    <option class="input" <?php echo $selected_y; ?> value="Y"><?php _e('Years') ?></option>

    with

    <option class="input" <?php echo $selected_s; ?> value="S"><?php _e('None', 'calendar') ?></option>
    <option class="input" <?php echo $selected_w; ?> value="W"><?php _e('Weeks', 'calendar') ?></option>
    <option class="input" <?php echo $selected_m; ?> value="M"><?php _e('Months (date)', 'calendar') ?></option>
    <option class="input" <?php echo $selected_u; ?> value="U"><?php _e('Months (day)', 'calendar') ?></option>
    <option class="input" <?php echo $selected_y; ?> value="Y"><?php _e('Years', 'calendar') ?></option>

    Waiting to read from you :)

    Bastien

    http://wordpress.org/extend/plugins/calendar/

  2. Kieran O'Shea
    Member
    Plugin Author

    Posted 11 months ago #

    Looks like a good suggestion, I'll look to do this and also to bundle languages with the plugin so there is less hassle for people getting localisation working

  3. Deamon77
    Member
    Posted 10 months ago #

    Thanks for your answer.
    If you want I can help you doing this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic