Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Translation for Spanish

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

  • Henry Wright
    Moderator

    @henrywright

    Hi @ivanguinea

    Can you provide some more details on what you are doing. What exactly isn’t working?


    r-a-y
    Keymaster

    @r-a-y

    ivanguinea – If you look at the Spanish translation on translate.wordpress.org, there are still some strings that haven’t been translated:
    https://translate.wordpress.org/projects/buddypress/dev/es/default?filters[status]=untranslated

    You can help by translating these strings. If you decide to help and are not sure how to add your contributions, let us know and we’ll point you in the right direction.


    ivanguinea
    Participant

    @ivanguinea

    Thanks guys for replying.


    @r-a-y
    I Translated several of the string in development. 😉

    The thing is if you guys log in as users. (use this dummy user details; user: aguenaguen pass:n0n0n0)

    Go to this URL: http://www.valerunners.com/miembros/aguenaguen/

    You can check there are translated strings, but not all of them. I am quite confident those strings are translated in the po and mo files.

    Why is this happening?
    The file should be located under: wp-content/languages/plugins. Right?


    r-a-y
    Keymaster

    @r-a-y

    @ivanguinea – If you recently added some new strings on translate.wordpress.org, you might need to force a translation update to see the changes.

    By default, translation updates get updated when WordPress checks for new versions of plugins.

    One way to force this is by installing the WP Crontrol plugin and by forcing the 'wp_update_plugins' cronjob to run. Untested, but please do try and let us know if it works.


    mabellaneda
    Participant

    @mabellaneda

    Hello,

    I’m suffering a lot of issues too with the translation into Spanish, in such a way that I had to patch it several times after trying different configurations.

    So! To the point. It works for me now and I explain here my current configuration:

    1. I’ve downloaded the BuddyPress translation package from https://translate.wordpress.org/projects/buddypress/ and contributed with some translations (specifically for Spanish: https://translate.wordpress.org/projects/buddypress/dev/es/default)

    2. Saved the .mo and .po files in /wp-content/languages/plugins as recommended by the Moderators: https://translate.wordpress.org/projects/buddypress/dev/es/default.
    And configured the site in Spanish (particularly I tried to do it dinamically)

    3. Becuase I try to change the language dinamically according to the browser preferred language I use the xili-language plugin, which “helps” you to manage in what language you’ll display your WordPress, but I’m no sure if it is decisive for the BuddyPress translation. In this plugin there’s a configuration to mention and not enough documented. In case you use the plugn, in the tub “Settings for expert” there are rules to specify. My configuration is:
    Wordress rule –> translation in local
    BuddyPress rule –> no modification

    5. At this point the translation didn’t work correctly or I didn’t succeed in translating some strings that remained in English (like: “Members”, “Groups”, “Notifications”, “Activity” in the BuddyPress navigation menu and others). So, I edited the .po file with PoEdit and updated it with the BuddyPress catalog “buddypress.pot”:

    Customizing Labels, Messages, and URLs

    6. I updoaded the modified .po and .mo files to the mentioned folder /wp-content/languages/plugins and didn’t change a thing. I read then in forums the different issues with translations, for example:

    https://buddypress.org/support/topic/translation-fails-only-at-sitewide-activity/
    https://buddypress.trac.wordpress.org/ticket/5655
    https://buddypress.org/support/topic/buddypress-2-1-bp-language/
    https://buddypress.trac.wordpress.org/ticket/5887
    https://buddypress.org/support/topic/buddypress-2-1-known-issues/ (here there’s another workaround)

    7. And I added the following lines to the file functions.php of my child theme:

    function igf_my_child_theme_setup() {
    load_child_theme_textdomain( ‘my_child_theme’, get_stylesheet_directory() . ‘/languages’ );
    load_plugin_textdomain(‘buddypress’, false, basename( dirname( __FILE__ ) ) . ‘/languages/’ );
    }
    add_action( ‘after_setup_theme’, ‘igf_my_child_theme_setup’ );

    And it begans to translate correctly! I’m sorry I really don’t understand why. Furthermore I thought that the buddypress textdomain was set by the plugin xili-language but, as I said, I’m not clever enough or it is not well documented.

    I know there’s a lot of steps to do, I was really frustated with it, but if you try something like this

    Anyway, as this is my first post, I have to thank to the developers for the software and the great effort, of course; it has helped me a lot too.

    Regards.


    ivanguinea
    Participant

    @ivanguinea

    @r-a-y, I tried what you suggested and nothing. Those strings still remain unstranslated…


    danbp
    Moderator

    @danbp

    @ivanguinea,

    the url you provided gives Página en Construcción ! We’re unable to login for the moment.
    What is your theme, which plugins do you use ?
    And if you use a cache, clear it before applying changes.


    ivanguinea
    Participant

    @ivanguinea

    Sorry, Try it now.

    I disabled under construction plugin.

    😉


    danbp
    Moderator

    @danbp

    Don’t you like answering questions ?
    It will became difficult to help you if you don’t. 🙄


    ivanguinea
    Participant

    @ivanguinea

    Sorry:

    This is the list of my plugins:
    BackWPup
    Better WordPress Minify
    Breadcrumb NavXT
    Buddypress
    BuddyPress Registration Groups
    Formulario de Contacto 7
    Cookie Law Info
    Gears
    Hide Admin Bar From Non-admins
    Hide User Profile Fields
    Límitador de intentos de login
    Nav Menu Images
    Paid Memberships Pro
    PMPro Check Levels
    PMPro Customizations
    PMPro Email Templates
    PMPro Register Helper
    Regenerate Thumbnails
    Remove Dashboard Access
    Revolution Slider
    Simple Social Icons
    Editor de Roles
    WordPress SEO
    WP-Optimize
    WPBakery Visual Composer
    WP Google Fonts
    WP Smush.it
    WP Super Cache
    WP User Frontend Pro

    My theme is Klein (http://klein.dunhakdis.me/)


    danbp
    Moderator

    @danbp

    just checked the bp po file from glotpress. The file contains an error which may mo not working correclty, but I have to investigate more indeep as this doesn’t solve the problem.


    ivanguinea
    Participant

    @ivanguinea

    Is that a weird issue?

    Thanks!!


    danbp
    Moderator

    @danbp

    Yes it is weird ! And it is not a buddypress issue but a translation issue.

    The glotpress po file is uncomplete and contains many errors.
    Not sure if it can have an influence on the automatted language upload, but the header is missing the language parameter. (@r-a-y, @boone)

    I first tested it “as is” and got same errors as you.
    I applied patch #5887… nothing
    I used the function mentionned by @r-a-y… nothing
    I added the mo into suggested /wp-content/languages/plugins/buddypress/bp-languages/buddypress-es_ES.mo… nothing

    So i went back to my original config and used the same settings i usually use for my fr_FR BP version (/wp-content/languages/plugins/buddypress-es_ES.mo)… nothing !

    WTF ? 👿 #grumbl…@?/;rrrrr !

    So i decided to make a new po by updating the one found on glotpress. (i’m working with poEdit)
    This resulted in around 1300 (a little more) new lines and over 100 deprecated lines… and a lot of approximative strings….

    In these approx, i found groups, activity and all other strings you mentionned not getting translated. I simply reverted them to valid and bam, the translation worked.

    I suggest the following:

    • revert back to standard config (no language patch, no language custom functions, no extra language folder) and po/mo in wp-content/languages/buddypress-xx_XX.mo
    • download the po from glotpress
    • open the file with a text editor and remove the header and replace it with this one:
    msgid ""
    msgstr ""
    "Project-Id-Version: BuddyPress 2.1\n"
    "POT-Creation-Date: 2014-09-26 13:34+0100\n"
    "PO-Revision-Date: 2014-09-26 14:19+0100\n"
    "Last-Translator: \n"
    "Language-Team: \n"
    "Language: es_ES\n"
    "MIME-Version: 1.0\n"
    "Content-Type: text/plain; charset=UTF-8\n"
    "Content-Transfer-Encoding: 8bit\n"
    "Plural-Forms: nplurals=2; plural=n != 1;\n"
    "X-Poedit-SourceCharset: UTF-8\n"
    "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
    "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
    "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
    "X-Textdomain-Support: yes\n"
    "X-Poedit-Basepath: .\n"
    "X-Generator: Poedit 1.5.7\n"
    "X-Poedit-SearchPath-0: ..\n"
    • create a folder in BP called bp-languages-ES (or whatever)
    • add the po to this folder
    • open the file with poEdit
    • update the catalog from source

    Now you can see all untranslated lines, the one who are approximative and the one who are already translated.

    At this stage, the file is translated to 53% and you’ll have to translate around 770 strings (of 2668).

    You also have to check each string containing count variables like %s or %1$s (many are old and must be modified). You’ll find also some plural strings. This is particulary true for approximative strings, who may be similar to the english phrase, but aren’t. Needs good eyes and slow checking ! 😉

    Once finished, save your work and copy the mo file into the appropriate language folder:

    /wp-content/languages/plugins/buddypress-es_ES.mo (if you want to use your custom translation only)
    /wp-content/languages/buddypress-es_ES.mo – if you want automagical 👿 glotpress updates (when avaible, complete and without errors of course).


    ivanguinea
    Participant

    @ivanguinea

    Man, you just saved my life!

    Thanks a lot for helping me! just the description of what I should be doing (perfectly clear by the way) amazes me…

    I followed your steps and works like a charm.

    Thanks again


    danbp
    Moderator

    @danbp

    You’re welcome. Glad you got it ! 😉

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] Translation for Spanish’ is closed to new replies.
Skip to toolbar