[pLog-svn] r809 - in plog/trunk: class/action/admin locale templates/admin

oscar at devel.plogworld.net oscar at devel.plogworld.net
Sun Jan 23 21:42:04 GMT 2005


Author: oscar
Date: 2005-01-23 21:42:04 +0000 (Sun, 23 Jan 2005)
New Revision: 809

Modified:
   plog/trunk/class/action/admin/adminaddblogaction.class.php
   plog/trunk/class/action/admin/adminupdateeditblogaction.class.php
   plog/trunk/locale/locale_en_UK.php
   plog/trunk/templates/admin/createblog.template
   plog/trunk/templates/admin/editblog.template
Log:
more localized pages

Modified: plog/trunk/class/action/admin/adminaddblogaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddblogaction.class.php	2005-01-23 20:52:47 UTC (rev 808)
+++ plog/trunk/class/action/admin/adminaddblogaction.class.php	2005-01-23 21:42:04 UTC (rev 809)
@@ -67,7 +67,7 @@
 
 			$this->notifyEvent( EVENT_POST_BLOG_ADD, Array( "blog" => &$blog ));
             $this->_view = new AdminSiteBlogsListView( $this->_blogInfo );
-            $this->_view->setSuccessMessage($this->_locale->pr("blog_added_ok", $this->_blogName));
+            $this->_view->setSuccessMessage($this->_locale->pr("blog_added_ok", $blog->getBlog()));
             $this->setCommonData();
 
             return true;

Modified: plog/trunk/class/action/admin/adminupdateeditblogaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdateeditblogaction.class.php	2005-01-23 20:52:47 UTC (rev 808)
+++ plog/trunk/class/action/admin/adminupdateeditblogaction.class.php	2005-01-23 21:42:04 UTC (rev 809)
@@ -47,11 +47,11 @@
 			$this->registerFieldValidator( "blogStatus", new IntegerValidator());
 			$this->registerFieldValidator( "blogLocale", new StringValidator());
 			$this->registerFieldValidator( "blogTemplate", new StringValidator());
-			$this->registerFieldValidator( "blogResourcesQuota", new IntegerValidator());
+			$this->registerFieldValidator( "blogResourcesQuota", new IntegerValidator(), true );
 			$this->registerFieldValidator( "blogOwner", new IntegerValidator());
 			$this->registerField( "blogTimeOffset" );
 			$view = new AdminEditSiteBlogView( $this->_blogInfo );
-			$view->setErrorMessage( $this->_locale->tr("error_updating_settings" ));
+			$view->setErrorMessage( $this->_locale->tr("error_updating_blog_settings2" ));
 			$this->setValidationErrorView( $view );
         }
 		
@@ -87,7 +87,7 @@
             $blogInfo = $blogs->getBlogInfo( $this->_editBlogId );
             if( !$blogInfo ) {
             	$this->_view = new AdminSiteBlogsListView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
+                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_blog"));
                 $this->setCommonData();
 
                 return false;
@@ -114,7 +114,7 @@
             $blogSettings->setValue( "time_offset", $this->_blogTimeOffset );
             $blogInfo->setSettings( $blogSettings );
 			$blogInfo->setResourcesQuota( $this->_blogQuota );
-		$blogInfo->setBlog( $this->_blogName );
+			$blogInfo->setBlog( $this->_blogName );
 			$blogInfo->setProperties( $this->_blogProperties );
             $blogInfo->setOwner( $this->_blogOwner );
 			$blogInfo->setStatus( $this->_blogStatus );
@@ -150,7 +150,7 @@
 
             // if everything went fine, we can show a nice message
             $this->_view = new AdminSiteBlogsListView( $this->_blogInfo );
-            $this->_view->setSuccessMessage( $this->_locale->pr( "blog_settings_updated_ok", $blogInfo->getBlog()));
+            $this->_view->setSuccessMessage( $this->_locale->pr( "edit_blog_settings_updated_ok", $blogInfo->getBlog()));
             $this->setCommonData();
 			
 			// clear the cache

Modified: plog/trunk/locale/locale_en_UK.php
===================================================================
--- plog/trunk/locale/locale_en_UK.php	2005-01-23 20:52:47 UTC (rev 808)
+++ plog/trunk/locale/locale_en_UK.php	2005-01-23 21:42:04 UTC (rev 809)
@@ -117,7 +117,7 @@
 $messages["error_fetching_articles"] = "The articles could not be fetched.";
 $messages["error_trackback_no_trackback"] = "No trackbacks were found for the article.";
 $messages["error_incorrect_article_id"] = "The article identifier is not correct.";
-$messages["error_incorrect_blog_id"] = "The journal identifier is not correct.";
+$messages["error_incorrect_blog_id"] = "The blog identifier is not correct.";
 $messages["error_comment_without_text"] = "You should at least provide some text.";
 $messages["error_comment_without_name"] = "You should at least give your name or nickname.";
 $messages["error_adding_comment"] = "There was an error adding the comment.";
@@ -207,6 +207,7 @@
 $messages["cleanUp"] = "Clean Up";
 $messages["editResourceAlbum"] = "Edit Album";
 $messages["resourceInfo"] = "Edit Resource";
+$messages["editBlog"] = "Edit Blog";
 
 // new post
 $messages["topic"] = "Topic";
@@ -612,9 +613,23 @@
 $messages["error_deleting_blog"] = "There was an error disabling blog \"%s\"";
 $messages["error_deleting_blog2"] = "There was an error disabling blog with identifier \"%s\"";
 
+// create blog
+$messages["error_adding_blog"] = "There was an error adding the blog. Please check the data and try again";
+$messages["blog_added_ok"] = "Blog \"%s\" successfully added";
+
 // edit blog
+$messages["blog_status_help"] = "Blog status";
+$messages["blog_owner_help"] = "User who will be set as the owner, with full control on the blog settings";
+$messages["users"] = "Users";
+$messages["blog_quota_help"] = "Resource quota in bytes. Set as 0 for unlimited or leave empty to make the blog use the global quota";
+$messages["blog_users_help"] = "Users who have access to this blog. Select a user from the left and move it to the right list in order to give this user access in this blog";
+$messages["edit_blog_settings_updated_ok"] = "Blog \"%s\" updated successfully";
+$messages["error_updating_blog_settings"] = "There was an error updating blog \"%s\"";
+$messages["error_incorrect_blog_owner"] = "The user selected as blog owner is not correct";
+$messages["error_fetching_blog"] = "There was an error fetching the blog";
+$messages["error_updating_blog_settings2"] = "There was an error updating the blog. Please check the data and try again";
+$messages["add_or_remove"] = "Add or remove users";
 
-
 // global settings
 $messages["help_comments_enabled"] = "Enable comments by default in all new blogs";
 ?>
\ No newline at end of file

Modified: plog/trunk/templates/admin/createblog.template
===================================================================
--- plog/trunk/templates/admin/createblog.template	2005-01-23 20:52:47 UTC (rev 808)
+++ plog/trunk/templates/admin/createblog.template	2005-01-23 21:42:04 UTC (rev 809)
@@ -1,23 +1,19 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=createBlog title=$locale->tr("createBlog")}
-
-
  <form name="addBlog" action="admin.php" method="post">
    <fieldset class="inputField">
      <legend>{$locale->tr("createBlog")}</legend>
