Last modified 13 years ago Last modified on 4/25/2010 2:27:13 PM

Localizing Eraser

Requirements

Localising Eraser 6 requires you to be able to build it from source. Get the necessary dependencies and build the solution before continuing.


What needs to be localised

The source files that require localisation are:

  • Strings.xx.resx: there's one for most projects
  • <PageName>.xx.resx: there's one for each form and custom control
  • ShellExt.rc: there's only one in ShellExt, the Eraser Shell Extension

xx is the acronym of the target localization language.


Creating new localisations

If you are starting on a new localisation, you need to create a new .resx file to contain the strings used in the Eraser source tree. For this, you need the csgettext.exe binary (attached, digitally signed) and you need to run this at the Eraser Solution directory:

for %i in (Eraser Eraser.Manager !Eraser.DefaultPlugins) do csgettext --recursive {locale} "%i" Strings

{locale} is the 2-letter locale used for your localisation.

This runs csgettext on each of the Eraser project directories, searching for localisable strings and generating the localisation template that you will use later on.

After this, you need to edit the project files to maintain the localisations (so that on build new strings are automatically added and old ones are discarded.) For each of the Eraser, Eraser.Manager and Eraser.DefaultPlugins? projects, go to Project Properties | Build Events and add your locale after the list of localisations in the Pre-build Event Command Line:

csgettext --merge --recursive EN,NL,IT,{locale} "$(ProjectDir)\." Strings

If you are updating an existing localisation, you need not do this.


How to localise Strings

You'll find Strings.xx.resx files in the following projects:

  • Eraser
  • Eraser.DefaultPlugins
  • Eraser.Manager

Localising these files is simple:

  • Open the file in Visual Studio.NET (double clicking the file)
  • A form (see picture below) is shown with three columns in the following order (column names are provided in English as a reference):
    1. Name: source language string
    2. Value: target language string (initially set to "(Untranslated)")
    3. Comment: a comment string
  • Change the value in the second column with the translated string

Screen shot of Strings files localization

At every project build phase, you will be provided with a summary of the status of translations in the Output window such the following:

C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Eraser6\Eraser\\.\Strings.en.resx: 73 strings, 73 translated, 0 untranslated, 100% complete.
C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Eraser6\Eraser\\.\Strings.nl.resx: 73 strings, 23 translated, 50 untranslated, 31% complete.
C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Eraser6\Eraser\\.\Strings.it.resx: 73 strings, 71 translated, 2 untranslated, 97% complete.

It is thus possible to determine the level of completeness of every localisation.


Localization of forms

How to localise Forms and Custom Controls

Each form has a number of controls that shows text and then that can be localised.

The localisation process comprises:

  1. Choosing the form's Language property as the target locale (shown in the screenshot on the right.)
  2. Clicking the form object that requires localisation (it can be a Label, for example.)
  3. Selecting the Text property of the object.
  4. Changing the value of the Text property.
  5. And repeating steps 2 through 4 for each control requiring localisation.

The following section describes the controls that require localisation.

