forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p' (head 4a63eba1606a8ba2448352876b4177d9e4c753a1)
to branch 'i2p.i2p.unittests' (head 051ea486db9f6f5a4327038827763f350369f932)
This commit is contained in:
@@ -30,7 +30,7 @@ if which find|grep -q -i windows ; then
|
||||
export PATH=.:/bin:/usr/local/bin:$PATH
|
||||
fi
|
||||
# Fast mode - update ondemond
|
||||
# set LG2 to the language you need in envrionment varibales to enable this
|
||||
# set LG2 to the language you need in environment variables to enable this
|
||||
|
||||
# add ../java/ so the refs will work in the po file
|
||||
JPATHS="../java/src"
|
||||
@@ -63,13 +63,13 @@ do
|
||||
echo "Updating the $i file from the tags..."
|
||||
# extract strings from java and jsp files, and update messages.po files
|
||||
# translate calls must be one of the forms:
|
||||
# _("foo")
|
||||
# _t("foo")
|
||||
# _x("foo")
|
||||
# To start a new translation, copy the header from an old translation to the new .po file,
|
||||
# then ant distclean poupdate.
|
||||
find $JPATHS -name *.java > $TMPFILE
|
||||
xgettext -f $TMPFILE -F -L java --from-code=UTF-8 --add-comments\
|
||||
--keyword=_ --keyword=_x \
|
||||
--keyword=_t --keyword=_x \
|
||||
-o ${i}t
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
|
@@ -124,7 +124,7 @@ public class I2PSocketException extends SocketException {
|
||||
|
||||
default:
|
||||
// Translate this one here, can't do it later
|
||||
return _("Failure code") + ": " + _status;
|
||||
return _t("Failure code") + ": " + _status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,13 +136,13 @@ public class I2PSocketException extends SocketException {
|
||||
String s = getMessage();
|
||||
if (s == null)
|
||||
return null;
|
||||
return _(s);
|
||||
return _t(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
private static String _(String s) {
|
||||
private static String _t(String s) {
|
||||
return Translate.getString(s, I2PAppContext.getGlobalContext(), BUNDLE_NAME);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user