-
      {include file="$admintemplatepath/formvalidate.template" message=$locale->tr("error_adding_blog")}
-
      <div class="field">
-       <label for="blogName">{$locale->tr("blog_name")}</label>
+       <label for="blogName">{$locale->tr("name")}</label>
        <span class="required">*</span>
        <div class="formHelp">{$locale->tr("blog_name_help")}</div>
        <input type="text" style="width:95%" name="blogName" id="blogName" value="{$blogName}"/>
-       {include file="$admintemplatepath/validate.template" field=blogName message=$locale->tr("error_must_give_blog_name")}
+       {include file="$admintemplatepath/validate.template" field=blogName message=$locale->tr("error_empty_name")}
      </div>
  
      <div class="field">
-       <label for="blogOwner">{$locale->tr("blog_owner")}</label>
+       <label for="blogOwner">{$locale->tr("owner")}</label>
        <span class="required">*</span>
        <div class="formHelp">{$locale->tr("blog_owner_help")}</div>
        <select name="blogOwner" id="blogOwner">
@@ -25,7 +21,6 @@
           <option value="{$user->getId()}">{$user->getUsername()}</option>
          {/foreach}
        </select>
-      {include file="$admintemplatepath/validate.template" field=blogOwner message=$locale->tr("error_incorrect_blog_owner")}    
      </div>
     </fieldset>
     <div class="buttons">
@@ -34,6 +29,5 @@
        <input type="hidden" name="op" value="addBlog" />
     </div>
  </form>
-
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Modified: plog/trunk/templates/admin/editblog.template
===================================================================
--- plog/trunk/templates/admin/editblog.template	2005-01-23 20:52:47 UTC (rev 808)
+++ plog/trunk/templates/admin/editblog.template	2005-01-23 21:42:04 UTC (rev 809)
@@ -1,25 +1,25 @@
 {include file="$admintemplatepath/header.template"}
-{include file="$admintemplatepath/navigation.template" showOpt=editSiteBlogs title=$locale->tr("editSiteBlogs")}
+{include file="$admintemplatepath/navigation.template" showOpt=editSiteBlogs title=$locale->tr("editBlog")}
 
  {include file="$admintemplatepath/formvalidate.template" message=$locale->tr("error_updating_settings")}
  <form name="blogSettings" action="admin.php" method="post" onSubmit="listSelectAll('blogUsersList');">
    <fieldset class="inputField">
     <legend>{$locale->tr("editBlog")}</legend>
 
-    <div clas="field">
+    <div class="field">
       <label for="blogLink">{$locale->tr("blog_link")}</label>
       <span class="required"></span>
-      <div class="formHelp">{$locale->tr("permanent_blog_url")}</div>
+      <div class="formHelp">{$locale->tr("blog_link_help")}</div>
       {assign var=editBlogUrlGenerator value=$editblog->getBlogRequestGenerator()} 
       <input style="width:100%" type="text" readonly="readonly" id="blogLink" name="blogLink" class="readOnly" value="{$editBlogUrlGenerator->blogLink()}" />
     </div>
 
     <div class="field">
