[pLog-svn] r2799 - in plog/trunk: js/ui locale templates/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Mon Jan 16 15:29:53 GMT 2006


Author: mark
Date: 2006-01-16 15:29:53 +0000 (Mon, 16 Jan 2006)
New Revision: 2799

Modified:
   plog/trunk/js/ui/plogui.js
   plog/trunk/locale/locale_en_UK.php
   plog/trunk/locale/locale_zh_TW.php
   plog/trunk/templates/admin/editpost.template
   plog/trunk/templates/admin/newpost.template
Log:
Add locale messages to Ajax action.

Modified: plog/trunk/js/ui/plogui.js
===================================================================
--- plog/trunk/js/ui/plogui.js	2006-01-16 12:03:08 UTC (rev 2798)
+++ plog/trunk/js/ui/plogui.js	2006-01-16 15:29:53 UTC (rev 2799)
@@ -1,6 +1,20 @@
 /**
- * this function is the one called when clicking the "save draft and continue" button
+ * when adding a new form, checks that there is at least one category selected
  */
+function submitNewPost(form)
+{
+	if( form.postCategories.selectedIndex == -1 ) {
+		// we have no category selected!
+		window.alert(msgErrorNoCategorySelected);
+		return false;
+    }  
+    
+	return true;
+}
+
+/**
+ * The following functions are called when clicking the "save draft and continue" button
+ */
 function saveDraftArticleAjax()
 {
 	// if there is no category selected, then we won't save a draft!
@@ -35,9 +49,6 @@
 					);    
 }
 
-/**
- * this function is the one called when clicking the "save draft and continue" button
- */
 function saveDraftArticleResponse(originalRequest)
 {
 	//put returned XML in the textarea
@@ -47,22 +58,8 @@
 }
 
 /**
- * when adding a new form, checks that there is at least one category selected
+ * The following functions are called when clicking the "add category" button
  */
-function submitNewPost(form)
-{
-	if( form.postCategories.selectedIndex == -1 ) {
-		// we have no category selected!
-		window.alert(msgErrorNoCategorySelected);
-		return false;
-    }  
-    
-	return true;
-}
-
-/**
- * this function is the one called when clicking the "add category" button
- */
 function addArticleCategoryAjax()
 {
 	var categoryName = $F('newArticleCategory');
@@ -77,9 +74,6 @@
 	}
 }
 
-/**
- * this function is the one called when clicking the "add category" button
- */
 function addArticleCategoryOption(originalRequest)
 {
 	//put returned XML in the textarea
@@ -105,7 +99,7 @@
 }
 
 function showArticleCategorySavingStatus(originalRequest) {
-	$( 'newArticleCategory' ).value = 'Saving ...';
+	$( 'newArticleCategory' ).value = msgSaving;
 	$( 'addArticleCategory' ).disabled = 1;
 }
 
@@ -117,12 +111,21 @@
 	if ( $('optionPanel').style.display == 'none' )
 	{
 		startWidth = $('mainPanel').offsetWidth;
-		new Rico.Effect.Size( $('mainPanel'), 489, null, 500, 10, {complete:function() { Element.show($('optionPanel')); $('optionIcon').src = 'imgs/admin/icon_optionhide-16.png'; }} );
+		new Rico.Effect.Size( $('mainPanel'), 489, null, 500, 10, {
+			complete:function() { 
+				Element.show($('optionPanel'));
+				$('optionIcon').src = 'imgs/admin/icon_optionhide-16.png';
+				$('optionIconLink').title = msgHideOptionPanel;
+			}} );
 	}
 	else
 	{
 		Element.hide($('optionPanel'));
 		startWidth = $('mainPanel').offsetWidth;
-		new Rico.Effect.Size( $('mainPanel'), 660, null, 500, 10, {complete:function() { $('optionIcon').src = 'imgs/admin/icon_optionopen-16.png'; }} );
+		new Rico.Effect.Size( $('mainPanel'), 660, null, 500, 10, {
+			complete:function() { 
+				$('optionIcon').src = 'imgs/admin/icon_optionopen-16.png';
+				$('optionIconLink').title = msgShowOptionPanel;
+			}} );
 	}
 }
\ No newline at end of file

