Changeset 909
- Timestamp:
- 4/28/2009 2:06:18 PM (4 years ago)
- Location:
- branches/eraser6
- Files:
-
- 9 edited
-
Eraser/LogForm.cs (modified) (5 diffs)
-
Eraser/ProgressForm.cs (modified) (2 diffs)
-
Eraser/SchedulerPanel.cs (modified) (2 diffs)
-
Eraser/SettingsPanel.cs (modified) (5 diffs)
-
Eraser/Strings.NL.resx (modified) (2 diffs)
-
Eraser/Strings.en.resx (modified) (2 diffs)
-
Eraser/Strings.resx (modified) (2 diffs)
-
Eraser/TaskDataSelectionForm.cs (modified) (1 diff)
-
Util/Localisation.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/LogForm.cs
r905 r909 42 42 43 43 //Update the title 44 Text = string.Format( "{0} - {1}", Text, task.UIText);44 Text = string.Format(CultureInfo.InvariantCulture, "{0} - {1}", Text, task.UIText); 45 45 46 46 //Add all the existing log messages … … 49 49 foreach (DateTime sessionTime in log.Keys) 50 50 { 51 this.log.Groups.Add(new ListViewGroup(S._("Session: {0 }", sessionTime.ToString(DATEPATTERN))));51 this.log.Groups.Add(new ListViewGroup(S._("Session: {0:F}", sessionTime))); 52 52 foreach (LogEntry entry in log[sessionTime]) 53 53 task_Logged(entry); … … 82 82 } 83 83 84 ListViewItem item = log.Items.Add(e.Timestamp.ToString( DATEPATTERN));84 ListViewItem item = log.Items.Add(e.Timestamp.ToString("F", CultureInfo.CurrentCulture)); 85 85 item.SubItems.Add(e.Level.ToString()); 86 86 item.SubItems.Add(e.Message); … … 112 112 foreach (DateTime sessionTime in logEntries.Keys) 113 113 { 114 text.AppendLine(S._("Session: {0 }", sessionTime.ToString(DATEPATTERN)));114 text.AppendLine(S._("Session: {0:F}", sessionTime)); 115 115 foreach (LogEntry entry in logEntries[sessionTime]) 116 116 { 117 117 text.AppendFormat("{0} {1} {2}\n", 118 entry.Timestamp.ToString( DATEPATTERN).Replace("\"", "\"\""),118 entry.Timestamp.ToString("F", CultureInfo.CurrentCulture).Replace("\"", "\"\""), 119 119 entry.Level.ToString(), entry.Message); 120 120 } 121 121 } 122 122 123 Clipboard.SetText(text.ToString(), TextDataFormat. UnicodeText);123 Clipboard.SetText(text.ToString(), TextDataFormat.CommaSeparatedValue); 124 124 } 125 125 … … 130 130 131 131 private Task task; 132 private static string DATEPATTERN =133 DateTimeFormatInfo.CurrentInfo.ShortDatePattern + " " +134 DateTimeFormatInfo.CurrentInfo.ShortTimePattern;135 132 } 136 133 } -
branches/eraser6/Eraser/ProgressForm.cs
r905 r909 30 30 using Eraser.Manager; 31 31 using Eraser.Util; 32 using System.Globalization; 32 33 33 34 namespace Eraser … … 68 69 pass.Text = e.CurrentTargetTotalPasses != 0 ? 69 70 S._("{0} out of {1}", e.CurrentItemPass, e.CurrentTargetTotalPasses) : 70 string.Format("{0}", e.CurrentItemPass);71 e.CurrentItemPass.ToString(CultureInfo.CurrentCulture); 71 72 72 73 if (e.TimeLeft >= TimeSpan.Zero) 73 timeLeft.Text = S._("About {0: hh:mm:ss} left", e.TimeLeft);74 timeLeft.Text = S._("About {0:T} left", e.TimeLeft); 74 75 else 75 76 timeLeft.Text = S._("Unknown"); 76 77 77 78 itemProgress.Value = (int)(e.CurrentItemProgress * 1000); 78 itemProgressLbl.Text = e.CurrentItemProgress.ToString("#0%"); 79 itemProgressLbl.Text = e.CurrentItemProgress.ToString("#0%", 80 CultureInfo.CurrentCulture); 79 81 overallProgress.Value = (int)(e.OverallProgress * 1000); 80 82 overallProgressLbl.Text = S._("Total: {0,2:#0.00%}", e.OverallProgress); -
branches/eraser6/Eraser/SchedulerPanel.cs
r906 r909 86 86 else if (task.Schedule is RecurringSchedule) 87 87 item.SubItems[1].Text = ((task.Schedule as RecurringSchedule).NextRun. 88 ToString( DateTimeFormatInfo.CurrentInfo.FullDateTimePattern));88 ToString("F", CultureInfo.CurrentCulture)); 89 89 else if (task.Schedule == Schedule.RunNow) 90 90 item.SubItems[1].Text = S._("Not queued"); … … 467 467 { 468 468 if (MessageBox.Show(this, S._("Are you sure you want to delete the selected tasks?"), 469 S._("Eraser"), MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) 469 S._("Eraser"), MessageBoxButtons.YesNo, MessageBoxIcon.Question, 470 MessageBoxDefaultButton.Button1, 471 RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading : 0) != DialogResult.Yes) 470 472 { 471 473 return; -
branches/eraser6/Eraser/SettingsPanel.cs
r905 r909 247 247 "{0}\nThese settings have now been set to naive defaults.\n\n" + 248 248 "Please check that the new settings suit your required level of security.", 249 defaults), S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Warning); 249 defaults), S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Warning, 250 MessageBoxDefaultButton.Button1, 251 RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading : 0); 250 252 saveSettings_Click(null, null); 251 253 } … … 294 296 { 295 297 MessageBox.Show(this, S._("The path you selected is invalid."), S._("Eraser"), 296 MessageBoxButtons.OK, MessageBoxIcon.Error); 298 MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 299 RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading : 0); 297 300 } 298 301 } … … 377 380 MessageBox.Show(this, S._("Plugins which have just been approved will only be loaded " + 378 381 "the next time Eraser is started."), S._("Eraser"), MessageBoxButtons.OK, 379 MessageBoxIcon.Information); 382 MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 383 RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading : 0); 380 384 } 381 385 … … 418 422 MessageBox.Show(this, S._("The new UI language will take only effect when " + 419 423 "Eraser is restarted."), S._("Eraser"), MessageBoxButtons.OK, 420 MessageBoxIcon.Information); 424 MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 425 RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading : 0); 421 426 } 422 427 settings.IntegrateWithShell = uiContextMenu.Checked; … … 432 437 MessageBox.Show(this, S._("The new randomness data source will only be used when " + 433 438 "the next task is run.\nCurrently running tasks will use the old source."), 434 S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Information); 439 S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Information, 440 MessageBoxDefaultButton.Button1, 441 RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading : 0); 435 442 managerSettings.ActivePrng = newPRNG.Guid; 436 443 } -
branches/eraser6/Eraser/Strings.NL.resx
r907 r909 133 133 <value>(Untranslated)</value> 134 134 </data> 135 <data name="Session: {0 }" xml:space="preserve">135 <data name="Session: {0:F}" xml:space="preserve"> 136 136 <value>(Untranslated)</value> 137 137 </data> … … 163 163 <value>{0} van {1}</value> 164 164 </data> 165 <data name="About {0: hh:mm:ss} left" xml:space="preserve">165 <data name="About {0:T} left" xml:space="preserve"> 166 166 <value>(Untranslated)</value> 167 167 </data> -
branches/eraser6/Eraser/Strings.en.resx
r907 r909 133 133 <value>Please help us to continue developing Eraser - donate some coffee!</value> 134 134 </data> 135 <data name="Session: {0 }" xml:space="preserve">136 <value>Session: {0 }</value>135 <data name="Session: {0:F}" xml:space="preserve"> 136 <value>Session: {0:F}</value> 137 137 </data> 138 138 <data name="Erase Schedule" xml:space="preserve"> … … 163 163 <value>{0} out of {1}</value> 164 164 </data> 165 <data name="About {0: hh:mm:ss} left" xml:space="preserve">166 <value>About {0: hh:mm:ss} left</value>165 <data name="About {0:T} left" xml:space="preserve"> 166 <value>About {0:T} left</value> 167 167 </data> 168 168 <data name="Unknown" xml:space="preserve"> -
branches/eraser6/Eraser/Strings.resx
r907 r909 133 133 <value>Please help us to continue developing Eraser - donate some coffee!</value> 134 134 </data> 135 <data name="Session: {0 }" xml:space="preserve">136 <value>Session: {0 }</value>135 <data name="Session: {0:F}" xml:space="preserve"> 136 <value>Session: {0:F}</value> 137 137 </data> 138 138 <data name="Erase Schedule" xml:space="preserve"> … … 163 163 <value>{0} out of {1}</value> 164 164 </data> 165 <data name="About {0: hh:mm:ss} left" xml:space="preserve">166 <value>About {0: hh:mm:ss} left</value>165 <data name="About {0:T} left" xml:space="preserve"> 166 <value>About {0:T} left</value> 167 167 </data> 168 168 <data name="Unknown" xml:space="preserve"> -
branches/eraser6/Eraser/TaskDataSelectionForm.cs
r905 r909 228 228 { 229 229 MessageBox.Show(this, S._("The path you selected is invalid."), S._("Eraser"), 230 MessageBoxButtons.OK, MessageBoxIcon.Error); 230 MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 231 RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading : 0); 231 232 } 232 233 } -
branches/eraser6/Util/Localisation.cs
r581 r909 65 65 66 66 //Format the string. 67 return string.Format( localStr, args);67 return string.Format(CultureInfo.CurrentCulture, localStr, args); 68 68 } 69 69
Note: See TracChangeset
for help on using the changeset viewer.
