Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can i keep my custom translations from resetting after BP version upgrades?


  • jreeve
    Participant

    @jreeve

    As I understand it, new versions of BuddyPress come with new .po and .mo files, auto-generated from the source code. I’ve modified a lot of BuddyPress’s text and messages by editing those files (translating English to English), and it looks like those edits are tied to certain php files and line numbers. I’d like my changes to be persistent across versions of BuddyPress. Is there a way to do that?

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

  • r-a-y
    Keymaster

    @r-a-y

    See the latter section of:
    https://buddypress.org/support/topic/buddypress-2-1-known-issues/

    Let me know if you have any questions, jreeve.


    jreeve
    Participant

    @jreeve

    Thanks for that, @r-a-y. I added that function to my theme so that our custom .mo file will still load when we upgrade to 2.1. But even if the file still loads, will it work if the line numbers are off? That’s to say, if the line numbers in our .mo file still correspond to a previous version of BP, will they still work in the current version of BP? If not, is there a way I can programmatically map all the older translations to the new translations file, without having to rewrite it?


    r-a-y
    Keymaster

    @r-a-y

    But even if the file still loads, will it work if the line numbers are off?

    It should, but for new strings introduced in BP 2.1, you’ll need to merge your translation file with the .pot file from BP 2.1 – /wp-content/plugins/buddypress/buddypress.pot.

    View the “Updating your custom language file” for how it’s done with poEdit:

    Customizing Labels, Messages, and URLs

    We don’t have a tutorial for those using command-line tools though 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can i keep my custom translations from resetting after BP version upgrades?’ is closed to new replies.
Skip to toolbar