Translate text from forum_post page

svn path=/trunk/boinc/; revision=8228
This commit is contained in:
Janus B. Kristensen 2005-09-27 20:38:44 +00:00
parent 1b919d324e
commit 60b6c6d973
3 changed files with 121 additions and 50 deletions

View File

@ -12194,3 +12194,15 @@ Rom 27 Sept 2005
clientgui/wizards/
WizardAccountManager.cpp
WizardAttachProject.cpp, .h
Janus 27 Sept 2005
- Made forum_post.php translatable
html/
inc/
util.inc
user/
forum_post.php
languages/translations
en.po

View File

@ -359,6 +359,67 @@ msgid "TEAM_TABLE_MEMBERS"
msgstr "Members"
#########################################
# Forum
#########################################
msgid "FORUM_ERR_NOT_FOUND"
msgstr "No such forum"
msgid "FORUM_ERR_EXPAVG"
msgstr "In order to create a new thread in %s you must have a certain amount of credit."
"This is to prevent and protect against abuse of the system."
msgid "FORUM_ERR_INTERVAL"
msgstr "You cannot create any more threads right now. Please wait a while before trying again."
"This delay has been enforced to protect against abuse of the system."
msgid "FORUM_QA_POST_MESSAGE"
msgstr "The %s area lets you get help from other users. If you have a question or problem:"
msgid "FORUM_QA_POST_MESSAGE2"
msgstr "Read the existing list of questions. If your question is already there, "
"click on the %s button. If answers to the question have been submitted, read them. "
"If one of them answers your question, click the %s button."
msgid "FORUM_QA_POST_MESSAGE3"
msgstr "If your question has not already been asked, fill out and submit this form."
msgid "FORUM_QA_POST_MESSAGE4"
msgstr "This will prevent questions from being asked repeatedly."
msgid "FORUM_QA_SUBMIT_NEW"
msgstr "Submit a new question/problem"
msgid "FORUM_SUBMIT_NEW"
msgstr "Create a new thread"
msgid "FORUM_SUBMIT_NEW_TITLE"
msgstr "Title"
msgid "FORUM_QA_SUBMIT_NEW_HELP"
msgstr "Describe your question in a few words. "
"A brief, clear summary will help others with the same "
"question (or an answer) to find it."
msgid "FORUM_QA_SUBMIT_NEW_BODY_HELP"
msgstr "If you are having software problems, "
"mention the version number of the software, "
"your computer type and operating system."
msgid "FORUM_ADD_MY_SIG"
msgstr "Add my signature to this post"
msgid "FORUM_MESSAGE"
msgstr "Message"
msgid "FORUM_QA_GOT_PROBLEM_TOO"
msgstr "I also got this problem"
msgid "FORUM_QA_QUESTION_ANSWERED"
msgstr "This answered my question"
msgid "FORUM_HTML_INFO"
msgstr "Use BBCode tags to format your text"
#########################################
# Forum search features
#########################################
@ -373,3 +434,29 @@ msgstr "No titles containing '%s' could be found."
msgid "FORUM_SEARCH_BODIES_NO"
msgstr "No posts containing '%s' could be found."
#########################################
# Links from the main page
#########################################
msgid "LINKS_QA"
msgstr "Questions and Answers"
msgid ""
msgstr ""
msgid ""
msgstr ""
msgid ""
msgstr ""
msgid ""
msgstr ""
msgid ""
msgstr ""
msgid ""
msgstr ""

View File

