\TransvisionConsistency

Consistency class

Functions used to analyze translation consistency

Summary

Methods
Properties
Constants
findDuplicates()
filterStrings()
filterComponents()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

findDuplicates()

findDuplicates(array  $strings_array) : array

Find duplicated strings (strings with the same text, ignoring case).

Parameters

array $strings_array

Array of strings in the form string_id => string_value

Returns

array —

Array of duplicated strings, same format as the input array

filterStrings()

filterStrings(array  $strings_array,   $repo) : array

Filter out strings that should not be evaluted for consistency.

Parameters

array $strings_array

Array of strings in the form string_id => string_value

$repo

Returns

array —

Array of filtered strings, with known false positives removed

filterComponents()

filterComponents(array  $strings_array, array  $components) : array

Filter out strings that belong to a group of components

Parameters

array $strings_array

Array of strings in the form string_id => string_value

array $components

Array of component names

Returns

array —

Array of filtered strings, with strings belonging to requested components removed