-      <label for="blogName">{$locale->tr("blog_name")}</label>
+      <label for="blogName">{$locale->tr("name")}</label>
       <span class="required">*</span>
-      <div class="formHelp">{$locale->tr("blog_name")}</div>
+      <div class="formHelp">{$locale->tr("blog_name_help")}</div>
       <input type="text" name="blogName" style="width:100%" id="blogName" value="{$blogName|escape:"html"}" />
-      {include file="$admintemplatepath/validate.template" field=blogName message=$locale->tr("error_no_blog_name")}
+      {include file="$admintemplatepath/validate.template" field=blogName message=$locale->tr("error_empty_name")}
     </div>
 
     <div class="field">
@@ -47,7 +47,7 @@
     <div class="field">
      <label for="blogLocale">{$locale->tr("language")}</label>
      <span class="required">*</span>
-     <div class="formHelp">{$locale->tr("language_used")}</div>
+     <div class="formHelp">{$locale->tr("blog_language_help")}</div>
      <select name="blogLocale" id="blogLocale">
       {foreach from=$locales item=localeobject}
        <option value="{$localeobject->getLocaleCode()}" {if $localeobject->getLocaleCode()==$blogLocale} selected="selected" {/if}>
@@ -55,13 +55,12 @@
 	   </option>
       {/foreach}
       </select>
-      {include file="$admintemplatepath/validate.template" field=blogLocale message=$locale->tr("error_invalid_locale")}
     </div>
 
     <div class="field">
      <label for="blogTemplate">{$locale->tr("template")}</label>
      <span class="required">*</span>
-     <div class="formHelp">{$locale->tr("template_used")}</div>
+     <div class="formHelp">{$locale->tr("blog_template_help")}</div>
     {assign var=blogTemplateSet value=$blog->getTemplateSet()}
      <select name="blogTemplate" id="blogTemplate">
        {foreach from=$templates item=template}
@@ -69,12 +68,11 @@
        {/foreach}
       </select>
       <a href="javascript:openTemplateChooserWindow();">{$locale->tr("choose")}...</a>
-      <br/>{include file="$admintemplatepath/validate.template" field=blogTemplate message=$locale->tr("error_incorrect_template")}
      </div>
 
     <div class="field">
      <label for="blogTimeOffset">{$locale->tr("time_offset")}</label>
-     <div class="formHelp">{$locale->tr("time_offset")}</div>
+     <div class="formHelp">{$locale->tr("time_offset_help")}</div>
       <select name="blogTimeOffset" id="blogTimeOffset">
        <option {if $blogTimeOffset == -20} selected="selected"{/if} value="-20">-20 {$locale->tr("hours")}</option>
        <option {if $blogTimeOffset == -19} selected="selected"{/if} value="-19">-19 {$locale->tr("hours")}</option>
@@ -123,9 +121,9 @@
 
     <div class="field">
      <label for="blogResourcesQuota">{$locale->tr("quota")}</label>
-     <div class="formHelp">{$locale->tr("quota_help")}</div>
+     <div class="formHelp">{$locale->tr("blog_quota_help")}</div>
      <input type="text" id="blogResourcesQuota" name="blogResourcesQuota" value="{$blogResourcesQuota}" />
-     {include file="$admintemplatepath/validate.template" field=blogResourcesQuota message=$locale->tr("error_invalid_quota")}
+     {include file="$admintemplatepath/validate.template" field=blogResourcesQuota message=$locale->tr("error_invalid_number")}
     </div>
 
     <div class="field">
@@ -135,7 +133,7 @@
           <tr>
           <td>
 	  <select id="availableUsersList" name="availableUsers[]" size="10">
-	   <option value="-1">-- {$locale->tr("please_add_or_remove")} --</option>	  
+	   <option value="-1">-- {$locale->tr("add_or_remove")} --</option>	  
 	   {foreach from=$availableusers item=siteuser}
 	    <option value="{$siteuser->getId()}">{$siteuser->getUsername()}</option>
 	   {/foreach}
@@ -149,7 +147,7 @@
           </td>
           <td>
 	  <select id="blogUsersList" name="blogUsers[]" size="10" multiple="multiple">
-	   <option value="-1">-- {$locale->tr("please_add_or_remove")} --</option>
+	   <option value="-1">-- {$locale->tr("add_or_remove")} --</option>
 	   {foreach from=$blogusers item=bloguser}
 	    <option value="{$bloguser->getId()}">{$bloguser->getUsername()}</option>
 	   {/foreach}
@@ -161,7 +159,7 @@
     </fieldset>
     <div class="buttons">
       <input type="reset" name="reset" value="{$locale->tr("reset")}" />
-      <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")} {$editblog->getBlog()}" />
+      <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}" />
       <input type="hidden" name="op" value="updateEditBlog" />
       <input type="hidden" name="blogId" value="{$editblog->getId()}"/>
     </div>




More information about the pLog-svn mailing list