Changeset 01da323


Ignore:
Timestamp:
Jun 23, 2014 8:10:11 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
986de4c
Parents:
8b1abc08
Message:

Streaming: Bundle I2PSocketException messages for translation

Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • .tx/config

    r8b1abc08 r01da323  
    272272trans.zh_CN = core/java/src/gnu/getopt/MessagesBundle_zh.properties
    273273
     274[I2P.streaming]
     275source_file = apps/ministreaming/locale/messages_en.po
     276source_lang = en
     277
    274278[main]
    275279host = https://www.transifex.com
  • apps/ministreaming/java/build.xml

    r8b1abc08 r01da323  
    2020        </depend>
    2121    </target>
     22
    2223    <property name="javac.compilerargs" value="" />
     24    <property name="require.gettext" value="true" />
     25
     26    <condition property="no.bundle">
     27        <isfalse value="${require.gettext}" />
     28    </condition>
     29
    2330    <target name="compile" depends="depend">
    2431        <mkdir dir="./build" />
     
    6370    </target>
    6471
    65     <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
     72    <target name="jar" depends="compile, bundle, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
    6673        <!-- set if unset -->
    6774        <property name="workspace.changes.tr" value="" />
     
    9097        </condition>
    9198    </target>
     99   
     100    <target name="bundle" depends="compile" unless="no.bundle">
     101        <exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" >
     102            <env key="JAVA_HOME" value="${java.home}" />
     103            <arg value="./bundle-messages.sh" />
     104        </exec>
     105        <exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" >
     106            <arg value="./bundle-messages.sh" />
     107        </exec>
     108        <exec executable="sh" osfamily="windows" failifexecutionfails="false" >
     109            <arg value="./bundle-messages.sh" />
     110        </exec>
     111    </target>
     112
     113    <target name="poupdate" depends="builddep, compile">
     114        <!-- Update the messages_*.po files.  -->
     115        <exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="true" >
     116            <arg value="./bundle-messages.sh" />
     117            <arg value="-p" />
     118        </exec>
     119        <exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="true" >
     120            <arg value="./bundle-messages.sh" />
     121            <arg value="-p" />
     122        </exec>
     123        <exec executable="sh" osfamily="windows" failifexecutionfails="true" failonerror="true" >
     124            <arg value="./bundle-messages.sh" />
     125            <arg value="-p" />
     126        </exec>
     127    </target>
    92128
    93129    <target name="javadoc">
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java

    r8b1abc08 r01da323  
    110110
    111111            default:
    112                 return "Failure code: " + _status;
     112                // Translate this one here, can't do it later
     113                return _("Failure code") + ": " + _status;
    113114        }
    114115    }
     
    122123        if (s == null)
    123124            return null;
     125        return _(s);
     126    }
     127
     128    /**
     129     *  Translate
     130     */
     131    private static String _(String s) {
    124132        return Translate.getString(s, I2PAppContext.getGlobalContext(), BUNDLE_NAME);
    125133    }
  • build.xml

    r8b1abc08 r01da323  
    467467        <ant dir="apps/desktopgui" target="poupdate" />
    468468        <ant dir="installer/resources/locale" target="poupdate" />
     469        <ant dir="apps/ministreaming/" target="poupdate" />
    469470    </target>
    470471
  • tests/scripts/checkpo.sh

    r8b1abc08 r01da323  
    1717  apps/i2ptunnel/locale-proxy \
    1818  apps/i2psnark/locale \
     19  apps/ministreaming/locale \
    1920  apps/susidns/locale \
    2021  apps/susimail/locale \
  • tests/scripts/checkutf8.sh

    r8b1abc08 r01da323  
    2020  apps/i2ptunnel/locale-proxy \
    2121  apps/i2psnark/locale \
     22  apps/ministreaming/locale \
    2223  apps/susidns/locale \
    2324  apps/susimail/locale \
Note: See TracChangeset for help on using the changeset viewer.