Changeset 2696
- Timestamp:
- 10/02/10 06:17:55 (12 years ago)
- Location:
- plugins/dctranslations
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/dctranslations/_admin.php
r1548 r2696 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of dctranslations, a plugin for Dotclear .3 # This file is part of dctranslations, a plugin for Dotclear 2. 4 4 # 5 # Copyright (c) 20 09 Jean-Christophe Dubacq6 # jcdubacq1@free.fr5 # Copyright (c) 2010 Franck Paul and contributors 6 # carnet.franck.paul@gmail.com 7 7 # 8 8 # Licensed under the GPL version 2.0 license. … … 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 if (!defined('DC_CONTEXT_ADMIN')) { exit; } 13 14 … … 185 186 { 186 187 global $core; 187 $core->blog->settings-> setNameSpace('system');188 $core->blog->settings-> put('lang','');188 $core->blog->settings->addNameSpace('system'); 189 $core->blog->settings->system->put('lang',''); 189 190 } 190 191 } -
plugins/dctranslations/_define.php
r1668 r2696 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of dctranslations, a plugin for Dotclear .3 # This file is part of dctranslations, a plugin for Dotclear 2. 4 4 # 5 # Copyright (c) 20 09 Jean-Christophe Dubacq6 # jcdubacq1@free.fr5 # Copyright (c) 2010 Franck Paul and contributors 6 # carnet.franck.paul@gmail.com 7 7 # 8 8 # Licensed under the GPL version 2.0 license. … … 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 if (!defined('DC_RC_PATH')) { return; } 13 14 … … 15 16 "Posts Translations", // Name 16 17 "Allows to translate posts", // Description 17 "Jean-Christophe Dubacq ", // Author18 '1.1 0.0', // Version18 "Jean-Christophe Dubacq, Franck Paul", // Author 19 '1.11', // Version 19 20 'admin,editor,usage', // Permissions 20 21 500 // Priority -
plugins/dctranslations/_install.php
r1130 r2696 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of dctranslations, a plugin for Dotclear .3 # This file is part of dctranslations, a plugin for Dotclear 2. 4 4 # 5 # Copyright (c) 20 09 Jean-Christophe Dubacq6 # jcdubacq1@free.fr5 # Copyright (c) 2010 Franck Paul and contributors 6 # carnet.franck.paul@gmail.com 7 7 # 8 8 # Licensed under the GPL version 2.0 license. … … 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 if (!defined('DC_CONTEXT_ADMIN')) { exit; } 13 14 -
plugins/dctranslations/_prepend.php
r1548 r2696 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of dctranslations, a plugin for Dotclear .3 # This file is part of dctranslations, a plugin for Dotclear 2. 4 4 # 5 # Copyright (c) 20 09 Jean-Christophe Dubacq6 # jcdubacq1@free.fr5 # Copyright (c) 2010 Franck Paul and contributors 6 # carnet.franck.paul@gmail.com 7 7 # 8 8 # Licensed under the GPL version 2.0 license. … … 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 if (!defined('DC_RC_PATH')) {return;} 13 14 -
plugins/dctranslations/_public.php
r1548 r2696 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of dctranslations, a plugin for Dotclear .3 # This file is part of dctranslations, a plugin for Dotclear 2. 4 4 # 5 # Copyright (c) 20 09 Jean-Christophe Dubacq6 # jcdubacq1@free.fr5 # Copyright (c) 2010 Franck Paul and contributors 6 # carnet.franck.paul@gmail.com 7 7 # 8 8 # Licensed under the GPL version 2.0 license. … … 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 if (!defined('DC_RC_PATH')) {return;} 13 14 … … 81 82 // hard-coded preferences in case the preferences are not set 82 83 83 $actla=$core->blog->settings->ptrans _active_languages;84 $actla=$core->blog->settings->ptrans->ptrans_active_languages; 84 85 if (!$actla) { 85 86 $actla = 'en,fr'; 86 87 } 87 $fbla=$core->blog->settings->ptrans _fallback_language;88 $fbla=$core->blog->settings->ptrans->ptrans_fallback_language; 88 89 if (!$fbla) { 89 90 $fbla = 'en'; … … 123 124 $_lang=$activelangs[0]; 124 125 $core->lang_array=$activelangs; 125 $core->blog->settings-> lang=$_lang;126 $core->blog->settings-> lang_nav=$_lang;126 $core->blog->settings->system->lang=$_lang; 127 $core->blog->settings->system->lang_nav=$_lang; 127 128 l10n::set(DC_L10N_ROOT.'/'.$_lang.'/date'); 128 129 l10n::set(DC_L10N_ROOT.'/'.$_lang.'/public'); … … 436 437 $_lang=$activelangs[0]; 437 438 $core->lang_array=$activelangs; 438 $core->blog->settings-> lang=$_lang;439 $core->blog->settings-> lang_nav=$_lang;439 $core->blog->settings->system->lang=$_lang; 440 $core->blog->settings->system->lang_nav=$_lang; 440 441 $newargs=$m[2]; 441 442 } else { … … 454 455 $_lang=$activelangs[0]; 455 456 $core->lang_array=$activelangs; 456 $core->blog->settings-> lang=$_lang;457 $core->blog->settings-> lang_nav=$_lang;457 $core->blog->settings->system->lang=$_lang; 458 $core->blog->settings->system->lang_nav=$_lang; 458 459 $newargs=$m[2]; 459 460 } else { … … 469 470 $_ctx->cur_lang = $val; 470 471 $core->translation_force_lang = $val; 471 $core->blog->settings-> lang=$val;472 $core->blog->settings->system->lang=$val; 472 473 } 473 474 -
plugins/dctranslations/_widget.php
r1130 r2696 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of dctranslations, a plugin for Dotclear .3 # This file is part of dctranslations, a plugin for Dotclear 2. 4 4 # 5 # Copyright (c) 20 09 Jean-Christophe Dubacq6 # jcdubacq1@free.fr5 # Copyright (c) 2010 Franck Paul and contributors 6 # carnet.franck.paul@gmail.com 7 7 # 8 8 # Licensed under the GPL version 2.0 license. … … 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 if (!defined('DC_RC_PATH')) {return;} 13 14 … … 109 110 } 110 111 111 $al=$core->blog->settings->ptrans _active_languages;112 $al=$core->blog->settings->ptrans->ptrans_active_languages; 112 113 if (!$al) { 113 114 $al="fr,en"; -
plugins/dctranslations/_widgets.php
r1548 r2696 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of dctranslations, a plugin for Dotclear .3 # This file is part of dctranslations, a plugin for Dotclear 2. 4 4 # 5 # Copyright (c) 20 09 Jean-Christophe Dubacq6 # jcdubacq1@free.fr5 # Copyright (c) 2010 Franck Paul and contributors 6 # carnet.franck.paul@gmail.com 7 7 # 8 8 # Licensed under the GPL version 2.0 license. … … 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 if (!defined('DC_RC_PATH')) {return;} 13 14 … … 109 110 } 110 111 111 $al=$core->blog->settings->ptrans _active_languages;112 $al=$core->blog->settings->ptrans->ptrans_active_languages; 112 113 if (!$al) { 113 114 $al="fr,en"; -
plugins/dctranslations/class.translations.php
r1668 r2696 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of dctranslations, a plugin for Dotclear .3 # This file is part of dctranslations, a plugin for Dotclear 2. 4 4 # 5 # Copyright (c) 20 09 Jean-Christophe Dubacq6 # jcdubacq1@free.fr5 # Copyright (c) 2010 Franck Paul and contributors 6 # carnet.franck.paul@gmail.com 7 7 # 8 8 # Licensed under the GPL version 2.0 license. … … 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 if (!defined('DC_RC_PATH')) { return; } 13 14 … … 188 189 array_keys($url_patterns), 189 190 array_values($url_patterns), 190 $this->core->blog->settings-> post_url_format191 $this->core->blog->settings->system->post_url_format 191 192 ); 192 193 } else { … … 486 487 $format = addslashes($attr['format']); 487 488 } else { 488 $format=$GLOBALS['core']->blog->settings-> date_format;489 $format=$GLOBALS['core']->blog->settings->system->date_format; 489 490 } 490 491 $f = $GLOBALS['core']->tpl->getFilters($attr); … … 496 497 $format = addslashes($attr['format']); 497 498 } else { 498 $format=$GLOBALS['core']->blog->settings-> time_format;499 $format=$GLOBALS['core']->blog->settings->system->time_format; 499 500 } 500 501 $f = $GLOBALS['core']->tpl->getFilters($attr); -
plugins/dctranslations/index.php
r1131 r2696 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # This file is part of dctranslations, a plugin for Dotclear .3 # This file is part of dctranslations, a plugin for Dotclear 2. 4 4 # 5 # Copyright (c) 20 09 Jean-Christophe Dubacq6 # jcdubacq1@free.fr5 # Copyright (c) 2010 Franck Paul and contributors 6 # carnet.franck.paul@gmail.com 7 7 # 8 8 # Licensed under the GPL version 2.0 license. … … 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 if (!defined('DC_CONTEXT_ADMIN')) { exit; } 13 14 … … 81 82 try { 82 83 if ($core->blog->settings->lang) { 83 $core->blog->settings-> setNameSpace('system');84 $core->blog->settings-> put('lang','');84 $core->blog->settings->addNameSpace('system'); 85 $core->blog->settings->system->put('lang',''); 85 86 } 86 87 // Create settings if they don't exist 87 if ($core->blog->settings->ptrans_fallback_language === null) {88 $core->blog->settings->setNameSpace('ptrans');89 $core->blog->settings->p ut('ptrans_active_languages','en,fr','string','Navigation language',true,true);90 $core->blog->settings->p ut('ptrans_fallback_language','en','string','Fallback language',true,true);88 $core->blog->settings->addNameSpace('ptrans'); 89 if ($core->blog->settings->ptrans->ptrans_fallback_language === null) { 90 $core->blog->settings->ptrans->put('ptrans_active_languages','en,fr','string','Navigation language',true,true); 91 $core->blog->settings->ptrans->put('ptrans_fallback_language','en','string','Fallback language',true,true); 91 92 http::redirect($p_url); 92 93 } 93 $active_languages = $core->blog->settings->ptrans _active_languages;94 $fallback_language = $core->blog->settings->ptrans _fallback_language;94 $active_languages = $core->blog->settings->ptrans->ptrans_active_languages; 95 $fallback_language = $core->blog->settings->ptrans->ptrans_fallback_language; 95 96 if (!$active_languages) { 96 97 // FIXME It should probably be join(',',$existent_languages_array) … … 121 122 } 122 123 $ptrans_active_languages=implode(',',array_keys($valid_languages)); 123 $core->blog->settings-> setNameSpace('ptrans');124 $core->blog->settings->p ut('ptrans_active_languages',$ptrans_active_languages);125 $core->blog->settings->p ut('ptrans_fallback_language',$ptrans_fallback_language);124 $core->blog->settings->addNameSpace('ptrans'); 125 $core->blog->settings->ptrans->put('ptrans_active_languages',$ptrans_active_languages); 126 $core->blog->settings->ptrans->put('ptrans_fallback_language',$ptrans_fallback_language); 126 127 http::redirect($pgct_url.'&up=1&tab=settings'); 127 128 } -
plugins/dctranslations/post.js
r1654 r2696 1 /* -- BEGIN LICENSE BLOCK ---------------------------------- 2 * This file is part of dctranslations, a plugin for Dotclear 2. 3 * 4 * Copyright (c) 2010 Franck Paul and contributors 5 * carnet.franck.paul@gmail.com 6 * 7 * Licensed under the GPL version 2.0 license. 8 * A copy of this license is available in LICENSE file or at 9 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 * -- END LICENSE BLOCK ------------------------------------*/ 11 1 12 $(function() 2 13 {
Note: See TracChangeset
for help on using the changeset viewer.