Project Eraser

  • BasePanel
    • On this panel it has to be localized only the titleLabel label.
  • LightGroup
    • On this panel it has to be localized only the label label.
  • LogForm
    • Text property of the Form itself (form title)
    • filterSessionLabel label Text property
    • filterSeverityLabel label Text property
    • columns header of the central panel (log listView). To do that you'll have to right-click over it and choose "Edit Columns". You'll see the columns names (logTimestampColumn, logSeverityColumn and logMessageColumn) on the left side of a form and selecting each one you'll be able to change the Text property
    • clear button Text property
    • close button Text property
  • MainForm
    • In ToolBar (right-click over tham menù control), change Text property for these menù items:
      • tbSchedule
      • tbScheduleDropDown
      • tbSettings
      • tbHelp
      • tbHelpDropDown
    • In tbScheduleMenu (right-click over tham menù control), change Text property for these menù items:
      • newTaskToolStripMenuItem
      • exportTaskListToolStripMenuItem
      • importTaskListToolStripMenuItem
    • In thHelpMenu (right click over that menù control), change Text property for these menù items:
      • checkForUpdatesToolStripMenuItem1
      • aboutEraserToolStripMenuItem
    • In notificationMenu (right-click over tham menù control), change Text property for these menù items:
      • openEraserToolStripMenuItem
      • hideWehnMinimizedToolStripMenuItem
      • exitToolStripMenuItem
  • ProgressForm
    • Text property of the Form itself (form title)
    • titleLabel label Text property
    • overallProgressLbl label Text property
    • statusLbl label Text property
    • itemLbl label Text property
    • passLbl label Text property
    • timeLeftLbl label Text property
    • hide button Text property
    • stop button Text property
  • SchedulerPanel

    • titleLabel label Text property
    • columns header of the central panel (scheduler listView). To do that you'll have to right-click over it and choose "Edit Columns". You'll see the columns names (schedulerColName, schedulerColNextRun and schedulerColStatus) on the left side of a form and selecting each one you'll be able to change the Text property
    • In schedulerMenu (right-click over that menù control), change Text property for these menù items:
      • runNowToolStripMenuItem
      • cancelTaskToolStripMenuItem
      • viewTaskLogToolStripMenuItem
      • editTaskToolStripMenuItem
      • deleteTaskToolStripMenuItem
    • In schedulerDefaultMenu (right click over that menù control), change Text property for these menù item:
      • newTaskToolStripMenuItem
  • SettingsPanel
    • Text property of the Form itself (form title)
    • titleLabel label Text property
    • saveSetting button Text property
    • ui group Label property
    • uiLanguageLbl label Text property
    • uiContextMenu checkBox Text property
    • erase group Label property
    • eraseFilesMethodLbl label Text property
    • eraseUnusedMethodLbl label Text property
    • erasePRNGLbl label Text property
    • lockedForceUnlock checkBox Text property
    • plausibleDeniability checkBox Text property
    • plausibleDeniabilityFilesAddFile button Text property
    • plausibleDeniabilityFilesAddFolder button Text property
    • plausibleDeniabilityFilesRemove button Text property
    • scheduler group Label property
    • schedulerClearCompleted checkBox Text property
    • schedulerMissed label Text property
    • schedulerMissedImmediate radioButton Text property
    • schedulerMissedIgnore radioButton Text property
    • plugins group Label property
    • columns header of the central panel (pluginsManager listView). To do that you'll have to right-click over it and choose "Edit Columns". You'll see the columns names (pluginsManagerColName, pluginsManagerColAuthor, pluginsManagerColVersion and pluginsManagerColPath) on the left side of a form and selecting each one you'll be able to change the Text property
    • In pluginsMenu (right-click over that menù control), change Text property for these menù items:
      • settingsToolStripMenuItem
  • TaskDataSelectionForm
    • Text property of the Form itself (form title)
    • methodLbl label Text property
    • file radioButton Text property
    • fileBrowse button Text property
    • folder radioButton Text property
    • folderBrowse button Text property
    • folderIncludeLbl label Text property
    • folderExcludeLbl label Text property
    • folderDelete checkBox Text property
    • unused radioButton Text property
    • unusedClusterTips checkBox Text property
    • recycleBin radioButton Text property
    • ok button Text property
    • cancel button Text property
  • TaskPropertiesForm
    • Text property of the Form itself (form title)
    • for the container tabControl you will have to localize two TabPages (click on TabPages collection property):
      • containerTask tabPage Text property
      • containerSchedule tabPage Text property
    • in the containerTask tabPage (click on that tabPage label)
      • nameLbl label Text property
      • typeLbl label Text property
      • typeManual radioButton Text property
      • typeImmediate radioButton Text property
      • typeRestart radioButton Text property
      • typeRecurring radioButton Text property
      • eraseLbl label Text property
      • columns header of the central panel (data listView). To do that you'll have to right-click over it and choose "Edit Columns". You'll see the columns names (dataColData and dataColMethod) on the left side of a form and selecting each one you'll be able to change the Text property
      • dataAdd button Text property
    • in the containerSchedule tabPage (click on that tabPage label)
      • nonRecurringLbl label Text property
      • scheduleTimeLbl label Text property
      • schedulePattern groupBox Text property
      • scheduleDaily radioButton Text property
      • scheduleDailyByDay radioButton Text property
      • scheduleDailyByDayLbl label Text property
      • scheduleDailyByWeekday radioButton Text property
      • scheduleWeekly radioButton Text property
      • scheduleWeeklyLbl label Text property
      • scheduleWeeklyFreqLbl label Text property
      • scheduleWeeklyMonday checkBox Text property
      • scheduleWeeklyTuesday checkBox Text property
      • scheduleWeeklyWendsday checkBox Text property
      • scheduleWeeklyThursday checkBox Text property
      • scheduleWeeklyFriday checkBox Text property
      • scheduleWeeklySaturday checkBox Text property
      • scheduleWeeklySunday checkBox Text property
      • scheduleMonthly radioButton Text property
      • scheduleMonthlyLbl label Text property
      • scheduleMonthlyEveryLbl label Text property
      • scheduleMonthlyMonthLbl label Text property
    • ok button Text property
    • cancel button Text property
  • UpdateForm

    • Text property of the Form itself (form title)
    • updatesLbl label Text property
      • columns header of the central panel (updatesLv listView). To do that you'll have to right-click over it and choose "Edit Columns". You'll see the columns names (updatesLvNameCol, updatesLvVersionCol, updatesLvPublisherCol and updatesLvFilesizeCol) on the left side of a form and selecting each one you'll be able to change the Text property
    • updatesMirrorLbl label Text property
    • updatesBtn button Text property

