public function i18n_string_textgroup_default::update_check in Internationalization 7
Recheck strings after update
File
- i18n_string/
i18n_string.inc, line 1092 - API for internationalization strings
Class
- i18n_string_textgroup_default
- Textgroup handler for i18n_string API
Code
public function update_check() {
// Find strings in locales_source that have no data in i18n_string
$query = db_select('locales_source', 'l')
->fields('l')
->condition('l.textgroup', $this->textgroup);
$alias = $query
->leftJoin('i18n_string', 's', 'l.lid = s.lid');
$query
->isNull('s.lid');
foreach ($query
->execute()
->fetchAll() as $string) {
$i18nstring = $this
->build_string($string->context, $string->source);
$this
->save_string($i18nstring);
}
}