add array index as comment

This commit is contained in:
Eric House 2014-04-16 07:44:10 -07:00
parent be581e762e
commit 79dc66b3a7

View file

@ -104,15 +104,18 @@ public class %s {
""" """
fil.write( lines % name ) fil.write( lines % name )
for key in pairs.keys(): keys = pairs.keys()
fil.write( " R.string.%s,\n" % (key) ) for ii in range( len( keys ) ):
key = keys[ii]
fil.write( " /*%4d*/ R.string.%s,\n" % (ii, key) )
fil.write( " };\n\n" ) fil.write( " };\n\n" )
if "debug" == target: if "debug" == target:
fil.write( " static final String[] strs = {\n") fil.write( " static final String[] strs = {\n")
for key in pairs.keys(): for ii in range( len( keys ) ):
fil.write( " \"%s\",\n" % pairs[key]['text'] ) key = keys[ii]
fil.write( " /*%4d*/ \"%s\",\n" % (ii, pairs[key]['text']) )
fil.write( " };\n" ); fil.write( " };\n" );
func = " protected static void checkStrings( Context context ) {\n" func = " protected static void checkStrings( Context context ) {\n"