Skip to content
Permalink
Newer
Older
100644 30 lines (22 sloc) 816 Bytes
unknown unknown
Aug 28, 2015
1
// :name=Check Same Segment :description=Check for identical segments (case sensitive)
2
3
console.println("Check for identical segments (case sensitive).\n");
4
5
segment_count = 0;
6
7
files = project.projectFiles;
8
9
for (i in 0 ..< files.size())
10
{
11
fi = files[i];
12
13
console.println(fi.filePath);
14
for (j in 0 ..< fi.entries.size())
15
{
16
ste = fi.entries[j];
17
source = ste.getSrcText();
18
target = project.getTranslationInfo(ste) ? project.getTranslationInfo(ste).translation : null;
19
20
// if (target != null && source.charAt( source.length() - 1) != target.charAt( target.length() - 1))
21
if ( source == target )
22
{
23
console.println(ste.entryNum() + "\t" + source + "\t" + target);
24
segment_count++;
25
}
26
}
27
}
28
29
console.println("Segments found: " + segment_count);
30
You can’t perform that action at this time.