Ticket #982: project-sample.diff

File project-sample.diff, 4.1 KB (added by Christian Beer, 14 years ago)

project related include files from project.sample/

  • project.sample/project.inc

     
    33// This is a sample project file.
    44// Modify it to suit your project.
    55// 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
    68
    79require_once("../inc/util.inc");
    810
     
    4446    // If you include any links, prepend URL with $prefix
    4547    echo "<br><hr noshade size=1><center>";
    4648    if ($show_return) {
    47         echo "<a href=".$prefix."index.php>Home</a> &middot; <a href=".$prefix."home.php>Your account</a> &middot; <a href=".$prefix."forum_index.php>Message boards</a><br>\n";
     49        echo "<a href=".$prefix."index.php>".tra("Home")."</a> &middot; <a href=".$prefix."home.php>".tra("Your account")."</a> &middot; <a href=".$prefix."forum_index.php>".tra("Message boards")."</a><br>\n";
    4850    }
    49     echo "<br><br>Copyright &copy; ".date("Y ").COPYRIGHT_HOLDER."</center>\n";
     51    echo "<br><br>".tra("Copyright")." &copy; ".date("Y ").COPYRIGHT_HOLDER."</center>\n";
    5052    if ($show_date) {
    5153        $t = time_str(time());
    52         echo "<span class=\"note\">Generated $t</span>\n";
     54        echo "<span class=\"note\">".tra("Generated")." $t</span>\n";
    5355    }
    5456}
    5557
     
    8385}
    8486
    8587function show_profile_heading1() {
    86     return "Your personal background.";
     88    return tra("Your personal background.");
    8789}
    8890
    8991function 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.");
    9593}
    9694
    9795function show_profile_heading2() {
    98     return "Your opinions about " . PROJECT;
     96    return tra("Your opinions about %1", PROJECT);
    9997}
    10098
    10199function 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);
    109105}
    110106
    111107function project_workunit($wu){
  • project.sample/project_specific_prefs.inc

     
    4444    return "<option name='$name' $x>$name\n";
    4545}
    4646
    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?');
     47define('COLOR_DESC', tra('Color scheme for graphics'));
     48define("MAX_GFX_CPU_PCT_DESC", tra("Maximum CPU % for graphics%10 ... 100%2", "<br><span class=note>", "</span>"));
     49define('APP_SELECT_DESC', tra('Run only the selected applications'));
     50define('ACCEPT_ANY_DESC', tra('If no work for selected applications is available, accept work from other applications?'));
    5151
    5252// The following array is for app filtering; uncomment if you want it.
    5353// Note: in this implementation, if a user selects all apps,
     
    7171            $app_id = $app[0];
    7272            $app_name = $app[1];
    7373            if (in_array($app_id, $prefs->app_ids)) {
    74                 $x .= "$app_name: yes<br>";
     74                $x .= "$app_name: ".tra("yes")."<br>";
    7575            } else {
    76                 $x .= "$app_name: no<br>";
     76                $x .= "$app_name: ".tra("no")."<br>";
    7777            }
    7878        }
    7979    } else {
    80         $x = "(all applications)";
     80        $x = tra("(all applications)");
    8181    }
    8282    return $x;
    8383}