cvs: pres2 / config.php-dist index.php /locale/en/LC_MESSAGES pres2.mo pres2.php pres2.po /locale/es/LC_MESSAGES pres2.mo pres2.php pres2.po

From: Date: Tue, 24 May 2005 22:38:35 +0000
Subject: cvs: pres2 / config.php-dist index.php /locale/en/LC_MESSAGES pres2.mo pres2.php pres2.po /locale/es/LC_MESSAGES pres2.mo pres2.php pres2.po
Groups: php.pres 
Request: Send a blank email to pres+get-1140@lists.php.net to get a copy of this message
jmcastagnetto Tue May 24 18:38:35 2005 EDT Added files: /pres2/locale/en/LC_MESSAGES pres2.mo pres2.php pres2.po /pres2/locale/es/LC_MESSAGES pres2.mo pres2.php pres2.po Modified files: /pres2 config.php-dist index.php Log: Adding support for localization of navigation/talk selection pages.

http://cvs.php.net/diff.php/pres2/config.php-dist?r1=1.13&r2=1.14&ty=u Index: pres2/config.php-dist diff -u pres2/config.php-dist:1.13 pres2/config.php-dist:1.14 --- pres2/config.php-dist:1.13 Fri Aug 27 04:48:29 2004 +++ pres2/config.php-dist Tue May 24 18:38:33 2005 @@ -12,6 +12,14 @@ $pdf_example_font = "Courier"; $jsKeyboard = true; // enable javascript handling of keyboard events $topic_cols = 3; // number of topic columns on front page + + // language/locale for PRES2 messages, available: en, es + // do not use es_ES or other variation, set the equivalencies + // in the function _init_gettext() in messages.php + define('PRES2_LOCALE', 'en'); + define('PRES2_LOCALEDIR', 'locale'); + define('PRES2_USE_GETTEXT', false); + // Convert em font sizing to flash font sizes function flash_fixsize($ht) { http://cvs.php.net/diff.php/pres2/index.php?r1=1.40&r2=1.41&ty=u Index: pres2/index.php diff -u pres2/index.php:1.40 pres2/index.php:1.41 --- pres2/index.php:1.40 Sat Sep 11 19:59:51 2004 +++ pres2/index.php Tue May 24 18:38:33 2005 @@ -5,6 +5,7 @@ require 'config.php'; require 'XML_Presentation.php'; + require_once 'messages.php'; session_start(); @@ -23,8 +24,8 @@ } if (!$ps) { - echo "Could not find any slides (xml files) in \$presentationDir $presentationDir<BR>"; - echo "Please modify config.php<BR>"; + echo message('SLIDES_NOT_FOUND')." \$presentationDir $presentationDir<BR>"; + echo message('MODIFY_CONFIG')." config.php<BR>"; exit; } @@ -109,7 +110,7 @@ echo "<img src=\"$logo2\" align=\"right\" style=\"float: right;\">"; } - echo "<div style=\"font-size: 3em; margin: 0 2.5em 0 0;\">PHP Presentation System</div>"; + echo "<div style=\"font-size: 3em; margin: 0 2.5em 0 0;\">".message('PRES2_TITLE')."</div>"; echo '</div></div>'; ?> @@ -117,8 +118,7 @@ <div class="shadow" style="margin: 1em 4em 0.8em 3em;"> <div class="output" style="font-size: 1.8em; margin: -0.5em 0 0 -0.5em;"> <?php if(!isset($topic)){ ?> -<p> Welcome to the PHP Presentation System. Here we list all of the available presentation categories stored -within this system.</p> +<p><?php echo message('WELCOME_MSG'); ?></p> <?php ksort($topics); print('<table width="100%"><tr>'."\n"); @@ -144,51 +144,50 @@ $_SESSION['selected_display_mode'] = $display_mode; ?> <form name="modes_form" action="<?php echo $_SERVER['PHP_SELF']?>" method="POST"> -<p>Please select a display mode: +<p><?php echo message('SELECT_MODE'); ?> <select name="modes" onChange="change_mode()"> -<option value="html" <?php echo ($display_mode=='html')?'SELECTED':''?>>Fancy HTML (Best with Mozilla)</option> -<option value="plainhtml" <?php echo ($display_mode=='plainhtml')?'SELECTED':''?>>Plain HTML</option> -<option value="flash" <?php echo ($display_mode=='flash')?'SELECTED':''?>>Flash 5 (navbar only)</option> -<option value="pdfus" <?php echo ($display_mode=='pdfus')?'SELECTED':''?>>PDF (US-Letter)</option> -<option value="pdfusl" <?php echo ($display_mode=='pdfusl')?'SELECTED':''?>>PDF (US-Legal)</option> -<option value="pdfa4" <?php echo ($display_mode=='pdfa4')?'SELECTED':''?>>PDF (A4)</option> +<option value="html" <?php echo ($display_mode=='html')?'SELECTED':''?>><?php echo message('OPT_FANCYHTML'); ?></option> +<option value="plainhtml" <?php echo ($display_mode=='plainhtml')?'SELECTED':''?>><?php echo message('OPT_PLAINHTML'); ?></option> +<option value="flash" <?php echo ($display_mode=='flash')?'SELECTED':''?>><?php echo message('OPT_FLASH'); ?></option> +<option value="pdfus" <?php echo ($display_mode=='pdfus')?'SELECTED':''?>><?php echo message('OPT_PDFLETTER'); ?></option> +<option value="pdfusl" <?php echo ($display_mode=='pdfusl')?'SELECTED':''?>><?php echo message('OPT_PDFLEGAL'); ?></option> +<option value="pdfa4" <?php echo ($display_mode=='pdfa4')?'SELECTED':''?>><?php echo message('OPT_PDFA4'); ?></option> </select> <br /> -Show Speaker Notes: <input type="checkbox" name="speaker" <?php echo ($form_speaker=='true')?'checked':''?> onChange="change_mode()"> +<?php echo message('SHOW_NOTES'); ?> <input type="checkbox" name="speaker" <?php echo ($form_speaker=='true')?'checked':''?> onChange="change_mode()"> </p> </form> <?php switch($display_mode) { case 'html': if($jsKeyboard) { - echo "<p>Keyboard controls are available: <br />\n". - " &lt;cursor-left&gt; previous slide<br />\n". - " &lt;cursor-right&gt; next slide<br />\n". - " also use &lt;cursor-right&gt; to step through animated slides.</p>\n"; + echo "<p>".nl2br(message('HTML_KEYBOARD_CONTROLS'))."</p>\n"; } else { - echo "<p>Keyboard controls disabled</p>\n"; + echo "<p>".message('HTML_NO_KEYBOARD_CONTROLS')."</p>\n"; break; } break; case 'flash': - echo "<p>Keyboard controls available: <br />\n". - " &lt;Space&gt; or &lt;Enter&gt; next slide<br />\n". - " &lt;Backspace&gt; previous slide<br />\n"; + echo "<p>".nl2br(message('FLASH_KEYBOARD_CONTROLS'))."</p>\n"; break; case 'pdfus': case 'pdfusl': case 'pdfa4': if (!extension_loaded("pdf")) { - echo "<p>The PDF extension is not loaded, so this format is not available here.</p>"; + echo "<p>".message('NO_PDF_EXTENSION')."</p>\n"; } break; } ?> -<p>The available presentations are... (most recent first)</p> +<p><?php echo message('AVAILABLE_PRESENTATIONS'); ?></p> <table align="center" class="index"> -<tr><th>Title</th><th>Date</th><th>Location</th><th>Speaker</th><th>Slides</th></tr> +<tr><th><?php echo message('PRES_TITLE'); ?></th> + <th><?php echo message('PRES_DATE'); ?></th> + <th><?php echo message('PRES_LOCATION'); ?></th> + <th><?php echo message('PRES_SPEAKER'); ?></th> + <th><?php echo message('PRES_SLIDES'); ?></th></tr> <?php $prnum = sizeof($pr); http://cvs.php.net/co.php/pres2/locale/en/LC_MESSAGES/pres2.mo?r=1.1&p=1 Index: pres2/locale/en/LC_MESSAGES/pres2.mo +++ pres2/locale/en/LC_MESSAGES/pres2.mo •ÞÌ|ð 7Q_p ~ ˆ ’Ÿ­ » ÇÑ ß ë ø   +67gn¢Öy”F¢é'6 FQinw~†Œª(¾|ç   AVAILABLE_PRESENTATIONSFLASH_KEYBOARD_CONTROLSHTML_KEYBOARD_CONTROLSHTML_NO_KEYBOARD_CONTROLSMODIFY_CONFIGNO_PDF_EXTENSIONOPT_FANCYHTMLOPT_FLASHOPT_PDFA4OPT_PDFLEGALOPT_PDFLETTEROPT_PLAINHTMLPRES2_TITLEPRES_DATEPRES_LOCATIONPRES_SLIDESPRES_SPEAKERPRES_TITLESELECT_MODESHOW_NOTESSLIDES_NOT_FOUNDWELCOME_MSGThe available presentations are... (most recent first)Keyboard controls available: &lt;Space&gt; or &lt;Enter&gt; next slide &lt;Backspace&gt; previous slideKeyboard controls are available: &lt;cursor-left&gt; previous slide &lt;cursor-right&gt; next slide also use &lt;cursor-right&gt; to step through animated slides.Keyboard controls disabledPlease modifyThe PDF extension is not loaded, so this format is not available here.Fancy HTML (Best with Mozilla)Flash 5 (navbar only)PDF (A4)PDF (US-Legal)PDF (US-Letter)Plain HTMLPHP Presentation SystemDateLocationSlidesSpeakerTitlePlease select a display mode:Show Speaker Notes:Could not find any slides (xml files) inWelcome to the PHP Presentation System. Here we list all of the available presentation categories stored within this system. http://cvs.php.net/co.php/pres2/locale/en/LC_MESSAGES/pres2.php?r=1.1&p=1 Index: pres2/locale/en/LC_MESSAGES/pres2.php +++ pres2/locale/en/LC_MESSAGES/pres2.php <?php // en_US $messages = array( 'SLIDES_NOT_FOUND' => 'Could not find any slides (xml files) in', 'MODIFY_CONFIG' => 'Please modify', 'PRES2_TITLE' => 'PHP Presentation System', 'WELCOME_MSG' => 'Welcome to the PHP Presentation System. Here we list all of the available presentation categories stored within this system.', 'SELECT_MODE' => 'Please select a display mode:', 'OPT_FANCYHTML' => 'Fancy HTML (Best with Mozilla)', 'OPT_PLAINHTML' => 'Plain HTML', 'OPT_FLASH' => 'Flash 5 (navbar only)', 'OPT_PDFLETTER' => 'PDF (US-Letter)', 'OPT_PDFLEGAL' => 'PDF (US-Legal)', 'OPT_PDFA4' => 'PDF (A4)', 'SHOW_NOTES' => 'Show Speaker Notes:', 'HTML_KEYBOARD_CONTROLS' => "Keyboard controls are available:\n". " &lt;cursor-left&gt; previous slide\n". " &lt;cursor-right&gt; next slide\n". " also use &lt;cursor-right&gt; to step through animated slides.", 'HTML_NO_KEYBOARD_CONTROLS' => 'Keyboard controls disabled', 'FLASH_KEYBOARD_CONTROLS' => "Keyboard controls available:\n". " &lt;Space&gt; or &lt;Enter&gt; next slide\n". " &lt;Backspace&gt; previous slide", 'NO_PDF_EXTENSION' => 'The PDF extension is not loaded, so this format is not available here.', 'AVAILABLE_PRESENTATIONS' => 'The available presentations are... (most recent first)', 'PRES_TITLE' => 'Title', 'PRES_DATE' => 'Date', 'PRES_LOCATION' => 'Location', 'PRES_SPEAKER' => 'Speaker', 'PRES_SLIDES' => 'Slides', ); ?> http://cvs.php.net/co.php/pres2/locale/en/LC_MESSAGES/pres2.po?r=1.1&p=1 Index: pres2/locale/en/LC_MESSAGES/pres2.po +++ pres2/locale/en/LC_MESSAGES/pres2.po # English message strings for PRES2 # Copyright (C) PHP # Jesus M. Castagnetto <jmcastagnetto@php.net>, 2005. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.0\n" "POT-Creation-Date: 2005-05-07 23:21-0500\n" "PO-Revision-Date: 2005-05-07 23:26-0500\n" "Last-Translator: Jesus M. Castagnetto <jmcastagnetto@php.net>\n" "Language-Team:\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ASCII\n" "Content-Transfer-Encoding: 8bit\n" msgid "SLIDES_NOT_FOUND" msgstr "Could not find any slides (xml files) in" msgid "MODIFY_CONFIG" msgstr "Please modify" msgid "PRES2_TITLE" msgstr "PHP Presentation System" msgid "WELCOME_MSG" msgstr "Welcome to the PHP Presentation System. Here we list all of the available presentation categories stored within this system." msgid "SELECT_MODE" msgstr "Please select a display mode:" msgid "OPT_FANCYHTML" msgstr "Fancy HTML (Best with Mozilla)" msgid "OPT_PLAINHTML" msgstr "Plain HTML" msgid "OPT_FLASH" msgstr "Flash 5 (navbar only)" msgid "OPT_PDFLETTER" msgstr "PDF (US-Letter)" msgid "OPT_PDFLEGAL" msgstr "PDF (US-Legal)" msgid "OPT_PDFA4" msgstr "PDF (A4)" msgid "SHOW_NOTES" msgstr "Show Speaker Notes:" msgid "HTML_KEYBOARD_CONTROLS" msgstr "Keyboard controls are available:\n&lt;cursor-left&gt; previous slide\n&lt;cursor-right&gt; next slide\nalso use &lt;cursor-right&gt; to step through animated slides." msgid "HTML_NO_KEYBOARD_CONTROLS" msgstr "Keyboard controls disabled" msgid "FLASH_KEYBOARD_CONTROLS" msgstr "Keyboard controls available:\n&lt;Space&gt; or &lt;Enter&gt; next slide\n&lt;Backspace&gt; previous slide" msgid "NO_PDF_EXTENSION" msgstr "The PDF extension is not loaded, so this format is not available here." msgid "AVAILABLE_PRESENTATIONS" msgstr "The available presentations are... (most recent first)" msgid "PRES_TITLE" msgstr "Title" msgid "PRES_DATE" msgstr "Date" msgid "PRES_LOCATION" msgstr "Location" msgid "PRES_SPEAKER" msgstr "Speaker" msgid "PRES_SLIDES" msgstr "Slides" http://cvs.php.net/co.php/pres2/locale/es/LC_MESSAGES/pres2.mo?r=1.1&p=1 Index: pres2/locale/es/LC_MESSAGES/pres2.mo +++ pres2/locale/es/LC_MESSAGES/pres2.mo •ÞÌ|ð 7Q_p ~ ˆ ’Ÿ­ » ÇÑ ß ë ø   +F7š~È$â`(|.¥Ôë ( 4U[ k x„2’!Å0ç„   AVAILABLE_PRESENTATIONSFLASH_KEYBOARD_CONTROLSHTML_KEYBOARD_CONTROLSHTML_NO_KEYBOARD_CONTROLSMODIFY_CONFIGNO_PDF_EXTENSIONOPT_FANCYHTMLOPT_FLASHOPT_PDFA4OPT_PDFLEGALOPT_PDFLETTEROPT_PLAINHTMLPRES2_TITLEPRES_DATEPRES_LOCATIONPRES_SLIDESPRES_SPEAKERPRES_TITLESELECT_MODESHOW_NOTESSLIDES_NOT_FOUNDWELCOME_MSGLas presentaciones disponibles son... (la m&aacute;s reciente primera)Controles de teclado disponibles: &lt;Barra de espacio&gt; or &lt;Tecla de retorno&gt; diapositiva siguiente &lt;Tecla de retroceso&gt; diapositiva previaControles de teclado disponibles: &lt;flecha-izquierda&gt; diapositiva previa &lt;flecha-derecha&gt; diapositiva siguiente tambi&eacute;n use &lt;flecha-derecha&gt; para activar diapositivas animadas.Controles de teclado no disponibles.Por favor modifiqueLa extensi&ooacute;n de PDF no esta cargada, de manera que este formato no esta disponible aqui.HTML Din&aacute;mico (Mejor con Mozilla)Flash 5 (barra de navegaci&oacute;n solamente)PDF (Tama&ntilde;o A4)PDF (Tama&ntilde;o oficio, US)PDF (Tama&ntilde;o carta, US)HTML SimpleSistema de Presentaciones de PHPFechaLocaci&oacute;nDiapositivasPresentadorT&iacute;tuloPor favor seleccione un modo de exhibici&oacute;n:Mostrar las Notas de Presentador:No pude encontrar diapositivas (archivos xml) enBienvenido al Sistema de Presentaciones de PHP. Aqui listamos todas las categorias de presentaciones disponibles en nuestro sistema. http://cvs.php.net/co.php/pres2/locale/es/LC_MESSAGES/pres2.php?r=1.1&p=1 Index: pres2/locale/es/LC_MESSAGES/pres2.php +++ pres2/locale/es/LC_MESSAGES/pres2.php <?php // es_PE $messages = array( 'SLIDES_NOT_FOUND' => 'No pude encontrar diapositivas (archivos xml) en', 'MODIFY_CONFIG' => 'Por favor modifique', 'PRES2_TITLE' => 'Sistema de Presentaciones de PHP', 'WELCOME_MSG' => 'Bienvenido al Sistema de Presentaciones de PHP. Aqui listamos todas las categorias de presentaciones disponibles en nuestro sistema.', 'SELECT_MODE' => 'Por favor seleccione un modo de exhibici&oacute;n:', 'OPT_FANCYHTML' => 'HTML Din&aacute;mico (Mejor con Mozilla)', 'OPT_PLAINHTML' => 'HTML Simple', 'OPT_FLASH' => 'Flash 5 (barra de navegaci&oacute;n solamente)', 'OPT_PDFLETTER' => 'PDF (Tama&ntilde;o carta, US)', 'OPT_PDFLEGAL' => 'PDF (Tama&ntilde;o oficio, US)', 'OPT_PDFA4' => 'PDF (Tama&ntilde;o A4)', 'SHOW_NOTES' => 'Mostrar las Notas de Presentador:', 'HTML_KEYBOARD_CONTROLS' => "Controles de teclado disponibles:\n". " &lt;flecha-izquierda&gt; diapositiva previa\n". " &lt;flecha-derecha&gt; diapositiva siguiente\n". " tambi&eacute;n use &lt;flecha-derecha&gt; para activar diapositivas animadas.", 'HTML_NO_KEYBOARD_CONTROLS' => 'Controles de teclado no disponibles.', 'FLASH_KEYBOARD_CONTROLS' => "Controles de teclado disponibles:\n". " &lt;Barra de espacio&gt; or &lt;Tecla de retorno&gt; diapositiva siguiente\n". " &lt;Tecla de retroceso&gt; diapositiva previa", 'NO_PDF_EXTENSION' => 'La extensi&ooacute;n de PDF no esta cargada, de manera que este formato no esta disponible aqui.', 'AVAILABLE_PRESENTATIONS' => 'Las presentaciones disponibles son... (la m&aacute;s reciente primera)', 'PRES_TITLE' => 'T&iacute;tulo', 'PRES_DATE' => 'Fecha', 'PRES_LOCATION' => 'Locaci&oacute;n', 'PRES_SPEAKER' => 'Presentador', 'PRES_SLIDES' => 'Diapositivas', ); ?> http://cvs.php.net/co.php/pres2/locale/es/LC_MESSAGES/pres2.po?r=1.1&p=1 Index: pres2/locale/es/LC_MESSAGES/pres2.po +++ pres2/locale/es/LC_MESSAGES/pres2.po # Spanish translation of PRES2 # Copyright (C) PHP # Jesus M. Castagnetto <jmcastagnetto@php.net>, 2005. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.0\n" "POT-Creation-Date: 2005-05-07 23:21-0500\n" "PO-Revision-Date: 2005-05-07 23:26-0500\n" "Last-Translator: Jesus M. Castagnetto <jmcastagnetto@php.net>\n" "Language-Team:\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ASCII\n" "Content-Transfer-Encoding: 8bit\n" msgid "SLIDES_NOT_FOUND" msgstr"No pude encontrar diapositivas (archivos xml) en" msgid "MODIFY_CONFIG" msgstr"Por favor modifique" msgid "PRES2_TITLE" msgstr"Sistema de Presentaciones de PHP" msgid "WELCOME_MSG" msgstr"Bienvenido al Sistema de Presentaciones de PHP. Aqui listamos todas las categorias de presentaciones disponibles en nuestro sistema." msgid "SELECT_MODE" msgstr"Por favor seleccione un modo de exhibici&oacute;n:" msgid "OPT_FANCYHTML" msgstr"HTML Din&aacute;mico (Mejor con Mozilla)" msgid "OPT_PLAINHTML" msgstr"HTML Simple" msgid "OPT_FLASH" msgstr"Flash 5 (barra de navegaci&oacute;n solamente)" msgid "OPT_PDFLETTER" msgstr"PDF (Tama&ntilde;o carta, US)" msgid "OPT_PDFLEGAL" msgstr"PDF (Tama&ntilde;o oficio, US)" msgid "OPT_PDFA4" msgstr"PDF (Tama&ntilde;o A4)" msgid "SHOW_NOTES" msgstr"Mostrar las Notas de Presentador:" msgid "HTML_KEYBOARD_CONTROLS" msgstr"Controles de teclado disponibles:\n&lt;flecha-izquierda&gt; diapositiva previa\n&lt;flecha-derecha&gt; diapositiva siguiente\ntambi&eacute;n use &lt;flecha-derecha&gt; para activar diapositivas animadas." msgid "HTML_NO_KEYBOARD_CONTROLS" msgstr"Controles de teclado no disponibles." msgid "FLASH_KEYBOARD_CONTROLS" msgstr"Controles de teclado disponibles:\n&lt;Barra de espacio&gt; or &lt;Tecla de retorno&gt; diapositiva siguiente\n&lt;Tecla de retroceso&gt; diapositiva previa" msgid "NO_PDF_EXTENSION" msgstr"La extensi&ooacute;n de PDF no esta cargada, de manera que este formato no esta disponible aqui." msgid "AVAILABLE_PRESENTATIONS" msgstr"Las presentaciones disponibles son... (la m&aacute;s reciente primera)" msgid "PRES_TITLE" msgstr"T&iacute;tulo" msgid "PRES_DATE" msgstr"Fecha" msgid "PRES_LOCATION" msgstr"Locaci&oacute;n" msgid "PRES_SPEAKER" msgstr"Presentador" msgid "PRES_SLIDES" msgstr"Diapositivas"
« previous php.pres (#1140) next »