I finished coding of my student project, gettext (.po) catalogs editor.
It is written in wxWindows 2.2, runs under wxGTK and wxMSW (and
of course, should work with wxMac as well, but I don't have Mac
machine). It aims to provide more convenient approach to editing
catalogs than launching vi :) and editing the file by hand.
For those who prefer old good text editors to GUI frontends,
it may still serve as an example of coding small wxWindows app.
The GUI is built with XML resources (all files neccessary to
compile it are included in source distribution; but you will need
CVS version to _edit_ resources).
Features:
* User friendly way of editing entries. You can easily navigate in
large catalogs, easily enter or modify entries (fuzzy flag is
automatically removed if you change translation, you can copy
original string to translation by pressing Alt-I)
* Whitespaces highlighting
* Fuzzy and untranslated records highlighting. Furthermore, untranslated
and fuzzy translations are displayed at the top of the list
* Automatic compilation of .mo files (optional)
* Automatic headers update
* References browser lets you see where in what context the string is used
* You can use poEdit to scan source code for translatable strings
For screenshots and downloads, see http://www.volny.cz/v.slavik/poedit/
Source code and precompiled binaries for Linux and Windows are
available.
Vaclav
Wow, great! I've almost forgotten that you were writing it, but
waiting for it was worth it :-) I've tried it and I liked it a lot
(I don't know if it's better than using vi(m) for the initial
translations, but it is surely helpful to fix the small errors/add
missing translations later)!
Of course, what would be a message from me be without some remarks...
> Features:
> * User friendly way of editing entries. You can easily navigate in
> large catalogs, easily enter or modify entries (fuzzy flag is
> automatically removed if you change translation, you can copy
> original string to translation by pressing Alt-I)
I am missing "Search" dialog (with a checkbox "search in translated or
untranslated strings").
> * Fuzzy and untranslated records highlighting. Furthermore, untranslated
> and fuzzy translations are displayed at the top of the list
This is very nice.
> * References browser lets you see where in what context the string is used
Small buglet: when you right click on the item, the menu title is disabled
(I don't know if it's your or wxGTK bug). Another wish: line numbers in the
source file viewer. An entry to edit the file (with a configurable editor
as, apparently, not everybody likes vi ;-) would be nice. BTW, I don't know
which editor Robert uses in wxDesigner (Scintilla or not?) but the syntax
highlighting there is nice.
Another possible wxWin (but maybe not) bug is that after completing the
initial dialog I got the following (yes, I linked it against debug version
of wxWin):
Debug: Assert failed in file ../src/common/fileconf.cpp at line 1295.
I don't immediately see why would it happen...
And the very last one: you do something strange in docs/Makefile.am
to access the files in that directory when running zip. This plainly
doesn't work for me (it tries to create a file under '/' which fails...)
and IMHO you should replace the last line of Makefile.am with simply
the following:
cd $(srcdir) ; zip -9 -r $(top_builddir)/docs/poedit_help.htb gettext img *.html *.hhc *.hhp
After this change it builds without problems.
Thanks for poEdit once again!
VZ
> I finished coding of my student project, gettext (.po) catalogs editor.
Very nice! This should be in CVS, I think.
Robert
On Mon, 28 Aug 2000 22:03:59 +0200 (CEST) Vadim Zeitlin wrote:
> Wow, great! I've almost forgotten that you were writing it,
> but
Me too :) Then I had to remember it because it was school project
with set deadline.
> waiting for it was worth it :-) I've tried it and I liked it a lot
> (I don't know if it's better than using vi(m) for the initial
> translations, but it is surely helpful to fix the small errors/add
> missing translations later)!
Nice to hear it from you :)
> I am missing "Search" dialog (with a checkbox "search in translated or
> untranslated strings").
Ok.
> > * References browser lets you see where in what context the string is used
>
> Small buglet: when you right click on the item, the menu title is disabled
> (I don't know if it's your or wxGTK bug).
Actually, this was intended to be a feature. The top most item is
menu's label and it is disabled to prevent users from clicking on it.
> Another wish: line numbers in the
> source file viewer. An entry to edit the file (with a
> configurable editor
Ok.
> as, apparently, not everybody likes vi ;-) would be nice. BTW,
Ok.
> Debug: Assert failed in file ../src/common/fileconf.cpp at line
> 1295.
I'll have a look at it (although it never happened here, probably
because I already had ~/.poedit).
> And the very last one: you do something strange in docs/Makefile.am
> to access the files in that directory when running zip. This plainly
> doesn't work for me (it tries to create a file under '/' which fails...)
> and IMHO you should replace the last line of Makefile.am with simply
> the following:
>
> cd $(srcdir) ; zip -9 -r
> $(top_builddir)/docs/poedit_help.htb gettext img *.html *.hhc *.hhp
Thanks, I'll do it your way.
thanks for feedback,
Vasek
I think it is just another wxApp, not directly related to
wxWindows, therefore it does not belong into CVS. (?)
VS
I think it depends on
(1) the personal preference of the author
(2) whether we consider an application part of the overall wxWindows toolkit
(3) whether people may wish to contribute mods (e.g. ports to other
platforms, enhancements)
I think poEdit is in the same arena as Dialog Editor and Tex2RTF in
importance, and therefore by that argument should be in CVS. On the other
hand, were there to be many tools to assist in wxWin app development, we
might find CVS getting rather overloaded... personally I think it would be
nice to see poEdit in CVS.
Regards,
Julian
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728763
True. IMHO (3) is the most important. It makes sense to put something into
the cvs as long as there is going to be two or more persons working on the
code - so the real question is whether this is the case here.
OTOH, it might be a good policy to just put everything into the cvs
as gnome.org does - in fact, I think I'd prefer this as it always gives
access to the latest version, but then we'd need a lot of disk space
(and where are we with it now?).
So my opinion is that we should wait until cvs moves (once again...)
and see how much disk space are we going to have first. But I do think
that we should have a copy of everything at the FTP site (i.e. at
Remstar).
Thanks,
VZ
Ehm, have you tried using wxMenu::SetTitle()? :-)
Regards,
VZ
Nothing prevents them from sending patches to me :)
> I think poEdit is in the same arena as Dialog Editor and Tex2RTF in
> importance, and therefore by that argument should be in CVS. On
> the other
In importance yes. In relation to wxWin, poEdit is similar to
Tex2RTF but not to Dialog Editor...
> hand, were there to be many tools to assist in wxWin app development, we
> might find CVS getting rather overloaded...
Exactly.
> personally I think it would be
> nice to see poEdit in CVS.
Personally, I'm not against -- I just don't think it belongs
there. But of course I can put it into utils/ much the same way
wxStudio was (i.e. with it's own files hierarchy and build
system independent of wxWin's one).
VS
This is the first time I write to the list although I've been around for a
while, just reading!
I don't know if it's my fault but I've found that poEdit doesn't handle
multi-line strings at all. For instance, poEdit doesn't load the following
entry at all:
(from Gnumeric...)
msgid ""
"Invalid CSV file - \n"
"unexpected end of line at line %d"
msgstr ""
And then, when saving the file it doesn't update it, the file is
overwritten. So, we lost the string!!
When translating, '\n' have to be entered by hand. Perhaps they could be
added automatically when pressing Enter, couldn't they?
In case it helps, I've tested poEdit in it's Windows version, having
installed it from the binaries package.
Regards,
Josep
-----Mensaje original-----
De: Vaclav Slavik <v.sl...@volny.cz>
Para: wx-u...@wxwindows.org <wx-u...@wxwindows.org>
Fecha: miércoles 30 de agosto de 2000 2:44
Asunto: Re: [wx-users] Announce: poEdit, language catalogs editor
(sorry, I got this mail corrupted)
> Hi all!This is the first time I write to the list although I've been
> around for awhile, just reading!I don't know if it's my fault but I've
> found that poEdit doesn't handlemulti-line strings at all. For
> instance, poEdit doesn't load the following entry at all:(from
> Gnumeric...)
>
> msgid ""
> "Invalid CSV file - \n"
> "unexpected end of line at
> line %d"
> msgstr ""
Are you sure this is valid entry? I thought that only
msgid ""
"Invalid CSV file - \n"
"unexpected end of line at "
"line %d"
msgstr ""
is correct. But gettext documentation is very vague on this.
Anyway, what kind of tool produced that Gnumeric entry? xgettext
from _GNU_ gettext shouldn't do that.
> And then, when saving the file it doesn't update it,
> the file isoverwritten. So, we lost the string!!When translating, '\n'
> have to be entered by hand. Perhaps they could beadded
> automatically
This is on purpose -- that's how gettext works. In C or C++, you
must enter '\n' as well, it is natural that you have to translate
"something\n" as "...\n".
Having multiline text control would eliminate arrow keys
navigation in the catalog. But I plan to add "long strings" mode
that would do exactly that.
bye,
Vasek
Not implemented by wxGTK :(
The entry I sent from Grnumeric was the following:
msgid ""
"Invalid CSV file - \n"
"unexpected end of line at line %d"
msgstr ""
Each line is quoted.
But I couldn't load this kind of entry. poEdit seems only to load entries
like:
msgid "Hello world!"
I think that it could also be fine that the program could save the file
without rewriting it all (as an option). I mean that it could save the file
without overwriting anything that it couldn't parse. It could be useful in
case .po format changes or someone wants to use your program in a custom
file format.
Best regards,
Josep
-----Mensaje original-----
De: Vaclav Slavik <v.sl...@volny.cz>
Para: wxusers <wx-u...@wxwindows.org>
Fecha: viernes 1 de septiembre de 2000 2:55
Asunto: RE: [wx-users] Announce: poEdit, language catalogs editor
Oh. I believe it handles such case correctly -- except that it
abviously doesn't if you have trouble with it :( Ok, I will look
at it asap and let you know.
> I think that it could also be fine that the program could save the file
> without rewriting it all (as an option). I mean that it could save the file
> without overwriting anything that it couldn't parse. It could
> be useful in
Interesting idea. I've put it to my TODO list.
> case .po format changes or someone wants to use your program in a custom
> file format.
Well, if .po changed, everybody would have problems :)
Regards,
Vaclav