0
votes

I have a translated .po file. I like to extract msgid and msgstr to another file.. so that i can print it and give it for error checking to another person..

Here i need omit all the strings/newline/whitespace and space characters. i need only lines with msgid and msgstr

example input

**

#: ../src/administration-activity/admin/class_edit.py:56 
msgid "Editing a Class" 
msgstr "ತರಗತಿನ್ನು  ಬದಲಾಯಿಸಲಾಗುತ್ತಿದೆ" 

#: ../src/administration-activity/admin/class_edit.py:61 
msgid "Editing class: " 
msgstr "ಬದಲಾಯಿಲಾಗುತ್ತಿರುವ ತರಗ:"

**

required output

    msgid "Editing a Class" 
    msgstr "ತರಗತಿನ್ನು  ಬದಲಾಯಿಸಲಾಗುತ್ತಿದೆ" 
    msgid "Editing class: " 
    msgstr "ಬದಲಾಯಿಲಾಗುತ್ತಿರುವ ತರಗ:"
1

1 Answers

0
votes

With Eazy Po you use Export Using Template to save the file the way you like. Open the po file, and from the File menu select Export -> Using Template. A Template Editor window will pop up:

enter image description here

In the left pane list right click for a popup menu and select New Template. In New Template dialog define your template name and press Ok.

enter image description here

In the Loop Block text box type the following (or copy & paste):

msgid "%source%"
msgstr "%translation%"

You will notice a sample result in the Result Example pane at the bottom of the window and this result will change instantly as you play with it.

enter image description here

Select Generate & Save button to save the generated file. For escape characters substitution; see the setting for the other pre built templates.