[LUGOS] Štetje

Grega Fajdiga Gregor.Fajdiga at guest.arnes.si
Mon Apr 28 16:39:37 CEST 2008


Živjo!

Delam diplomsko o lokalizaciji programa WinRAR. Imam več datotek 
s končnico RC (Borland C++ resource file) z besedilom programa. 
Rad bi preštel prevedljive vrstice, saj moram njihovo število 
vključiti med statistiko.

Prevedljivo besedilo se deli na tri dele:

1. stringtable


STRINGTABLE
{
   IDS_OK,                  "OK"
   IDS_WARNING,             "Warning"
   IDS_ERROR,               "Error"
   IDS_DRIVENOTACCESSIBLE,  "Drive %c: is not accessible"
   IDS_PSWNOTMATCH,         "Passwords do not match."
   IDS_FILETYPE,            "File %s"
   IDS_REGONLY,             "Available in registered version only."
   IDS_ARCHIVE,             "Archive"
   IDS_PATHNOTACCESSIBLE,   "Path ""%s"" is not accessible"
....
}

(Za gnezdene narekovaje sta vedno uporabljena dva narekovaja).

2. Dialog box

  GETARC DIALOG 68, 35, 258, 180
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | 
WS_CAPTION
  CAPTION "General"
  FONT 8, "MS Shell Dlg"
  {
   LTEXT "&Archive name", -1, 10, 9, 170, 11
   COMBOBOX IDC_GETARCEDITNAME, 10, 20, 239, 166, CBS_DROPDOWN | 
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
   PUSHBUTTON "&Browse...", IDC_GETARCFINDNAME, 199, 4, 50, 14, 
BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE
   PUSHBUTTON "Pro&files...", IDC_GETARCSELECTPROFILE, 10, 47, 82, 14
   GROUPBOX "Archive format", -1, 10, 70, 82, 40, BS_GROUPBOX
   AUTORADIOBUTTON "&RAR", IDC_RAR, 16, 81, 30, 12, 
BS_AUTORADIOBUTTON | WS_GROUP
   AUTORADIOBUTTON "&ZIP", IDC_ZIP, 16, 94, 30, 12
   LTEXT "&Compression method", -1, 10, 117, 82, 11
   COMBOBOX IDC_GETARCCOMBOCOMPR, 10, 127, 82, 71, 
CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP
   LTEXT "Split to &volumes, bytes", -1, 10, 146, 82, 10
   COMBOBOX IDC_GETARCCOMBOVOLSIZE, 10, 156, 82, 65, CBS_DROPDOWN 
| CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
   LTEXT "&Update mode", -1, 103, 39, 146, 8
   COMBOBOX IDC_GETARCCOMBOUPDATE, 103, 48, 146, 70, 
CBS_DROPDOWNLIST | WS_TABSTOP
   GROUPBOX "Archiving options", -1, 103, 70, 146, 99, BS_GROUPBOX
   AUTOCHECKBOX "De&lete files after archiving", 
IDC_GETARCCHECKMOVE, 110, 81, 134, 12, BS_AUTOCHECKBOX | WS_TABSTOP
   AUTOCHECKBOX "Create SF&X archive", IDC_GETARCCHECKSFX, 110, 
93, 134, 12
   AUTOCHECKBOX "Create &solid archive", IDC_GETARCCHECKSOLID, 
110, 105, 134, 12
   AUTOCHECKBOX "Put au&thenticity verification", 
IDC_GETARCCHECKAV, 110, 117, 134, 12
   AUTOCHECKBOX "&Put recovery record", IDC_GETARCCHECKRR, 110, 
129, 134, 12
   AUTOCHECKBOX "T&est archived files", IDC_GETARCCHECKTEST, 110, 
141, 134, 12
   CHECKBOX "Loc&k archive", IDC_GETARCLOCK, 110, 153, 134, 12, 
BS_AUTOCHECKBOX | WS_TABSTOP
  }

3. Menu

MAIN_MENU MENU
{
  POPUP "&File"
  {
   MENUITEM "&Open archive\tCtrl+O", CM_OPENARCHIVE
   MENUITEM "Sa&ve archive copy as...", CM_SAVEARCHIVEAS
   POPUP "Change &drive\tCtrl+D"
   {
    MENUITEM "", CM_FILECHANGEDISK
   }

   MENUITEM "Set default &password\tCtrl+P", CM_FILEPASSWORD
   MENUITEM SEPARATOR
   MENUITEM "&Copy files to clipboard\tCtrl+C", CM_COPYTOCLIPBOARD
   MENUITEM "Pas&te files from clipboard\tCtrl+V", 
CM_PASTEFROMCLIPBOARD
   MENUITEM SEPARATOR
   MENUITEM "Select &all\tCtrl+A", CM_FILESELECTALL
   MENUITEM "&Select group    \tGray +", CM_FILESELECT
   MENUITEM "&Deselect group  \tGray -", CM_FILEUNSELECT
   MENUITEM "&Invert selection\tGray *", CM_FILEINVERT
   MENUITEM SEPARATOR
   MENUITEM "E&xit", CM_FILEEXIT
  }
....

}

Potem so tu še neprevidljivi deli, ki bi jih rad izpustil iz štetja:

Shortcuts:

