Ticket #6987: FilePermissionView.patch

File FilePermissionView.patch, 3.9 KB (added by Karvjorm, 13 years ago)

Two missing localization texts

  • FilePermissionsView.cpp

     
    5454    :   BView(rect, "FilePermissionsView", B_FOLLOW_LEFT_RIGHT, B_WILL_DRAW),
    5555        fModel(model)
    5656{
     57    BString kOwner(B_TRANSLATE("Owner"));
     58    BString kGroup(B_TRANSLATE("Group"));
     59    BString kOther(B_TRANSLATE("Other"));
     60    BString kRead(B_TRANSLATE("Read"));
     61    BString kWrite(B_TRANSLATE("Write"));
     62    BString kExecute(B_TRANSLATE("Execute"));
     63   
    5764    // Constants for the column labels: "User", "Group" and "Other".
    5865    const float kColumnLabelMiddle = 77, kColumnLabelTop = 6, kColumnLabelSpacing = 37,
    5966        kColumnLabelBottom = 20, kColumnLabelWidth = 35, kAttribFontHeight = 10;
    6067
    6168    BStringView *strView;
    6269
    63     strView = new BStringView(BRect(kColumnLabelMiddle - kColumnLabelWidth / 2,
    64         kColumnLabelTop, kColumnLabelMiddle + kColumnLabelWidth / 2, kColumnLabelBottom),
    65         "", B_TRANSLATE("Owner"));
     70    strView = new BStringView(BRect(kColumnLabelMiddle - kOwner.Length() / 2,
     71        kColumnLabelTop, kColumnLabelMiddle + kOwner.Length() / 2, kColumnLabelBottom),
     72        "", kOwner.String());
    6673    AddChild(strView);
    6774    strView->SetAlignment(B_ALIGN_CENTER);
    6875    strView->SetFontSize(kAttribFontHeight);
    6976
    70     strView = new BStringView(BRect(kColumnLabelMiddle - kColumnLabelWidth / 2
     77    strView = new BStringView(BRect(kColumnLabelMiddle - kGroup.Length() / 2
    7178        + kColumnLabelSpacing, kColumnLabelTop,
    72         kColumnLabelMiddle + kColumnLabelWidth / 2 + kColumnLabelSpacing,
    73         kColumnLabelBottom), "", B_TRANSLATE("Group"));
     79        kColumnLabelMiddle + kGroup.Length() / 2 + kColumnLabelSpacing,
     80        kColumnLabelBottom), "", kGroup.String());
    7481    AddChild(strView);
    7582    strView->SetAlignment(B_ALIGN_CENTER);
    7683    strView->SetFontSize(kAttribFontHeight);
    7784
    78     strView = new BStringView(BRect(kColumnLabelMiddle - kColumnLabelWidth / 2
     85    strView = new BStringView(BRect(kColumnLabelMiddle - kOther.Length() / 2
    7986        + 2 * kColumnLabelSpacing, kColumnLabelTop,
    80         kColumnLabelMiddle + kColumnLabelWidth / 2 + 2 * kColumnLabelSpacing,
    81         kColumnLabelBottom), "", B_TRANSLATE("Other"));
     87        kColumnLabelMiddle + kOther.Length() / 2 + 2 * kColumnLabelSpacing,
     88        kColumnLabelBottom), "", kOther.String());
    8289    AddChild(strView);
    8390    strView->SetAlignment(B_ALIGN_CENTER);
    8491    strView->SetFontSize(kAttribFontHeight);
     
    9097
    9198    strView = new BStringView(BRect(kRowLabelLeft, kRowLabelTop, kRowLabelRight,
    9299        kRowLabelTop + kRowLabelHeight),
    93         "", B_TRANSLATE("Read"));
     100        "", kRead.String());
    94101    AddChild(strView);
    95102    strView->SetAlignment(B_ALIGN_RIGHT);
    96103    strView->SetFontSize(kAttribFontHeight);
     
    98105    strView = new BStringView(BRect(kRowLabelLeft, kRowLabelTop
    99106        + kRowLabelVerticalSpacing, kRowLabelRight, kRowLabelTop
    100107        + kRowLabelVerticalSpacing + kRowLabelHeight),
    101         "", B_TRANSLATE("Write"));
     108        "", kWrite.String());
    102109    AddChild(strView);
    103110    strView->SetAlignment(B_ALIGN_RIGHT);
    104111    strView->SetFontSize(kAttribFontHeight);
     
    106113    strView = new BStringView(BRect(kRowLabelLeft, kRowLabelTop
    107114        + 2 * kRowLabelVerticalSpacing, kRowLabelRight, kRowLabelTop
    108115        + 2 * kRowLabelVerticalSpacing + kRowLabelHeight),
    109         "", B_TRANSLATE("Execute"));
     116        "", kExecute.String());
    110117    AddChild(strView);
    111118    strView->SetAlignment(B_ALIGN_RIGHT);
    112119    strView->SetFontSize(kAttribFontHeight);
     
    138145
    139146    strView = new BStringView(BRect(kTextControlLeft, kTextControlTop,
    140147        kTextControlRight, kTextControlTop + kTextControlHeight), "",
    141         B_TRANSLATE("Owner"));
     148        kOwner.String());
    142149    strView->SetAlignment(B_ALIGN_CENTER);
    143150    strView->SetFontSize(kAttribFontHeight);
    144151    AddChild(strView);
     
    153160        kTextControlTop + 5 + 2 * kTextControlSpacing,
    154161        kTextControlRight,
    155162        kTextControlTop + 2 + 2 * kTextControlSpacing + kTextControlHeight),
    156         "", B_TRANSLATE("Group"));
     163        "", kGroup.String());
    157164    strView->SetAlignment(B_ALIGN_CENTER);
    158165    strView->SetFontSize(kAttribFontHeight);
    159166    AddChild(strView);