|
...
|
...
|
@@ -195,6 +195,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
$texts = $dom->find("text");
|
|
|
|
$description = $dom->find("meta[name=description]",0);
|
|
|
|
$keywords = $dom->find("meta[name=keywords]",0);
|
|
|
|
$placeholders = $dom->find("[placeholder]");
|
|
|
|
// 组装需要翻译的内容 HTML内文案、meta description、meta keywords
|
|
|
|
$need_tran = [];
|
|
|
|
foreach ($texts as $k=>$text) {
|
|
...
|
...
|
@@ -217,6 +218,12 @@ class TranslateLogic extends BaseLogic |
|
|
|
$need_tran[] = htmlspecialchars_decode(html_entity_decode($string));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
foreach ($placeholders as $placeholder) {
|
|
|
|
$placeholderText = trim($placeholder->placeholder);
|
|
|
|
if ($placeholderText) {
|
|
|
|
$need_tran[] = $placeholderText;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$need_tran[] = $description ? $description->attr['content'] : '';
|
|
|
|
$need_tran[] = $keywords ? $keywords->attr['content'] : '';
|
|
|
|
$need_tran = array_values(array_unique($need_tran));
|
...
|
...
|
|