diff --git a/admin/admin.php b/admin/admin.php index ca459af..fbeb37e 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -65,7 +65,7 @@ if ($user->isAdmin()) {

Manage

  • -
  • +
  •  

    diff --git a/admin/settings.php b/admin/settings.php index 6eaa460..1cdd45d 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -101,7 +101,14 @@ if ($user->isAdmin()) {
  • diff --git a/classes/configuration.class.php b/classes/configuration.class.php index ea4ff11..c9db89f 100644 --- a/classes/configuration.class.php +++ b/classes/configuration.class.php @@ -39,6 +39,8 @@ class configuration extends Conexion_Mysql { $this->description = $row['description']; $this->lang = $row['lang']; $this->template = $row['template']; + + initLang($this->lang); $this->urlFriendly = $this->get_option("url_friendly"); $this->richText = $this->get_option("rich_text"); diff --git a/classes/functions.php b/classes/functions.php index 910c174..0984b96 100644 --- a/classes/functions.php +++ b/classes/functions.php @@ -276,5 +276,46 @@ $curl = $curl[1]; } return $curl; - } + } + + function transform_offset($offset){ + + } + + function getLangs() { + $langs_dir = "languages"; + $dirs = array(); + $path = getcwd(); + $dir = (substr(PHP_OS, 0, 3) == 'WIN') ? $path."\\".$langs_dir : $path."/".$langs_dir; + $dir = str_replace("admin\\", "", $dir); + $dir = str_replace("admin/", "", $dir); + $i=0; + $cls_lang_dir = @ dir($dir); + while (($directory = $cls_lang_dir->read()) !== false) { + if($directory != "." && $directory != "..") { + + $dir2 = (substr(PHP_OS, 0, 3) == 'WIN') ? $path."\\".$langs_dir."\\".$directory : $path."/".$langs_dir."/".$directory; + $dir2 = str_replace("admin\\", "", $dir2); + $dir2 = str_replace("admin/", "", $dir2); + if(is_dir($dir2)){ + $cls_lang_dir2 = @ dir($dir2); + while (($directory2 = $cls_lang_dir2->read()) !== false) { + if($directory2 != "." && $directory2 != "..") { + if (preg_match('|^\.+$|', $directory2)){ + continue; + } + if (preg_match('|\.mo$|', $directory2)){ + if(!in_array($directory2,$dirs)){ + $dirs[$i]=trim($directory); + $i++; + } + } + } + } + } + } + } + $dirs = array_unique($dirs); + return $dirs; + } ?> \ No newline at end of file diff --git a/config-sample.php b/config-sample.php index 8f1c45b..29d1987 100644 --- a/config-sample.php +++ b/config-sample.php @@ -32,5 +32,4 @@ require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php'); require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php'); require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'lang.functions.php'); - initLang('en'); ?> \ No newline at end of file diff --git a/languages/en/messages.mo b/languages/en/messages.mo new file mode 100644 index 0000000..3eb32f2 Binary files /dev/null and b/languages/en/messages.mo differ diff --git a/languages/en/messages.po b/languages/en/messages.po new file mode 100644 index 0000000..a5ec9a4 --- /dev/null +++ b/languages/en/messages.po @@ -0,0 +1,372 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-07-20 17:40-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:28 +msgid "admin users" +msgstr "" + +#: admin.php:52 index.php:141 options.php:58 settings.php:58 user.php:68 +msgid "Processing request..." +msgstr "" + +#: admin.php:55 close.php:39 index.php:144 options.php:61 settings.php:61 +#: user.php:71 +msgid "home" +msgstr "" + +#: admin.php:57 index.php:146 +msgid "View Tumblelog" +msgstr "" + +#: admin.php:58 index.php:147 +msgid "Log out" +msgstr "" + +#: admin.php:66 index.php:321 options.php:73 settings.php:74 +msgid "Settings" +msgstr "" + +#: admin.php:67 index.php:324 +msgid "Posts" +msgstr "" + +#: admin.php:68 +msgid "Add user" +msgstr "" + +#: admin.php:69 index.php:323 options.php:72 settings.php:72 user.php:82 +msgid "Users" +msgstr "" + +#: admin.php:75 admin.php:81 admin.php:87 +msgid "
    " +msgstr "" + +#: admin.php:75 +msgid "The user has been added successfully." +msgstr "" + +#: admin.php:75 admin.php:81 admin.php:87 admin.php:93 admin.php:95 +msgid "
    " +msgstr "" + +#: admin.php:81 +msgid "The user has been eliminated successfully." +msgstr "" + +#: admin.php:87 +msgid "The user has been modified successfully." +msgstr "" + +#: admin.php:93 +msgid "
    " +msgstr "" + +#: admin.php:93 ajax.php:36 +msgid "The username is not available." +msgstr "" + +#: admin.php:95 +msgid "
    " +msgstr "" + +#: admin.php:95 +msgid "Error on the database server:." +msgstr "" + +#: admin.php:95 +msgid " " +msgstr "" + +#: admin.php:95 +msgid "des" +msgstr "" + +#: admin.php:103 +msgid "Login" +msgstr "" + +#: admin.php:104 +msgid "Name" +msgstr "" + +#: admin.php:105 +msgid "Actions" +msgstr "" + +#: admin.php:115 +msgid "class=\"odd\"" +msgstr "" + +#: admin.php:117 +msgid "login" +msgstr "" + +#: admin.php:117 admin.php:120 +msgid "\n" +msgstr "" + +#: admin.php:120 +msgid "name" +msgstr "" + +#: admin.php:123 admin.php:126 +msgid "id_user" +msgstr "" + +#: admin.php:123 user.php:83 +msgid "Edit" +msgstr "" + +#: admin.php:126 +msgid "Delete" +msgstr "" + +#: admin.php:135 +msgid "No users available." +msgstr "" + +#: ajax.php:23 +msgid " ending session..." +msgstr "" + +#: ajax.php:25 +msgid " failure ending session..." +msgstr "" + +#: ajax.php:31 +msgid "Required field cannot be left blank." +msgstr "" + +#: ajax.php:34 +msgid "Username available." +msgstr "" + +#: close.php:27 +msgid "logout" +msgstr "" + +#: close.php:41 index.php:146 options.php:63 settings.php:63 user.php:73 +msgid "Take me to the tumblelog" +msgstr "" + +#: close.php:41 options.php:63 settings.php:63 user.php:73 +msgid "Back to the Tumblelog" +msgstr "" + +#: close.php:48 +msgid "Closing session" +msgstr "" + +#: close.php:49 +msgid "logoff" +msgstr "" + +#: close.php:57 +msgid "Ending session..." +msgstr "" + +#: close.php:61 +msgid "Has happened an error when closing the session." +msgstr "" + +#: index.php:104 +msgid "control panel" +msgstr "" + +#: index.php:153 +msgid "New Post" +msgstr "" + +#: index.php:154 +msgid "Chat" +msgstr "" + +#: index.php:155 +msgid "Quote" +msgstr "" + +#: index.php:156 +msgid "Link" +msgstr "" + +#: index.php:157 +msgid "Audio" +msgstr "" + +#: index.php:158 +msgid "Video" +msgstr "" + +#: index.php:159 +msgid "Picture" +msgstr "" + +#: index.php:160 +msgid "Regular" +msgstr "" + +#: index.php:167 +msgid "" +"A new gelato version has been released and is ready for download." +msgstr "" + +#: index.php:172 +msgid "The post has been eliminated successfully." +msgstr "" + +#: index.php:178 +msgid "The post has been modified successfully." +msgstr "" + +#: index.php:184 +msgid "The post has been added successfully." +msgstr "" + +#: index.php:190 +msgid "Error on the database server:" +msgstr "" + +#: index.php:196 +msgid "Not an MP3 file or an upload problem." +msgstr "" + +#: index.php:202 +msgid "Not a photo file or an upload problem." +msgstr "" + +#: index.php:305 +msgid "syntax is supported." +msgstr "" + +#: index.php:322 options.php:74 settings.php:73 +msgid "Options" +msgstr "" + +#: index.php:427 +msgid "No posts in this tumblelog." +msgstr "" + +#: options.php:35 +msgid "options" +msgstr "" + +#: options.php:70 +msgid "Tumblelog options" +msgstr "" + +#: options.php:71 settings.php:71 user.php:81 +msgid "Post" +msgstr "" + +#: options.php:80 settings.php:80 +msgid "The configuration has been modified successfully." +msgstr "" + +#: options.php:85 settings.php:85 +msgid "Error on the database server: " +msgstr "" + +#: options.php:94 +msgid "Rich text editor:" +msgstr "" + +#: options.php:96 options.php:102 +msgid "Active" +msgstr "" + +#: options.php:97 options.php:103 +msgid "Deactive" +msgstr "" + +#: options.php:109 settings.php:122 user.php:139 +msgid "Modify" +msgstr "" + +#: settings.php:35 +msgid "settings" +msgstr "" + +#: settings.php:70 +msgid "Tumblelog configuration" +msgstr "" + +#: settings.php:94 +msgid "Title:" +msgstr "" + +#: settings.php:96 +msgid "Description:" +msgstr "" + +#: settings.php:98 +msgid "Installation URL" +msgstr "" + +#: settings.php:100 +msgid "Post limit:" +msgstr "" + +#: settings.php:102 +msgid "Language:" +msgstr "" + +#: settings.php:107 +msgid "Template:" +msgstr "" + +#: user.php:56 +msgid "add user" +msgstr "" + +#: user.php:80 +msgid "Start session" +msgstr "" + +#: user.php:83 user.php:139 +msgid "Add" +msgstr "" + +#: user.php:99 +msgid "user:" +msgstr "" + +#: user.php:115 +msgid "password:" +msgstr "" + +#: user.php:119 +msgid "retype password:" +msgstr "" + +#: user.php:123 +msgid "name:" +msgstr "" + +#: user.php:127 +msgid "e-mail:" +msgstr "" + +#: user.php:131 +msgid "website:" +msgstr "" + +#: user.php:135 +msgid "about:" +msgstr "" diff --git a/languages/es-mx/messages.mo b/languages/es-mx/messages.mo new file mode 100644 index 0000000..7a10821 Binary files /dev/null and b/languages/es-mx/messages.mo differ diff --git a/languages/es-mx/messages.po b/languages/es-mx/messages.po new file mode 100644 index 0000000..2ac49c5 --- /dev/null +++ b/languages/es-mx/messages.po @@ -0,0 +1,419 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: gelato mexicna spanish\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-07-20 17:40-0500\n" +"PO-Revision-Date: 2007-07-21 00:40-0600\n" +"Last-Translator: pecesama \n" +"Language-Team: pecesama \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Spanish\n" +"X-Poedit-Country: MEXICO\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: admin.php:28 +msgid "admin users" +msgstr "administrar usuarios" + +#: admin.php:52 +#: index.php:141 +#: options.php:58 +#: settings.php:58 +#: user.php:68 +msgid "Processing request..." +msgstr "Procesando solicitud..." + +#: admin.php:55 +#: close.php:39 +#: index.php:144 +#: options.php:61 +#: settings.php:61 +#: user.php:71 +msgid "home" +msgstr "inicio" + +#: admin.php:57 +#: index.php:146 +msgid "View Tumblelog" +msgstr "Ver tumblelog" + +#: admin.php:58 +#: index.php:147 +msgid "Log out" +msgstr "Terminar sesión" + +#: admin.php:66 +#: index.php:321 +#: options.php:73 +#: settings.php:74 +msgid "Settings" +msgstr "Configuración" + +#: admin.php:67 +#: index.php:324 +msgid "Posts" +msgstr "Entradas" + +#: admin.php:68 +msgid "Add user" +msgstr "Agregar usuario" + +#: admin.php:69 +#: index.php:323 +#: options.php:72 +#: settings.php:72 +#: user.php:82 +msgid "Users" +msgstr "Usuarios" + +#: admin.php:75 +#: admin.php:81 +#: admin.php:87 +msgid "
    " +msgstr "
    " + +#: admin.php:75 +msgid "The user has been added successfully." +msgstr "Ha usuario ha sido agregado exitosamente." + +#: admin.php:75 +#: admin.php:81 +#: admin.php:87 +#: admin.php:93 +#: admin.php:95 +msgid "
    " +msgstr "
    " + +#: admin.php:81 +msgid "The user has been eliminated successfully." +msgstr "Ha usuario ha sido eliminado exitosamente." + +#: admin.php:87 +msgid "The user has been modified successfully." +msgstr "Ha usuario ha sido modificado exitosamente." + +#: admin.php:93 +msgid "
    " +msgstr "
    " + +#: admin.php:93 +#: ajax.php:36 +msgid "The username is not available." +msgstr "El usuario no esta disponible." + +#: admin.php:95 +msgid "
    " +msgstr "
    " + +#: admin.php:95 +msgid "Error on the database server:." +msgstr "Error en el servidor de base de datos:." + +#: admin.php:95 +msgid " " +msgstr " " + +#: admin.php:95 +msgid "des" +msgstr "des" + +#: admin.php:103 +msgid "Login" +msgstr "Usuario" + +#: admin.php:104 +msgid "Name" +msgstr "Nombre" + +#: admin.php:105 +msgid "Actions" +msgstr "Acciones" + +#: admin.php:115 +msgid "class=\"odd\"" +msgstr "class=\"odd\"" + +#: admin.php:117 +msgid "login" +msgstr "login" + +#: admin.php:117 +#: admin.php:120 +msgid "\n" +msgstr "" + +#: admin.php:120 +msgid "name" +msgstr "" + +#: admin.php:123 +#: admin.php:126 +msgid "id_user" +msgstr "" + +#: admin.php:123 +#: user.php:83 +msgid "Edit" +msgstr "" + +#: admin.php:126 +msgid "Delete" +msgstr "" + +#: admin.php:135 +msgid "No users available." +msgstr "" + +#: ajax.php:23 +msgid " ending session..." +msgstr "" + +#: ajax.php:25 +msgid " failure ending session..." +msgstr "" + +#: ajax.php:31 +msgid "Required field cannot be left blank." +msgstr "" + +#: ajax.php:34 +msgid "Username available." +msgstr "" + +#: close.php:27 +msgid "logout" +msgstr "" + +#: close.php:41 +#: index.php:146 +#: options.php:63 +#: settings.php:63 +#: user.php:73 +msgid "Take me to the tumblelog" +msgstr "" + +#: close.php:41 +#: options.php:63 +#: settings.php:63 +#: user.php:73 +msgid "Back to the Tumblelog" +msgstr "" + +#: close.php:48 +msgid "Closing session" +msgstr "" + +#: close.php:49 +msgid "logoff" +msgstr "" + +#: close.php:57 +msgid "Ending session..." +msgstr "" + +#: close.php:61 +msgid "Has happened an error when closing the session." +msgstr "" + +#: index.php:104 +msgid "control panel" +msgstr "" + +#: index.php:153 +msgid "New Post" +msgstr "" + +#: index.php:154 +msgid "Chat" +msgstr "" + +#: index.php:155 +msgid "Quote" +msgstr "" + +#: index.php:156 +msgid "Link" +msgstr "" + +#: index.php:157 +msgid "Audio" +msgstr "" + +#: index.php:158 +msgid "Video" +msgstr "" + +#: index.php:159 +msgid "Picture" +msgstr "" + +#: index.php:160 +msgid "Regular" +msgstr "" + +#: index.php:167 +msgid "A new gelato version has been released and is ready for download." +msgstr "" + +#: index.php:172 +msgid "The post has been eliminated successfully." +msgstr "" + +#: index.php:178 +msgid "The post has been modified successfully." +msgstr "" + +#: index.php:184 +msgid "The post has been added successfully." +msgstr "" + +#: index.php:190 +msgid "Error on the database server:" +msgstr "" + +#: index.php:196 +msgid "Not an MP3 file or an upload problem." +msgstr "" + +#: index.php:202 +msgid "Not a photo file or an upload problem." +msgstr "" + +#: index.php:305 +msgid "syntax is supported." +msgstr "" + +#: index.php:322 +#: options.php:74 +#: settings.php:73 +msgid "Options" +msgstr "" + +#: index.php:427 +msgid "No posts in this tumblelog." +msgstr "" + +#: options.php:35 +msgid "options" +msgstr "" + +#: options.php:70 +msgid "Tumblelog options" +msgstr "" + +#: options.php:71 +#: settings.php:71 +#: user.php:81 +msgid "Post" +msgstr "" + +#: options.php:80 +#: settings.php:80 +msgid "The configuration has been modified successfully." +msgstr "" + +#: options.php:85 +#: settings.php:85 +msgid "Error on the database server: " +msgstr "" + +#: options.php:94 +msgid "Rich text editor:" +msgstr "" + +#: options.php:96 +#: options.php:102 +msgid "Active" +msgstr "" + +#: options.php:97 +#: options.php:103 +msgid "Deactive" +msgstr "" + +#: options.php:109 +#: settings.php:122 +#: user.php:139 +msgid "Modify" +msgstr "" + +#: settings.php:35 +msgid "settings" +msgstr "" + +#: settings.php:70 +msgid "Tumblelog configuration" +msgstr "" + +#: settings.php:94 +msgid "Title:" +msgstr "" + +#: settings.php:96 +msgid "Description:" +msgstr "" + +#: settings.php:98 +msgid "Installation URL" +msgstr "" + +#: settings.php:100 +msgid "Post limit:" +msgstr "" + +#: settings.php:102 +msgid "Language:" +msgstr "" + +#: settings.php:107 +msgid "Template:" +msgstr "" + +#: user.php:56 +msgid "add user" +msgstr "" + +#: user.php:80 +msgid "Start session" +msgstr "" + +#: user.php:83 +#: user.php:139 +msgid "Add" +msgstr "" + +#: user.php:99 +msgid "user:" +msgstr "" + +#: user.php:115 +msgid "password:" +msgstr "" + +#: user.php:119 +msgid "retype password:" +msgstr "" + +#: user.php:123 +msgid "name:" +msgstr "" + +#: user.php:127 +msgid "e-mail:" +msgstr "" + +#: user.php:131 +msgid "website:" +msgstr "" + +#: user.php:135 +msgid "about:" +msgstr "" +