[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8299: po-mode faulty?

From: Gurce
Subject: bug#8299: po-mode faulty?
Date: Sun, 20 Mar 2011 14:42:09 +1100

Hi there,

I recently joined a software project that has been using .po files for 
multi-lingual string support.

While reading up on this format, I learnt that emacs has a "po-mode" to support 
in the editing of these .po files.

I started reading the online documentation regarding the 'gettext' facility 
(which makes many mentions of emacs and the facilities it provides for .po file 
editing). But on this the following page, I encountered a few problems:

In section "3.4 Marking Translatable Strings", it suggests to:
1) Generate the TAGS file for your source via the "etags" tools
2) create a new PO file with emacs, and then emacs can let you browse through 
all strings in your code via the ',' key. As you scan each potential string 
one-by-one, if you decide that it should be a multi-lingual string, you then 
press 'M-,' which will automatically add the "_()" marker around the string in 
the source code, and also automatically add a msgstr key for you in your .po 

This sounds like a really handy feature. I tried to follow these steps, 
generated the TAGS file fine, but that 2nd step doesn't seem to work. When I 
press the ',' key, emacs spends a minute scanning through all the source code, 
then opens one, but highlighting no string within it.

This surprised me a little, so I tried these steps out on a simple 'hello 
world' c example instead. When I tried steps 1 and 2 on it, it failed on step 
2, no string was highlighted (I was hoping it would highlight the 'Hello World' 
within the printf).

By chance, I happened to have an older fedora core 4 pc on me, I tried the 
simple 'hello world' c example, along with steps 1 and 2, and surprisingly it 
worked! The "Hello World" string within the printf statement was highlighted, 
and I was able to add it into the po file via 'M-,'.

So I'm now starting to suspect that perhaps something broke in this behaviour 
for newer versions of emacs?

So summarising what I saw regarding po-mode's string searching facility:
    * fc4 pc has emacs v21.4.1 (works)
    * opensuse pc has emacs v23.1.1 (doesn't work)

So yeah, one aspect of my email was intending to report the problem. But 
another part of me was curious whether I could examine the issue further myself 
via the source code, perhaps grabbing it from the cvs repo, version by version, 
to try see in which version it initially broke, then gauging what changes were 
made in that version that could have been the culprit.

I had a look at the following site regarding cvs access:

With that info, I tried typing in at the console:
cvs -z3 -d:pserver:address@hidden:/sources/emacs co emacs

But got the following response:
cvs [checkout aborted]: connect to cvs.savannah.gnu.org( 
failed: Connection timed out

So not sure whether I typed something in wrong, or perhaps just unlucky and the 
server was down. Nonetheless, thought I'd better mention this too.

Anyways, hope you can help in any way.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]