Project Eraser.!DefaultPlugins

CustomMethodEditorForm

  • Text property of the Form itself (form title)
  • nameLbl label Text property
  • randomizeChk checkbox Text property
    • columns header of the central panel (passesLv listView). To do that you'll have to right-click over it and choose "Edit Columns". You'll see the columns names (passesColNumber and passesColType) on the left side of a form and selecting each one you'll be able to change the Text property
  • passesAddBtn button Text property
  • passesRemoveBtn button Text property
  • passesDuplicateBtn button Text property
  • passesMoveUpBtn button Text property
  • passesMoveDownBtn button Text property
  • passGrp groupbox Text property
  • passesAddBtn button Text property
  • ok button Text property
  • cancel button Text property

CustomMethodPassEditor

  • passTypeText radioButton Text property
  • passTypeHex button Text property
  • passTypeRandom button Text property

SettingsForm

  • for the containerTab tabControl you will have to localize two TabPages (click on TabPages collection property):
    • containerTabGeneralPnl tabPage Text property
    • containerTabEraseMethodsPnl tabPage Text property
  • in the containerTabGeneralPnl tabPage (click on that tabPage label)
    • fl16MethodLbl label Text property
    • ok button Text property
    • cancel button Text property
  • in the containerTabEraseMethodsPnl tabPage (click on that tabPage label)
    • columns header of the central panel (customMethod listView). To do that you'll have to right-click over it and choose "Edit Columns". You'll see the columns names (columnHeader1 and columnHeader2) on the left side of a form and selecting each one you'll be able to change the Text property
    • customMethodAdd button Text property




Shell Extension localizing

How localize Shell Extension

In the ShellExt project (a C++.NET project), expand the Resource Files subfolders and double-click over ShellExt.rc file. You'll get the Resource View panel. Expand the ShellExt resource until view the String Table list. Right click over the English version and select Intert Copy... as showed in the picture on the right. Double-click on the new String Table and you'll get the list of strings you'll have to localize under the Caption table header.


Attachments