From 3550907d3d30ae624ae60a88015d5582bbf93c7e Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Tue, 6 Feb 2007 17:46:29 +0000 Subject: [PATCH] template language translations from Dr. Bosman's group --- library/plugins/function.xl.php | 55 +++++++++++++++++++++++ templates/document_categories/general_upload.html | 6 +-- templates/documents/general_list.html | 4 +- templates/documents/general_queue.html | 10 ++--- templates/documents/general_upload.html | 22 ++++----- templates/documents/general_view.html | 12 ++--- templates/hl7/general_parse.html | 4 +- templates/insurance_companies/general_edit.html | 20 ++++----- templates/insurance_companies/general_list.html | 8 ++-- templates/insurance_numbers/general_edit.html | 24 +++++----- templates/insurance_numbers/general_list.html | 12 ++--- templates/patient_finder/general_find.html | 8 ++-- templates/pharmacies/general_edit.html | 18 ++++---- templates/pharmacies/general_list.html | 8 ++-- templates/practice_settings/general_list.html | 18 ++++---- templates/prescription/general_edit.html | 46 +++++++++++-------- templates/prescription/general_list.html | 16 +++---- templates/prescription/general_lookup.html | 8 ++-- templates/prescription/general_send.html | 8 ++-- templates/report/general_default.html | 46 +++++++++---------- templates/x12_partners/general_edit.html | 18 ++++---- templates/x12_partners/general_list.html | 12 ++--- 22 files changed, 224 insertions(+), 159 deletions(-) create mode 100644 library/plugins/function.xl.php diff --git a/library/plugins/function.xl.php b/library/plugins/function.xl.php new file mode 100644 index 000000000..8f7d36e5b --- /dev/null +++ b/library/plugins/function.xl.php @@ -0,0 +1,55 @@ + + * Name: xl
+ * Purpose: translate in OpenEMR - Smarty templates
+ * + * Examples: + * + * {xl t="some words"} + * + * @param array + * @param Smarty + */ + +function smarty_function_xl($params, &$smarty) +{ + if (empty($params['t'])) { + $smarty->trigger_error("xk: missing 't' parameter"); + return; + } else { + $translate = $params['t']; + } + + $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 = '" . + addslashes($constant) . "' LIMIT 1"; + + $res = SqlStatement($sql); + $row = SqlFetchArray($res); + + $string = $row['definition']; + + if ($string=='') { + $string="$translate"; + } + + echo $string; +} + +/* vim: set expandtab: */ + +?> diff --git a/templates/document_categories/general_upload.html b/templates/document_categories/general_upload.html index 7a6d9f19d..72aa4c759 100644 --- a/templates/document_categories/general_upload.html +++ b/templates/document_categories/general_upload.html @@ -21,20 +21,20 @@ a { - + - + {if !empty($file)} - + diff --git a/templates/documents/general_list.html b/templates/documents/general_list.html index c1ee01733..1c77e2300 100644 --- a/templates/documents/general_list.html +++ b/templates/documents/general_list.html @@ -28,8 +28,8 @@ a {
Upload Document{xl t="Upload Document"}


Upload Report{xl t='Upload Report'}
{$error}
- - + - + - + - + {foreach name=queue_list from=$queue_files item=file} @@ -30,7 +30,7 @@ {/foreach} - +
Document Categories
-    collapse all +
{xl t='Document Categories'}
+    {xl t='collapse all'}
diff --git a/templates/documents/general_queue.html b/templates/documents/general_queue.html index fe77fb7df..b284aad9f 100644 --- a/templates/documents/general_queue.html +++ b/templates/documents/general_queue.html @@ -6,13 +6,13 @@
 Name{xl t='Name'}  Date{xl t='Date'}  Patient{xl t='Patient'}  Category{xl t='Category'}


diff --git a/templates/documents/general_upload.html b/templates/documents/general_upload.html index b4dcb4e32..2ee06def3 100644 --- a/templates/documents/general_upload.html +++ b/templates/documents/general_upload.html @@ -2,36 +2,36 @@ - + - + - + {if !empty($file)} - + {/if} diff --git a/templates/documents/general_view.html b/templates/documents/general_view.html index 5cd2031b0..e5f66167f 100644 --- a/templates/documents/general_view.html +++ b/templates/documents/general_view.html @@ -18,7 +18,7 @@ {if $hl7_message_err} diff --git a/templates/insurance_companies/general_edit.html b/templates/insurance_companies/general_edit.html index f9e7fa722..92cad5548 100644 --- a/templates/insurance_companies/general_edit.html +++ b/templates/insurance_companies/general_edit.html @@ -4,50 +4,50 @@
NOTE: Uploading files with duplicate names will cause the files to be automatically renamed. For example 'file.jpg' will become 'file.jpg.1'. Filenames are considered unique per patient, not per category. {xl t="NOTE: Uploading files with duplicate names will cause the files to be automatically renamed. For example 'file.jpg' will become 'file.jpg.1'. Filenames are considered unique per patient, not per category. "}
Upload Document {if $category_name} to category '{$category_name}'{/if}{xl t="Upload Document"} {if $category_name} {xl t="to category"} '{$category_name}'{/if}


Upload Report{xl t='Upload Report'}
{$error}
- ID: {$file->get_id()}
- Patient: {$file->get_foreign_id()}
- URL: {$file->get_url()}
- Size: {$file->get_size()}
- Date: {$file->get_date()}
- MimeType: {$file->get_mimetype()}
- Revision: {$file->revision}
+ {xl t='ID'}: {$file->get_id()}
+ {xl t='Patient'}: {$file->get_foreign_id()}
+ {xl t='URL'}: {$file->get_url()}
+ {xl t='Size'}: {$file->get_size()}
+ {xl t='Date'}: {$file->get_date()}
+ {xl t='MimeType'}: {$file->get_mimetype()}
+ {xl t='Revision'}: {$file->revision}

- +
@@ -26,8 +26,8 @@


-

+

- + - + - + - + - + - + - + - + @@ -61,13 +61,13 @@ This is now deprecated use the newer x12 partner code instead --> - + - +
Name{xl t='Name'}
Attn{xl t='Attn'}
Address{xl t='Address'}
Address{xl t='Address'}
City, State Zip{xl t='City, State Zip'} ,
Phone{xl t='Phone'}
CMS ID{xl t='CMS ID'}
Payer Type{xl t='Payer Type'} {html_options name="freeb_type" options=$insurancecompany->freeb_type_array selected=$insurancecompany->get_freeb_type()}
Default X12 Partner{xl t='Default X12 Partner'} {html_options name="x12_default_partner_id" options=$x12_partners selected=$insurancecompany->get_x12_default_partner_id()}


diff --git a/templates/insurance_companies/general_list.html b/templates/insurance_companies/general_list.html index ff15b486f..62b8e6bde 100644 --- a/templates/insurance_companies/general_list.html +++ b/templates/insurance_companies/general_list.html @@ -1,8 +1,8 @@ - - - + + + {foreach from=$icompanies item=insurancecompany} @@ -12,7 +12,7 @@ {foreachelse} - + {/foreach}
NameCity, StateDefault X12 Partner{xl t='Name'}{xl t='City, State'}{xl t='Default X12 Partner'}
No Insurance Companies Found{xl t='No Insurance Companies Found'}
diff --git a/templates/insurance_numbers/general_edit.html b/templates/insurance_numbers/general_edit.html index 9f7cc0cd1..8d04e5f1c 100644 --- a/templates/insurance_numbers/general_edit.html +++ b/templates/insurance_numbers/general_edit.html @@ -7,7 +7,7 @@ - + @@ -19,25 +19,25 @@ - + - + - + {if $smarty.foreach.inums.last} - + @@ -45,7 +45,7 @@ {foreachelse} - + @@ -56,7 +56,7 @@ - + - + - + - + @@ -91,9 +91,9 @@ diff --git a/templates/insurance_numbers/general_list.html b/templates/insurance_numbers/general_list.html index a30ac8cf2..b8c688890 100644 --- a/templates/insurance_numbers/general_list.html +++ b/templates/insurance_numbers/general_list.html @@ -1,24 +1,24 @@
Provider{xl t='Provider'} {$provider->get_name_display()} {$num_set->get_insurance_company_name()} Provider #{xl t='Provider'} # {$num_set->get_provider_number()}
Rendering Provider #{xl t='Rendering Provider'} # {$num_set->get_rendering_provider_number()}
Group #{xl t='Group'} # {$num_set->get_group_number()}
Add New...{xl t='Add New'}...
No entries found, use the form below to add an entry.{xl t='No entries found, use the form below to add an entry.'}



Insurance Company{xl t='Insurance Company'} {if $ins->get_id() eq ""} {html_options name="insurance_company_id" options=$ic_array values=$ic_array selected=$ins->get_insurance_company_id()} @@ -66,7 +66,7 @@
Provider Number{xl t='Provider Number'}  Type:  @@ -74,7 +74,7 @@
Rendering Provider Number{xl t='Rendering Provider Number'}  Type:  @@ -82,7 +82,7 @@
Group Number{xl t='Group Number'}
{if $ins->get_id() eq ""} - + {else} - + {/if}
- + - - - + + + {foreach from=$providers item=provider} - + {foreachelse} - + {/foreach}
Name{xl t='Name'}    Provider #Rendering #Group #{xl t='Provider'} #{xl t='Rendering'} #{xl t='Group'} #
{$provider->get_name_display()}Default{xl t='Default'} {$provider->get_provider_number_default()} {$provider->get_rendering_provider_number_default()} {$provider->get_group_number_default()}
No Providers Found{xl t='No Providers Found'}
diff --git a/templates/patient_finder/general_find.html b/templates/patient_finder/general_find.html index 34d851888..9b0083a62 100644 --- a/templates/patient_finder/general_find.html +++ b/templates/patient_finder/general_find.html @@ -39,7 +39,7 @@ a { - + @@ -49,10 +49,10 @@ a { {if count($result_set) > 0} - + - + {/if} {foreach name="search_results" from=$result_set item=result} @@ -65,7 +65,7 @@ a { {foreachelse} {if is_array($result_set)} - + {/if} {/foreach} diff --git a/templates/pharmacies/general_edit.html b/templates/pharmacies/general_edit.html index 317879424..499f1be9e 100644 --- a/templates/pharmacies/general_edit.html +++ b/templates/pharmacies/general_edit.html @@ -4,56 +4,56 @@
Results Found For Search '{$search_string}'{xl t='Results Found For Search'} '{$search_string}'
NameDOBPatient ID{xl t='Name'}{xl t='DOB'}{xl t='Patient ID'}
No Results Found For Search '{$search_string}'{xl t='No Results Found For Search'} '{$search_string}'
- + - + - + - + - + - + - + - + - +
Name{xl t='Name'}
Address{xl t='Address'}
Address{xl t='Address'}
City, State Zip{xl t='City, State Zip'} ,
Email{xl t='Email'}
Phone{xl t='Phone'}
Fax{xl t='Fax'}
Default Method{xl t='Default Method'}


diff --git a/templates/pharmacies/general_list.html b/templates/pharmacies/general_list.html index 080ef649b..367a53a53 100644 --- a/templates/pharmacies/general_list.html +++ b/templates/pharmacies/general_list.html @@ -1,10 +1,10 @@ - + - + - + {foreach from=$pharmacies item=pharmacy} @@ -15,7 +15,7 @@ {foreachelse} - + {/foreach}
Name{xl t='Name'}  Address{xl t='Address'}  Default Method{xl t='Default Method'}
No Pharmacies Found{xl t='No Pharmacies Found'}
diff --git a/templates/practice_settings/general_list.html b/templates/practice_settings/general_list.html index 323a95e0d..d1ca3aef4 100644 --- a/templates/practice_settings/general_list.html +++ b/templates/practice_settings/general_list.html @@ -34,21 +34,21 @@ a { Settings
 

{$display} diff --git a/templates/prescription/general_edit.html b/templates/prescription/general_edit.html index 1028dce72..b56ac5a0c 100644 --- a/templates/prescription/general_edit.html +++ b/templates/prescription/general_edit.html @@ -69,6 +69,14 @@ textarea { '_blank', 400, 200); } + function quantityChanged() { + var f = document.forms[0]; + f.per_refill.value = f.quantity.value; + if (f.disp_quantity) { + f.disp_quantity.value = f.quantity.value; + } + } + {/literal} @@ -76,13 +84,13 @@ textarea {
- + - + --> - + @@ -103,19 +111,21 @@ textarea { {if $DRUG_ARRAY_VALUES} - + {/if} - + {if $SIMPLIFIED_PRESCRIPTIONS && !$prescription->size} @@ -123,14 +133,14 @@ textarea { {else} {/if} - + - + - + - + - + {if !$WEIGHT_LOSS_CLINIC} - + @@ -179,16 +189,16 @@ textarea { {/if} diff --git a/templates/prescription/general_list.html b/templates/prescription/general_list.html index 3b2d0206f..f075cdb31 100644 --- a/templates/prescription/general_list.html +++ b/templates/prescription/general_list.html @@ -40,18 +40,18 @@ var myRegExp = new RegExp(":" + value + ":"); - + - + - + - + - + - - + + {foreach from=$prescriptions item=prescription} @@ -67,7 +67,7 @@ var myRegExp = new RegExp(":" + value + ":"); {foreachelse} - + {/foreach}
Starting Date{xl t='Starting Date'} {html_select_date start_year="-10" end_year="+5" time=$prescription->start_date prefix="start_date_"}
Provider{xl t='Provider'} {html_options name="provider_id" options=$prescription->provider->utility_provider_array() selected=$prescription->provider->get_id()} @@ -95,7 +103,7 @@ textarea {
Drug{xl t='Drug'}
  in-house  {xl t='in-house'}
Quantity{xl t='Quantity'} - +
Medicine Units{xl t='Medicine Units'}
Take{xl t='Take'} {if $SIMPLIFIED_PRESCRIPTIONS && !$prescription->form && !$prescription->route && !$prescription->interval} @@ -138,7 +148,7 @@ textarea { {else} - in + {xl t='in'} @@ -146,32 +156,32 @@ textarea {
Refills{xl t='Refills'} {html_options name="refills" options=$prescription->refills_array selected=$prescription->refills} {if $SIMPLIFIED_PRESCRIPTIONS} {else} -     # of tablets: +     # {xl t='of tablets'}: {/if}
Substitution{xl t='Substitution'} {html_options name="substitute" options=$prescription->substitute_array selected=$prescription->substitute}
Notes{xl t='Notes'}
Add to Medication List{xl t='Add to Medication List'} {html_radios name="medication" options=$prescription->medication_array selected=$prescription->medication}
- + {if $DRUG_ARRAY_VALUES}         {if $prescription->get_refills() >= $prescription->get_dispensation_count()} - + units, $ {else} - This prescription has reached its limit of {$prescription->get_refills()} refills. + {xl t=' prescription has reached its limit of'} {$prescription->get_refills()} {xl t='refills'}. {/if} {/if}
Drug{xl t='Drug'}  Created
Changed
{xl t='Created'}
{xl t='Changed'}
 Dosage{xl t='Dosage'}  Unit{xl t='Unit'}  Qty.{xl t='Qty'}.  ProviderSelect{xl t='Provider'}{xl t='Select'}
No Prescriptions Found{xl t='No Prescriptions Found'}
diff --git a/templates/prescription/general_lookup.html b/templates/prescription/general_lookup.html index 168f72392..9e1bb644b 100644 --- a/templates/prescription/general_lookup.html +++ b/templates/prescription/general_lookup.html @@ -42,19 +42,19 @@ textarea {
{if $drug_options} - {html_options name="drug" values=$drug_values options=$drug_options} -
search again + {html_options name="drug" values=$drug_values options=$drug_options} +
{xl t='search again'} {else} {$NO_RESULTS} - +
Drug: - +
diff --git a/templates/prescription/general_send.html b/templates/prescription/general_send.html index 56d089a72..171d619a5 100644 --- a/templates/prescription/general_send.html +++ b/templates/prescription/general_send.html @@ -24,18 +24,18 @@ a { {/if} - +
- - + +
-{html_options name="pharmacy_id" options=$prescription->pharmacy->utility_pharmacy_array() selected=$prescription->pharmacy->id} +{html_options name="pharmacy_id" options=$prescription->pharmacy->utility_pharmacy_array() selected=$prescription->pharmacy->id} diff --git a/templates/report/general_default.html b/templates/report/general_default.html index 6bb1784c3..d33edb592 100644 --- a/templates/report/general_default.html +++ b/templates/report/general_default.html @@ -32,76 +32,76 @@ function dopopup(aurl) { -Superbill Report +{xl t='Superbill Report'}
-Appointments Report +{xl t='Appointments Report'}
-Appointments-Encounters Report +{xl t='Appointments-Encounters Report'}
{php} if (! $GLOBALS['simplified_demographics']) { {/php} -Patient Insurance Distribution Report +{xl t='Patient Insurance Distribution Report'}
-Indigent Patients Report +{xl t='Indigent Patients Report'}
-Unique Seen Patients Report +<{xl t='Unique Seen Patients Report'}
-Patient List +{xl t='Patient List'}
{php} } {/php} {php} if (! $GLOBALS['weight_loss_clinic']) { {/php} -Front Office Receipts Report +{xl t='Front Office Receipts Report'}
{php} } {/php} -Prescriptions Report +{xl t='Prescriptions Report'}
-Sales by Product Report +{xl t='Sales by Product Report'}
-Collections Report +{xl t='Collections Report'}
{php} if ($GLOBALS['inhouse_pharmacy']) { {/php} -Destroyed Drugs Report +{xl t='Destroyed Drugs Report'}
{php} } {/php} -Receipts by Payment Method Report +{xl t='Receipts by Payment Method Report'} {php} if ($GLOBALS['athletic_team']) { echo "
\n"; - echo "Team Roster\n"; + echo "{xl t='Team Roster'}\n"; echo "
\n"; - echo "Days and Games Missed\n"; + echo "{xl t='Days and Games Missed'}\n"; echo "
\n"; - echo "Football Injury Reports\n"; + echo "{xl t='Football Injury Reports'}\n"; echo "
\n"; - echo "Injury Overview Report\n"; + echo "{xl t='Injury Overview Report'}\n"; } {/php}
 
-[printable] +[{xl t='printable'}]  
- + - + - + - - + + diff --git a/templates/x12_partners/general_edit.html b/templates/x12_partners/general_edit.html index 69c738cc3..6d3211922 100644 --- a/templates/x12_partners/general_edit.html +++ b/templates/x12_partners/general_edit.html @@ -1,30 +1,30 @@
Reports:{xl t='Reports'}: {html_options onChange="clear_vars()" name="query_id" selected=$query_id options=$queries}   Var1: {xl t='Var1'}:    Var2: {xl t='Var2'}:    Show: {html_options name="show" selected=$show options=$show_options}{xl t='Show'}: {html_options name="show" selected=$show options=$show_options}

{$title}    {$smarty.now|date_format:"%A, %B %e, %Y"}

- + - + - + - + - + - + - + @@ -32,9 +32,9 @@ diff --git a/templates/x12_partners/general_list.html b/templates/x12_partners/general_list.html index 5399290ef..b6aafeaec 100644 --- a/templates/x12_partners/general_list.html +++ b/templates/x12_partners/general_list.html @@ -1,12 +1,12 @@
X12 Partner{xl t='X12 Partner'}
Partner Name{xl t='Partner'} {xl t='Name'}
ID Number (ETIN){xl t='ID'} {xl t='Number'} ({xl t='ETIN'})
Receiver ID{xl t='Receiver'} {xl t='ID'}
Sender ID{xl t='Sender'} {xl t='ID'}
Version{xl t='Version'}
Processing Format{xl t='Processing'} {xl t='Format'} {html_options name="processing_format" options=$partner->get_processing_format_array() selected=$partner->get_processing_format()}
{if $partner->get_id() eq ""} - + {else} - + {/if}
- + - + - + - + {foreach from=$partners item=partner} @@ -20,13 +20,13 @@ {foreachelse} - + {/foreach} - +
Name{xl t='Name'}  Sender ID{xl t='Sender ID'}  Receiver ID{xl t='Receiver ID'}  Version{xl t='Version'}
No Partners Found{xl t='No Partners Found'}
 
Add New Partner{xl t='Add New Partner'}
-- 2.11.4.GIT