robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
1086016477
master
1string ( TOUPPER ${ INPUT_ENC } upperInputEnc ) 2string ( TOLOWER ${ INPUT_ENC } lowerInputEnc ) 3get_filename_component ( inputName ${ INPUT_FILE } NAME ) 4execute_process ( 5COMMAND ${ ICONV_PRG } -f ${ INPUT_ENC } -t ${ OUTPUT_ENC } ${ INPUT_FILE } 6OUTPUT_VARIABLE trans 7ERROR_VARIABLE err 8RESULT_VARIABLE res ) 9if ( res) 10message ( FATAL_ERROR "iconv failed to run correctly: ${ err } " ) 11endif () 12 13string ( REPLACE "charset= ${ lowerInputEnc } " "charset= ${ OUTPUT_CHARSET } " 14trans " ${ trans } " ) 15string ( REPLACE "charset= ${ upperInputEnc } " "charset= ${ OUTPUT_CHARSET } " 16trans " ${ trans } " ) 17string ( REPLACE "# Original translations" 18"# Generated from ${ inputName } , DO NOT EDIT" 19trans " ${ trans } " ) 20 21file ( WRITE ${ OUTPUT_FILE } " ${ trans } " )