forked from I2P_Developers/i2p.www
merge of '447d847eb838367672bc21cfb5b2ff6b9984922e'
and '88a9eef5dd75416a1ccd8dba36ff97bc1c852638'
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
env
|
||||
pots
|
||||
\.pyc$
|
||||
\.pyo$
|
||||
~$
|
||||
|
@@ -1,11 +1,13 @@
|
||||
#!/bin/sh
|
||||
. ./etc/translation.vars
|
||||
|
||||
export TZ=UTC
|
||||
|
||||
if [ $# -ge 1 ]
|
||||
then
|
||||
TZ=UTC env/bin/pybabel compile -D $1 -d $TRANSDIR
|
||||
$PYBABEL compile -D $1 -d $TRANSDIR
|
||||
else
|
||||
for domain in $(ls $BABELCFG); do
|
||||
TZ=UTC env/bin/pybabel compile -D $domain -d $TRANSDIR
|
||||
$PYBABEL compile -D $domain -d $TRANSDIR
|
||||
done
|
||||
fi
|
||||
|
@@ -1,3 +1,4 @@
|
||||
pytz>=2012
|
||||
Flask==0.9
|
||||
Flask-Babel==0.8
|
||||
Flask-Cache==0.10.1
|
||||
|
@@ -4,3 +4,12 @@ BABELCFG=etc/babel.cfg
|
||||
POTDIR=pots
|
||||
PROJDIR=i2p2www
|
||||
TRANSDIR=$PROJDIR/translations
|
||||
|
||||
if [ -x env/bin/pybabel ]; then
|
||||
PYBABEL=env/bin/pybabel
|
||||
elif [ $(which pybabel) ]; then
|
||||
PYBABEL=$(which pybabel)
|
||||
else
|
||||
echo "ERROR: pybabel was not found. Please run setup_venv.sh" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
@@ -1,13 +1,19 @@
|
||||
#!/bin/sh
|
||||
. ./etc/translation.vars
|
||||
|
||||
export TZ=UTC
|
||||
|
||||
if [ ! -e $POTDIR ]; then
|
||||
mkdir $POTDIR
|
||||
fi
|
||||
|
||||
# By setting the PYTHONPATH here we can help pybabel find 'our' highlighting
|
||||
# extension and we can use any pybabel
|
||||
export PYTHONPATH=i2p2www:$PYTHONPATH
|
||||
|
||||
if [ $# -ge 1 ]
|
||||
then
|
||||
TZ=UTC ./pybabel extract --msgid-bugs-address="http://trac.i2p2.de" \
|
||||
$PYBABEL extract --msgid-bugs-address="http://trac.i2p2.de" \
|
||||
--project=$PROJECT \
|
||||
--version=$VERSION \
|
||||
-F $BABELCFG/$1 \
|
||||
@@ -17,7 +23,7 @@ else
|
||||
if [ -e $POTDIR/$domain.pot ]; then
|
||||
mv $POTDIR/$domain.pot $POTDIR/$domain.pot.old
|
||||
fi
|
||||
TZ=UTC ./pybabel extract --msgid-bugs-address="http://trac.i2p2.de" \
|
||||
$PYBABEL extract --msgid-bugs-address="http://trac.i2p2.de" \
|
||||
--project=$PROJECT \
|
||||
--version=$VERSION \
|
||||
-F $BABELCFG/$domain \
|
||||
|
@@ -1,6 +1,12 @@
|
||||
from flask import Flask, request, g, redirect, url_for, abort, render_template, send_from_directory, safe_join
|
||||
from flaskext.babel import Babel
|
||||
from flask.ext.cache import Cache
|
||||
try:
|
||||
from flaskext.babel import Babel
|
||||
except ImportError:
|
||||
from flask_babel import Babel
|
||||
try:
|
||||
from flask.ext.cache import Cache
|
||||
except ImportError:
|
||||
from flask_cache import Cache
|
||||
from docutils.core import publish_parts
|
||||
import os.path
|
||||
import os
|
||||
|
@@ -1210,8 +1210,7 @@ msgid ""
|
||||
"<a href=\"%(german)s\">German translation</a>"
|
||||
msgstr ""
|
||||
"<a href=\"%(link)s\">zzz entrevistado por gulli.com</a>\n"
|
||||
"Marzo de 2009\n"
|
||||
"<a href=\"%(german)s\">Traducción al alemán</a>"
|
||||
"href=\"%(german)s\">traducción en alemán</a>"
|
||||
|
||||
#: i2p2www/pages/site/about/media.html:202
|
||||
#, python-format
|
||||
|
@@ -12854,7 +12854,7 @@ msgid ""
|
||||
"It is hosted on <a href=\"%(pybit)s\">%(pybit)s</a> <!-- TODO: expand -->"
|
||||
msgstr ""
|
||||
"PyBit es un cliente Bittorrent escrito en python. Se aloja en <a "
|
||||
"href=\"http://%(pebcache)s/\">http://%(pebcache)s/</a> <!-- TODO: "
|
||||
"href=\"http://%(pybit)s/\">http://%(pybit)s/</a> <!-- TODO: "
|
||||
"desarrollar -->"
|
||||
|
||||
#: i2p2www/pages/site/docs/how/tech-intro.html:1015
|
||||
|
@@ -2316,7 +2316,7 @@ msgstr ""
|
||||
"Si considera todas las eepsites que se han creado, si, la mayoría no "
|
||||
"funcionan. La gente y las eepsites van y vienen. Una buena forma de "
|
||||
"comenzar con I2P es mirar la lista de eepsites que funcionan actualmente."
|
||||
" <a href=\\\"http://%(perv)s/stats.cgi\\\">%(perv)s</a> informa qué "
|
||||
" <a href=\\\"http://%(eepstatus)s/\\\">%(eepstatus)s</a> informa qué "
|
||||
"páginas están activas."
|
||||
|
||||
#: i2p2www/pages/site/faq.html:385
|
||||
|
@@ -2313,7 +2313,7 @@ msgstr ""
|
||||
"Les gens et les eepsites vont et viennent.\n"
|
||||
"Une bonne façon de se lancer dans I2P est de vérifier une liste de "
|
||||
"eepsites qui sont actuellement en place.\n"
|
||||
"<a href=\"http://%(perv)s/stats.cgi\">%(perv)s</a> trace les eepsites "
|
||||
"<a href=\"http://%(eepstatus)s\">%(eepstatus)s</a> trace les eepsites "
|
||||
"actifs."
|
||||
|
||||
#: i2p2www/pages/site/faq.html:385
|
||||
|
@@ -1,10 +1,12 @@
|
||||
#!/bin/sh
|
||||
. ./etc/translation.vars
|
||||
|
||||
export TZ=UTC
|
||||
|
||||
if [ $# -ge 1 ]
|
||||
then
|
||||
for domain in $(ls $BABELCFG); do
|
||||
TZ=UTC env/bin/pybabel init -D $domain -i $POTDIR/$domain.pot -d $TRANSDIR -l $1
|
||||
$PYBABEL init -D $domain -i $POTDIR/$domain.pot -d $TRANSDIR -l $1
|
||||
done
|
||||
else
|
||||
echo "Usage: ./init-new-po.sh lang"
|
||||
|
10
pybabel
10
pybabel
@@ -1,10 +0,0 @@
|
||||
#!env/bin/python
|
||||
# EASY-INSTALL-ENTRY-SCRIPT: 'Babel==0.9.6','console_scripts','pybabel'
|
||||
__requires__ = 'Babel==0.9.6'
|
||||
import sys
|
||||
from pkg_resources import load_entry_point
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(
|
||||
load_entry_point('Babel==0.9.6', 'console_scripts', 'pybabel')()
|
||||
)
|
@@ -4,6 +4,7 @@ set -e
|
||||
|
||||
if [ ! $venv ]; then
|
||||
echo "ERROR: virtualenv not found!" >&2
|
||||
exit 1
|
||||
else
|
||||
if [ ! -d $venv_dir ] ; then
|
||||
$venv --distribute $venv_dir
|
||||
@@ -12,5 +13,5 @@ else
|
||||
. $venv_dir/bin/activate
|
||||
pip install -r etc/reqs.txt
|
||||
# Apply multi-domain patch to Flask-Babel
|
||||
patch -p0 <etc/multi-domain.patch
|
||||
patch -p0 -N -r - <etc/multi-domain.patch
|
||||
fi
|
||||
|
@@ -1,18 +1,15 @@
|
||||
#!/bin/sh
|
||||
TMP=tmp
|
||||
TMP=$(mktemp XXXXXXXXXX)
|
||||
trap 'rm -f $TMP;exit' 0 1 2 15
|
||||
|
||||
mtn update 2>&1 | tee $TMP
|
||||
|
||||
cat $TMP | grep "^mtn: adding 'i2p2www/translations/\|^mtn: dropping 'i2p2www/translations/\|^mtn: updating 'i2p2www/translations/" >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if grep "^mtn: \(add\|dropp\|updat\)ing 'i2p2www/translations/" "$TMP" >/dev/null; then
|
||||
echo "Translations updated, compiling messages"
|
||||
./compile-messages-i2hq.sh
|
||||
fi
|
||||
|
||||
cat $TMP | grep "^mtn: updating 'i2p2www/.*\.py\|^mtn: updating 'i2p2www/.*/.*\.py" >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if grep "^mtn: updating 'i2p2www/.*\.py\|^mtn: updating 'i2p2www/.*/.*\.py" >/dev/null; then
|
||||
echo "Python files changed, restarting server"
|
||||
touch /tmp/2fcd2f17-c293-4f77-b4c9-9b266ba70daa
|
||||
fi
|
||||
|
||||
rm $TMP
|
||||
|
@@ -1,18 +1,15 @@
|
||||
#!/bin/sh
|
||||
TMP=tmp
|
||||
TMP=$(mktemp XXXXXXXXXX)
|
||||
trap 'rm -f $TMP;exit' 0 1 2 15
|
||||
|
||||
mtn update 2>&1 | tee $TMP
|
||||
|
||||
cat $TMP | grep "^mtn: adding 'i2p2www/translations/\|^mtn: dropping 'i2p2www/translations/\|^mtn: updating 'i2p2www/translations/" >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if grep "^mtn: \(add\|dropp\|updat\)ing 'i2p2www/translations/" "$TMP" >/dev/null ; then
|
||||
echo "Translations updated, compiling messages"
|
||||
./compile-messages.sh
|
||||
fi
|
||||
|
||||
cat $TMP | grep "^mtn: updating 'i2p2www/.*\.py\|^mtn: updating 'i2p2www/.*/.*\.py" >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if grep "^mtn: updating 'i2p2www/.*\.py\|^mtn: updating 'i2p2www/.*/.*\.py" "$TMP" >/dev/null ; then
|
||||
echo "Python files changed, restarting server"
|
||||
touch /tmp/2fcd2f17-c293-4f77-b4c9-9b266ba70daa
|
||||
fi
|
||||
|
||||
rm $TMP
|
||||
|
@@ -1,11 +1,12 @@
|
||||
#!/bin/sh
|
||||
. ./etc/translation.vars
|
||||
export TZ=UTC
|
||||
|
||||
if [ $# -ge 1 ]
|
||||
then
|
||||
TZ=UTC env/bin/pybabel update -D $1 -i $POTDIR/$1.pot -d $TRANSDIR
|
||||
$PYBABEL update -D $1 -i $POTDIR/$1.pot -d $TRANSDIR
|
||||
else
|
||||
for domain in $(ls $BABELCFG); do
|
||||
TZ=UTC env/bin/pybabel update -D $domain -i $POTDIR/$domain.pot -d $TRANSDIR
|
||||
$PYBABEL update -D $domain -i $POTDIR/$domain.pot -d $TRANSDIR
|
||||
done
|
||||
fi
|
||||
|
Reference in New Issue
Block a user