make scan for translations in PHP more dynamic
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Fri, 14 Nov 2008 16:34:06 +0000 (16:34 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Fri, 14 Nov 2008 16:34:06 +0000 (16:34 +0000)
TODO: automatically call the script

git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@182 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/genphpscan.sh [new file with mode: 0755]
src/phpscan.pri [new file with mode: 0644]
src/smoke.pro

diff --git a/src/genphpscan.sh b/src/genphpscan.sh
new file mode 100755 (executable)
index 0000000..4ed5130
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+P=phpscan.pri
+
+rm -f $P
+
+echo '#this is an automatically generated file' >$P
+echo '#DO NOT EDIT IT!' >>$P
+echo '#use genphpscan.sh to regenerate it!' >>$P
+echo  >>$P
+echo 'HEADERS += \' >>$P
+
+find ../www -name '*.php' -exec echo {} \\ \;  >>$P
+echo >>$P
+
+exit 0
diff --git a/src/phpscan.pri b/src/phpscan.pri
new file mode 100644 (file)
index 0000000..97a3c8f
--- /dev/null
@@ -0,0 +1,39 @@
+#this is an automatically generated file
+#DO NOT EDIT IT!
+#use genphpscan.sh to regenerate it!
+
+HEADERS += \
+../www/inc/db/db_mysql.php \
+../www/inc/db/db_scheme.php \
+../www/inc/db/db.php \
+../www/inc/loader_nonadmin.php \
+../www/inc/listing.php \
+../www/inc/machine/cauth_hash.php \
+../www/inc/machine/host.php \
+../www/inc/machine/cauth_mhash.php \
+../www/inc/machine/session.php \
+../www/inc/machine/template.php \
+../www/inc/machine/cauth_string.php \
+../www/inc/global_variables.php \
+../www/inc/loader.php \
+../www/inc/global_functions.php \
+../www/inc/rendering/event_listing.php \
+../www/inc/rendering/cart_listing.php \
+../www/inc/rendering/submit.php \
+../www/inc/rendering/order_listing.php \
+../www/inc/classes/random.php \
+../www/inc/classes/parser.php \
+../www/inc/classes/customer.php \
+../www/inc/classes/language_manager.php \
+../www/inc/classes/ticket.php \
+../www/inc/classes/event.php \
+../www/inc/classes/order.php \
+../www/inc/classes/config_manager.php \
+../www/inc/classes/cart.php \
+../www/inc/classes/room.php \
+../www/inc/classes/websession.php \
+../www/inc/classes/error.php \
+../www/admin.php \
+../www/config.php \
+../www/machine.php \
+../www/index.php \
index c66368c..5955bd1 100644 (file)
@@ -44,7 +44,6 @@ SOURCES = \
        orderwin.cpp \
        labeldlg.cpp
 
-#some PHP files are listed below to scan them for translatable items:
 HEADERS = \
        keygen.h \
        debug.h \
@@ -64,12 +63,11 @@ HEADERS = \
        odtrender.h \
        ticketrender.h \
        orderwin.h \
-       labeldlg.h \
-       ../www/machine.php \
-       ../www/inc/machine/session.php \
-       ../www/inc/machine/host.php \
-       ../www/inc/machine/template.php \
-       ../www/inc/classes/customer.php
+       labeldlg.h
+       
+#some PHP files are listed in this file to scan them for translatable items
+#use genphpscan.sh to regenerate it.
+include( phpscan.pri )
 
 RESOURCES += files.qrc