Jump to content


Photo
- - - - -

How to change a text string with POedit.


  • Please log in to reply
33 replies to this topic

#1 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 23 January 2012 - 01:05 PM

In this quick tutorial I'm going to show you how to change a translatable string in PageLines Framework 2.x
Tools Needed:
Framework 2.x
pagelines-customize plugin
POedit -

Please Login or Register to see this Hidden Content


So as an easy example I'm going to show you how to change the 'Tagged with:' string as it was requested earlier today. Posted Image
1. Make a 'language' dir in the customize plugin folder.

Posted Image


2. Open POedit and click file/open and navigate to the pagelines.pot file in pagelines/language folder ( you will need to select 'all files' to open it ) Posted Image


3. Now we need to find the string to translate, i used the find function to find the word 'tagged'.

Posted Image
4. Highlight the string to edit then add the new string in the bottom box.


Posted Image
5. Now click Catelog/settings, you need to change a couple of fields before it will let you save. You have to change the team name and team email address. Posted Image


6. Now click 'save as' and navigate to your customize plugin folder, and change the filename to en_US.po Posted Image

It should save out 2 files like this:
Posted Image




Now refresh your page, it should be translated!


Posted Image

Edited by Simon Prosser, 17 September 2012 - 02:21 AM.
make it readable in new forum


#2 annabelr

annabelr

    Advanced Member

  • Members
  • 68 posts

Posted 27 January 2012 - 12:51 PM

Hi Simon,

Trying to output new .po .mo files using the pagelines.pot file.
Followed every step in your tutorial.
Getting the following error msg from POEDIT :

Please Login or Register to see this Hidden Content

I looked it up and can't see what's wrong.

This result was achieved by forcing the opening of the .pot file in POEDIT (open with from finder), for when i try to open the file with the "new catalog from a POT file" POEDIT menu entry i get the following error messages in the log file (aproximate translation from french) :
pagelines.pot is not a valid POT file, corrupted catalog (incorrect entries, msgstr used conjointly with msgid_plural...

Could you point me out to a solution? Alternate POT file?

Thx a lot.

Cheers

#3 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 27 January 2012 - 12:59 PM

I used the one from the latest package, pagelines.zip. Just tried it again definatly works. You dont have to 'create a new catelog from pot file. You just open the pot with poedit then adjust the catalog settings then save as.

#4 annabelr

annabelr

    Advanced Member

  • Members
  • 68 posts

Posted 27 January 2012 - 03:59 PM

Thx Simon, a problem with POEDIT... Re-installed : everything ok. Cheers

#5 ilkka

ilkka

    Advanced Member

  • Members
  • 34 posts
  • Country: Country Flag

Posted 01 February 2012 - 10:41 AM

Hi, thanks a lot for the tutorial, very helpful. I had success translating theme, although poEdit gives me an error every time I try to save: "en_US.po:4: field 'Last-Translator' still has initial default value". Any idea what is the problem here?

#6 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 01 February 2012 - 11:00 AM

Did you fill in the project info?

#7 jbrouwer

jbrouwer

    Super Member

  • Members
  • 191 posts
  • Country: Country Flag

Posted 06 February 2012 - 11:21 AM

Hi, How does this work with the base theme? I created a language folder in the base theme folder and followed the above steps. No results. It does work when I copy the language files in the pagelines/language folder. Or do I have to use the customize plugin (in addition to the base theme)? Thanks.

#8 Jackey

Jackey

    Advocate

  • Members


  • 683 posts
  • LocationHelmond
  • Country: Country Flag

Posted 06 February 2012 - 12:56 PM

Or, you can user the customize plugin instead of the base theme...

#9 jbrouwer

jbrouwer

    Super Member

  • Members
  • 191 posts
  • Country: Country Flag

Posted 06 February 2012 - 01:42 PM

I cannot, as I've installed Buddypress...

#10 Jackey

Jackey

    Advocate

  • Members


  • 683 posts
  • LocationHelmond
  • Country: Country Flag

Posted 06 February 2012 - 05:54 PM

??? I had buddypress installed with the Customize Plugin, without Base Theme... no problems...

#11 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 06 February 2012 - 05:56 PM

@jackey@melisgs.nl yes you can do it that way, the templatepack then installs all its stuff into the main framework folder, which means next time you upgrade all that could get nuked.

#12 Jackey

Jackey

    Advocate

  • Members


  • 683 posts
  • LocationHelmond
  • Country: Country Flag

Posted 06 February 2012 - 06:03 PM

Nice to know! Thanks for the warnng! Can one still do Base Theme And Customize Plugin? It sounds like asking for trouble.

#13 jbrouwer

jbrouwer

    Super Member

  • Members
  • 191 posts
  • Country: Country Flag

Posted 06 February 2012 - 09:18 PM

@simon what about translating pagelines using the base theme, is that possible?

#14 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 06 February 2012 - 09:21 PM

@jbrouwer The framework looks in either the customize directory if its installed or the main framework folder.

#15 Jackey

Jackey

    Advocate

  • Members


  • 683 posts
  • LocationHelmond
  • Country: Country Flag

Posted 06 February 2012 - 09:52 PM

@jbrouwer That's why I switched from the Base Theme to the plugin... Clearly no option for you... :(

#16 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 06 February 2012 - 09:53 PM

Guys you can use both!

#17 Jackey

Jackey

    Advocate

  • Members


  • 683 posts
  • LocationHelmond
  • Country: Country Flag

Posted 06 February 2012 - 09:55 PM

Okay, that's solved then.

#18 jbrouwer

jbrouwer

    Super Member

  • Members
  • 191 posts
  • Country: Country Flag

Posted 04 April 2012 - 09:12 AM

@simon In my experience you cannot do both (base or custumize plugin as Jackey was suggesting), only the main framework folder works (together with the custumize plugin) as you said before. However, would it be possible to make this work in the base theme as well? Seems to be double work to install the customize plugin next to the base theme. Thanks.

#19 pehja

pehja

    Advocate

  • Members


  • 543 posts
  • LocationSweden
  • Framework Version:Pagelines v2.4.3 and DMS
  • Country: Country Flag

Posted 12 April 2012 - 08:36 AM

I am not sure I got this correct. But I would like to see that my language files were not overwritten each time the Page Line updates. They do when I use the base theme. Is it better to put them in the "customize plugin" and if so, can I still use Base Theme. If I should want to use Buddy Press.

#20 pehja

pehja

    Advocate

  • Members


  • 543 posts
  • LocationSweden
  • Framework Version:Pagelines v2.4.3 and DMS
  • Country: Country Flag

Posted 13 April 2012 - 02:57 PM

Am I not suppose to ask this question in this thread or what ?