Skip to content

Commit

Permalink
constants optimize (openemr#5000)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller authored Mar 14, 2022
1 parent 09caca3 commit cd2484e
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 13 deletions.
8 changes: 8 additions & 0 deletions contrib/util/language_translations/collectConstants.pl
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@
next;
}

# skip \. Another rare usage of xl() function.
# Can put in manually if require.
if ($de eq "\\") {
print LOGFILE "MESSAGE: Special case character \\ skipped\n";
print LOGFILE $editvar2."\n";
next;
}

# skip if starts with d of date(), since
# this is used in calendar frequently
# for translation of variables returned
Expand Down
1 change: 1 addition & 0 deletions contrib/util/language_translations/filterDirectories.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ openemr/contrib/forms
openemr/.git
openemr/contrib/icd10
openemr/contrib/icd9
openemr/contrib/util/language_translations
openemr/vendor
openemr/public
openemr/images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ tring[,'r'[,
tring) Which with example
cfirst($array_his_alcohol[0])); ?>' ></td> <td><?php echo $this->listenerObject->z_
cfirst($this->listenerObject->z_
elf::MEDICATION_REQUEST_CATEGORY_COMMUNITY_TITLE), '
heda
rim($i
rim($row['
xiale lengte)
xiale lengte)'); INSERT INTO `lang_definitions` V
rrorConstants::
rrorConstants::M
rrorConstants::R
cwords($item['row_s
tring) { if (typeof top.i18next.t == 'function') { return top.i18next.t(
...
Expand Down
2 changes: 1 addition & 1 deletion interface/forms/eye_mag/php/taskman_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function process_tasks($task)
$send['DOC_link'] = "<a onclick=\"openNewForm('" . $GLOBALS['webroot'] . "/controller.php?document&view&patient_id=" . attr($task['PATIENT_ID']) . "&doc_id=" . attr($task['DOC_ID']) . "', 'Fax Report');\"
href=\"JavaScript:void(0);\"
title='" . xlt('Report was faxed to') . " " . attr($task['to_name']) . " @ " . attr($task['to_fax']) . " on " .
text($task['COMPLETED_DATE']) . ". " . xla(' Click to view.') . "'><i class='far fa-file-pdf fa-fw'></i></a>";
text($task['COMPLETED_DATE']) . ". " . xla('Click to view.') . "'><i class='far fa-file-pdf fa-fw'></i></a>";
//if we want a "resend" icon, add it here.
}

Expand Down
2 changes: 1 addition & 1 deletion interface/forms/gad7/new.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function create_q8(question, menue){
<table>
<tr>
<td>
<span class="text"><?php echo xlt('Being so restless that it\'s hard to sit still'); ?></span>
<span class="text"><?php echo xlt("Being so restless that it's hard to sit still"); ?></span>
<select name="restless_score" onchange="update_score(4, my_form.restless_score.value);">
<option selected value="undef" ><?php echo text($str_default); ?></option>
<option value="0"><?php echo text($str_not); ?></option>
Expand Down
2 changes: 1 addition & 1 deletion interface/language/csv/commit_csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

if (!$errmsg && !isset($_REQUEST['lang_id'])) {
$errmsg = xlt("No Language ID specified!");
$errmsg = xlt("No Language ID specified");
}

if (!isset($_REQUEST['preview'])) {
Expand Down
4 changes: 2 additions & 2 deletions library/globals.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4108,7 +4108,7 @@ function gblTimeZones()
xl('Visits by Item Report'),
'bool', // data type
'0', // default
xl('Visits by Item Report.')
xl('Visits by Item Report')
),

'gbl_menu_acct_trans' => array(
Expand Down Expand Up @@ -4157,7 +4157,7 @@ function gblTimeZones()
xl('Service and Client Volume Report'),
'bool', // data type
'1', // default
xl('Service and client volume report')
xl('Service and Client Volume Report')
),
);

Expand Down
2 changes: 1 addition & 1 deletion src/Billing/BillingProcessor/Tasks/GeneratorHCFA_PDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function validateAndClear(BillingClaim $claim)
'hcfa'
);

$this->printToScreen(xl("Successfully marked claim") . ": " . $claim->getId() . xl(" as billed"));
$this->printToScreen(xl("Successfully marked claim") . ": " . $claim->getId() . " " . xl("as billed"));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/RestControllers/SMART/SMARTAuthorizationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function patientSelectConfirm()
if (!isset($user_uuid)) {
$this->logger->error("SMARTAuthorizationController->patientSelect() Unauthorized call, user has not authenticated");
http_response_code(401);
die(xlt('Invalid request'));
die(xlt('Invalid Request'));
}

if (!CsrfUtils::verifyCsrfToken($_POST["csrf_token"], 'oauth2')) {
Expand Down Expand Up @@ -199,7 +199,7 @@ public function patientSelect()
if (empty($user_uuid)) {
$this->logger->error("SMARTAuthorizationController->patientSelect() Unauthorized call, user has not authenticated");
http_response_code(401);
die(xlt('Invalid request'));
die(xlt('Invalid Request'));
}

$hasMore = false;
Expand Down
6 changes: 3 additions & 3 deletions src/Services/PatientService.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public function getAll($search = array(), $isAndCondition = true, $puuidBind = n

public function search($search, $isAndCondition = true)
{
$sql = "SELECT
$sql = "SELECT
patient_data.*
,patient_history_type_key
,previous_name_first
Expand All @@ -353,7 +353,7 @@ public function search($search, $isAndCondition = true)
,previous_name_enddate
FROM patient_data
LEFT JOIN (
SELECT
SELECT
pid AS patient_history_pid
,history_type_key AS patient_history_type_key
,previous_name_prefix
Expand Down Expand Up @@ -776,7 +776,7 @@ private function parseSuffixForPatientRecord($patientRecord)
private function getPatientSuffixKeys()
{
if (!isset($this->patientSuffixKeys)) {
$this->patientSuffixKeys = array(xl('Jr.'), xl(' Jr'), xl('Sr.'), xl(' Sr'), xl('II'), xl('III'), xl('IV'));
$this->patientSuffixKeys = array(xl('Jr.'), ' ' . xl('Jr'), xl('Sr.'), ' ' . xl('Sr'), xl('II{{patient suffix}}'), xl('III{{patient suffix}}'), xl('IV{{patient suffix}}'));
}
return $this->patientSuffixKeys;
}
Expand Down

0 comments on commit cd2484e

Please sign in to comment.