Modified: plog/trunk/locale/locale_en_UK.php
===================================================================
--- plog/trunk/locale/locale_en_UK.php	2006-01-16 12:03:08 UTC (rev 2798)
+++ plog/trunk/locale/locale_en_UK.php	2006-01-16 15:29:53 UTC (rev 2799)
@@ -238,7 +238,7 @@
 $messages['send_notifications_ok'] = 'A notification will be sent every time there is a new comment or trackback.';
 $messages['bookmarklet'] = "Bookmarklet";
 $messages['bookmarklet_help'] = "Drag this link to your toolbar or right-click it and choose Add to Favorites or Bookmark.";
-$messages['blogit_to_plog'] = "Blog It to LifeType!";
+$messages['blogit_to_lifetype'] = "Blog It to LifeType!";
 $messages['original_post'] = "(Original Post)";
 
 // send trackbacks
@@ -363,7 +363,7 @@
 $messages['error_adding_link'] = 'There was an error adding the link. Please check the data and try again';
 $messages['error_invalid_url'] = 'The address is not correct';
 $messages['link_added_ok'] = 'Link "%s" was successfully added';
-$messages['bookmarkit_to_plog'] = "Bookmark It to LifeType!";
+$messages['bookmarkit_to_lifetype'] = "Bookmark It to LifeType!";
 
 // update link
 $messages['error_updating_link'] = 'There was an error updating the link. Please check the data and try again';
@@ -970,4 +970,8 @@
 $messages['register_default_album_description'] = 'Use this album to upload new pictures.';
 $messages['show_in_summary'] = 'Show in Summary';
 $messages['show_in_summary_help'] = 'Include this blog in the summary page of this site.';
+
+$messages['saving_message'] = 'Saving ...';
+$messages['show_option_panel'] = 'Show Options';
+$messages['hide_option_panel'] = 'Hide Options';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/locale_zh_TW.php
===================================================================
--- plog/trunk/locale/locale_zh_TW.php	2006-01-16 12:03:08 UTC (rev 2798)
+++ plog/trunk/locale/locale_zh_TW.php	2006-01-16 15:29:53 UTC (rev 2799)
@@ -238,7 +238,7 @@
 $messages['send_notifications_ok'] = '當有新的迴響或是引用時,便向我發送電子郵件通知';
 $messages['bookmarklet'] = "書籤小程式";
 $messages['bookmarklet_help'] = "把下面的連結拉到你工具列,或是按下滑鼠右鍵把連結加到我的最愛。";
-$messages['blogit_to_LifeType'] = "把文章加到 LifeType!";
+$messages['blogit_to_lifetype'] = "把文章加到 LifeType!";
 $messages['original_post'] = "(原文)";
 
 // send trackbacks
@@ -363,7 +363,7 @@
 $messages['error_adding_link'] = '新增網站連結時發生錯誤。請檢查輸入的資料,再重試一次。';
 $messages['error_invalid_url'] = '網址不正確';
 $messages['link_added_ok'] = '網站連結「%s」已順利新增';
-$messages['bookmarkit_to_LifeType'] = "把書籤加到 LifeType!";
+$messages['bookmarkit_to_lifetype'] = "把書籤加到 LifeType!";
 
 // update link
 $messages['error_updating_link'] = '更新網站連結時發生錯誤。請檢查輸入的資料,再重試一次。';
@@ -907,4 +907,71 @@
 $messages['menu'] = '主選單';
 $messages['albums'] = '資料夾';
 $messages['admin'] = '管理介面';
