Ticket #981: prefs_i18n.diff
File prefs_i18n.diff, 44.2 KB (added by , 14 years ago) |
---|
-
inc/prefs.inc
EigenschaftsÀnderungen: . ___________________________________________________________________ GeÀndert: svn:ignore - .httpd.conf boinc.sln boinc.suo boinc_web.phpproj + .httpd.conf boinc.sln boinc.suo boinc_web.phpproj boinc-i18n.kpf
65 65 66 66 // strings describing various preference fields 67 67 // 68 define("CPU_LIMIT_DESC", "Processor usage");68 define("CPU_LIMIT_DESC", tra("Processor usage")); 69 69 define("SUSPEND_WHILE_ON_BATTERIES_DESC", 70 "Suspend work while computer is on battery power?71 <br><span class=note>(matters only for portable computers)</span>"70 tra("Suspend work while computer is on battery power? %1 71 (matters only for portable computers)%2", "<br><span class=note>", "</span>") 72 72 ); 73 73 define("RUN_IF_USER_ACTIVE_DESC", 74 "Suspend work while computer is in use?"74 tra("Suspend work while computer is in use?") 75 75 ); 76 76 define("RUN_GPU_IF_USER_ACTIVE_DESC", 77 "Suspend GPU work while computer is in use?78 <br><span class=note>Enforced by version 6.7+</span>"77 tra("Suspend GPU work while computer is in use? %1 78 Enforced by version 6.7+", "<br><span class=note>", "</span>") 79 79 ); 80 define("IDLE_TIME_TO_RUN_DESC", "'In use' means mouse/keyboard activity in last");80 define("IDLE_TIME_TO_RUN_DESC", tra("'In use' means mouse/keyboard activity in last")); 81 81 define("SUSPEND_IF_NO_RECENT_INPUT_DESC", 82 "Suspend work if no mouse/keyboard activity in last83 <br><span class=note>(Needed to enter low-power mode on some computers)</span>"82 tra("Suspend work if no mouse/keyboard activity in last %1 83 (Needed to enter low-power mode on some computers)%2", "<br><span class=note>", "</span>") 84 84 ); 85 85 define("SUSPEND_CPU_USAGE_DESC", 86 "Suspend work if CPU usage is above<br><span class=note>0 means no restriction<br>Enforced by version 6.10.30+</span>" 86 tra("Suspend work if CPU usage is above %1 87 0 means no restriction<br>Enforced by version 6.10.30+%2", "<br><span class=note>", "</span>") 87 88 ); 88 define("START_END_DESC", "Do work only between the hours of");89 define("START_END_DESC2", "<br><span class=note> (no restriction if equal)</span>");89 define("START_END_DESC", tra("Do work only between the hours of")); 90 define("START_END_DESC2", "<br><span class=note>".tra("(no restriction if equal)")."</span>"); 90 91 define("LEAVE_APPS_IN_MEMORY_DESC", 91 "Leave tasks in memory while suspended? 92 <br><span class=note>(suspended tasks will consume swap space if 'yes')</span>"); 93 define("CPU_SCHEDULING_DESC", "Switch between tasks every 94 <br><span class=note>(recommended: 60 minutes)</span>"); 92 tra("Leave tasks in memory while suspended? %1 93 (suspended tasks will consume swap space if 'yes')%2", "<br><span class=note>", "</span>") 94 ); 95 define("CPU_SCHEDULING_DESC", 96 tra("Switch between tasks every %1 97 (recommended: 60 minutes)%2", "<br><span class=note>", "</span>") 98 ); 95 99 define("CONFIRM_BEFORE_CONNECTING_DESC", 96 "Confirm before connecting to Internet?97 <br><span class=note>(matters only if you have a modem, ISDN or VPN connection)</span>"100 tra("Confirm before connecting to Internet? %1 101 (matters only if you have a modem, ISDN or VPN connection)%2", "<br><span class=note>", "</span>") 98 102 ); 99 103 define("HANGUP_IF_DIALED_DESC", 100 "Disconnect when done?101 <br><span class=note>(matters only if you have a modem, ISDN or VPN connection)</span>"104 tra("Disconnect when done? %1 105 (matters only if you have a modem, ISDN or VPN connection)%2", "<br><span class=note>", "</span>") 102 106 ); 103 107 define("WORK_BUF_MIN_DAYS_DESC", 104 "Computer is connected to the Internet about every 105 <br><span class=note>(Leave blank or 0 if always connected. 106 <br>BOINC will try to maintain at least this much work.)</span> 107 " 108 tra("Computer is connected to the Internet about every %1 109 (Leave blank or 0 if always connected.<br> 110 BOINC will try to maintain at least this much work.)%2", "<br><span class=note>", "</span>") 108 111 ); 109 112 define("WORK_BUF_ADDITIONAL_DAYS_DESC", 110 "Maintain enough work for an additional"113 tra("Maintain enough work for an additional") 111 114 ); 112 define("MAX_NCPUS_PCT_DESC", "On multiprocessors, use at most<span class=note><br>Enforced by version 6.1+</span>"); 113 define("MAX_NCPUS_PCT_DESC2", "% of the processors"); 114 define("MAX_CPUS_DESC", "On multiprocessors, use at most"); 115 define("MAX_CPUS_DESC2", "processors"); 116 define("USE_AT_MOST", "Use at most"); 117 define("USE_AT_MOST2", "Use at most<span class=note><br>(Can be used to reduce CPU heat)</span>"); 118 define("USE_AT_MOST3", "Use at most"); 119 define("CPU_USAGE_LIMIT_DESC2", "percent of CPU time"); 120 define("DISK_INTERVAL_DESC", "Tasks checkpoint to disk at most every"); 121 define("DISK_LIMIT_DESC", "Disk and memory usage"); 122 define("DISK_MIN_FREE_GB_DESC", "Leave at least"); 123 define("DISK_SCHED_MIN_FREE_DESC1", "<br><span class=note>(Values smaller than "); 124 define("DISK_SCHED_MIN_FREE_DESC2", " are ignored)</span>"); 125 define("DISK_MAX_USED_PCT_DESC2", "% of total disk space"); 126 define("VM_MAX_USED_PCT_DESC2", "% of page file (swap space)"); 127 define("RAM_MAX_USED_BUSY_PCT_DESC2", "% of memory when computer is in use"); 128 define("RAM_MAX_USED_IDLE_PCT_DESC2", "% of memory when computer is not in use"); 129 define("NETWORK_LIMIT_DESC", "Network usage"); 130 define("MAX_BYTES_SEC_DOWN_DESC", "Maximum download rate:"); 131 define("MAX_BYTES_SEC_UP_DESC", "Maximum upload rate:"); 132 define("NET_START_END_DESC", "Use network only between the hours of"); 115 define("MAX_NCPUS_PCT_DESC", 116 tra("On multiprocessors, use at most %1 Enforced by version 6.1+%2", "<br><span class=note>", "</span>") 117 ); 118 define("MAX_NCPUS_PCT_DESC2", tra("% of the processors")); 119 define("MAX_CPUS_DESC", tra("On multiprocessors, use at most")); 120 define("MAX_CPUS_DESC2", tra("processors")); 121 define("USE_AT_MOST", tra("Use at most")); 122 define("USE_AT_MOST2", 123 tra("Use at most %1 (Can be used to reduce CPU heat)%2", "<br><span class=note>", "</span>") 124 ); 125 define("USE_AT_MOST3", tra("Use at most")); 126 define("CPU_USAGE_LIMIT_DESC2", tra("percent of CPU time")); 127 define("DISK_INTERVAL_DESC", tra("Tasks checkpoint to disk at most every")); 128 define("DISK_LIMIT_DESC", tra("Disk and memory usage")); 129 define("DISK_MIN_FREE_GB_DESC", tra("Leave at least")); 130 define("DISK_SCHED_MIN_FREE_DESC", 131 "<br><span class=note>".tra("(Values smaller than %s are ignored)")."</span>" 132 ); 133 define("DISK_MAX_USED_PCT_DESC2", tra("% of total disk space")); 134 define("VM_MAX_USED_PCT_DESC2", tra("% of page file (swap space)")); 135 define("RAM_MAX_USED_BUSY_PCT_DESC2", tra("% of memory when computer is in use")); 136 define("RAM_MAX_USED_IDLE_PCT_DESC2", tra("% of memory when computer is not in use")); 137 define("NETWORK_LIMIT_DESC", tra("Network usage")); 138 define("MAX_BYTES_SEC_DOWN_DESC", tra("Maximum download rate:")); 139 define("MAX_BYTES_SEC_UP_DESC", tra("Maximum upload rate:")); 140 define("NET_START_END_DESC", tra("Use network only between the hours of")); 133 141 define("DONT_VERIFY_IMAGES_DESC", 134 "Skip image file verification? 135 <br><span class=note>Check this ONLY if your Internet provider 136 modifies image files (UMTS does this, for example). 137 <br>Skipping verification reduces the security of BOINC.</span>" 142 tra("Skip image file verification? %1 143 Check this ONLY if your Internet provider modifies image files (UMTS does this, for example).<br /> 144 Skipping verification reduces the security of BOINC.%2", "<br><span class=note>", "</span>") 138 145 ); 139 define('ATI_SELECT_DESC', "Use ATI GPU if present<br><span class=note>(enforced by 6.10+ clients)</span>"); 140 define('CUDA_SELECT_DESC', "Use NVIDIA GPU if present<br><span class=note>(enforced by 6.10+ clients)</span>"); 141 define('CPU_SELECT_DESC', "Use CPU<br><span class=note>(enforced by 6.10+ clients)</span>"); 146 define('ATI_SELECT_DESC', 147 tra("Use ATI GPU if present %1 (enforced by 6.10+ clients)%2", "<br><span class=note>", "</span>") 148 ); 149 define('CUDA_SELECT_DESC', 150 tra("Use NVIDIA GPU if present %1 (enforced by 6.10+ clients)%2", "<br><span class=note>", "</span>") 151 ); 152 define('CPU_SELECT_DESC', 153 tra("Use CPU % 1 (enforced by 6.10+ clients)%2", "<br><span class=note>", "</span>") 154 ); 142 155 143 156 144 157 define("BYTE_CONVERSION", 1000.0); 145 define("BYTE_UNITS", "Kbytes/sec");146 define("BYTE_ABBR", "KB/s");158 define("BYTE_UNITS", tra("Kbytes/sec")); 159 define("BYTE_ABBR", tra("KB/s")); 147 160 define("ALLOW_BETA_WORK", 148 "Run test applications?<br> 149 <span class=note>This helps us develop applications, 150 but may cause jobs to fail on your computer</span>" 161 tra("Run test applications? %1 162 This helps us develop applications, but may cause jobs to fail on your computer%2", "<br><span class=note>", "</span>") 151 163 ); 152 164 153 165 // These texts are used in multiple places in prefs_edit.php and add_venue.php 154 define("PREFS_FORM_DESC1", "These preferences apply to all the BOINC projects in which you participate.<br><br>"); 155 define("PREFS_FORM_ERROR_DESC", "<b>Unable to update preferences.</b> The values marked in red below were out of range or not numeric.<br><br>"); 166 define("PREFS_FORM_DESC1", tra("These preferences apply to all the BOINC projects in which you participate.")."<br><br>"); 167 define("PREFS_FORM_ERROR_DESC", 168 tra("%1Unable to update preferences.%2 The values marked in red below were out of range or not numeric.", "<strong>", "</strong>"). 169 "<br><br>" 170 ); 156 171 157 172 global $text; 158 173 global $parse_result; … … 202 217 if ($x == "home") return; 203 218 if ($x == "work") return; 204 219 if ($x == "school") return; 205 error_page( "bad venue: $x");220 error_page(tra("bad venue: %1", $x)); 206 221 } 207 222 208 223 function check_subset($x) { 209 224 if ($x == "global") return; 210 225 if ($x == "project") return; 211 error_page( "bad subset: $x");226 error_page(tra("bad subset: %1", $x)); 212 227 } 213 228 214 229 // functions to convert between max_bytes_sec_* as stored in the … … 271 286 $venue_name = $attrs["name"]; 272 287 $top_parse_result = $parse_result; 273 288 $parse_result = default_prefs_global(); 274 //echo "VENUE PREFS AFTER INIT: <pre>";275 //var_dump($parse_result);276 //echo "</pre>";277 289 break; 278 290 } 279 291 $text = ""; … … 288 300 289 301 switch($name) { 290 302 case "venue": 291 //echo "VENUE PREFS AFTER PARSE: <pre>";292 //var_dump($parse_result);293 //echo "</pre>";294 303 $top_parse_result->$venue_name = $parse_result; 295 304 $parse_result = $top_parse_result; 296 305 break; … … 619 628 $type = $value === "--" ? "--" : $type; 620 629 switch($type) { 621 630 case "yesno": 622 echo $value ? "yes":"no";631 echo $value ?tra("yes"):tra("no"); 623 632 break; 624 633 case "noyes": 625 echo $value ? "no":"yes";634 echo $value ?tra("no"):tra("yes"); 626 635 break; 627 636 case "limit": 628 637 $x = max_bytes_display_mode($value); 629 638 $y = "$x " . BYTE_ABBR; 630 echo $x ? "$y" : "no limit";639 echo $x ? "$y" : tra("no limit"); 631 640 break; 632 641 case "minutes": 633 642 if ($value) { … … 652 661 $pre_add = "<a href=add_venue.php?venue="; 653 662 $pre_edit = "<a href=prefs_edit.php?venue="; 654 663 $pre_remove = "<a href=prefs_remove.php?venue="; 655 $post_add = "&subset=$subset&cols=1$tokens> Add</a>";656 $post_edit = "&subset=$subset&cols=1$tokens> Edit</a>";657 $post_remove = "&subset=$subset&cols=1$tokens> Remove</a>";658 $gen = "<a href=prefs_edit.php?subset=$subset&cols=1$tokens> Edit</a>";664 $post_add = "&subset=$subset&cols=1$tokens>".tra("Add")."</a>"; 665 $post_edit = "&subset=$subset&cols=1$tokens>".tra("Edit")."</a>"; 666 $post_remove = "&subset=$subset&cols=1$tokens>".tra("Remove")."</a>"; 667 $gen = "<a href=prefs_edit.php?subset=$subset&cols=1$tokens>".tra("Edit")."</a>"; 659 668 660 669 $hom = isset($prefs->home) ? $pre_edit."home".$post_edit : $pre_add."home".$post_add; 661 670 $schl = isset($prefs->school) ? $pre_edit."school".$post_edit : $pre_add."school".$post_add; … … 689 698 row_defs(SUSPEND_WHILE_ON_BATTERIES_DESC, "suspend_while_on_batteries", "", "yesno", $prefs); 690 699 row_defs(RUN_IF_USER_ACTIVE_DESC, "suspend_if_user_active", "", "yesno", $prefs); 691 700 row_defs(RUN_GPU_IF_USER_ACTIVE_DESC, "suspend_gpu_if_user_active", "", "yesno", $prefs); 692 row_defs(IDLE_TIME_TO_RUN_DESC, "idle_time_to_run", " minutes", "", $prefs);701 row_defs(IDLE_TIME_TO_RUN_DESC, "idle_time_to_run", tra("minutes"), "", $prefs); 693 702 694 row_defs(SUSPEND_IF_NO_RECENT_INPUT_DESC, "suspend_if_no_recent_input", "minutes", "minutes", $prefs);703 row_defs(SUSPEND_IF_NO_RECENT_INPUT_DESC, "suspend_if_no_recent_input", tra("minutes"), "minutes", $prefs); 695 704 row_defs(SUSPEND_CPU_USAGE_DESC, "suspend_cpu_usage", "%", "", $prefs); 696 705 697 706 row_hours(START_END_DESC, "run", $prefs); 698 707 699 708 row_defs(LEAVE_APPS_IN_MEMORY_DESC, "leave_apps_in_memory", "", "yesno", $prefs); 700 row_defs(CPU_SCHEDULING_DESC, "cpu_scheduling_period_minutes", " minutes", "", $prefs);709 row_defs(CPU_SCHEDULING_DESC, "cpu_scheduling_period_minutes", tra("minutes"), "", $prefs); 701 710 row_defs(MAX_CPUS_DESC, "max_cpus", MAX_CPUS_DESC2, "", $prefs); 702 711 row_defs(MAX_NCPUS_PCT_DESC, "max_ncpus_pct", MAX_NCPUS_PCT_DESC2, "", $prefs); 703 712 row_defs(USE_AT_MOST2, "cpu_usage_limit", CPU_USAGE_LIMIT_DESC2, "", $prefs); 704 713 705 714 row_top(DISK_LIMIT_DESC); 706 row_defs(USE_AT_MOST, "disk_max_used_gb", " GB disk space", "", $prefs);707 row_defs(DISK_MIN_FREE_GB_DESC, "disk_min_free_gb", " GB disk space free", "", $prefs);715 row_defs(USE_AT_MOST, "disk_max_used_gb", tra("GB disk space"), "", $prefs); 716 row_defs(DISK_MIN_FREE_GB_DESC, "disk_min_free_gb", tra("GB disk space free"), "", $prefs); 708 717 row_defs(USE_AT_MOST, "disk_max_used_pct", DISK_MAX_USED_PCT_DESC2, "", $prefs); 709 row_defs(DISK_INTERVAL_DESC, "disk_interval", " seconds", "", $prefs);718 row_defs(DISK_INTERVAL_DESC, "disk_interval", tra("seconds"), "", $prefs); 710 719 row_defs(USE_AT_MOST, "vm_max_used_pct", VM_MAX_USED_PCT_DESC2, "", $prefs); 711 720 row_defs(USE_AT_MOST3, "ram_max_used_busy_pct", RAM_MAX_USED_BUSY_PCT_DESC2, "", $prefs); 712 721 row_defs(USE_AT_MOST3, "ram_max_used_idle_pct", RAM_MAX_USED_IDLE_PCT_DESC2, "", $prefs); 713 722 714 723 row_top(NETWORK_LIMIT_DESC); 715 row_defs(WORK_BUF_MIN_DAYS_DESC, "work_buf_min_days", " days", "", $prefs);716 row_defs(WORK_BUF_ADDITIONAL_DAYS_DESC, "work_buf_additional_days", " days", "", $prefs);724 row_defs(WORK_BUF_MIN_DAYS_DESC, "work_buf_min_days", tra("days"), "", $prefs); 725 row_defs(WORK_BUF_ADDITIONAL_DAYS_DESC, "work_buf_additional_days", tra("days"), "", $prefs); 717 726 row_defs(CONFIRM_BEFORE_CONNECTING_DESC, "confirm_before_connecting", "", "yesno", $prefs); 718 727 row_defs(HANGUP_IF_DIALED_DESC, "hangup_if_dialed", "", "yesno", $prefs); 719 728 row_defs(MAX_BYTES_SEC_DOWN_DESC, "max_bytes_sec_down", "", "limit", $prefs); … … 731 740 732 741 function prefs_show_global($prefs) { 733 742 row1(CPU_LIMIT_DESC); 734 row2(SUSPEND_WHILE_ON_BATTERIES_DESC, $prefs->suspend_while_on_batteries? "yes":"no");735 row2(RUN_IF_USER_ACTIVE_DESC, $prefs->suspend_if_user_active? "yes":"no");736 row2(RUN_GPU_IF_USER_ACTIVE_DESC, $prefs->suspend_gpu_if_user_active? "yes":"no");737 row2(IDLE_TIME_TO_RUN_DESC, "$prefs->idle_time_to_run minutes");743 row2(SUSPEND_WHILE_ON_BATTERIES_DESC, $prefs->suspend_while_on_batteries?tra("yes"):tra("no")); 744 row2(RUN_IF_USER_ACTIVE_DESC, $prefs->suspend_if_user_active?tra("yes"):tra("no")); 745 row2(RUN_GPU_IF_USER_ACTIVE_DESC, $prefs->suspend_gpu_if_user_active?tra("yes"):tra("no")); 746 row2(IDLE_TIME_TO_RUN_DESC, tra("%1 minutes", $prefs->idle_time_to_run)); 738 747 739 748 $x = show_double($prefs->suspend_if_no_recent_input); 740 row2(SUSPEND_IF_NO_RECENT_INPUT_DESC, "$x minutes");749 row2(SUSPEND_IF_NO_RECENT_INPUT_DESC, tra("%1 minutes", $x)); 741 750 $x = show_double($prefs->suspend_cpu_usage); 742 751 row2(SUSPEND_CPU_USAGE_DESC, "$x %"); 743 752 744 753 if ($prefs->start_hour == $prefs->end_hour) { 745 $x = "(no restriction)";754 $x = tra("(no restriction)"); 746 755 } else { 747 756 $s = hour_str($prefs->start_hour); 748 757 $e = hour_str($prefs->end_hour); 749 $x = "$s and$e";758 $x = "$s ".tra("and")." $e"; 750 759 } 751 760 row2(START_END_DESC, $x); 752 row2(LEAVE_APPS_IN_MEMORY_DESC, $prefs->leave_apps_in_memory? "yes":"no");753 row2(CPU_SCHEDULING_DESC, "$prefs->cpu_scheduling_period_minutes minutes");761 row2(LEAVE_APPS_IN_MEMORY_DESC, $prefs->leave_apps_in_memory?tra("yes"):tra("no")); 762 row2(CPU_SCHEDULING_DESC, tra("%1 minutes", $prefs->cpu_scheduling_period_minutes)); 754 763 $x = $prefs->max_cpus?$prefs->max_cpus:'---'; 755 764 row2(MAX_CPUS_DESC, "$x ".MAX_CPUS_DESC2); 756 765 $x = $prefs->max_ncpus_pct?$prefs->max_ncpus_pct:'---'; 757 766 row2(MAX_NCPUS_PCT_DESC, "$x ".MAX_NCPUS_PCT_DESC2); 758 767 row2(USE_AT_MOST2, "$prefs->cpu_usage_limit ".CPU_USAGE_LIMIT_DESC2); 759 768 row1(DISK_LIMIT_DESC); 760 row2(USE_AT_MOST, "$prefs->disk_max_used_gb GB disk space");769 row2(USE_AT_MOST, tra("%1 GB disk space", $prefs->disk_max_used_gb)); 761 770 762 771 $dp = get_disk_space_config(); 763 772 764 773 $msg = null; 765 774 if ($dp->new_sched_flag) { 766 $msg = DISK_SCHED_MIN_FREE_DESC1.$dp->sched_disk_min_free_gb.DISK_SCHED_MIN_FREE_DESC2;775 $msg = sprintf(DISK_SCHED_MIN_FREE_DESC, $dp->sched_disk_min_free_gb); 767 776 } 768 row2(DISK_MIN_FREE_GB_DESC.$msg, "$prefs->disk_min_free_gb GB disk space free");777 row2(DISK_MIN_FREE_GB_DESC.$msg, tra("%1 GB disk space free", $prefs->disk_min_free_gb)); 769 778 row2(USE_AT_MOST, "$prefs->disk_max_used_pct".DISK_MAX_USED_PCT_DESC2); 770 779 row2(DISK_INTERVAL_DESC, "$prefs->disk_interval seconds"); 771 780 row2(USE_AT_MOST, "$prefs->vm_max_used_pct".VM_MAX_USED_PCT_DESC2); 772 781 row2(USE_AT_MOST3, "$prefs->ram_max_used_busy_pct".RAM_MAX_USED_BUSY_PCT_DESC2); 773 782 row2(USE_AT_MOST3, "$prefs->ram_max_used_idle_pct".RAM_MAX_USED_IDLE_PCT_DESC2); 774 783 row1(NETWORK_LIMIT_DESC); 775 row2(WORK_BUF_MIN_DAYS_DESC, "$prefs->work_buf_min_days days");776 row2(WORK_BUF_ADDITIONAL_DAYS_DESC, "$prefs->work_buf_additional_days days");777 row2(CONFIRM_BEFORE_CONNECTING_DESC, $prefs->confirm_before_connecting? "yes":"no");778 row2(HANGUP_IF_DIALED_DESC, $prefs->hangup_if_dialed? "yes":"no");784 row2(WORK_BUF_MIN_DAYS_DESC, tra("%1 days", $prefs->work_buf_min_days)); 785 row2(WORK_BUF_ADDITIONAL_DAYS_DESC, tra("%1 days", $prefs->work_buf_additional_days)); 786 row2(CONFIRM_BEFORE_CONNECTING_DESC, $prefs->confirm_before_connecting?tra("yes"):tra("no")); 787 row2(HANGUP_IF_DIALED_DESC, $prefs->hangup_if_dialed?tra("yes"):tra("no")); 779 788 $x = max_bytes_display_mode($prefs->max_bytes_sec_down); 780 789 $y = "$x " . BYTE_ABBR; 781 row2(MAX_BYTES_SEC_DOWN_DESC, $x?"$y": "no limit");790 row2(MAX_BYTES_SEC_DOWN_DESC, $x?"$y":tra("no limit")); 782 791 $x = max_bytes_display_mode($prefs->max_bytes_sec_up); 783 792 $y = "$x " . BYTE_ABBR; 784 row2(MAX_BYTES_SEC_UP_DESC, $x?"$y": "no limit");793 row2(MAX_BYTES_SEC_UP_DESC, $x?"$y":tra("no limit")); 785 794 if ($prefs->net_start_hour == $prefs->net_end_hour) { 786 $x = "(no restriction)";795 $x = tra("(no restriction)"); 787 796 } else { 788 797 $s = hour_str($prefs->net_start_hour); 789 798 $e = hour_str($prefs->net_end_hour); 790 $x = "$s and$e";799 $x = "$s ".tra("and")." $e"; 791 800 } 792 801 row2(NET_START_END_DESC, $x); 793 row2(DONT_VERIFY_IMAGES_DESC, $prefs->dont_verify_images? "yes":"no");802 row2(DONT_VERIFY_IMAGES_DESC, $prefs->dont_verify_images?tra("yes"):tra("no")); 794 803 } 795 804 796 805 function prefs_show_resource($prefs, $columns=false) { 797 806 global $app_types; 798 $x = "Resource share<br> 799 <span class=note>If you participate in multiple BOINC projects, 800 this is the proportion of your resources used by ".PROJECT."</span> 801 "; 807 $x = tra("Resource share %1 808 If you participate in multiple BOINC projects, 809 this is the proportion of your resources used by %2%3", 810 "<br><span class=note>", PROJECT, "</span>" 811 ); 802 812 if ($columns) { 803 813 row_defs($x, "resource_share", "", "" ,$prefs); 804 814 if ($app_types->count > 1) { … … 816 826 row2($x, $prefs->resource_share); 817 827 if ($app_types->count > 1) { 818 828 if ($app_types->cpu) { 819 row2(CPU_SELECT_DESC, $prefs->no_cpu? "no":"yes");829 row2(CPU_SELECT_DESC, $prefs->no_cpu?tra("no"):tra("yes")); 820 830 } 821 831 if ($app_types->cuda) { 822 row2(CUDA_SELECT_DESC, $prefs->no_cuda? "no":"yes");832 row2(CUDA_SELECT_DESC, $prefs->no_cuda?tra("no"):tra("yes")); 823 833 } 824 834 if ($app_types->ati) { 825 row2(ATI_SELECT_DESC, $prefs->no_ati? "no":"yes");835 row2(ATI_SELECT_DESC, $prefs->no_ati?tra("no"):tra("yes")); 826 836 } 827 837 } 828 838 } … … 832 842 if ($columns) { 833 843 row_defs(ALLOW_BETA_WORK, "allow_beta_work", "", "yesno" ,$prefs); 834 844 } else { 835 row2(ALLOW_BETA_WORK, $prefs->allow_beta_work? "yes":"no");845 row2(ALLOW_BETA_WORK, $prefs->allow_beta_work?tra("yes"):tra("no")); 836 846 } 837 847 } 838 848 839 849 function prefs_show_privacy($user) { 840 850 $x = ""; 841 851 if (defined('EMAIL_FROM')) { 842 $x = "<br><span class=note>Emails will be sent from ".EMAIL_FROM."; 843 make sure your spam filter accepts this address.</span>"; 852 $x = "<br><span class=note>". 853 tra("Emails will be sent from %1; make sure your spam filter accepts this address.", EMAIL_FROM). 854 "</span>"; 844 855 } 845 row2( "Is it OK for ".PROJECT." and your team (if any) to email you?$x",846 $user->send_email? "yes":"no"856 row2(tra("Is it OK for %1 and your team (if any) to email you?", PROJECT)." $x", 857 $user->send_email?tra("yes"):tra("no") 847 858 ); 848 row2( "Should ".PROJECT." show your computers on its web site?", $user->show_hosts?"yes":"no");859 row2(tra("Should %1 show your computers on its web site?", PROJECT), $user->show_hosts?tra("yes"):tra("no")); 849 860 } 850 861 851 862 function prefs_show_project($prefs, $columns=false) { … … 861 872 } 862 873 863 874 function subset_name($subset) { 864 if ($subset == "global") return "Computing";875 if ($subset == "global") return tra("Computing"); 865 876 return PROJECT; 866 877 } 867 878 … … 873 884 if (isset($prefs->$venue)) $x = $prefs->$venue; 874 885 875 886 if ($x) { 876 row1( "Separate preferences for $venue", 2, "heading");887 row1(tra("Separate preferences for %1", $venue), 2, "heading"); 877 888 echo "<tr><td colspan=2>"; 878 889 start_table(); 879 890 if ($subset == "global") { … … 883 894 if ($project_has_beta) prefs_show_beta($x); 884 895 prefs_show_project($x); 885 896 } 886 row2("<br>", "<a href=prefs_edit.php?venue=$venue&subset=$subset$tokens> Edit preferences</a> | <a href=prefs_remove.php?venue=$venue&subset=$subset$tokens>Remove</a>");897 row2("<br>", "<a href=prefs_edit.php?venue=$venue&subset=$subset$tokens>".tra("Edit preferences")."</a> | <a href=prefs_remove.php?venue=$venue&subset=$subset$tokens>".tra("Remove")."</a>"); 887 898 end_table(); 888 899 echo "</td></tr>\n"; 889 900 } else { 890 row1("<a href=add_venue.php?venue=$venue&subset=$subset$tokens> Add separate preferences for $venue</a>", 2, "heading");901 row1("<a href=add_venue.php?venue=$venue&subset=$subset$tokens>".tra("Add separate preferences for %1", $venue)."</a>", 2, "heading"); 891 902 } 892 903 } 893 904 … … 896 907 $project_prefs = prefs_parse_project($user->project_prefs); 897 908 898 909 start_table(); 899 $switch_link = " <font size=\"-2\"><a href=prefs.php?subset=project&cols=". (int)!$columns ."> (Switch View)</a></font>";910 $switch_link = " <font size=\"-2\"><a href=prefs.php?subset=project&cols=". (int)!$columns .">".tra("(Switch View)")."</a></font>"; 900 911 if ($columns) { 901 row1( "Combined preferences".$switch_link, 2, "heading");912 row1(tra("Combined preferences").$switch_link, 2, "heading"); 902 913 echo "<tr><td colspan=2>"; 903 914 start_table(); 904 915 prefs_show_privacy($user); 905 916 venue_show($user); 906 row_top( "Project specific settings");917 row_top(tra("Project specific settings")); 907 918 prefs_show_resource($project_prefs, true); 908 919 if ($project_has_beta) prefs_show_beta($project_prefs, true); 909 920 prefs_show_project($project_prefs, true); … … 912 923 echo "</td></tr>\n"; 913 924 } else { 914 925 if (isset($project_prefs->home) || isset($project_prefs->work) || isset($project_prefs->school)) { 915 row1( "Primary (default) preferences".$switch_link, 2, "heading");926 row1(tra("Primary (default) preferences").$switch_link, 2, "heading"); 916 927 } 917 928 echo "<tr><td colspan=2>"; 918 929 start_table(); … … 922 933 venue_show($user); 923 934 prefs_show_project($project_prefs, false); 924 935 $tokens = url_tokens($user->authenticator); 925 row2("", "<a href=prefs_edit.php?subset=project$tokens> Edit ".PROJECT." preferences</a>");936 row2("", "<a href=prefs_edit.php?subset=project$tokens>".tra("Edit %1 preferences", PROJECT)."</a>"); 926 937 end_table(); 927 938 echo "</td></tr>\n"; 928 939 prefs_display_venue($project_prefs, "home", "project"); … … 935 946 function print_prefs_display_global($user, $columns=false) { 936 947 $global_prefs = prefs_parse_global($user->global_prefs); 937 948 938 echo "<span class=note> 939 These apply to all BOINC projects in which you participate. 940 <br> 941 On computers attached to multiple projects, 942 the most recently modified preferences will be used. 943 </span> 944 <br><br> 945 "; 949 echo "<span class=note>". 950 tra("These apply to all BOINC projects in which you participate.<br> 951 On computers attached to multiple projects, the most recently modified preferences will be used."). 952 "</span><br><br>"; 946 953 if (isset($global_prefs->mod_time)) { 947 echo " 948 Preferences last modified: ", pretty_time_str($global_prefs->mod_time), " 949 "; 954 echo tra("Preferences last modified:")." ".pretty_time_str($global_prefs->mod_time); 950 955 } 951 echo " 952 <br><br> 953 "; 954 $switch_link = " <font size=\"-2\"><a href=prefs.php?subset=global&cols=". (int)!$columns .">(Switch View)</a></font>"; 956 echo "<br><br>"; 957 $switch_link = " <font size=\"-2\"><a href=prefs.php?subset=global&cols=". (int)!$columns .">".tra("(Switch View)")."</a></font>"; 955 958 start_table(); 956 959 if ($columns) { 957 row1( "Combined preferences".$switch_link, 2, "heading");960 row1(tra("Combined preferences").$switch_link, 2, "heading"); 958 961 echo "<tr><td colspan=2>"; 959 962 start_table(); 960 963 prefs_show_columns_global($global_prefs); … … 963 966 964 967 } else { 965 968 if (isset($global_prefs->home) || isset($global_prefs->work) || isset($global_prefs->school)) { 966 row1( "Primary (default) preferences".$switch_link, 2, "heading");969 row1(tra("Primary (default) preferences").$switch_link, 2, "heading"); 967 970 } 968 971 echo "<tr><td colspan=2>"; 969 972 start_table(); 970 973 prefs_show_global($global_prefs); 971 974 $tokens = url_tokens($user->authenticator); 972 row2("<br>", "<a href=prefs_edit.php?subset=global$tokens> Edit preferences</a>");975 row2("<br>", "<a href=prefs_edit.php?subset=global$tokens>".tra("Edit preferences")."</a>"); 973 976 end_table(); 974 977 echo "</td></tr>\n"; 975 978 … … 1000 1003 1001 1004 if ($action == "add") { 1002 1005 $script = "add_venue.php"; 1003 $submit_value = "Add preferences";1006 $submit_value = tra("Add preferences"); 1004 1007 } 1005 1008 if ($action == "edit") { 1006 1009 $script = "prefs_edit.php"; 1007 $submit_value = "Update preferences";1010 $submit_value = tra("Update preferences"); 1008 1011 } 1009 1012 echo "<form action=$script><input type=hidden name=subset value=$subset> 1010 1013 ".form_tokens($user->authenticator); … … 1038 1041 // Functions to display preference subsets as forms 1039 1042 // 1040 1043 function prefs_form_global($user, $prefs, $error=false) { 1041 //echo "IN PREFS_FORM_GLOBAL: <pre>"; 1042 //var_dump($prefs); 1043 //echo "</pre>"; 1044 1044 1045 row1(CPU_LIMIT_DESC); 1045 $y = "yes <input type=radio name=suspend_while_on_batteries value=yes " 1046 .($prefs->suspend_while_on_batteries?"checked":"") 1047 ."> no <input type=radio name=suspend_while_on_batteries value=no " 1048 .($prefs->suspend_while_on_batteries?"":"checked") 1049 ."> 1050 "; 1046 $y = prefs_form_radio_buttons("suspend_while_on_batteries", $prefs->suspend_while_on_batteries); 1051 1047 row2(SUSPEND_WHILE_ON_BATTERIES_DESC, $y); 1052 1048 1053 $y = "yes <input type=radio name=suspend_if_user_active value=yes " 1054 .($prefs->suspend_if_user_active?"checked":"") 1055 ."> no <input type=radio name=suspend_if_user_active value=no " 1056 .($prefs->suspend_if_user_active?"":"checked") 1057 ."> 1058 "; 1049 $y = prefs_form_radio_buttons("suspend_if_user_active", $prefs->suspend_if_user_active); 1059 1050 row2(RUN_IF_USER_ACTIVE_DESC, $y); 1060 1051 1061 $y = "yes <input type=radio name=suspend_gpu_if_user_active value=yes " 1062 .($prefs->suspend_gpu_if_user_active?"checked":"") 1063 ."> no <input type=radio name=suspend_gpu_if_user_active value=no " 1064 .($prefs->suspend_gpu_if_user_active?"":"checked") 1065 ."> 1066 "; 1052 $y = prefs_form_radio_buttons("suspend_gpu_if_user_active", $prefs->suspend_gpu_if_user_active); 1067 1053 row2(RUN_GPU_IF_USER_ACTIVE_DESC, $y); 1068 1054 1069 $y = "<input size=5 name=idle_time_to_run value='$prefs->idle_time_to_run'> minutes ";1055 $y = "<input size=5 name=idle_time_to_run value='$prefs->idle_time_to_run'> ".tra("minutes"); 1070 1056 $show_error = false; 1071 1057 if (isset($error->idle_time_to_run)) $show_error= true; 1072 1058 row2(IDLE_TIME_TO_RUN_DESC, $y, $show_error); 1073 1059 1074 $y = "<input size=5 name=suspend_if_no_recent_input value='$prefs->suspend_if_no_recent_input'> minutes ";1060 $y = "<input size=5 name=suspend_if_no_recent_input value='$prefs->suspend_if_no_recent_input'> ".tra("minutes"); 1075 1061 $show_error = false; 1076 1062 if (isset($error->suspend_if_no_recent_input)) $show_error= true; 1077 1063 row2(SUSPEND_IF_NO_RECENT_INPUT_DESC, $y, $show_error); … … 1082 1068 row2(SUSPEND_CPU_USAGE_DESC, $y, $show_error); 1083 1069 1084 1070 $x = START_END_DESC.START_END_DESC2; 1085 $y = hour_select($prefs->start_hour, "start_hour"). "and".hour_select($prefs->end_hour, "end_hour");1071 $y = hour_select($prefs->start_hour, "start_hour").tra("and").hour_select($prefs->end_hour, "end_hour"); 1086 1072 row2($x, $y); 1087 1073 1088 1074 $x = LEAVE_APPS_IN_MEMORY_DESC; 1089 $y = "yes <input type=radio name=leave_apps_in_memory value=yes " 1090 .($prefs->leave_apps_in_memory?"checked":"") 1091 ."> no <input type=radio name=leave_apps_in_memory value=no " 1092 .($prefs->leave_apps_in_memory?"":"checked") 1093 ."> 1094 "; 1075 $y = prefs_form_radio_buttons("leave_apps_in_memory", $prefs->leave_apps_in_memory); 1095 1076 row2($x, $y); 1096 1077 1097 $y = "<input size=5 name=cpu_scheduling_period_minutes value='$prefs->cpu_scheduling_period_minutes'> minutes ";1078 $y = "<input size=5 name=cpu_scheduling_period_minutes value='$prefs->cpu_scheduling_period_minutes'> ".tra("minutes"); 1098 1079 $show_error = false; 1099 1080 if (isset($error->cpu_scheduling_period_minutes)) $show_error= true; 1100 1081 row2(CPU_SCHEDULING_DESC, $y, $show_error); … … 1125 1106 $show_error = false; 1126 1107 if (isset($error->disk_max_used_gb)) $show_error= true; 1127 1108 row2(USE_AT_MOST, 1128 "<input size=7 name=disk_max_used_gb value='$prefs->disk_max_used_gb'> Gbytes",1109 "<input size=7 name=disk_max_used_gb value='$prefs->disk_max_used_gb'> ".tra("Gbytes"), 1129 1110 $show_error 1130 1111 ); 1131 1112 … … 1133 1114 1134 1115 $msg=null; 1135 1116 if ($dp->new_sched_flag) { 1136 $msg = DISK_SCHED_MIN_FREE_DESC1.$dp->sched_disk_min_free_gb.DISK_SCHED_MIN_FREE_DESC2;1117 $msg = sprintf(DISK_SCHED_MIN_FREE_DESC, $dp->sched_disk_min_free_gb); 1137 1118 } 1138 1119 1139 1120 $show_error = false; 1140 1121 if (isset($error->disk_min_free_gb)) $show_error= true; 1141 1122 row2(DISK_MIN_FREE_GB_DESC.$msg, 1142 "<input size=7 name=disk_min_free_gb value='$prefs->disk_min_free_gb'> Gbytes free",1123 "<input size=7 name=disk_min_free_gb value='$prefs->disk_min_free_gb'> ".tra("Gbytes free"), 1143 1124 $show_error 1144 1125 ); 1145 1126 … … 1153 1134 $show_error = false; 1154 1135 if (isset($error->disk_interval)) $show_error= true; 1155 1136 row2(DISK_INTERVAL_DESC, 1156 "<input size=6 name=disk_interval value=$prefs->disk_interval> seconds",1137 "<input size=6 name=disk_interval value=$prefs->disk_interval> ".tra("seconds"), 1157 1138 $show_error 1158 1139 ); 1159 1140 … … 1180 1161 1181 1162 row1(NETWORK_LIMIT_DESC); 1182 1163 $x = WORK_BUF_MIN_DAYS_DESC; 1183 $y = "<input size=5 name=work_buf_min_days value='$prefs->work_buf_min_days'> days";1164 $y = "<input size=5 name=work_buf_min_days value='$prefs->work_buf_min_days'> ".tra("days"); 1184 1165 $show_error = false; 1185 1166 if (isset($error->work_buf_min_days)) $show_error= true; 1186 1167 row2($x, $y, $show_error); 1187 1168 1188 1169 $x = WORK_BUF_ADDITIONAL_DAYS_DESC; 1189 $y = "<input size=5 name=work_buf_additional_days value='$prefs->work_buf_additional_days'> days";1170 $y = "<input size=5 name=work_buf_additional_days value='$prefs->work_buf_additional_days'> ".tra("days"); 1190 1171 $show_error = false; 1191 1172 if (isset($error->work_buf_additional_days)) $show_error= true; 1192 1173 row2($x, $y, $show_error); 1193 1174 1194 1175 $x = CONFIRM_BEFORE_CONNECTING_DESC; 1195 $y = "yes <input type=radio name=confirm_before_connecting value=yes " 1196 .($prefs->confirm_before_connecting?"checked":"") 1197 ."> no <input type=radio name=confirm_before_connecting value=no " 1198 .($prefs->confirm_before_connecting?"":"checked") 1199 ."> 1200 "; 1176 $y = prefs_form_radio_buttons("confirm_before_connecting", $prefs->confirm_before_connecting); 1201 1177 row2($x, $y); 1202 1178 1203 1179 $x = HANGUP_IF_DIALED_DESC; 1204 $y = "yes <input type=radio name=hangup_if_dialed value=yes " 1205 .($prefs->hangup_if_dialed?"checked":"") 1206 ."> no <input type=radio name=hangup_if_dialed value=no " 1207 .($prefs->hangup_if_dialed?"":"checked") 1208 ."> 1209 "; 1180 $y = prefs_form_radio_buttons("hangup_if_dialed", $prefs->hangup_if_dialed); 1210 1181 row2($x, $y); 1211 1182 1212 1183 $d = max_bytes_display_mode($prefs->max_bytes_sec_down); … … 1229 1200 ); 1230 1201 1231 1202 $x = NET_START_END_DESC.START_END_DESC2; 1232 $y = hour_select($prefs->net_start_hour, "net_start_hour"). "and".hour_select($prefs->net_end_hour, "net_end_hour");1203 $y = hour_select($prefs->net_start_hour, "net_start_hour").tra("and").hour_select($prefs->net_end_hour, "net_end_hour"); 1233 1204 row2($x, $y); 1234 1205 $x = DONT_VERIFY_IMAGES_DESC; 1235 $y = "yes <input type=radio name=dont_verify_images value=yes " 1236 .($prefs->dont_verify_images?"checked":"") 1237 ."> no <input type=radio name=dont_verify_images value=no " 1238 .($prefs->dont_verify_images?"":"checked") 1239 ."> 1240 "; 1206 $y = prefs_form_radio_buttons("dont_verify_images", $prefs->dont_verify_images); 1241 1207 row2($x, $y); 1242 1208 1243 1209 } 1244 1210 1245 1211 function prefs_form_privacy($user) { 1246 $y = "yes <input type=radio name=send_email value=yes " 1247 .($user->send_email?"checked":"") 1248 ."> no <input type=radio name=send_email value=no " 1249 .($user->send_email?"":"checked") 1250 ."> 1251 "; 1252 row2("Is it OK for ".PROJECT." and your team (if any) to email you?", $y); 1212 $y = prefs_form_radio_buttons("send_email", $user->send_email); 1213 row2(tra("Is it OK for %1 and your team (if any) to email you?", PROJECT), $y); 1253 1214 1254 $y = "yes <input type=radio name=show_hosts value=yes " 1255 .($user->show_hosts?"checked":"") 1256 ."> no <input type=radio name=show_hosts value=no " 1257 .($user->show_hosts?"":"checked") 1258 ."> 1259 "; 1260 row2("Should ".PROJECT." show your computers on its web site?", $y); 1215 $y = prefs_form_radio_buttons("show_hosts", $user->show_hosts); 1216 row2(tra("Should %1 show your computers on its web site?", PROJECT), $y); 1261 1217 } 1262 1218 1263 1219 function prefs_form_resource($prefs, $error=false) { … … 1265 1221 $show_error = false; 1266 1222 if (isset($error->resource_share)) $show_error= true; 1267 1223 row2( 1268 "< b>Resource share:</b>1269 < span class=note><br>Determines the proportion of your computer's resources1270 allocated to this project.1271 Example: if you participate in two BOINC projects with1272 resource shares of 100 and 200,1273 the first will get 1/3 of your resources and the second will get 2/3.1274 </span>",1224 "<strong>".tra("Resource share").":</strong> 1225 <br><span class=note>". 1226 tra("Determines the proportion of your computer's resources 1227 allocated to this project. Example: if you participate in two 1228 BOINC projects with resource shares of 100 and 200, the first 1229 will get 1/3 of your resources and the second will get 2/3."). 1230 "</span>", 1275 1231 "<input name=resource_share value='$prefs->resource_share'>", 1276 1232 $show_error 1277 1233 ); … … 1295 1251 } 1296 1252 1297 1253 function prefs_form_beta($prefs, $error=false) { 1298 $ychecked = $prefs->allow_beta_work?"checked":""; 1299 $nchecked = $prefs->allow_beta_work?"":"checked"; 1300 row2( 1301 ALLOW_BETA_WORK, 1302 "yes <input type=radio checkbox name=allow_beta_work value=1 $ychecked> 1303 no <input type=radio checkbox name=allow_beta_work value=0 $nchecked>" 1304 ); 1254 $y = prefs_form_radio_buttons("allow_beta_work", $prefs->allow_beta_work); 1255 row2(ALLOW_BETA_WORK, $y); 1305 1256 } 1306 1257 1307 1258 function prefs_form_project($prefs_xml, $error=false) { … … 1309 1260 project_specific_prefs_edit($prefs, $error); 1310 1261 } 1311 1262 1263 // returns a set of translated yes/no radio buttons for editing prefs forms 1264 // Example: prefs_form_radio_buttons("allow_beta_work", $user->allow_beta_work); 1265 // 1266 // @param string $name name of the radio buttons 1267 // @param bool $yesno toggles the preset of the buttons; true=yes, false=no 1268 function prefs_form_radio_buttons($name, $yesno) { 1269 $rb = tra("yes")." <input type=radio name=$name value=yes " 1270 .($yesno?"checked":"") 1271 ."> ".tra("no")." <input type=radio name=$name value=no " 1272 .(!$yesno?"":"checked") 1273 .">\n"; 1274 return $rb; 1275 } 1276 1312 1277 function venue_show($user) { 1313 1278 $venue = $user->venue; 1314 1279 if ($venue =='') $venue = '---'; 1315 row2( "Default computer location", $venue);1280 row2(tra("Default computer location"), $venue); 1316 1281 } 1317 1282 1318 1283 function venue_form($user) { … … 1321 1286 if ($user->venue == 'home') $h = 'selected'; 1322 1287 if ($user->venue == 'work') $w = 'selected'; 1323 1288 if ($user->venue == 'school') $s = 'selected'; 1324 row2( 'Default computer location',1289 row2(tra("Default computer location"), 1325 1290 "<select name=default_venue> 1326 1291 <option value=\"\" $n>--- 1327 <option value=home $h> Home1328 <option value=work $w> Work1329 <option value=school $s> School1292 <option value=home $h>".tra("Home")." 1293 <option value=work $w>".tra("Work")." 1294 <option value=school $s>".tra("School")." 1330 1295 </select>" 1331 1296 ); 1332 1297 } … … 1452 1417 } 1453 1418 1454 1419 function prefs_beta_parse_form(&$prefs) { 1455 $prefs->allow_beta_work = false; 1456 $x = $_GET['allow_beta_work']; 1457 if ($x) { 1458 $prefs->allow_beta_work = true; 1459 } 1420 $prefs->allow_beta_work = ($_GET['allow_beta_work'] == "yes")?1:0; 1460 1421 } 1461 1422 1462 1423 function prefs_privacy_parse_form(&$user) { … … 1605 1566 $query = "update user set global_prefs='$prefs_xml' where id=$user->id"; 1606 1567 $retval = mysql_query($query); 1607 1568 if (!$retval) { 1608 echo "Update failed: ".htmlspecialchars($query)."\n";1569 echo tra("Update failed: ").htmlspecialchars($query)."\n"; 1609 1570 echo mysql_error(); 1610 1571 exit(); 1611 1572 } -
user/prefs_remove.php
43 43 } 44 44 Header("Location: prefs.php?subset=$subset$c"); 45 45 } else { 46 page_head( "Confirm delete preferences");46 page_head(tra("Confirm delete preferences")); 47 47 $tokens = url_tokens($user->authenticator); 48 echo " 49 <p> 50 Are you sure you want to delete your separate ", subset_name($subset), 51 " preferences for $venue? 52 <br><br> 53 "; 48 echo "<p>". 49 tra("Are you sure you want to delete your separate %1 preferences for %2?", subset_name($subset), $venue). 50 "</p><br><br>\n"; 54 51 show_button( 55 52 "prefs_remove.php?subset=$subset&venue=$venue&confirmed=yes$c$tokens", 56 'Yes', "Remove preferences"53 tra("Yes"), tra("Remove preferences") 57 54 ); 58 show_button("prefs.php?subset=$subset$c", "Cancel", "Cancel");55 show_button("prefs.php?subset=$subset$c", tra("Cancel"), tra("Cancel")); 59 56 page_tail(); 60 57 } 61 58 -
user/prefs.php
30 30 $columns = get_int("cols", true); 31 31 $updated = get_int("updated", true); 32 32 33 page_head(subset_name($subset)." preferences");33 page_head(subset_name($subset)." ".tra("preferences")); 34 34 if (isset($updated)) { 35 35 echo "<p style='color: red'> 36 Your preferences have been updated. 37 Client-related preferences 38 will take effect when your computer communicates 39 with ".PROJECT." or 40 you issue the \"Update\" command from the BOINC client. 36 ".tra("Your preferences have been updated. Client-related preferences 37 will take effect when your computer communicates with %1 38 or you issue the %2Update%3 command from the BOINC client.", 39 PROJECT, "<strong>", "</strong>")." 41 40 </p> 42 41 "; 43 42 } -
user/prefs_edit.php
42 42 else $prefs = $main_prefs; 43 43 $error = prefs_global_parse_form($prefs); 44 44 if ($error != false) { 45 $title = "Edit ".subset_name($subset)." preferences";45 $title = tra("Edit %1 preferences", subset_name($subset)); 46 46 if ($venue) $title = "$title for $venue"; 47 47 page_head($title); 48 48 $x = $venue?"&venue=$venue":""; … … 68 68 $error = prefs_resource_parse_form($prefs); 69 69 if (isset($project_has_beta) && $project_has_beta) prefs_beta_parse_form($prefs); 70 70 if ($error != false || $project_error != false) { 71 $title = "Edit ".subset_name($subset)." preferences";72 if ($venue) $title = "$title for $venue";71 $title = tra("Edit %1 preferences", subset_name($subset)); 72 if ($venue) $title = tra("%1 for %2", $title, $venue); 73 73 page_head($title); 74 74 $x = $venue?"&venue=$venue":""; 75 75 … … 97 97 } 98 98 } 99 99 } else { 100 $title = "Edit ".subset_name($subset)." preferences";101 if ($venue) $title = "$title for $venue";100 $title = tra("Edit %1 preferences", subset_name($subset)); 101 if ($venue) $title = tra("%1 for %2", $title, $venue); 102 102 page_head($title); 103 103 $x = $venue?"&venue=$venue":""; 104 104 … … 116 116 } 117 117 print_prefs_form("edit", $subset, $venue, $user, $prefs, $columns); 118 118 } 119 echo "<a href=prefs.php?subset=$subset$x$c> Back to preferences</a>\n";119 echo "<a href=prefs.php?subset=$subset$x$c>".tra("Back to preferences")."</a>\n"; 120 120 page_tail(); 121 121 122 122 $cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit -
user/add_venue.php
40 40 $prefs->$venue = $prefs; 41 41 $error = prefs_global_parse_form($new_prefs); 42 42 if ($error != false) { 43 $title = "Edit ".subset_name($subset)." preferences";43 $title = tra("Edit %1 preferences", subset_name($subset)); 44 44 if ($venue) $title = "$title for $venue"; 45 45 page_head($title); 46 46 $x = $venue?"&venue=$venue":""; … … 65 65 if (isset($project_has_beta) && $project_has_beta) prefs_beta_parse_form($new_prefs); 66 66 67 67 if ($error != false || $project_error != false) { 68 $title = "Edit ".subset_name($subset)." preferences";68 $title = tra("Edit %1 preferences", subset_name($subset)); 69 69 if ($venue) $title = "$title for $venue"; 70 70 page_head($title); 71 71 $x = $venue?"&venue=$venue":""; … … 83 83 } 84 84 } 85 85 } else { 86 $title = "Add ".subset_name($subset)." preferences for $venue";86 $title = tra("Add %1 preferences for %2", subset_name($subset), $venue); 87 87 page_head($title); 88 88 89 89 if ($subset == "global") {