internationalize form labels

This commit is contained in:
Colin Kuskie 2005-03-01 18:08:14 +00:00
parent 5ef3b565f7
commit 0373bf2038
2 changed files with 132 additions and 22 deletions

View file

@ -376,57 +376,57 @@ sub getEditForm {
$tabform->getTab("display")->template( $tabform->getTab("display")->template(
-value=>$self->getValue('collaborationTemplateId'), -value=>$self->getValue('collaborationTemplateId'),
-namespace=>"Collaboration", -namespace=>"Collaboration",
-label=>"Collaboration System Template", -label=>WebGUI::International::get('system template', 'Collaboration'),
-name=>"collaborationTemplateId" -name=>"collaborationTemplateId"
); );
$tabform->getTab("display")->template( $tabform->getTab("display")->template(
-name=>"threadTemplateId", -name=>"threadTemplateId",
-value=>$self->getValue("threadTemplateId"), -value=>$self->getValue("threadTemplateId"),
-namespace=>"Collaboration/Thread", -namespace=>"Collaboration/Thread",
-label=>"Thread Template" -label=>WebGUI::International::get('thread template', 'Collaboration'),
); );
$tabform->getTab("display")->template( $tabform->getTab("display")->template(
-name=>"postFormTemplateId", -name=>"postFormTemplateId",
-value=>$self->getValue("postFormTemplateId"), -value=>$self->getValue("postFormTemplateId"),
-namespace=>"Collaboration/PostForm", -namespace=>"Collaboration/PostForm",
-label=>"Post Form Template" -label=>WebGUI::International::get('post template', 'Collaboration'),
); );
$tabform->getTab("display")->template( $tabform->getTab("display")->template(
-name=>"searchTemplateId", -name=>"searchTemplateId",
-value=>$self->getValue("SearchTemplateId"), -value=>$self->getValue("SearchTemplateId"),
-namespace=>"Collaboration/Search", -namespace=>"Collaboration/Search",
-label=>"Search Template" -label=>WebGUI::International::get('search template', 'Collaboration'),
); );
$tabform->getTab("display")->template( $tabform->getTab("display")->template(
-name=>"notificationTemplateId", -name=>"notificationTemplateId",
-value=>$self->getValue("notificationTemplateId"), -value=>$self->getValue("notificationTemplateId"),
-namespace=>"Collaboration/Notification", -namespace=>"Collaboration/Notification",
-label=>"Notification Template" -label=>WebGUI::International::get('notification template', 'Collaboration'),
); );
$tabform->getTab("security")->group( $tabform->getTab("security")->group(
-name=>"moderateGroupId", -name=>"moderateGroupId",
-label=>"Who can moderate?", -label=>WebGUI::International::get('who moderates', 'Collaboration'),
-value=>[$self->getValue("moderateGroupId")] -value=>[$self->getValue("moderateGroupId")]
); );
$tabform->getTab("security")->group( $tabform->getTab("security")->group(
-name=>"postGroupId", -name=>"postGroupId",
-label=>"Who can post?", -label=>WebGUI::International::get('who posts', 'Collaboration'),
-value=>[$self->getValue("postGroupId")] -value=>[$self->getValue("postGroupId")]
); );
$tabform->getTab("display")->integer( $tabform->getTab("display")->integer(
-name=>"threadsPerPage", -name=>"threadsPerPage",
-label=>"Threads Per Page", -label=>WebGUI::International::get('threads/page', 'Collaboration'),
-value=>$self->getValue("threadsPerPage") -value=>$self->getValue("threadsPerPage")
); );
$tabform->getTab("display")->integer( $tabform->getTab("display")->integer(
-name=>"postsPerPage", -name=>"postsPerPage",
-label=>"Posts Per Page", -label=>WebGUI::International::get('posts/page', 'Collaboration'),
-value=>$self->getValue("postsPerPage") -value=>$self->getValue("postsPerPage")
); );
if ($session{setting}{useKarma}) { if ($session{setting}{useKarma}) {
$tabform->getTab("properties")->integer( $tabform->getTab("properties")->integer(
-name=>"karmaPerPost", -name=>"karmaPerPost",
-label=>"Karma Per Post", -label=>WebGUI::International::get('karma/post', 'Collaboration'),
-value=>$self->getValue("karmaPerPost") -value=>$self->getValue("karmaPerPost")
); );
} else { } else {
@ -435,7 +435,7 @@ sub getEditForm {
$tabform->getTab("security")->filterContent( $tabform->getTab("security")->filterContent(
-value=>$self->getValue("filterCode"), -value=>$self->getValue("filterCode"),
-name=>"filterCode", -name=>"filterCode",
-label=>"Filter Code" -label=>WebGUI::International::get('filter code', 'Collaboration'),
); );
$tabform->getTab("display")->selectList( $tabform->getTab("display")->selectList(
-name=>"sortBy", -name=>"sortBy",
@ -451,7 +451,7 @@ sub getEditForm {
userDefined5=>"User Defined 5", userDefined5=>"User Defined 5",
title=>"Title" title=>"Title"
}, },
-label=>"Sort By" -label=>WebGUI::International::get('sort by', 'Collaboration'),
); );
$tabform->getTab("display")->selectList( $tabform->getTab("display")->selectList(
-name=>"sortOrder", -name=>"sortOrder",
@ -460,51 +460,51 @@ sub getEditForm {
asc=>"Ascending", asc=>"Ascending",
desc=>"Descending" desc=>"Descending"
}, },
-label=>"Sort Order" -label=>WebGUI::International::get('sort order', 'Collaboration'),
); );
$tabform->getTab("properties")->interval( $tabform->getTab("properties")->interval(
-name=>"archiveAfter", -name=>"archiveAfter",
-label=>"Archive After", -label=>WebGUI::International::get('archive after', 'Collaboration'),
-value=>$self->getValue("archiveAfter") -value=>$self->getValue("archiveAfter")
); );
$tabform->getTab("properties")->integer( $tabform->getTab("properties")->integer(
-name=>"attachmentsPerPost", -name=>"attachmentsPerPost",
-label=>"Attachments Per Post", -label=>WebGUI::International::get('attachments/post', 'Collaboration'),
-value=>$self->getValue("attachmentsPerPost") -value=>$self->getValue("attachmentsPerPost")
); );
$tabform->getTab("security")->interval( $tabform->getTab("security")->interval(
-name=>"editTimeout", -name=>"editTimeout",
-label=>"Edit Timeout", -label=>WebGUI::International::get('edit timeout', 'Collaboration'),
-value=>$self->getValue("editTimeout") -value=>$self->getValue("editTimeout")
); );
$tabform->getTab("security")->yesNo( $tabform->getTab("security")->yesNo(
-name=>"allowReplies", -name=>"allowReplies",
-label=>"Allow replies?", -label=>WebGUI::International::get('allow replies', 'Collaboration'),
-value=>$self->getValue("allowReplies") -value=>$self->getValue("allowReplies")
); );
$tabform->getTab("security")->yesNo( $tabform->getTab("security")->yesNo(
-name=>"addEditStampToPosts", -name=>"addEditStampToPosts",
-label=>"Add edit stamp to posts?", -label=>WebGUI::International::get('edit stamp', 'Collaboration'),
-value=>$self->getValue("addEditStampToPosts") -value=>$self->getValue("addEditStampToPosts")
); );
$tabform->getTab("display")->yesNo( $tabform->getTab("display")->yesNo(
-name=>"allowRichEdit", -name=>"allowRichEdit",
-label=>"Allow rich edit?", -label=>WebGUI::International::get('rich edit', 'Collaboration'),
-value=>$self->getValue("allowRichEdit") -value=>$self->getValue("allowRichEdit")
); );
$tabform->getTab("display")->yesNo( $tabform->getTab("display")->yesNo(
-name=>"useContentFilter", -name=>"useContentFilter",
-label=>"Use content filter?", -label=>WebGUI::International::get('content filter', 'Collaboration'),
-value=>$self->getValue("useContentFilter") -value=>$self->getValue("useContentFilter")
); );
$tabform->getTab("properties")->yesNo( $tabform->getTab("properties")->yesNo(
-name=>"usePreview", -name=>"usePreview",
-label=>"Use preview?", -label=>WebGUI::International::get('preview', 'Collaboration'),
-value=>$self->getValue("usePreview") -value=>$self->getValue("usePreview")
); );
$tabform->getTab("security")->yesNo( $tabform->getTab("security")->yesNo(
-name=>"moderatePosts", -name=>"moderatePosts",
-label=>"Moderate posts?", -label=>WebGUI::International::get('moderate', 'Collaboration'),
-value=>$self->getValue("moderatePosts") -value=>$self->getValue("moderatePosts")
); );
return $tabform; return $tabform;

View file

@ -296,6 +296,116 @@ our $I18N = {
lastUpdated => 1109696029, lastUpdated => 1109696029,
}, },
'system template' => {
message => q|Collaboration System Template|,
lastUpdated => 1109698614,
},
'thread template' => {
message => q|Thread Template|,
lastUpdated => 1109698614,
},
'post template' => {
message => q|Post Form Template|,
lastUpdated => 1109698614,
},
'search template' => {
message => q|Search Template|,
lastUpdated => 1109698614,
},
'notification template' => {
message => q|Notification Template|,
lastUpdated => 1109698614,
},
'who moderates' => {
message => q|Who can moderate?|,
lastUpdated => 1109698614,
},
'who posts' => {
message => q|Who can post?|,
lastUpdated => 1109698614,
},
'threads/page' => {
message => q|Threads Per Page|,
lastUpdated => 1109698614,
},
'posts/page' => {
message => q|Posts Per Page|,
lastUpdated => 1109698614,
},
'karma/post' => {
message => q|Karma Per Post|,
lastUpdated => 1109698614,
},
'filter code' => {
message => q|Filter Code|,
lastUpdated => 1109698614,
},
'sort by' => {
message => q|Sort By|,
lastUpdated => 1109698614,
},
'sort order' => {
message => q|Sort Order|,
lastUpdated => 1109698614,
},
'archive after' => {
message => q|Archive After|,
lastUpdated => 1109698614,
},
'attachments/post' => {
message => q|Attachments Per Post|,
lastUpdated => 1109698614,
},
'edit timeout' => {
message => q|Edit Timeout|,
lastUpdated => 1109698614,
},
'allow replies' => {
message => q|Allow Replies|,
lastUpdated => 1109698614,
},
'edit stamp' => {
message => q|Add edit stamp to posts?|,
lastUpdated => 1109698614,
},
'rich edit' => {
message => q|Allow rich edit?|,
lastUpdated => 1109698614,
},
'content filter' => {
message => q|Use content filter?|,
lastUpdated => 1109698614,
},
'preview' => {
message => q|Use preview?|,
lastUpdated => 1109698614,
},
'moderate' => {
message => q|Moderate posts?|,
lastUpdated => 1109698614,
},
}; };
1; 1;