MENUACC ACCELERATORS
{
  "^A", CM_FILESELECTALL, ASCII
  "^C", CM_COPYTOCLIPBOARD, ASCII
  VK_INSERT, CM_COPYTOCLIPBOARD, VIRTKEY, CONTROL
  "^V", CM_PASTEFROMCLIPBOARD, ASCII
  VK_INSERT, CM_PASTEFROMCLIPBOARD, VIRTKEY, SHIFT
  "^O", CM_OPENARCHIVE, ASCII
  "^P", CM_FILEPASSWORD, ASCII
  "^D", CM_FILECHANGEDISK, ASCII
  "^T", CM_FILETREE, ASCII
  "^S", CM_OPTIONS, ASCII
  "^L", CM_VIEWLOG, ASCII
  "^F", CM_ADDFAVORITES, ASCII
  "^H", CM_FLATFOLDERS, ASCII
  220, CM_ROOTDIR, VIRTKEY, CONTROL
  "1", CM_FAVORITES, VIRTKEY, CONTROL
  "2", CM_FAVORITES +1, VIRTKEY, CONTROL
  "3", CM_FAVORITES +2, VIRTKEY, CONTROL
  "4", CM_FAVORITES +3, VIRTKEY, CONTROL
  "5", CM_FAVORITES +4, VIRTKEY, CONTROL
  "6", CM_FAVORITES +5, VIRTKEY, CONTROL
  "7", CM_FAVORITES +6, VIRTKEY, CONTROL
  "8", CM_FAVORITES +7, VIRTKEY, CONTROL
  "9", CM_FAVORITES +8, VIRTKEY, CONTROL
  "0", CM_FAVORITES +9, VIRTKEY, CONTROL
}

Ikone in slike:

IDC_DRAGCOPY     CURSOR "dragcopy.cur"

IDB_UP           BITMAP "up.bmp"
IDB_DOWN         BITMAP "down.bmp"
IDB_SMALLTB      BITMAP "smalltb.bmp"
IDB_LOGO         BITMAP "logo.bmp"
IDB_WIZLOGO      BITMAP "wizlogo.bmp"

IDB_BTNADD       BITMAP "btnadd.bmp"
IDB_BTNCMT       BITMAP "btncmt.bmp"
IDB_BTNDEL       BITMAP "btndel.bmp"
IDB_BTNEST       BITMAP "btnest.bmp"
IDB_BTNEXT       BITMAP "btnextr.bmp"
IDB_BTNEXTTO     BITMAP "btnexto.bmp"
IDB_BTNINFO      BITMAP "btninfo.bmp"
IDB_BTNLOCK      BITMAP "btnlock.bmp"
IDB_BTNPROT      BITMAP "btnprot.bmp"
IDB_BTNREP       BITMAP "btnrep.bmp"
IDB_BTNSFX       BITMAP "btnsfx.bmp"
IDB_BTNTEST      BITMAP "btntest.bmp"
IDB_BTNVIEW      BITMAP "btnview.bmp"
IDB_BTNWIZ       BITMAP "btnwiz.bmp"
IDB_BTNEXIT      BITMAP "btnexit.bmp"
IDB_BTNFIND      BITMAP "btnfind.bmp"
IDB_BTNCVT       BITMAP "btncvt.bmp"
IDB_BTNVIR       BITMAP "btnvir.bmp"
IDB_BTNRPT       BITMAP "btnrpt.bmp"
IDB_BTNBENCH     BITMAP "btnbnch.bmp"
IDB_BTNPRINT     BITMAP "btnprnt.bmp"

IDB_SBTNADD      BITMAP "sbtnadd.bmp"
IDB_SBTNCMT      BITMAP "sbtncmt.bmp"
IDB_SBTNDEL      BITMAP "sbtndel.bmp"
IDB_SBTNEXT      BITMAP "sbtnextr.bmp"
IDB_SBTNEXTTO    BITMAP "sbtnexto.bmp"
IDB_SBTNINFO     BITMAP "sbtninfo.bmp"
IDB_SBTNLOCK     BITMAP "sbtnlock.bmp"
IDB_SBTNPROT     BITMAP "sbtnprot.bmp"
IDB_SBTNREP      BITMAP "sbtnrep.bmp"
IDB_SBTNSFX      BITMAP "sbtnsfx.bmp"
IDB_SBTNTEST     BITMAP "sbtntest.bmp"
IDB_SBTNVIEW     BITMAP "sbtnview.bmp"
IDB_SBTNWIZ      BITMAP "sbtnwiz.bmp"
IDB_SBTNEXIT     BITMAP "sbtnexit.bmp"
IDB_SBTNFIND     BITMAP "sbtnfind.bmp"
IDB_SBTNCVT      BITMAP "sbtncvt.bmp"
IDB_SBTNVIR      BITMAP "sbtnvir.bmp"
IDB_SBTNRPT      BITMAP "sbtnrpt.bmp"
IDB_SBTNBENCH    BITMAP "sbtnbnch.bmp"
IDB_SBTNPRINT    BITMAP "sbtnprnt.bmp"

IDI_RARICON1     ICON "rar.ico"
IDI_REVFILE      ICON "revfile.ico"
//IDI_RARICON2     ICON "rar1.ico"
//IDI_RARICON3     ICON "rar2.ico"
IDI_DISKICON     ICON "disk.ico"
IDI_DISKHIICON   ICON "diskhi.ico"
IDI_PSWICON      ICON "psw.ico"
IDI_PSWHIICON    ICON "pswhi.ico"
IDI_FILEICON     ICON "file.ico"
IDI_TRAYICON     ICON "tray.ico"

Je mogoce kaj postorit v kombinaciji s sed in wc -l?

Hvala in lp,
Grega







More information about the lugos-list mailing list