Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] language problem in widget edit

Viewing 9 replies - 1 through 9 (of 9 total)

  • danbp
    Moderator

    @danbp

    @tsabar,

    the widget remain in english because the translation is missing.

    The hebrew version on GlotPress, where BP picks the automatic translation in your language is not completly translated (64%).

    Download it and finish the translation on your computer. BP comes with a buddypress.pot file which you must use to do this. And use poEdit or a similar software.

    Concerning the widget, you have to translate this string in the po file:
    <a href=\"%s\" title=\"Register for a new account\">Register</a>

    Aside, bp and po files are always in UTF8.
    If you save a po file in ANSI, you have to use exclusively ANSI without BOM (.txt format and evtl. change the file extension to your need)

    To generate the mo file, you must use a compiler like poEdit.

    Also avoid to hack core files and don’t make a translation on the admin side.

    I’ll find more details around how to translate in some previous topics, since 2.1 is out.


    tsabar
    Participant

    @tsabar

    thanx that worked 🙂

    but if i shouldn’t hack core files, where do i correct the width of the login input fields which are too long for my sidebar?


    danbp
    Moderator

    @danbp

    This is a cosmetic question which can be solved by CSS from within your child-theme.

    https://buddypress.org/support/topic/change-textbox-size/


    tsabar
    Participant

    @tsabar

    i tried adding the following code to my active theme’s style.css file but it didn’t work. should i be adding it to a specific buddypress file?

    
    .mytextbox {
       width: 100%;
    }
    

    danbp
    Moderator

    @danbp

    try this: (! mytextbox is an example name, not the the one used by your site probably)

    .mytextbox {
       width: 100%!important;
    }

    Read attentively the topic i mentionned you. 😉


    tsabar
    Participant

    @tsabar

    d-uh 🙂

    any chance you can tell me from my code below which is the right name to substitute instead of .mytextbox ?
    would it be bp-login-widget-user-login and bp-login-widget-user-pass ?
    (relatively new to css, sorry)

    
    <div class="block">
    <div class="block-border">
    <div class="block-content">
    <div id="bp_core_login_widget-3" class="widget widget_bp_core_login_widget buddypress widget">
    <h4 class="widgettitle"></h4>
    <div class="widgetcontent">
    <form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="/wp-login.php" method="post"> 
    <label for="bp-login-widget-user-login">שם משתמש</label>
    <input type="text" name="log" id="bp-login-widget-user-login"  value="" width="10" />
    

    danbp
    Moderator

    @danbp

    Don’t know your code !
    The BuddyPress login widget code looks like this: (source:/buddypress/bp-core/bp-core-widgets.php)

    <form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    	<label for="bp-login-widget-user-login"><?php _e( 'Username', 'buddypress' ); ?></label>
    	<input type="text" name="log" id="bp-login-widget-user-login" class="input" value="" />
    
    	<label for="bp-login-widget-user-pass"><?php _e( 'Password', 'buddypress' ); ?></label>
    	<input type="password" name="pwd" id="bp-login-widget-user-pass" class="input" value=""  />
    
    	<div class="forgetmenot"><label><input name="rememberme" type="checkbox" id="bp-login-widget-rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ); ?></label></div>
    
    	<input type="submit" name="wp-submit" id="bp-login-widget-submit" value="<?php esc_attr_e( 'Log In', 'buddypress' ); ?>" />
    
    	<?php if ( bp_get_signup_allowed() ) : ?>
    
    	<span class="bp-login-widget-register-link"><?php printf( __( '<a href="%s" title="Register for a new account">Register</a>', 'buddypress' ), bp_get_signup_page() ); ?></span>
    
    	<?php endif; ?>
    </form>

    You hardcoded several things.
    <label for="bp-login-widget-user-login">שם משתמש</label>
    and
    <input type="text" name="log" id="bp-login-widget-user-login" value="" width="10" />

    Be warned that such hacks will be overwriten at next BuddyPress or theme update.
    Modifications should only be done in a child theme.

    Begin to remove width=”10″ to fit to the original code. And see if this change something. If not, try

    input#bp-login-widget-user-login {
       width: 100%!important;
    }

    tsabar
    Participant

    @tsabar

    that worked!

    thanx for the great support! very appreciated 🙂


    danbp
    Moderator

    @danbp

    You’re welcome. Glad you got it to work ! 😉

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] language problem in widget edit’ is closed to new replies.
Skip to toolbar