Extracting some more string from Quanta data files

Andras Mantia amantia at kde.org
Sat Nov 22 15:17:18 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

 The translators have realized that some strings in Quanta cannot be
translated as they are not even extracted. Those string are in the "user
definable" toolbar and action files shipped with Quanta. They are XML files,
but the toolbar and action file is packed together into a .toolbar.tgz file.
The toolbar file describes the GUI for a toolbar (toolbar name, actions and
separators on it), it's a little bit extended version of the standard XML
GUI. The only addition is a "tabname" attribute to the ToolBar tag, but that
is always the same as the text between <text></text>. This means that
extractrc extracts everything from toolbar files without problem. The actions
file is a little more complicated. The extracted texts should be:
1. Text between <tooltip></tooltip>. This is already done correctly
2. The "text" attribute of the "action" tags. This is not done, and I've tried
to look at the extractrc, but perl seems a very strange language for me...Can
it be updated so extracts also this attribute?

Further more there is a need to first temporary unpack the .tgz file and
extract the strings from the temp files. This patch to the
quanta/quanta/Makefile.am may do the job:
- --- Makefile.am 2003-11-11 10:55:53.000000000 +0200
+++ Makefile.am.new     2003-11-22 17:16:47.000000000 +0200
@@ -40,12 +40,17 @@
        find $$dirs -maxdepth 1 -name "*.cpp" -print > files ;\
        find $$dirs -maxdepth 1 -name "*.cc" -print >> files ;\
        find $$dirs -maxdepth 1 -name "*.h" -print >> files ;\
+       toolbars=`find -name "*.toolbar.tgz"`;\
+       for toolbar in $toolbars; do \
+        tar Oxfz $toolbar  >> toolbarfiles; \
+       done
        $(EXTRACTRC) `find $$dirs -maxdepth 1 -name "*.ui"` >> rc.cpp
        $(EXTRACTRC) `find $$dirs -maxdepth 1 -name "*.rc"` >> rc.cpp
        $(EXTRACTRC) `find $$dirs -maxdepth 1 -name "*.kmdr"` >> rc.cpp
        $(EXTRACTRC) data/chars >> rc.cpp
+       $(EXTRACTRC) toolbarfiles >> rc.cpp
        $(XGETTEXT) rc.cpp `cat files` -o $(podir)/quanta.pot
- -       rm -f files dirs
+       rm -f toolbarfiles files dirs

 KDE_ICON = quanta

Can somebody help me with the extratrc and review this patch and the idea?

Andras

- --
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/v33+TQdfac6L/08RAnpNAJoDmbFN8TSxymaYvaPgnXeN/cf5iACfY7Qx
AKwqTcLvla4kFCT/EoTYKLk=
=t8A3
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list