equal
deleted
inserted
replaced
47 |
47 |
48 |
48 |
49 # Credits localization |
49 # Credits localization |
50 file(GLOB CreditsCSV ${CMAKE_SOURCE_DIR}/QTfrontend/res/credits.csv) |
50 file(GLOB CreditsCSV ${CMAKE_SOURCE_DIR}/QTfrontend/res/credits.csv) |
51 foreach(csvfile ${CreditsCSV}) |
51 foreach(csvfile ${CreditsCSV}) |
|
52 # Load credits.csv |
52 file(READ ${csvfile} csv) |
53 file(READ ${csvfile} csv) |
|
54 |
|
55 # Match first line of CSV file |
|
56 string(REGEX MATCH "(E|S|U),\"[^\n\"]+\"" loc_top ${csv}) |
|
57 string(REGEX REPLACE "(E|S|U),\"([^\n\"]+)\"" "\nQT_TRANSLATE_NOOP(\"credits\", \"\\2\")" s ${loc_top}) |
|
58 list(APPEND csvlocs ${s}) |
|
59 |
|
60 # Match remaining lines of CSV file |
53 string(REGEX MATCHALL "\n(E|S|U),\"[^\n\"]+\"" locs ${csv}) |
61 string(REGEX MATCHALL "\n(E|S|U),\"[^\n\"]+\"" locs ${csv}) |
54 foreach(str ${locs}) |
62 foreach(str ${locs}) |
55 string(REGEX REPLACE "(E|S|U),\"([^\n\"]+)\"" "QT_TRANSLATE_NOOP(\"credits\", \"\\2\")" s ${str}) |
63 string(REGEX REPLACE "(E|S|U),\"([^\n\"]+)\"" "QT_TRANSLATE_NOOP(\"credits\", \"\\2\")" s ${str}) |
56 list(APPEND csvlocs ${s}) |
64 list(APPEND csvlocs ${s}) |
57 endforeach(str) |
65 endforeach(str) |