Note: This implementation will be tested first for some time to see how to works out in practice over a longer period of time.
See #2782
<categoryname>module.development</categoryname>
<optiontype>boolean</optiontype>
<defaultvalue>0</defaultvalue>
+ <enableoptions>log_missing_language_items</enableoptions>
</option>
<!-- general.page -->
<option name="page_title">
<selectoptions>ASC:wcf.global.sortOrder.ascending
DESC:wcf.global.sortOrder.descending</selectoptions>
</option>
+ <option name="log_missing_language_items">
+ <categoryname>module.development</categoryname>
+ <optiontype>boolean</optiontype>
+ <defaultvalue>0</defaultvalue>
+ </option>
</options>
</import>
<delete>
define('IMAGE_PROXY_ENABLE_PRUNE', 1);
define('SEARCH_ENABLE_PAGES', 1);
define('SEARCH_ENABLE_ARTICLES', 1);
+define('LOG_MISSING_LANGUAGE_ITEMS', 0);
return '';
}
+ if (LOG_MISSING_LANGUAGE_ITEMS && preg_match('~^([a-zA-Z0-9-_]+\.)+[a-zA-Z0-9-_]+$~', $item)) {
+ $logFile = WCF_DIR . 'log/missingLanguageItems.txt';
+ \wcf\functions\exception\logThrowable(
+ new \Exception("Missing language item '{$item}'."),
+ $logFile
+ );
+ }
+
// return plain input
return $item;
}
return WCF::getTPL()->fetchString($this->dynamicItems[$item], $variables);
}
+ if (LOG_MISSING_LANGUAGE_ITEMS && $staticItem === $item && preg_match('~^([a-zA-Z0-9-_]+\.)+[a-zA-Z0-9-_]+$~', $item)) {
+ $logFile = WCF_DIR . 'log/missingLanguageItems.txt';
+ \wcf\functions\exception\logThrowable(
+ new \Exception("Missing language item '{$item}'."),
+ $logFile
+ );
+ }
+
return $staticItem;
}
<item name="wcf.acp.option.search_enable_articles"><![CDATA[Artikel sind durchsuchbar]]></item>
<item name="wcf.acp.option.search_enable_pages"><![CDATA[Seiten sind durchsuchbar]]></item>
<item name="wcf.acp.option.message_sidebar_enable_articles"><![CDATA[Artikelanzahl der Autoren anzeigen]]></item>
+ <item name="wcf.acp.option.log_missing_language_items"><![CDATA[Fehlende Sprachvariablen protokollieren]]></item>
+ <item name="wcf.acp.option.log_missing_language_items.description"><![CDATA[Die fehlenden Sprachvariablen werden in der Datei <code>{'WCF_DIR'|constant}log/missingLanguageItems.txt</code> protokolliert.]]></item>
</category>
<category name="wcf.acp.customOption">
<item name="wcf.acp.customOption.list"><![CDATA[Eingabefelder]]></item>
<item name="wcf.acp.option.search_enable_articles"><![CDATA[Articles are searchable]]></item>
<item name="wcf.acp.option.search_enable_pages"><![CDATA[Pages are searchable]]></item>
<item name="wcf.acp.option.message_sidebar_enable_articles"><![CDATA[Display author’s article count]]></item>
+ <item name="wcf.acp.option.log_missing_language_items"><![CDATA[Log Missing Language Items]]></item>
+ <item name="wcf.acp.option.log_missing_language_items.description"><![CDATA[The missing language items are logged in the log file <code>{'WCF_DIR'|constant}log/missingLanguageItems.txt</code>.]]></item>
</category>
<category name="wcf.acp.customOption">
<item name="wcf.acp.customOption.list"><![CDATA[Option Fields]]></item>