[TEP-COMMIT] [CVS admin] Move decimal point and thousands seperator to the language files

anonymous-OfajU3CKLf1/[email protected] 16 Apr 2004 05:37:27 -0000
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Commit in admin/admin on MAIN

currencies.php +1 -11 1.49 -> 1.50

includes/classes/currencies.php +3 -5 1.3 -> 1.4

includes/languages/english.php +3 1.111 -> 1.112

/espanol.php +3 1.106 -> 1.107

/german.php +3 1.105 -> 1.106

includes/languages/english/currencies.php -2 1.12 -> 1.13

includes/languages/espanol/currencies.php -2 1.15 -> 1.16

includes/languages/german/currencies.php -2 1.16 -> 1.17

+13 -22

8 modified files

Move decimal point and thousands seperator to the language files

----------

admin /admin

currencies.php 1.49 -> 1.50

diff -u -r1.49 -r1.50
--- currencies.php 2003/06/29 22:50:51 1.49
+++ currencies.php 2004/04/16 05:37:21 1.50
@@ -26,8 +26,6 @@

$code = tep_db_prepare_input($HTTP_POST_VARS['code']);
$symbol_left = tep_db_prepare_input($HTTP_POST_VARS['symbol_left']);
$symbol_right = tep_db_prepare_input($HTTP_POST_VARS['symbol_right']);

- $decimal_point = tep_db_prepare_input($HTTP_POST_VARS['decimal_point']);
- $thousands_point = tep_db_prepare_input($HTTP_POST_VARS['thousands_point']);

$decimal_places = tep_db_prepare_input($HTTP_POST_VARS['decimal_places']);
$value = tep_db_prepare_input($HTTP_POST_VARS['value']);

@@ -35,8 +33,6 @@

'code' => $code,
'symbol_left' => $symbol_left,
'symbol_right' => $symbol_right,

- 'decimal_point' => $decimal_point,
- 'thousands_point' => $thousands_point,

'decimal_places' => $decimal_places,
'value' => $value);

@@ -152,7 +148,7 @@

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
</tr>
<?php

- $currency_query_raw = "select currencies_id, title, code, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, last_updated, value from " . TABLE_CURRENCIES . " order by title";

+ $currency_query_raw = "select currencies_id, title, code, symbol_left, symbol_right, decimal_places, last_updated, value from " . TABLE_CURRENCIES . " order by title";

$currency_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $currency_query_raw, $currency_query_numrows);
$currency_query = tep_db_query($currency_query_raw);
while ($currency = tep_db_fetch_array($currency_query)) {

@@ -212,8 +208,6 @@

$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_CODE . '<br>' . tep_draw_input_field('code'));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_SYMBOL_LEFT . '<br>' . tep_draw_input_field('symbol_left'));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_SYMBOL_RIGHT . '<br>' . tep_draw_input_field('symbol_right'));

- $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_DECIMAL_POINT . '<br>' . tep_draw_input_field('decimal_point'));
- $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_THOUSANDS_POINT . '<br>' . tep_draw_input_field('thousands_point'));

$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_DECIMAL_PLACES . '<br>' . tep_draw_input_field('decimal_places'));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_VALUE . '<br>' . tep_draw_input_field('value'));
$contents[] = array('text' => '<br>' . tep_draw_checkbox_field('default') . ' ' . TEXT_INFO_SET_AS_DEFAULT);

@@ -228,8 +222,6 @@

$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_CODE . '<br>' . tep_draw_input_field('code', $cInfo->code));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_SYMBOL_LEFT . '<br>' . tep_draw_input_field('symbol_left', $cInfo->symbol_left));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_SYMBOL_RIGHT . '<br>' . tep_draw_input_field('symbol_right', $cInfo->symbol_right));

- $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_DECIMAL_POINT . '<br>' . tep_draw_input_field('decimal_point', $cInfo->decimal_point));
- $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_THOUSANDS_POINT . '<br>' . tep_draw_input_field('thousands_point', $cInfo->thousands_point));

$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_DECIMAL_PLACES . '<br>' . tep_draw_input_field('decimal_places', $cInfo->decimal_places));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_VALUE . '<br>' . tep_draw_input_field('value', $cInfo->value));
if (DEFAULT_CURRENCY != $cInfo->code) $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('default') . ' ' . TEXT_INFO_SET_AS_DEFAULT);

