summaryrefslogtreecommitdiff
path: root/muse2/find_translation_concatenation.sh
blob: 644944f1ed0ad13610a0afa24c3e7f4be42f7dab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# this script tries to find all "bad" code like
# tr("the file ") + your_file + tr(" could not be loaded!")
# you should replace it by:
# tr("the file %1 could not be loaded!").arg(your_file)
#
# this script is not perfect. it misses some "bad" things, and
# finds some "good" things.

{
find . -iname '*.cpp' -print0 | xargs -0 grep -E 'tr *\("[^"]*" *\) *\+';
find . -iname '*.cpp' -print0 | xargs -0 grep -E '\+ *tr *\("[^"]*" *\)';
} | sort | uniq