@ -3,6 +3,7 @@
require_once('../inc/forum.inc');
require_once('../inc/util.inc');
require_once('../inc/subscribe.inc');
require_once('../inc/translation.inc');
db_init();
@ -12,21 +13,17 @@ $logged_in_user = getForumPreferences($logged_in_user);
$forumid = get_int("id");
$forum = getForum($forumid);
if (!$forum) {
error_page("no such forum");
error_page(tr(FORUM_ERR_NOT_FOUND));
}
if ($logged_in_user->total_credit<$forum->post_min_total_credit || $logged_in_user->expavg_credit<$forum->post_min_expavg_credit){
//If user haven't got enough credit (according to forum regulations)
//We do not tell the (ab)user how much this is - no need to make it easy for them to break the system.
error_page(
"In order to create a new thread in ".$forum->title." you must have a certain amount of credit.
This is to prevent and protect against abuse of the system.");
error_page(sprintf(tr(FORUM_ERR_EXPAVG),$forum->title));
}
if (time()-$logged_in_user->last_post<$forum->post_min_interval){
//If the user is posting faster than forum regulations allow
//Tell the user to wait a while before creating any more posts
error_page(
"You cannot create any more threads right now. Please wait a while before trying again.<br />
This delay has been enforced to protect against abuse of the system.");
error_page(tr(FORUM_ERR_INTERVAL));
}
$title = post_str("title", true);
$content = post_str("content", true);
@ -59,64 +56,39 @@ if ($category->is_helpdesk) {
show_forum_title($forum, NULL, $category->is_helpdesk);
if ($category->is_helpdesk) {
echo "<p>The <b>Questions and answers</b> area let you
get help from other users.
If you have a question or problem:
<ul>
<li>
Read the existing list of questions.
If your question is already there,
click on the <b>I also have this question or problem</b> button.
If answers to the question have been submitted, read them.
If one of them answers your question, click the
<b>This answered my question</b> button.
<li>
If your question has not already been asked,
fill out and submit this form.
</ul>
This will prevent questions from being asked repeatedly.
";
//Tell people to first search for answers THEN ask the question...
echo "<p>".sprintf(tr(FORUM_QA_POST_MESSAGE), "<b>".tr(LINKS_QA)."</b>");
echo "<ul><li>".sprintf(tr(FORUM_QA_POST_MESSAGE2), "<b>".tr(FORUM_QA_GOT_PROBLEM_TOO)."</b>", "<b>".tr(FORUM_QA_QUESTION_ANSWERED)."</b>");
echo "<li>".tr(FORUM_QA_POST_MESSAGE3);
echo "</ul>".tr(FORUM_QA_POST_MESSAGE4);
}
echo "<form action=forum_post.php?id=$forumid method=POST>\n";
start_table();
if ($category->is_helpdesk) {
row1("Submit a new question/problem");
row1(tr(FORUM_QA_SUBMIT_NEW)); //New question
$submit_help = "<br>".tr(FORUM_QA_SUBMIT_NEW_HELP);
$body_help ="<br>".tr(FORUM_QA_SUBMIT_NEW_BODY_HELP);
} else {
row1("Create a new thread");
row1(tr(FORUM_SUBMIT_NEW)); //New thread
$submit_help = "";
$body_help = "";
}
$x = "Title".html_info();
//Title
row2(tr(FORUM_SUBMIT_NEW_TITLE).html_info().$submit_help, "<input type=text name=title size=62>");
//Message
row2(tr(FORUM_MESSAGE).html_info().post_warning().$body_help, "<textarea name=content rows=12 cols=54></textarea>");
if ($category->is_helpdesk) {
$x .="<br>
Describe your question in a few words.
A brief, clear summary will help others with the same
question (or an answer) find it.
";
}
$y = "<input type=text name=title size=62>";
row2($x, $y);
$x = "Message".html_info().post_warning();
if ($category->is_helpdesk) {
$x .= " If you are having software problems,
mention the version number of the software,
your computer type and operating system.
";
}
$y = "<textarea name=content rows=12 cols=54></textarea>";
if ($logged_in_user->no_signature_by_default==0) {
$enable_signature="checked=\"true\"";
} else {
$enable_signature="";
}
row2($x, $y);
row2("", "<input name=add_signature value=add_it ".$enable_signature." type=checkbox>Add my signature to this post");
row2("", "<input name=add_signature value=add_it ".$enable_signature." type=checkbox>".tr(FORUM_ADD_MY_SIG));
row2("", "<input type=submit value=\"OK\">");
end_forum_table();