Revision: 2156
http://mrbs.svn.sourceforge.net/mrbs/?rev=2156&view=rev
Author: jberanek
Date: 2011-11-01 23:27:49 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
* Removed the code that had to exist in config.inc.php in a particular
place. Booking entry types are now configured by the simple array
$booking_types, which contains elements like "E" and "I". The entry
types are now localised in the translation files as "type.X" where X is
the booking type. config.inc.php no longer needs to include language.inc,
and the $typel configuration array has been removed.
Modified Paths:
--------------
mrbs/trunk/web/config.inc.php
mrbs/trunk/web/defaultincludes.inc
mrbs/trunk/web/edit_entry.php
mrbs/trunk/web/functions.inc
mrbs/trunk/web/functions_mail.inc
mrbs/trunk/web/functions_view.inc
mrbs/trunk/web/lang.ca
mrbs/trunk/web/lang.cs
mrbs/trunk/web/lang.da
mrbs/trunk/web/lang.de
mrbs/trunk/web/lang.el
mrbs/trunk/web/lang.en
mrbs/trunk/web/lang.es
mrbs/trunk/web/lang.eu
mrbs/trunk/web/lang.fi
mrbs/trunk/web/lang.fr
mrbs/trunk/web/lang.it
mrbs/trunk/web/lang.ja
mrbs/trunk/web/lang.ko
mrbs/trunk/web/lang.nl
mrbs/trunk/web/lang.no
mrbs/trunk/web/lang.pl
mrbs/trunk/web/lang.pt
mrbs/trunk/web/lang.ru
mrbs/trunk/web/lang.sl
mrbs/trunk/web/lang.sv
mrbs/trunk/web/lang.tr
mrbs/trunk/web/lang.zh-cn
mrbs/trunk/web/lang.zh-tw
mrbs/trunk/web/language.inc
mrbs/trunk/web/report.php
mrbs/trunk/web/systemdefaults.inc.php
Modified: mrbs/trunk/web/config.inc.php
===================================================================
--- mrbs/trunk/web/config.inc.php 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/config.inc.php 2011-11-01 23:27:49 UTC (rev 2156)
@@ -55,43 +55,4 @@
or areadefaults.inc.php. */
-
-
-
-
-// This next section must come at the end of the config file - ie after any
-// language and mail settings, as the definitions are used in the included file
-//
-// IMPORTANT NOTE: Do NOT put any configuration apart from the "Entry Types"
-// below this section
-require_once "language.inc"; // DO NOT DELETE THIS LINE
-
-/*************
- * Entry Types
- *************/
-
-// This array maps entry type codes (letters A through J) into descriptions.
-//
-// Each type has a color which is defined in the array $color_types in the
Themes
-// directory - just edit whichever include file corresponds to the theme you
-// have chosen in the config settings. (The default is default.inc,
unsurprisingly!)
-//
-// The value for each type is a short (one word is best) description of the
-// type. The values must be escaped for HTML output ("R&D").
-// Please leave I and E alone for compatibility.
-// If a type's entry is unset or empty, that type is not defined; it will not
-// be shown in the day view color-key, and not offered in the type selector
-// for new or edited entries.
-
-// $typel["A"] = "A";
-// $typel["B"] = "B";
-// $typel["C"] = "C";
-// $typel["D"] = "D";
-$typel["E"] = get_vocab("external");
-// $typel["F"] = "F";
-// $typel["G"] = "G";
-// $typel["H"] = "H";
-$typel["I"] = get_vocab("internal");
-// $typel["J"] = "J";
-
?>
Modified: mrbs/trunk/web/defaultincludes.inc
===================================================================
--- mrbs/trunk/web/defaultincludes.inc 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/defaultincludes.inc 2011-11-01 23:27:49 UTC (rev 2156)
@@ -6,6 +6,7 @@
require_once "systemdefaults.inc.php";
require_once "areadefaults.inc.php";
require_once "config.inc.php";
+require_once "language.inc";
require_once "internalconfig.inc.php";
require_once "functions.inc";
require_once "dbsys.inc";
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/edit_entry.php 2011-11-01 23:27:49 UTC (rev 2156)
@@ -1065,9 +1065,9 @@
<label for="type"><?php echo get_vocab("type")?>:</label>
<select id="type" name="type">
<?php
- foreach ($typel as $key => $value)
+ foreach ($booking_types as $key)
{
- echo "<option value=\"$key\"" . (($type == $key) ? "
selected=\"selected\"" : "") . ">$value</option>\n";
+ echo "<option value=\"$key\"" . (($type == $key) ? "
selected=\"selected\"" : "") . ">".get_type_vocab($key)."</option>\n";
}
?>
</select>
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/functions.inc 2011-11-01 23:27:49 UTC (rev 2156)
@@ -945,9 +945,9 @@
// Display the entry-type color key. This has up to 2 rows, up to 5 columns.
function show_colour_key()
{
- global $typel;
+ global $booking_types;
// set the table width. Default is 5, but try and avoid rows of unequal
length
- switch (count($typel))
+ switch (count($booking_types))
{
case '6':
$table_width = 3;
@@ -961,8 +961,9 @@
}
echo "<table id=\"colour_key\"><tr>\n";
$n = 0;
- foreach ($typel as $key => $value)
+ foreach ($booking_types as $key)
{
+ $value = get_type_vocab($key);
if (++$n > $table_width)
{
$n = 1;
@@ -975,7 +976,7 @@
}
// If there is more than one row and the bottom row isn't complete then
// pad it out with a single merged cell
- if ((count($typel) > $table_width) && ($n < $table_width))
+ if ((count($booking_types) > $table_width) && ($n < $table_width))
{
echo "<td colspan=\"" . ($table_width - $n) . "\"" .
" id=\"row_padding\"> </td>\n";
Modified: mrbs/trunk/web/functions_mail.inc
===================================================================
--- mrbs/trunk/web/functions_mail.inc 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/functions_mail.inc 2011-11-01 23:27:49 UTC (rev 2156)
@@ -411,7 +411,7 @@
{
global $mail_previous, $returl, $mrbs_company;
global $enable_periods, $approval_enabled, $confirmation_enabled;
- global $typel, $mail_settings, $standard_fields, $url_base;
+ global $mail_settings, $standard_fields, $url_base;
global $tbl_entry;
global $select_options;
@@ -598,8 +598,8 @@
// Type of booking
$body .= create_body_table_row (get_mail_vocab("type"),
- $typel[$data['type']],
- $typel[$mail_previous['type']],
+ get_type_vocab($data['type']),
+ get_type_vocab($mail_previous['type']),
$compare, $as_html);
// Created by
Modified: mrbs/trunk/web/functions_view.inc
===================================================================
--- mrbs/trunk/web/functions_view.inc 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/functions_view.inc 2011-11-01 23:27:49 UTC (rev 2156)
@@ -37,7 +37,7 @@
function create_details_body($data, $as_html=FALSE, $keep_private=FALSE,
$room_disabled=FALSE)
{
global $enable_periods, $confirmation_enabled, $approval_enabled;
- global $is_private_field, $standard_fields, $typel;
+ global $is_private_field, $standard_fields;
global $strftime_format;
global $tbl_entry;
global $select_options;
@@ -141,7 +141,8 @@
}
$tbody .= create_details_row(get_vocab("end_date"), $end_date, $as_html);
// Type
- $value = (empty($typel[$data['type']])) ? "?${data['type']}?" :
$typel[$data['type']];
+ $type = get_type_vocab($data['type']);
+ $value = (empty($type)) ? "?${data['type']}?" : $type;
$tbody .= create_details_row(get_vocab("type"), $value, $as_html);
// Created by
$class = ($keep_private && $is_private_field['entry.create_by']) ? "private"
: "";
Modified: mrbs/trunk/web/lang.ca
===================================================================
--- mrbs/trunk/web/lang.ca 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.ca 2011-11-01 23:27:49 UTC (rev 2156)
@@ -59,8 +59,6 @@
$vocab["periods"] = "períodes";
$vocab["all_day"] = "Dia complet";
$vocab["type"] = "Entitat";
-$vocab["internal"] = "Intern";
-$vocab["external"] = "Extern";
$vocab["save"] = "Guardar";
$vocab["rep_type"] = "Tipus de repetició";
$vocab["rep_type_0"] = "Cap";
@@ -236,4 +234,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Error Fatal: Fallada al conectar a la base de
dades";
+// Entry types
+$vocab["type.I"] = "Intern";
+$vocab["type.E"] = "Extern";
+
?>
Modified: mrbs/trunk/web/lang.cs
===================================================================
--- mrbs/trunk/web/lang.cs 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.cs 2011-11-01 23:27:49 UTC (rev 2156)
@@ -59,8 +59,6 @@
$vocab["periods"] = "period";
$vocab["all_day"] = "Všechny dny";
$vocab["type"] = "Typ";
-$vocab["internal"] = "Volná místa";
-$vocab["external"] = "Obsazeno";
$vocab["save"] = "Uložit";
$vocab["rep_type"] = "Typ opakování";
$vocab["rep_type_0"] = "Nikdy";
@@ -235,4 +233,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Fatalní chyba: Nepodařilo se připojit do
databáze";
+// Entry types
+$vocab["type.I"] = "Volná místa";
+$vocab["type.E"] = "Obsazeno";
+
?>
Modified: mrbs/trunk/web/lang.da
===================================================================
--- mrbs/trunk/web/lang.da 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.da 2011-11-01 23:27:49 UTC (rev 2156)
@@ -59,8 +59,6 @@
$vocab["periods"] = "periods";
$vocab["all_day"] = "hele dagen";
$vocab["type"] = "Type";
-$vocab["internal"] = "Internt";
-$vocab["external"] = "Eksternt";
$vocab["save"] = "Gem";
$vocab["rep_type"] = "Repetitionstype";
$vocab["rep_type_0"] = "ingen";
@@ -235,4 +233,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Fatal Error: Failed to connect to database";
+// Entry types
+$vocab["type.I"] = "Internt";
+$vocab["type.E"] = "Eksternt";
+
?>
Modified: mrbs/trunk/web/lang.de
===================================================================
--- mrbs/trunk/web/lang.de 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.de 2011-11-01 23:27:49 UTC (rev 2156)
@@ -73,8 +73,6 @@
$vocab["all_day"] = "Ganztägig";
$vocab["area"] = "Bereich";
$vocab["type"] = "Kategorie";
-$vocab["internal"] = "Intern";
-$vocab["external"] = "Extern";
$vocab["save"] = "Speichern";
$vocab["rep_type"] = "Serientyp";
$vocab["rep_type_0"] = "Keine";
@@ -426,6 +424,10 @@
$vocab["show_hide_columns"] = "Anzeigen / Ausblenden von Spalten";
$vocab["restore_original"] = "Standard wieder herstellen";
+// Entry types
+$vocab["type.I"] = "Intern";
+$vocab["type.E"] = "Extern";
+
// General
$vocab["fatal_db_error"] = "Fataler Fehler: Leider steht die Datenbank im
Moment nicht zur Verfügung.";
$vocab["back"] = "Zurück";
Modified: mrbs/trunk/web/lang.el
===================================================================
--- mrbs/trunk/web/lang.el 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.el 2011-11-01 23:27:49 UTC (rev 2156)
@@ -59,8 +59,6 @@
$vocab["periods"] = "periods";
$vocab["all_day"] = "Ολόκληρη μέρα";
$vocab["type"] = "Τύπος";
-$vocab["internal"] = "Εσωτερικά";
-$vocab["external"] = "Εξωτερικά";
$vocab["save"] = "Αποθήκευση";
$vocab["rep_type"] = "Τύπος επανάληψης";
$vocab["rep_type_0"] = "Τίποτα";
@@ -235,4 +233,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Κρίσιμο σφάλμα: Αποτυχία σύνδεσης στη βάση
δεδομένων";
+// Entry types
+$vocab["type.I"] = "Εσωτερικά";
+$vocab["type.E"] = "Εξωτερικά";
+
?>
Modified: mrbs/trunk/web/lang.en
===================================================================
--- mrbs/trunk/web/lang.en 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.en 2011-11-01 23:27:49 UTC (rev 2156)
@@ -72,8 +72,6 @@
$vocab["all_day"] = "All day";
$vocab["area"] = "Area";
$vocab["type"] = "Type";
-$vocab["internal"] = "Internal";
-$vocab["external"] = "External";
$vocab["save"] = "Save";
$vocab["rep_type"] = "Repeat type";
$vocab["rep_type_0"] = "None";
@@ -425,6 +423,10 @@
$vocab["show_hide_columns"] = "Show / hide columns";
$vocab["restore_original"] = "Restore original";
+// Entry types
+$vocab["type.I"] = "Internal";
+$vocab["type.E"] = "External";
+
// General
$vocab["fatal_db_error"] = "Fatal error: unfortunately the database is not
available at the moment.";
$vocab["back"] = "Back";
Modified: mrbs/trunk/web/lang.es
===================================================================
--- mrbs/trunk/web/lang.es 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.es 2011-11-01 23:27:49 UTC (rev 2156)
@@ -73,8 +73,6 @@
$vocab["all_day"] = "Día Completo";
$vocab["area"] = "Agrupación";
$vocab["type"] = "Tipo";
-$vocab["internal"] = "Interna";
-$vocab["external"] = "Externa";
$vocab["save"] = "Guardar";
$vocab["rep_type"] = "Tipo Repetición";
$vocab["rep_type_0"] = "Ninguna";
@@ -404,6 +402,10 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Error: No se pudo conectar a la Base de Datos";
+// Entry types
+$vocab["type.I"] = "Interna";
+$vocab["type.E"] = "Externa";
+
// General
$vocab["fatal_db_error"] = "Error: la base de datos no está disponible en
este momento.";
?>
Modified: mrbs/trunk/web/lang.eu
===================================================================
--- mrbs/trunk/web/lang.eu 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.eu 2011-11-01 23:27:49 UTC (rev 2156)
@@ -1,4 +1,4 @@
-<?php // -*-mode: PHP; coding:iso-utf-8;-*-
+<?php // -*-mode: PHP; coding:utf-8;-*-
// $Id$
@@ -59,8 +59,6 @@
$vocab["periods"] = "tarte ordu erdikoak";
$vocab["all_day"] = "Egun osorako";
$vocab["type"] = "Mota";
-$vocab["internal"] = "Arrunta";
-$vocab["external"] = "Berezia";
$vocab["save"] = "Gorde";
$vocab["rep_type"] = "Errepikapen mota";
$vocab["rep_type_0"] = "Ezein ez";
@@ -235,4 +233,8 @@
// Used in mysql.php AND pgsql.php
$vocab["failed_connect_db"] = "Errorea: Ezin izan da datubasearekiko konexioa
burutu";
+// Entry types
+$vocab["type.I"] = "Arrunta";
+$vocab["type.E"] = "Berezia";
+
?>
Modified: mrbs/trunk/web/lang.fi
===================================================================
--- mrbs/trunk/web/lang.fi 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.fi 2011-11-01 23:27:49 UTC (rev 2156)
@@ -62,8 +62,6 @@
$vocab["all_day"] = "Koko päivän";
$vocab["area"] = "Alue";
$vocab["type"] = "Tyyppi";
-$vocab["internal"] = "Sisäinen";
-$vocab["external"] = "Ulkoinen";
$vocab["save"] = "Tallenna";
$vocab["rep_type"] = "Toiston tyyppi";
$vocab["rep_type_0"] = "Ei toistoa";
@@ -295,4 +293,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Järjestelmävirhe: Tietokantayhteyden avaaminen
ei onnistu.";
+// Entry types
+$vocab["type.I"] = "Sisäinen";
+$vocab["type.E"] = "Ulkoinen";
+
?>
Modified: mrbs/trunk/web/lang.fr
===================================================================
--- mrbs/trunk/web/lang.fr 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.fr 2011-11-01 23:27:49 UTC (rev 2156)
@@ -72,8 +72,6 @@
$vocab["all_day"] = "Journée entière";
$vocab["area"] = "Lieu";
$vocab["type"] = "Type ";
-$vocab["internal"] = "Régulier";
-$vocab["external"] = "Occasionnel";
$vocab["save"] = "Enregistrer";
$vocab["rep_type"] = "Type de périodicité ";
$vocab["rep_type_0"] = "Aucune";
@@ -384,4 +382,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Erreur grave : échec de la connexion à la
base de données";
+// Entry types
+$vocab["type.I"] = "Régulier";
+$vocab["type.E"] = "Occasionnel";
+
?>
Modified: mrbs/trunk/web/lang.it
===================================================================
--- mrbs/trunk/web/lang.it 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.it 2011-11-01 23:27:49 UTC (rev 2156)
@@ -61,8 +61,6 @@
$vocab["periods"] = "periodi";
$vocab["all_day"] = "Tutto il giorno";
$vocab["type"] = "Tipo";
-$vocab["internal"] = "Interno";
-$vocab["external"] = "Esterno";
$vocab["save"] = "Salva";
$vocab["rep_type"] = "Tipo ripetizione";
$vocab["rep_type_0"] = "Nessuno";
@@ -248,4 +246,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Errore fatale: Fallita connessione al
database";
+// Entry types
+$vocab["type.I"] = "Interno";
+$vocab["type.E"] = "Esterno";
+
?>
Modified: mrbs/trunk/web/lang.ja
===================================================================
--- mrbs/trunk/web/lang.ja 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.ja 2011-11-01 23:27:49 UTC (rev 2156)
@@ -62,8 +62,6 @@
$vocab["all_day"] = "終日";
$vocab["area"] = "部署";
$vocab["type"] = "種別";
-$vocab["internal"] = "内部会議";
-$vocab["external"] = "外部会議";
$vocab["save"] = "保存";
$vocab["rep_type"] = "繰り返しの様式";
$vocab["rep_type_0"] = "なし";
@@ -347,4 +345,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "致命的なエラー: データベースに接続できません。";
+// Entry types
+$vocab["type.I"] = "内部会議";
+$vocab["type.E"] = "外部会議";
+
?>
Modified: mrbs/trunk/web/lang.ko
===================================================================
--- mrbs/trunk/web/lang.ko 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.ko 2011-11-01 23:27:49 UTC (rev 2156)
@@ -58,8 +58,6 @@
$vocab["periods"] = "기간";
$vocab["all_day"] = "하루종일";
$vocab["type"] = "회의 종류";
-$vocab["internal"] = "내부회의";
-$vocab["external"] = "외부회의";
$vocab["save"] = "보존";
$vocab["rep_type"] = "반복 타입";
$vocab["rep_type_0"] = "없음";
@@ -234,4 +232,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "심각한 에러: 데이터베이스에 접속할 수 없습니다.";
+// Entry types
+$vocab["type.I"] = "내부회의";
+$vocab["type.E"] = "외부회의";
+
?>
Modified: mrbs/trunk/web/lang.nl
===================================================================
--- mrbs/trunk/web/lang.nl 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.nl 2011-11-01 23:27:49 UTC (rev 2156)
@@ -73,8 +73,6 @@
$vocab["all_day"] = "Hele Dag";
$vocab["area"] = "Ruimte";
$vocab["type"] = "Soort";
-$vocab["internal"] = "Intern";
-$vocab["external"] = "Extern";
$vocab["save"] = "Opslaan";
$vocab["rep_type"] = "Soort Herhaling";
$vocab["rep_type_0"] = "Geen";
@@ -385,4 +383,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Fatale Fout: Verbinding naar database server
mislukt";
+// Entry types
+$vocab["type.I"] = "Intern";
+$vocab["type.E"] = "Extern";
+
?>
Modified: mrbs/trunk/web/lang.no
===================================================================
--- mrbs/trunk/web/lang.no 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.no 2011-11-01 23:27:49 UTC (rev 2156)
@@ -63,8 +63,6 @@
$vocab["periods"] = "timer";
$vocab["all_day"] = "hele dagen";
$vocab["type"] = "Type reservasjon";
-$vocab["internal"] = "Intern";
-$vocab["external"] = "Ekstern";
$vocab["save"] = "Lagre";
$vocab["rep_type"] = "Repetisjon";
$vocab["rep_type_0"] = "ingen";
@@ -249,4 +247,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Alvorlig feil: Kunne ikke koble til database";
+// Entry types
+$vocab["type.I"] = "Intern";
+$vocab["type.E"] = "Ekstern";
+
?>
\ No newline at end of file
Modified: mrbs/trunk/web/lang.pl
===================================================================
--- mrbs/trunk/web/lang.pl 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.pl 2011-11-01 23:27:49 UTC (rev 2156)
@@ -60,8 +60,6 @@
$vocab["periods"] = "okresy";
$vocab["all_day"] = "Cały dzień";
$vocab["type"] = "Typ";
-$vocab["internal"] = "Wewnętrzny";
-$vocab["external"] = "Zewnętrzny";
$vocab["save"] = "Zapisz";
$vocab["rep_type"] = "Powtórz Typ";
$vocab["rep_type_0"] = "Żaden";
@@ -250,3 +248,7 @@
// Uzyte w mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Błąd Krytyczny: Błąd połączenia z bazą danych";
+
+// Entry types
+$vocab["type.I"] = "Wewnętrzny";
+$vocab["type.E"] = "Zewnętrzny";
Modified: mrbs/trunk/web/lang.pt
===================================================================
--- mrbs/trunk/web/lang.pt 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.pt 2011-11-01 23:27:49 UTC (rev 2156)
@@ -73,8 +73,6 @@
$vocab["all_day"] = "Todo o dia";
$vocab["area"] = "Área";
$vocab["type"] = "Tipo";
-$vocab["internal"] = "Interno";
-$vocab["external"] = "Externo";
$vocab["save"] = "Gravar";
$vocab["rep_type"] = "Repetir Tipo";
$vocab["rep_type_0"] = "Nenhum";
@@ -384,4 +382,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Erro: Failha ao ligar à base de dados";
+// Entry types
+$vocab["type.I"] = "Interno";
+$vocab["type.E"] = "Externo";
+
?>
Modified: mrbs/trunk/web/lang.ru
===================================================================
--- mrbs/trunk/web/lang.ru 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.ru 2011-11-01 23:27:49 UTC (rev 2156)
@@ -72,8 +72,6 @@
$vocab["all_day"] = "Весь день";
$vocab["area"] = "Корпус";
$vocab["type"] = "Тип";
-$vocab["internal"] = "Внутренний";
-$vocab["external"] = "Внешний";
$vocab["save"] = "Сохранить";
$vocab["rep_type"] = "Тип повторения";
$vocab["rep_type_0"] = "Нет";
@@ -409,6 +407,10 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Критическая ошибка: Не удалось подключиться к
базе данных";
+// Entry types
+$vocab["type.I"] = "Внутренний";
+$vocab["type.E"] = "Внешний";
+
// General
$vocab["fatal_db_error"] = "Критическая ошибка: к сожалению, база данных
не доступна в данный момент.";
Modified: mrbs/trunk/web/lang.sl
===================================================================
--- mrbs/trunk/web/lang.sl 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.sl 2011-11-01 23:27:49 UTC (rev 2156)
@@ -61,8 +61,6 @@
$vocab["periods"] = "ponavljanj";
$vocab["all_day"] = "Vse dni";
$vocab["type"] = "Tip";
-$vocab["internal"] = "Interno";
-$vocab["external"] = "Zunanje";
$vocab["save"] = "Shrani";
$vocab["rep_type"] = "Način ponavljanja";
$vocab["rep_type_0"] = "Brez";
@@ -248,5 +246,9 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "NAPAKA: ni se možno povezati v podatkovno
bazo";
+// Entry types
+$vocab["type.I"] = "Interno";
+$vocab["type.E"] = "Zunanje";
+
?>
Modified: mrbs/trunk/web/lang.sv
===================================================================
--- mrbs/trunk/web/lang.sv 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.sv 2011-11-01 23:27:49 UTC (rev 2156)
@@ -64,8 +64,6 @@
$vocab["all_day"] = "hela dagen";
$vocab["area"] = "Område";
$vocab["type"] = "Typ";
-$vocab["internal"] = "Internt";
-$vocab["external"] = "Externt";
$vocab["save"] = "Spara";
$vocab["rep_type"] = "Repetitionstyp";
$vocab["rep_type_0"] = "ingen";
@@ -349,4 +347,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Fatalt fel: Kunde ej ansluta till databasen!";
+// Entry types
+$vocab["type.I"] = "Internt";
+$vocab["type.E"] = "Externt";
+
?>
Modified: mrbs/trunk/web/lang.tr
===================================================================
--- mrbs/trunk/web/lang.tr 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.tr 2011-11-01 23:27:49 UTC (rev 2156)
@@ -61,8 +61,6 @@
$vocab["periods"] = "dönem";
$vocab["all_day"] = "Tüm Gün";
$vocab["type"] = "Tip";
-$vocab["internal"] = "İç";
-$vocab["external"] = "Dış";
$vocab["Mix"] = "Karma İç+Dış";
$vocab["save"] = "Kaydet";
$vocab["rep_type"] = "Tekrar Tipi";
@@ -249,4 +247,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Ciddi Hata: VeriTabanına bağlanılamadı.";
+// Entry types
+$vocab["type.I"] = "İç";
+$vocab["type.E"] = "Dış";
+
?>
Modified: mrbs/trunk/web/lang.zh-cn
===================================================================
--- mrbs/trunk/web/lang.zh-cn 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.zh-cn 2011-11-01 23:27:49 UTC (rev 2156)
@@ -59,8 +59,6 @@
$vocab["periods"] = "periods";
$vocab["all_day"] = "整天";
$vocab["type"] = "种类";
-$vocab["internal"] = "内部使用";
-$vocab["external"] = "外部使用";
$vocab["save"] = "保存";
$vocab["rep_type"] = "重复预订";
$vocab["rep_type_0"] = "不重复";
@@ -235,4 +233,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Fatal Error: 无法连接数据库";
+// Entry types
+$vocab["type.I"] = "内部使用";
+$vocab["type.E"] = "外部使用";
+
?>
Modified: mrbs/trunk/web/lang.zh-tw
===================================================================
--- mrbs/trunk/web/lang.zh-tw 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/lang.zh-tw 2011-11-01 23:27:49 UTC (rev 2156)
@@ -59,8 +59,6 @@
$vocab["periods"] = "periods";
$vocab["all_day"] = "整天";
$vocab["type"] = "種類";
-$vocab["internal"] = "內部使用";
-$vocab["external"] = "外部使用";
$vocab["save"] = "儲存";
$vocab["rep_type"] = "重覆預約";
$vocab["rep_type_0"] = "不重覆";
@@ -235,4 +233,8 @@
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Fatal Error: 無法連上資料庫";
+// Entry types
+$vocab["type.I"] = "內部使用";
+$vocab["type.E"] = "外部使用";
+
?>
Modified: mrbs/trunk/web/language.inc
===================================================================
--- mrbs/trunk/web/language.inc 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/language.inc 2011-11-01 23:27:49 UTC (rev 2156)
@@ -777,6 +777,13 @@
}
+// Get localised booking type name
+function get_type_vocab($type)
+{
+ return get_vocab("type.$type");
+}
+
+
// Get localized field name for a user defined table column
// Looks for a tag of the format tablename.columnname (where tablename is
// stripped of the table prefix) and if can't find a string for that tag will
Modified: mrbs/trunk/web/report.php
===================================================================
--- mrbs/trunk/web/report.php 2011-11-01 17:44:59 UTC (rev 2155)
+++ mrbs/trunk/web/report.php 2011-11-01 23:27:49 UTC (rev 2156)
@@ -177,7 +177,6 @@
function report_row(&$row, $sortby)
{
- global $typel;
global $output_as_csv, $ajax, $ajax_capable, $json_data;
global $csv_row_sep, $csv_col_sep;
global $custom_fields, $field_natures, $field_lengths, $tbl_entry;
@@ -276,7 +275,8 @@
$values[] = escape($row['description']);
// Entry Type:
- $et = empty($typel[$row['type']]) ? "?".$row['type']."?" :
$typel[$row['type']];
+ $type = get_type_vocab($row['type']);
+ $et = empty($type) ? "?".$row['type']."?" : $type;
$values[] = escape($et);
// Created by:
@@ -380,7 +380,7 @@
function get_sumby_name_from_row(&$row)
{
- global $sumby, $typel;
+ global $sumby;
// Use brief description, created by or type as the name:
switch( $sumby )
@@ -389,7 +389,7 @@
$name = $row['name'];
break;
case 't':
- $name = $typel[ $row['type'] ];
+ $name = get_type_vocab($row['type']);
break;
case 'c':
default:
@@ -1111,8 +1111,9 @@
<label for="typematch"><?php echo get_vocab("match_type")?>:</label>
<select id="typematch" name="typematch[]" multiple="multiple"
size="5">
<?php
- foreach ( $typel as $key => $val )
+ foreach ( $booking_types as $key )
{
+ $val = get_type_vocab($key);
if (!empty($val) )
{
echo " <option value=\"$key\"" .
Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php 2011-11-01 17:44:59 UTC (rev
2155)
+++ mrbs/trunk/web/systemdefaults.inc.php 2011-11-01 23:27:49 UTC (rev
2156)
@@ -919,36 +919,23 @@
* Entry Types
*************/
-// This array maps entry type codes into descriptions. The key to the $typel
array
-// is a single char in the MRBS database, and so the array key can be any
permitted
-// PHP array key character.
+// This array lists the configured entry type codes. The values map to a
+// single char in the MRBS database, and so can be any permitted PHP array
+// character.
//
+// The description of the entry types are localised in the language files
+// as "type.X" where 'X' is the entry type.
+//
// This is a basic default array which ensures there are at least some types
defined.
-// The proper type definitions should be made in config.inc.php: they have to
go there
-// because they use get_vocab which requires language.inc which uses settings
which might
-// be made in config.inc.php.
+// The proper type definitions should be made in config.inc.php.
//
// Each type has a color which is defined in the array $color_types in the
Themes
// directory - just edit whichever include file corresponds to the theme you
// have chosen in the config settings. (The default is default.inc,
unsurprisingly!)
//
-// The value for each type is a short (one word is best) description of the
-// type. The values must be escaped for HTML output ("R&D").
-// Please leave I and E alone for compatibility.
-// If a type's entry is unset or empty, that type is not defined; it will not
-// be shown in the day view color-key, and not offered in the type selector
-// for new or edited entries.
-// $typel["A"] = "A";
-// $typel["B"] = "B";
-// $typel["C"] = "C";
-// $typel["D"] = "D";
-$typel["E"] = "E";
-// $typel["F"] = "F";
-// $typel["G"] = "G";
-// $typel["H"] = "H";
-$typel["I"] = "I";
-// $typel["J"] = "J";
+$booking_types[] = "E";
+$booking_types[] = "I";
// Default type for new bookings
$default_type = "I";
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
RSA® Conference 2012
Save $700 by Nov 18
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits