Commit 2f2ac2236c669e6553883c89a140262742cad68d
1 parent
b4f28d44
Add some tests for File_Gettext.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5354 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
4 changed files
with
82 additions
and
0 deletions
tests/file_gettext/po.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +require_once("../../config/dmsDefaults.php"); | |
| 4 | + | |
| 5 | +require_once('File/Gettext.php'); | |
| 6 | + | |
| 7 | +$aExpected = array( | |
| 8 | + '© 2006 <a href="http://www.ktdms.com/">The Jam Warehouse Software (Pty) Ltd.</a> All Rights Reserved' => '© 2006 <a href="http://www.ktdms.com/">The Jam Warehouse Software (Pty) Ltd.</a> Todos los Derechos Reservados - <a href="http://www.oriondatacenter.com/">Orion Datacenter.</a> Bussines Partner para Colombia', | |
| 9 | + 'Document "%s" renamed.' => 'El documento "%s" ha sido renombrado.', | |
| 10 | + 'Document archived: %s' => 'Documento archivados: %s', | |
| 11 | + 'Document checked in' => 'Documento liberado', | |
| 12 | +); | |
| 13 | + | |
| 14 | +$sFilename = "test2.po"; | |
| 15 | + | |
| 16 | +$foo = File_Gettext::factory('po', $sFilename); | |
| 17 | +$res = $foo->load(); | |
| 18 | +var_dump("t"); | |
| 19 | + | |
| 20 | +foreach ($aExpected as $sSrc => $sExpected) { | |
| 21 | + $sGot = $foo->strings[$sSrc]; | |
| 22 | + if ($sGot != $sExpected) { | |
| 23 | + print "Expected $sExpected, but got $sGot\n"; | |
| 24 | + } | |
| 25 | +} | ... | ... |
tests/file_gettext/test.mo
0 → 100644
No preview for this file type
tests/file_gettext/test.po
0 → 100644
| 1 | +msgid "" | |
| 2 | +msgstr "" | |
| 3 | +"Project-Id-Version: KTDMS 3.0 - Spanish 0.1\n" | |
| 4 | +"Report-Msgid-Bugs-To: \n" | |
| 5 | +"POT-Creation-Date: 2006-03-20 16:07+0200\n" | |
| 6 | +"PO-Revision-Date: 2006-03-20 21:08-0500\n" | |
| 7 | +"Last-Translator: Jaime Zárate <zaratej@oriondatacenter.com>\n" | |
| 8 | +"Language-Team: oriondatacenter <zaratej@oriondatacenter.com>\n" | |
| 9 | +"MIME-Version: 1.0\n" | |
| 10 | +"Content-Type: text/plain; charset=utf-8\n" | |
| 11 | +"Content-Transfer-Encoding: 8bit\n" | |
| 12 | +"X-Poedit-Language: Spanish\n" | |
| 13 | +"X-Poedit-Country: COLOMBIA\n" | |
| 14 | +"X-Poedit-SourceCharset: utf-8\n" | |
| 15 | + | |
| 16 | +msgid "© 2006 <a href=\"http://www.ktdms.com/\">The Jam Warehouse Software (Pty) Ltd.</a> All Rights Reserved" | |
| 17 | +msgstr "© 2006 <a href=\"http://www.ktdms.com/\">The Jam Warehouse Software (Pty) Ltd.</a> Todos los Derechos Reservados - <a href=\"http://www.oriondatacenter.com/\">Orion Datacenter.</a> Bussines Partner para Colombia" | |
| 18 | + | |
| 19 | +msgid "Document \"%s\" renamed." | |
| 20 | +msgstr "El documento \"%s\" ha sido renombrado." | |
| 21 | + | |
| 22 | +msgid "Document archived: %s" | |
| 23 | +msgstr "Documento archivados: %s" | |
| 24 | + | |
| 25 | +msgid "Document checked in" | |
| 26 | +msgstr "Documento liberado" | ... | ... |
tests/file_gettext/test2.po
0 → 100644
| 1 | +msgid "" | |
| 2 | +msgstr "" | |
| 3 | +"Project-Id-Version: KTDMS 3.0 - Spanish 0.1\n" | |
| 4 | +"Report-Msgid-Bugs-To: \n" | |
| 5 | +"POT-Creation-Date: 2006-03-20 16:07+0200\n" | |
| 6 | +"PO-Revision-Date: 2006-03-20 21:08-0500\n" | |
| 7 | +"Last-Translator: Jaime Zárate <zaratej@oriondatacenter.com>\n" | |
| 8 | +"Language-Team: oriondatacenter <zaratej@oriondatacenter.com>\n" | |
| 9 | +"MIME-Version: 1.0\n" | |
| 10 | +"Content-Type: text/plain; charset=utf-8\n" | |
| 11 | +"Content-Transfer-Encoding: 8bit\n" | |
| 12 | +"X-Poedit-Language: Spanish\n" | |
| 13 | +"X-Poedit-Country: COLOMBIA\n" | |
| 14 | +"X-Poedit-SourceCharset: utf-8\n" | |
| 15 | + | |
| 16 | +msgid "" | |
| 17 | +"© 2006 <a href=\"http://www.ktdms.com/\">The Jam Warehouse Software " | |
| 18 | +"(Pty) Ltd.</a> All Rights Reserved" | |
| 19 | +msgstr "" | |
| 20 | +"© 2006 <a href=\"http://www.ktdms.com/\">The Jam Warehouse Software " | |
| 21 | +"(Pty) Ltd.</a> Todos los Derechos Reservados - <a href=\"http://www." | |
| 22 | +"oriondatacenter.com/\">Orion Datacenter.</a> Bussines Partner para Colombia" | |
| 23 | + | |
| 24 | +msgid "Document \"%s\" renamed." | |
| 25 | +msgstr "El documento \"%s\" ha sido renombrado." | |
| 26 | + | |
| 27 | +msgid "Document archived: %s" | |
| 28 | +msgstr "Documento archivados: %s" | |
| 29 | + | |
| 30 | +msgid "Document checked in" | |
| 31 | +msgstr "Documento liberado" | ... | ... |