@@ -251,8 +243,6 @@

$contents[] = array('text' => TEXT_INFO_CURRENCY_CODE . ' ' . $cInfo->code);
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_SYMBOL_LEFT . ' ' . $cInfo->symbol_left);
$contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . ' ' . $cInfo->symbol_right);

- $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_DECIMAL_POINT . ' ' . $cInfo->decimal_point);
- $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . ' ' . $cInfo->thousands_point);

$contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . ' ' . $cInfo->decimal_places);
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_LAST_UPDATED . ' ' . tep_date_short($cInfo->last_updated));
$contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . ' ' . number_format($cInfo->value, 8));

----------

admin /admin /includes /classes

currencies.php 1.3 -> 1.4

diff -u -r1.3 -r1.4
--- currencies.php 2003/06/20 16:23:08 1.3
+++ currencies.php 2004/04/16 05:37:22 1.4
@@ -19,13 +19,11 @@

// class constructor
function currencies() {
$this->currencies = array();

- $currencies_query = tep_db_query("select code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from " . TABLE_CURRENCIES);

+ $currencies_query = tep_db_query("select code, title, symbol_left, symbol_right, decimal_places, value from " . TABLE_CURRENCIES);

while ($currencies = tep_db_fetch_array($currencies_query)) {
$this->currencies[$currencies['code']] = array('title' => $currencies['title'],
'symbol_left' => $currencies['symbol_left'],
'symbol_right' => $currencies['symbol_right'],

- 'decimal_point' => $currencies['decimal_point'],
- 'thousands_point' => $currencies['thousands_point'],

'decimal_places' => $currencies['decimal_places'],
'value' => $currencies['value']);
}

@@ -35,14 +33,14 @@

function format($number, $calculate_currency_value = true, $currency_type = DEFAULT_CURRENCY, $currency_value = '') {
if ($calculate_currency_value) {
$rate = ($currency_value) ? $currency_value : $this->currencies[$currency_type]['value'];

- $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format($number * $rate, $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right'];

+ $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format($number * $rate, $this->currencies[$currency_type]['decimal_places'], NUMERIC_DECIMAL_SEPARATOR, NUMERIC_THOUSANDS_SEPARATOR) . $this->currencies[$currency_type]['symbol_right'];

// if the selected currency is in the european euro-conversion and the default currency is euro,
// the currency will displayed in the national currency and euro currency
if ( (DEFAULT_CURRENCY == 'EUR') && ($currency_type == 'DEM' || $currency_type == 'BEF' || $currency_type == 'LUF' || $currency_type == 'ESP' || $currency_type == 'FRF' || $currency_type == 'IEP' || $currency_type == 'ITL' || $currency_type == 'NLG' || $currency_type == 'ATS' || $currency_type == 'PTE' || $currency_type == 'FIM' || $currency_type == 'GRD') ) {
$format_string .= ' <small>[' . $this->format($number, true, 'EUR') . ']</small>';
}
} else {

- $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format($number, $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right'];

+ $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format($number, $this->currencies[$currency_type]['decimal_places'], NUMERIC_DECIMAL_SEPARATOR, NUMERIC_THOUSANDS_SEPARATOR) . $this->currencies[$currency_type]['symbol_right'];

}

return $format_string;

----------

admin /admin /includes /languages

english.php 1.111 -> 1.112

diff -u -r1.111 -r1.112
--- english.php 2004/04/15 16:06:42 1.111
+++ english.php 2004/04/16 05:37:23 1.112
@@ -33,6 +33,9 @@

}
}

+define('NUMERIC_DECIMAL_SEPARATOR', '.');
+define('NUMERIC_THOUSANDS_SEPARATOR', ',');
+

// Global entries for the <html> tag
define('HTML_PARAMS','dir="ltr" lang="en"');

----------

admin /admin /includes /languages

espanol.php 1.106 -> 1.107

diff -u -r1.106 -r1.107
--- espanol.php 2004/04/15 16:06:42 1.106
+++ espanol.php 2004/04/16 05:37:23 1.107
@@ -33,6 +33,9 @@

}
}

