Changeset 231


Ignore:
Timestamp:
Sep 12, 2007, 8:51:21 PM (18 years ago)
Author:
RBRi
Message:

improved uppercas handling; many unused upper calls removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/ACLLanguageUnit.pas

    r226 r231  
    3131type
    3232  TLanguageItem = record
     33    pLabel: pString;
    3334    pValue: pString;
    3435    wasUsed: boolean;
     
    181182
    182183      // free the parts of the item
     184      DisposeStr(tmpPLanguageItem^.pLabel);
    183185      DisposeStr(tmpPLanguageItem^.pValue);
    184186      Dispose(tmpPLanguageItem);
     
    237239
    238240    New(tmpPLanguageItem);
     241    tmpPLanguageItem^.pLabel := NewStr(aLabel);
    239242    tmpPLanguageItem^.pValue := NewStr(aValue);
    240243    tmpPLanguageItem^.wasUsed := false;
     
    259262      if tmpPLanguageItem^.wasUsed then
    260263      begin
    261         tmpLabel := translationsList.Names[i];
     264        tmpLabel := tmpPLanguageItem^.pLabel^;
    262265
    263266        tmpQuotedValue := tmpPLanguageItem^.pValue^;
     
    294297        end;
    295298
    296         tmpLabel := translationsList.Names[i];
     299        tmpLabel := tmpPLanguageItem^.pLabel^;
    297300
    298301        tmpQuotedValue := tmpPLanguageItem^.pValue^;
     
    498501          end;
    499502
    500           languageItems.setValue(UpperCase(tmpLabel), tmpValue);
     503          languageItems.setValue(tmpLabel, tmpValue);
    501504        end;
    502505      end;
     
    523526    if anApplyFlag then
    524527    begin
    525       aValue := languageItems.getValue(UpperCase(aLabel), aDefaultValue)
     528      aValue := languageItems.getValue(aLabel, aDefaultValue)
    526529    end
    527530    else
    528531    begin
    529       languageItems.getValue(UpperCase(aLabel), aDefaultValue)
     532      languageItems.getValue(aLabel, aDefaultValue)
    530533    end
    531534  end;
     
    599602      if tmpMenuItem.Caption <> '-' then
    600603      begin
    601         tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Caption'), tmpMenuItem.Caption);
     604        tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpMenuItem.Caption);
    602605        if '' <> tmpValue then tmpMenuItem.Caption := tmpValue;
    603606
    604         tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Hint'), tmpMenuItem.Hint);
     607        tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpMenuItem.Hint);
    605608        if '' <> tmpValue then tmpMenuItem.Hint := tmpValue;
    606609      end;
     
    611614      tmpButton := TButton(aComponent);
    612615
    613       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Caption'), tmpButton.Caption);
     616      tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpButton.Caption);
    614617      if '' <> tmpValue then tmpButton.Caption := tmpValue;
    615618
    616       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Hint'), tmpButton.Hint);
     619      tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpButton.Hint);
    617620      if '' <> tmpValue then tmpButton.Hint := tmpValue;
    618621    end
     
    622625      tmpLabel := TLabel(aComponent);
    623626
    624       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Caption'), tmpLabel.Caption);
     627      tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpLabel.Caption);
    625628      if '' <> tmpValue then tmpLabel.Caption := tmpValue;
    626629
    627       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Hint'), tmpLabel.Hint);
     630      tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpLabel.Hint);
    628631      if '' <> tmpValue then tmpLabel.Hint := tmpValue;
    629632    end
     
    633636      tmpRadioGroup := TRadioGroup(aComponent);
    634637
    635       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Caption'), tmpRadioGroup.Caption);
     638      tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpRadioGroup.Caption);
    636639      if '' <> tmpValue then tmpRadioGroup.Caption := tmpValue;
    637640
    638641      for i := 0 to tmpRadioGroup.Items.Count - 1 do
    639642      begin
    640         tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Item' + IntToStr(i)), tmpRadioGroup.Items[i]);
     643        tmpValue := languageItems.getValue(tmpComponentPath + 'Item' + IntToStr(i), tmpRadioGroup.Items[i]);
    641644        if '' <> tmpValue then tmpRadioGroup.Items[i] := tmpValue;
    642645      end;
     
    649652      for i := 0 to tmpTabSet.Tabs.Count - 1 do
    650653      begin
    651         tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Tab' + IntToStr(i)), tmpTabSet.Tabs[i]);
     654        tmpValue := languageItems.getValue(tmpComponentPath + 'Tab' + IntToStr(i), tmpTabSet.Tabs[i]);
    652655        if '' <> tmpValue then tmpTabSet.Tabs[i] := tmpValue;
    653656      end;
     
    659662      for i := 0 to tmpTabbedNotebook.Pages.Count - 1 do
    660663      begin
    661         tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Tab' + IntToStr(i) + '.Caption'), tmpTabbedNotebook.Pages[i]);
     664        tmpValue := languageItems.getValue(tmpComponentPath + 'Tab' + IntToStr(i) + '.Caption', tmpTabbedNotebook.Pages[i]);
    662665        if '' <> tmpValue then tmpTabbedNotebook.Pages[i] := tmpValue;
    663666
    664         tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Tab' + IntToStr(i) + '.Hint'), tmpTabbedNotebook.Pages.Pages[i].Hint);
     667        tmpValue := languageItems.getValue(tmpComponentPath + 'Tab' + IntToStr(i) + '.Hint', tmpTabbedNotebook.Pages.Pages[i].Hint);
    665668        if '' <> tmpValue then tmpTabbedNotebook.Pages.Pages[i].Hint := tmpValue;
    666669      end;
     
    671674      tmpForm := TForm(aComponent);
    672675
    673       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Caption'), tmpForm.Caption);
     676      tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpForm.Caption);
    674677      if '' <> tmpValue then tmpForm.Caption := tmpValue;
    675678
     
    685688      tmpRadioButton := TRadioButton(aComponent);
    686689
    687       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Caption'), tmpRadioButton.Caption);
     690      tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpRadioButton.Caption);
    688691      if '' <> tmpValue then tmpRadioButton.Caption := tmpValue;
    689692
    690       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Hint'), tmpRadioButton.Hint);
     693      tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpRadioButton.Hint);
    691694      if '' <> tmpValue then tmpRadioButton.Hint := tmpValue;
    692695    end
     
    696699      tmpCheckBox := TCheckBox(aComponent);
    697700
    698       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Caption'), tmpCheckBox.Caption);
     701      tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpCheckBox.Caption);
    699702      if '' <> tmpValue then tmpCheckBox.Caption := tmpValue;
    700703
    701       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Hint'), tmpCheckBox.Hint);
     704      tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpCheckBox.Hint);
    702705      if '' <> tmpValue then tmpCheckBox.Hint := tmpValue;
    703706    end
     
    708711      for i := 0 to tmpCoolBar2.Sections.Count - 1 do
    709712      begin
    710         tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Item' + IntToStr(i)), tmpCoolBar2.Sections[i].Text);
     713        tmpValue := languageItems.getValue(tmpComponentPath + 'Item' + IntToStr(i), tmpCoolBar2.Sections[i].Text);
    711714        if '' <> tmpValue then tmpCoolBar2.Sections[i].Text := tmpValue;
    712715      end;
     
    717720      tmpGroupBox := TGroupBox(aComponent);
    718721
    719       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Caption'), tmpGroupBox.Caption);
     722      tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpGroupBox.Caption);
    720723      if '' <> tmpValue then tmpGroupBox.Caption := tmpValue;
    721724
    722       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Hint'), tmpGroupBox.Hint);
     725      tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpGroupBox.Hint);
    723726      if '' <> tmpValue then tmpGroupBox.Hint := tmpValue;
    724727    end
     
    730733      for i := 0 to tmpMultiColumnListBox.HeaderColumns.Count - 1 do
    731734      begin
    732         tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Column' + IntToStr(i)), tmpMultiColumnListBox.HeaderColumns[i].Text);
     735        tmpValue := languageItems.getValue(tmpComponentPath + 'Column' + IntToStr(i), tmpMultiColumnListBox.HeaderColumns[i].Text);
    733736        if '' <> tmpValue then tmpMultiColumnListBox.HeaderColumns[i].Text := tmpValue;
    734737      end;
     
    739742      tmpSystemOpenDialog := TSystemOpenDialog(aComponent);
    740743
    741       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'OKName'), tmpSystemOpenDialog.OKName);
     744      tmpValue := languageItems.getValue(tmpComponentPath + 'OKName', tmpSystemOpenDialog.OKName);
    742745      if '' <> tmpValue then tmpSystemOpenDialog.OKName := tmpValue;
    743746
    744       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Title'), tmpSystemOpenDialog.Title);
     747      tmpValue := languageItems.getValue(tmpComponentPath + 'Title', tmpSystemOpenDialog.Title);
    745748      if '' <> tmpValue then tmpSystemOpenDialog.Title := tmpValue;
    746749    end
     
    750753      tmpSystemSaveDialog := TSystemSaveDialog(aComponent);
    751754
    752       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'OKName'), tmpSystemSaveDialog.OKName);
     755      tmpValue := languageItems.getValue(tmpComponentPath + 'OKName', tmpSystemSaveDialog.OKName);
    753756      if '' <> tmpValue then tmpSystemSaveDialog.OKName := tmpValue;
    754757
    755       tmpValue := languageItems.getValue(UpperCase(tmpComponentPath + 'Title'), tmpSystemSaveDialog.Title);
     758      tmpValue := languageItems.getValue(tmpComponentPath + 'Title', tmpSystemSaveDialog.Title);
    756759      if '' <> tmpValue then tmpSystemSaveDialog.Title := tmpValue;
    757760    end;
Note: See TracChangeset for help on using the changeset viewer.