Skip to content
Permalink
Browse files

provide other-language hint if none available in selected lang; updat…

…es #1071
  • Loading branch information...
following5 committed Sep 5, 2017
1 parent ffce1e2 commit 1625ae9b5efdbe7a9949a587d613b97ba6e63df3
Showing with 23 additions and 0 deletions.
  1. +23 −0 htdocs/viewcache.php
@@ -199,6 +199,29 @@ function getChildWaypoints($cacheid)
}
}
// try to provide other-language hints if none is available for selected language
if (trim($rCache['hint']) == '') {
$rs = sql(
"SELECT
`hint`,
IFNULL(`stt`.`text`, `native_name`) AS `language`
FROM `cache_desc`
JOIN `languages`
ON `languages`.`short`=`cache_desc`.`language`
LEFT JOIN `sys_trans_text` `stt`
ON `stt`.`trans_id`=`languages`.`trans_id`
AND `stt`.`lang`='&2'
WHERE `cache_desc`.`cache_id`='&1'
AND TRIM(`hint`) != ''",
$cacheid,
$opt['template']['locale']
);
while ($r = sql_fetch_assoc($rs)) {
$rCache['hint'] .= '[' . $r['language'] . '] ' . $r['hint'] . '<br />';
}
sql_free_result($rs);
}
// format waylength
if ($rCache['waylength'] < 5) {
if (round($rCache['waylength'], 2) != round($rCache['waylength'], 1)) {

0 comments on commit 1625ae9

Please sign in to comment.
You can’t perform that action at this time.