From 07fb0668629ec98aaf3a3a03adeaa316df6f8be3 Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Mon, 19 Dec 2005 17:08:13 +0000 Subject: [PATCH] fix some language translation bugs --- interface/billing/sl_eob_invoice.php | 10 +++++----- library/translation.inc.php | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/interface/billing/sl_eob_invoice.php b/interface/billing/sl_eob_invoice.php index ac6a25d3a..9a541e72d 100644 --- a/interface/billing/sl_eob_invoice.php +++ b/interface/billing/sl_eob_invoice.php @@ -171,7 +171,7 @@ } else { sqlQuery($query); } - $info_msg = xl("Encounter ".$encounter . xl("is ready for re-billing."); + $info_msg = xl("Encounter ") . $encounter . xl(" is ready for re-billing."); return; } @@ -214,10 +214,10 @@ echo xl("Call to addForm() goes here.
")."\n"; } else { $encounter_id = idSqlStatement($query); - if (! $encounter_id) die(xl("Insert failed: ".$query); + if (! $encounter_id) die(xl("Insert failed: " . $query)); addForm($new_encounter, xl("New Patient Encounter"), $encounter_id, "newpatient", $pid, 1, $date_of_service); - $info_msg = xl("Encounter ").$new_encounter . xl(" has been created. "); + $info_msg = xl("Encounter ") . $new_encounter . xl(" has been created. "); } // For each invoice line item with a billing code we will insert @@ -547,7 +547,7 @@ function validate(f) { "customer.id = ar.customer_id and employee.id = ar.employee_id"); if ($sl_err) die($sl_err); $arrow = SLGetRow($arres, 0); - if (! $arrow) die(xl("There is no match for invoice id = ",).$trans_id); + if (! $arrow) die(xl("There is no match for invoice id = ") . $trans_id); // Determine the date of service. An 8-digit encounter number is // presumed to be a date of service imported during conversion. @@ -632,7 +632,7 @@ function validate(f) { - + diff --git a/library/translation.inc.php b/library/translation.inc.php index d10ee6437..106c5a3a4 100644 --- a/library/translation.inc.php +++ b/library/translation.inc.php @@ -4,7 +4,10 @@ function xl($constant,$mode='r',$prepend='',$append='') { $lang_id=LANGUAGE; - $sql="SELECT * FROM lang_definitions JOIN lang_constants ON lang_definitions.cons_id = lang_constants.cons_id WHERE lang_id='$lang_id' AND constant_name = '$constant' LIMIT 1"; + $sql="SELECT * FROM lang_definitions JOIN lang_constants ON " . + "lang_definitions.cons_id = lang_constants.cons_id WHERE " . + "lang_id='$lang_id' AND constant_name = '" . + addslashes($constant) . "' LIMIT 1"; $res=SqlStatement($sql); $row=SqlFetchArray($res); $string=$row['definition']; -- 2.11.4.GIT