From: konrad Date: Fri, 14 Nov 2008 16:34:06 +0000 (+0000) Subject: make scan for translations in PHP more dynamic X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=6955533e2cab09da5a447d1cd540952f8d6ee748;p=konrad%2Fsmoke.git make scan for translations in PHP more dynamic TODO: automatically call the script git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@182 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/src/genphpscan.sh b/src/genphpscan.sh new file mode 100755 index 0000000..4ed5130 --- /dev/null +++ b/src/genphpscan.sh @@ -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 index 0000000..97a3c8f --- /dev/null +++ b/src/phpscan.pri @@ -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 \ diff --git a/src/smoke.pro b/src/smoke.pro index c66368c..5955bd1 100644 --- a/src/smoke.pro +++ b/src/smoke.pro @@ -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