Emacs/Howto edit po files

From Wsms

Jump to: navigation, search

use emacs

Emacs has a built-in mode for editing .po files. It is easy to use if you are familiar with Emacs.

Here's how to use it step-by-step:
ssh into the sdvault using port 220 server with X forwarding:

ggeller@grant:~$ ssh -p 220 -X rpeeks@sdvault.wikiplanet.com
rpeeks@sdvault.wikiplanet.com's password:
rpeeks@sdvault's password:
Last login: Mon May  7 11:02:29 2007 from ns1.sdlinuxguy.com
[rpeeks@sdvault ~]$ cd /usr/lib/perl5/site_perl/5.8.8/SVN/Web/I18N
[rpeeks@sdvault I18N]$ emacs de.po &

You get a screen like this:
Image:20070507-010-emacs.png
Find the text you want to change, but the cursor on it and hit the enter key:
Image:20070507-020-emacs-edit-entry.png
After you are done with the entry, type C-c C-c, or use the menu selection as shown:
Image:20070507-030-emacs-save-edit.png

test your changes

This is on our 'live' site. So when you save the po file with C-c C-s or using the Save item from the file menu, you can use a browser to see the result once you restart the apache server:

[rpeeks@sdvault I18N]$ sudo /usr/sbin/apachectl graceful

Lynx is especially good for checking this because it doesn't have a cache:

[rpeeks@sdvault I18N]$ lynx http://sdvault.wikiplanet.com/svnweb/?lang=de
                                         Liste der Repositoies (via SVN::Web)

   [German_______________] Go

   Bitte das Repository auswählen:
     * svnweb → http://localhost/repos/svnweb/
     * test → http://localhost/repos/test/
     _________________________________________________________________

   Powered by SVN::Web

special characters

The special characters like a-umlaut are access via the C-x 8 emacs key combination. For example, a-umlaut is C-x 8 " a. You can get a menu of the characters by typing C-x 8 C-h.

Personal tools