+$messages['xmlrpc_ping_ok'] = 'XMLRPC Ping sent successfully: ';
+$messages['error_sending_xmlrpc_ping'] = 'There was an error sending the XMLRPC ping to: ';
+$messages['error_sending_xmlrpc_ping_message'] = 'There was an error sending the XMLRPC ping: ';
+
+//
+// new strings for 1.1 -- no need to translate yet!
+//
+$messages['error_incorrect_trackback_id'] = 'The trackback identifier is not correct';
+$messages['error_marking_trackback_as_spam'] = 'There was an error marking the trackback as spam';
+$messages['trackback_marked_as_spam_ok'] = 'The trackback was marked as successfully as spam';
+$messages['error_marking_trackback_as_nonspam'] = 'There was an error marking the trackback as non-spam';
+$messages['trackback_marked_as_nonspam_ok'] = 'The trackback was marked successfully as non-spam';
+$messages['upload_here'] = 'Upload here';
+$messages['reply_string'] = 'Re: ';
+$messages['cleanup_users'] = '刪除使用者';
+$messages['cleanup_users_help'] = 'This will remove all users that have been deleted by administrator (marked as "Deleted"). It will also remove any blogs that user own including everything in that blog. If user has permission to post in other blog, all posts made by them will be deleted as well.  It will not be possible to recover once users have been removed';
+$messages['users_purged_ok'] = 'Users purged successfully';
+$messages['cleanup_blogs'] = '刪除網誌';
+$messages['cleanup_blogs_help'] = 'This will remove all blogs that have been deleted by administrator (marked as "Deleted"). It will remove everthing in that blog.  It will not be possible to recover once users have been removed';
+$messages['blogs_purged_ok'] = 'Blogs purged successfully';
+$messages['help_use_http_accept_language_detection'] = 'Most web browsers such as Mozilla Firefox, Safari or Internet Explorer send at least one language code the user <i>should</i> understand. If this feature is activated, pLog tries to serve the user with the requested language if it\'s available. [Default = No]';
+
+$messages['error_invalid_blog_category'] = 'Invalid blog category';
+$messages['error_adding_blog_category'] = 'There was an error adding the blog category';
+$messages['newBlogCategory'] = '新增網誌分類';
+$messages['editBlogCategories'] = '編輯網誌分類';
+$messages['blog_category_added_ok'] = 'Blog category added successfully';
+$messages['error_blog_category_has_blogs'] = 'The blog category "%s" has some blogs assigned to it. Please edit first the blogs and then try again.';
+$messages['error_deleting_blog_category'] = 'There was an error deleting blog category "%s"';
+$messages['blog_category_deleted_ok'] = 'Blog category "%s" was deleted successfully';
+$messages['blog_categories_deleted_ok'] = '%s blog categories deleted successfully';
+$messages['error_deleting_blog_category2'] = 'There was an error removing the blog category with id %s';
+$messages['blog_category'] = 'Blog Category';
+$messages['blog_category_help'] = 'Global blog category assigned to this blog';
+
+$messages['help_use_captcha_auth'] = 'Use a CAPTCHA mechanism in the registration process to prevent automatic registration by robotic scripts';
+$messages['help_skip_dashboard'] = 'The dashboard page will not be shown anymore and instead users will be taken to the first blog to which they belong right away';
+
+$messages['manageGlobalArticleCategory'] = '全域文章分類';
+$messages['newGlobalArticleCategory'] = '新增全域文章分類';
+$messages['editGlobalArticleCategories'] = '編輯全域文章分類';
+$messages['global_category_name_help'] = 'Name of the new global article category';
+$messages['global_category_description_help'] = 'Description of the new global article category';
+$messages['error_incorrect_global_category_id'] = 'Invalid global article category';
+$messages['global_category_deleted_ok'] = 'Article category "%s" deleted successfully';
+$messages['global_category_added_ok'] = 'Global category "%s" added successfully';
+$messages['error_deleting_global_category2'] = 'There was an error removing article category with id = %s';
+
+$messages['help_page_suffix_format'] = 'Suffix that will be appended to URLs that support paging';
+
+$messages['help_final_size_thumbnail_width'] = 'Final width of uploaded images. Leave empty or as zero to store the full size image';
+$messages['help_final_size_thumbnail_height'] = 'Final height of uploaded images. Leave empty or as zero to store the full size image';
+$messages['error_comment_too_big'] = 'The comment is too big';
+$messages['error_you_have_been_blocked'] = 'Blocked: this request was not completed.';
+$messages['created'] = 'Created';
+$messages['view'] = 'View';
+$messages['editUser'] = 'Edit User';
+$messages['help_urlize_word_separator'] = 'Character that will be used as the word separator when generating URLs pointing to LifeType pages. This will also be used when generating hostnames from blog names if support for subdomains is activated. [Default = _]';
+$messages['help_summary_template_cache_lifetime'] = 'Life time in seconds of the summary cached pages. If set to something else than \'0\' the summary pages will be kept for as long as indicated here insted of being refreshed every time data changes. [Default = 0]';
+$messages['register_default_album_name'] = 'General';
+$messages['register_default_album_description'] = 'Use this album to upload new pictures.';
+$messages['show_in_summary'] = 'Show in Summary';
+$messages['show_in_summary_help'] = 'Include this blog in the summary page of this site.';
+
+$messages['saving_message'] = '儲存中 ...';
+$messages['show_option_panel'] = '顯示選項';
+$messages['hide_option_panel'] = '隱藏選項';
 ?>
