CMake: Fix detection of language codes


The CMake code that detects the available languages from the existing
.ts files picked up qtfoo_untranslated.ts files and recognized this as
the "ed" language. That's not a valid language code.

Even worse, after "ninja ts-qtfoo-all", we would have created such a
qtfoo_ed.ts file and the next reconfiguration had detected the language
"ed" twice. This led to the attempt to create the same target
ts-qtfoo-ed twice, and CMake stopped with an error.

Fix this by adding a leading underscore to the regular expression that's
used to extract the language.

Change-Id: I6fc9b8acf7839fae47b6b7d738c1b08d87d307e7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
commit580aa8fafa67be47255cdec1ef087ed75c80e9e3
parent78bb17824c6dc44fa1130c1296ce1295e84f5f4e
authorJoerg Bornemann <joerg.bornemann@qt.io>
committerJoerg Bornemann <joerg.bornemann@qt.io>
commit timeFri, 22 Nov 2024 12:21:55 +0100