+define('NUMERIC_DECIMAL_SEPARATOR', '.');
+define('NUMERIC_THOUSANDS_SEPARATOR', ',');
+

// Global entries for the <html> tag
define('HTML_PARAMS','dir="ltr" lang="es"');

----------

admin /admin /includes /languages

german.php 1.105 -> 1.106

diff -u -r1.105 -r1.106
--- german.php 2004/04/15 16:06:42 1.105
+++ german.php 2004/04/16 05:37:23 1.106
@@ -33,6 +33,9 @@

}
}

+define('NUMERIC_DECIMAL_SEPARATOR', '.');
+define('NUMERIC_THOUSANDS_SEPARATOR', ',');
+

// Global entries for the <html> tag
define('HTML_PARAMS','dir="ltr" lang="de"');

----------

admin /admin /includes /languages /english

currencies.php 1.12 -> 1.13

diff -u -r1.12 -r1.13
--- currencies.php 2003/06/25 20:36:48 1.12
+++ currencies.php 2004/04/16 05:37:24 1.13
@@ -22,8 +22,6 @@

define('TEXT_INFO_CURRENCY_CODE', 'Code:');
define('TEXT_INFO_CURRENCY_SYMBOL_LEFT', 'Symbol Left:');
define('TEXT_INFO_CURRENCY_SYMBOL_RIGHT', 'Symbol Right:');

-define('TEXT_INFO_CURRENCY_DECIMAL_POINT', 'Decimal Point:');
-define('TEXT_INFO_CURRENCY_THOUSANDS_POINT', 'Thousands Point:');

define('TEXT_INFO_CURRENCY_DECIMAL_PLACES', 'Decimal Places:');
define('TEXT_INFO_CURRENCY_LAST_UPDATED', 'Last Updated:');
define('TEXT_INFO_CURRENCY_VALUE', 'Value:');

----------

admin /admin /includes /languages /espanol

currencies.php 1.15 -> 1.16

diff -u -r1.15 -r1.16
--- currencies.php 2003/07/06 20:33:01 1.15
+++ currencies.php 2004/04/16 05:37:24 1.16
@@ -22,8 +22,6 @@

define('TEXT_INFO_CURRENCY_CODE', 'C&oacute;digo:');
define('TEXT_INFO_CURRENCY_SYMBOL_LEFT', 'S&iacute;mbolo a la izquierda:');
define('TEXT_INFO_CURRENCY_SYMBOL_RIGHT', 'S&iacute;mbolo a la derecha:');

-define('TEXT_INFO_CURRENCY_DECIMAL_POINT', 'Punto decimal:');
-define('TEXT_INFO_CURRENCY_THOUSANDS_POINT', 'Separador de miles:');

define('TEXT_INFO_CURRENCY_DECIMAL_PLACES', 'Lugares decimales:');
define('TEXT_INFO_CURRENCY_LAST_UPDATED', 'Actualizado el:');
define('TEXT_INFO_CURRENCY_VALUE', 'Valor:');

----------

admin /admin /includes /languages /german

currencies.php 1.16 -> 1.17

diff -u -r1.16 -r1.17
--- currencies.php 2003/06/25 20:36:48 1.16
+++ currencies.php 2004/04/16 05:37:25 1.17
@@ -22,8 +22,6 @@

define('TEXT_INFO_CURRENCY_CODE', 'K&uuml;rzel:');
define('TEXT_INFO_CURRENCY_SYMBOL_LEFT', 'Symbol Links:');
define('TEXT_INFO_CURRENCY_SYMBOL_RIGHT', 'Symbol Rechts:');

-define('TEXT_INFO_CURRENCY_DECIMAL_POINT', 'Dezimalkomma:');
-define('TEXT_INFO_CURRENCY_THOUSANDS_POINT', 'Tausenderpunkt:');

define('TEXT_INFO_CURRENCY_DECIMAL_PLACES', 'Dezimalstellen:');
define('TEXT_INFO_CURRENCY_LAST_UPDATED', 'letzte &Auml;nderung:');
define('TEXT_INFO_CURRENCY_VALUE', 'Wert:');

CVSspam 0.2.8

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click