\ No newline at end of file

Modified: plog/trunk/templates/admin/editpost.template
===================================================================
--- plog/trunk/templates/admin/editpost.template	2006-01-16 12:03:08 UTC (rev 2798)
+++ plog/trunk/templates/admin/editpost.template	2006-01-16 15:29:53 UTC (rev 2799)
@@ -15,7 +15,13 @@
  {/if} 
 
  <script type="text/javascript">
+  
+  // some messages that we are going to need in the functions above 
   var htmlAreaEnabled = '{$htmlarea}';
+  var msgSaving = "{$locale->tr("saving_message")}";  
+  var msgShowOptionPanel = "{$locale->tr("show_option_panel")}";
+  var msgHideOptionPanel = "{$locale->tr("hide_option_panel")}";  
+    
   {include file="$admintemplatepath/calendarstuff.template"}
  </script>
   <form name="editPost" id="editPost" action="admin.php" method="post">
@@ -23,7 +29,7 @@
    <legend>{$locale->tr("editPost")}</legend>
 
    <div style="text-align: right;">
-     <a href="#" onclick="switchOptionPanel()"><img name="optionIcon" id="optionIcon" src="imgs/admin/icon_optionhide-16.png" style="border:0px;width: 16px; height: 16px; padding: 0;" /></a>
+     <a id="optionIconLink" href="#" title="{$locale->tr("hide_option_panel")}" onclick="switchOptionPanel()"><img name="optionIcon" id="optionIcon" src="imgs/admin/icon_optionhide-16.png" style="border:0px;width: 16px; height: 16px; padding: 0;" /></a>
    </div>
    
    <div id="mainPanel" style="float:left; width: 73%; border-right: 1px solid #DEDEDE;">  

Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template	2006-01-16 12:03:08 UTC (rev 2798)
+++ plog/trunk/templates/admin/newpost.template	2006-01-16 15:29:53 UTC (rev 2799)
@@ -17,11 +17,6 @@
   <script type="text/javascript" src="js/editor/plogeditor.js"></script>
  {/if}
  <script type="text/javascript">
- {if $blogsettings->getValue("new_drafts_autosave_enabled")}
-  // in order to save drafts at regular intervals, we need a timer
-  var timer;
-  timer = window.setInterval("saveDraft()", {$autoSaveNewDraftsTimeMillis});
- {/if} 
   
   // some messages that we are going to need in the functions above
   var msgErrorMakingRequest = "{$locale->tr("error_sending_request")}";
@@ -30,6 +25,9 @@
   var htmlAreaEnabled = '{$htmlarea}';
   var msgErrorPostTopic = "{$locale->tr("error_missing_post_topic")}";
   var msgErrorPostText = "{$locale->tr("error_missing_post_text")}";
+  var msgSaving = "{$locale->tr("saving_message")}";
+  var msgShowOptionPanel = "{$locale->tr("show_option_panel")}";
+  var msgHideOptionPanel = "{$locale->tr("hide_option_panel")}";  
   
   var todayDay = '{$today->getDay()}';
   var todayMonth = '{$today->getMonth()}';
@@ -44,7 +42,7 @@
    <legend>{$locale->tr("newPost")}</legend>
 
    <div style="text-align: right;">
-     <a href="#" onclick="switchOptionPanel()"><img name="optionIcon" id="optionIcon" src="imgs/admin/icon_optionhide-16.png" style="border:0px;width: 16px; height: 16px; padding: 0;" /></a>
+     <a id="optionIconLink" href="#" title="{$locale->tr("hide_option_panel")}" onclick="switchOptionPanel()"><img name="optionIcon" id="optionIcon" src="imgs/admin/icon_optionhide-16.png" style="border:0px;width: 16px; height: 16px; padding: 0;" /></a>
    </div>
 
    <div id="mainPanel" style="float:left; width: 73%; border-right: 1px solid #DEDEDE;">



More information about the pLog-svn mailing list