summaryrefslogtreecommitdiff
path: root/utils/update-schema-translations.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utils/update-schema-translations.sh')
-rwxr-xr-xutils/update-schema-translations.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/utils/update-schema-translations.sh b/utils/update-schema-translations.sh
new file mode 100755
index 000000000..dff446506
--- /dev/null
+++ b/utils/update-schema-translations.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+BASENAME=`basename $0`
+TMPFILE="/tmp/$BASENAME-$$.tmp"
+
+cat schema/ttrss_schema_pgsql.sql | grep 'insert.*pref_name' | awk -F\' '{ print $8 }' > $TMPFILE
+cat schema/ttrss_schema_pgsql.sql | grep 'insert.*pref_name' | awk -F\' '{ print $6 }' >> $TMPFILE
+
+echo "<?php # This file has been generated at: " `date` > localized_schema.php
+echo >> localized_schema.php
+cat utils/localized_schema.txt >> localized_schema.php
+echo >> localized_schema.php
+
+cat $TMPFILE | grep -v '^$' | sed "s/.*/__('&');/" >> localized_schema.php
+
+echo "?>" >> localized_schema.php
+
+rm $TMPFILE