neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

ConvertPo.cmake (701B)


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