|
Stud.IP
3.2 Revision
|
Functions | |
| should_skip_file ($filename, $realfile) | |
| extract_strings ($file) | |
| find_strings_in_dir ($directory, $base=null) | |
Variables | |
| $occurences = find_strings_in_dir(realpath(__DIR__ . '/..')) | |
| $hashes = array() | |
| foreach( $occurences as $file=> $strings)( $strings as $string)($string, "'") ?>')<? endforeach;?><? endforeach;?> | $translations = $plugin->utf8EncodeArray($translations) |
| $view = ob_get_clean() | |
| extract_strings | ( | $file | ) |
Extract the actual text strings from a file. This will only detect single line text strings. Multi line strings are just a hassle to handle in js anyways.
| String | $file | Filename to extract text strings from |

| find_strings_in_dir | ( | $directory, | |
$base = null |
|||
| ) |
Recursively find text strings in files in the given directory. This skips invalid files.
| String | $directory | Directory to search files in |
| mixed | $base | Optional base directory to strip from file names, will default to the initial passed directory. |

| should_skip_file | ( | $filename, | |
| $realfile | |||
| ) |
Exports all strings from js into app/views/localizations/show.php so they can be translated as well.
| String | $filename | Adjusted filename (stripped to path inside trunk) |
| String | $realfile | Actual file name (needed for mime type detection) |

| $hashes = array() |
| $occurences = find_strings_in_dir(realpath(__DIR__ . '/..')) |
| foreach($occurences as $file => $strings) ($strings as $string) ( $string, "'") ?>')<? endforeach; ?><? endforeach; ?> $translations = $plugin->utf8EncodeArray($translations) |
| $view = ob_get_clean() |