3
# Run this script from within its own directory
7
en_GB_re = re.compile( "\\.en\\.properties" );
10
en_REVERSECAPS_files = []
12
i18n_dir = "../../src/resources/i18n"
14
for fl in os.listdir( i18n_dir ):
15
if en_GB_re.search( fl ):
16
en_GB_files.append( file( i18n_dir + "/" + fl, 'r' ) )
17
en_REVERSECAPS_files.append( file( i18n_dir + "/" + fl.replace(
18
".en.", ".en_RC." ), 'w' ) )
20
for i in range( len( en_GB_files ) ):
22
for line in en_GB_files[i].readlines():
24
split_line = line.split( '=', 1 )
26
if isinstance( split_line, list ) and len( split_line ) == 2:
27
new_line = "%s=%s" % ( split_line[0], split_line[1].swapcase() )
31
new_line = line.swapcase()
33
en_REVERSECAPS_files[i].write( new_line )
35
en_REVERSECAPS_files[i].close()
36
en_GB_files[i].close()