Created
July 5, 2015 07:12
-
-
Save hachy/10da751d0578ccfbc884 to your computer and use it in GitHub Desktop.
android values/strings.xml generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_name = 'kokumei_0.txt' | |
quiz_list_name = 'kokumei_0' | |
kanji = [] | |
yomi = [] | |
File.open(file_name).each_line do |line| | |
a, b = line.split(' ') | |
kanji << a | |
yomi << b | |
end | |
p kanji | |
p yomi | |
kanji.each_with_index do |k, i, name: quiz_list_name| | |
puts "<string name=\"#{name}_kanji_#{i}\" translatable=\"false\">#{k}</string>" | |
end | |
yomi.each_with_index do |y, i, name: quiz_list_name | | |
puts "<string name=\"#{name}_yomi_#{i}\" translatable=\"false\">#{y}</string>" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
加奈陀 カナダ | |
墨西哥 メキシコ | |
亜爾然丁 アルゼンチン | |
伯剌西爾 ブラジル | |
智利 チリ | |
秘露 ペルー | |
諾威 ノルウェー | |
芬蘭 フィンランド | |
瑞典 スウェーデン | |
瑞西 スイス | |
独国 ドイツ | |
仏蘭西 フランス | |
西班牙 スペイン | |
伊太利 イタリア | |
露西亜 ロシア | |
土耳古 トルコ | |
印度 インド | |
新嘉坡 シンガポール | |
泰国 タイ | |
越南 ベトナム | |
馬来西亜 マレーシア | |
濠太剌利 オーストラリア | |
新西蘭 ニュージーランド | |
埃及 エジプト |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment