# HG changeset patch # User Wuzzy # Date 1545421708 -3600 # Node ID 34fd1f32f4407de6d24eca0b0760b0264ff0b479 # Parent 8db03d9bc6e980ea13c2eceb58d842a4769f42db Localization: Also collect first line of credits.csv diff -r 8db03d9bc6e9 -r 34fd1f32f440 QTfrontend/CMakeLists.txt --- a/QTfrontend/CMakeLists.txt Fri Dec 21 20:31:21 2018 +0100 +++ b/QTfrontend/CMakeLists.txt Fri Dec 21 20:48:28 2018 +0100 @@ -49,7 +49,15 @@ # Credits localization file(GLOB CreditsCSV ${CMAKE_SOURCE_DIR}/QTfrontend/res/credits.csv) foreach(csvfile ${CreditsCSV}) + # Load credits.csv file(READ ${csvfile} csv) + + # Match first line of CSV file + string(REGEX MATCH "(E|S|U),\"[^\n\"]+\"" loc_top ${csv}) + string(REGEX REPLACE "(E|S|U),\"([^\n\"]+)\"" "\nQT_TRANSLATE_NOOP(\"credits\", \"\\2\")" s ${loc_top}) + list(APPEND csvlocs ${s}) + + # Match remaining lines of CSV file string(REGEX MATCHALL "\n(E|S|U),\"[^\n\"]+\"" locs ${csv}) foreach(str ${locs}) string(REGEX REPLACE "(E|S|U),\"([^\n\"]+)\"" "QT_TRANSLATE_NOOP(\"credits\", \"\\2\")" s ${str})