Ticket #982: project-sample.diff
File project-sample.diff, 4.1 KB (added by , 14 years ago) |
---|
-
project.sample/project.inc
3 3 // This is a sample project file. 4 4 // Modify it to suit your project. 5 5 // Put your version in html/project/project.inc 6 // add tra() around visible strings to make them translatable 7 // see inc/translation.inc and http://boinc.berkeley.edu/trac/wiki/TranslateProject for Details 6 8 7 9 require_once("../inc/util.inc"); 8 10 … … 44 46 // If you include any links, prepend URL with $prefix 45 47 echo "<br><hr noshade size=1><center>"; 46 48 if ($show_return) { 47 echo "<a href=".$prefix."index.php> Home</a> · <a href=".$prefix."home.php>Your account</a> · <a href=".$prefix."forum_index.php>Message boards</a><br>\n";49 echo "<a href=".$prefix."index.php>".tra("Home")."</a> · <a href=".$prefix."home.php>".tra("Your account")."</a> · <a href=".$prefix."forum_index.php>".tra("Message boards")."</a><br>\n"; 48 50 } 49 echo "<br><br> Copyright© ".date("Y ").COPYRIGHT_HOLDER."</center>\n";51 echo "<br><br>".tra("Copyright")." © ".date("Y ").COPYRIGHT_HOLDER."</center>\n"; 50 52 if ($show_date) { 51 53 $t = time_str(time()); 52 echo "<span class=\"note\"> Generated$t</span>\n";54 echo "<span class=\"note\">".tra("Generated")." $t</span>\n"; 53 55 } 54 56 } 55 57 … … 83 85 } 84 86 85 87 function show_profile_heading1() { 86 return "Your personal background.";88 return tra("Your personal background."); 87 89 } 88 90 89 91 function show_profile_question1() { 90 return " 91 Tell us about yourself. 92 You could tell us where you're from, your age, occupation, hobbies, 93 or anything else about yourself. 94 "; 92 return tra("Tell us about yourself. You could tell us where you're from, your age, occupation, hobbies, or anything else about yourself."); 95 93 } 96 94 97 95 function show_profile_heading2() { 98 return "Your opinions about " . PROJECT;96 return tra("Your opinions about %1", PROJECT); 99 97 } 100 98 101 99 function show_profile_question2() { 102 return " 103 Tell us your thoughts about " . PROJECT . "<ol> 104 <li>Why do you run " . PROJECT . "? 105 <li>What are your views about the project? 106 <li>Any suggestions? 107 </ol> 108 "; 100 return tra("Tell us your thoughts about %1<ol> 101 <li>Why do you run %1? 102 <li>What are your views about the project? 103 <li>Any suggestions? 104 </ol>", PROJECT); 109 105 } 110 106 111 107 function project_workunit($wu){ -
project.sample/project_specific_prefs.inc
44 44 return "<option name='$name' $x>$name\n"; 45 45 } 46 46 47 define('COLOR_DESC', 'Color scheme for graphics');48 define("MAX_GFX_CPU_PCT_DESC", "Maximum CPU % for graphics<br><span class=note>0 ... 100</span>");49 define('APP_SELECT_DESC', 'Run only the selected applications');50 define('ACCEPT_ANY_DESC', 'If no work for selected applications is available, accept work from other applications?');47 define('COLOR_DESC', tra('Color scheme for graphics')); 48 define("MAX_GFX_CPU_PCT_DESC", tra("Maximum CPU % for graphics%10 ... 100%2", "<br><span class=note>", "</span>")); 49 define('APP_SELECT_DESC', tra('Run only the selected applications')); 50 define('ACCEPT_ANY_DESC', tra('If no work for selected applications is available, accept work from other applications?')); 51 51 52 52 // The following array is for app filtering; uncomment if you want it. 53 53 // Note: in this implementation, if a user selects all apps, … … 71 71 $app_id = $app[0]; 72 72 $app_name = $app[1]; 73 73 if (in_array($app_id, $prefs->app_ids)) { 74 $x .= "$app_name: yes<br>";74 $x .= "$app_name: ".tra("yes")."<br>"; 75 75 } else { 76 $x .= "$app_name: no<br>";76 $x .= "$app_name: ".tra("no")."<br>"; 77 77 } 78 78 } 79 79 } else { 80 $x = "(all applications)";80 $x = tra("(all applications)"); 81 81 } 82 82 return $x; 83 83 }