Changeset 231
- Timestamp:
- Sep 12, 2007, 8:51:21 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Components/ACLLanguageUnit.pas
r226 r231 31 31 type 32 32 TLanguageItem = record 33 pLabel: pString; 33 34 pValue: pString; 34 35 wasUsed: boolean; … … 181 182 182 183 // free the parts of the item 184 DisposeStr(tmpPLanguageItem^.pLabel); 183 185 DisposeStr(tmpPLanguageItem^.pValue); 184 186 Dispose(tmpPLanguageItem); … … 237 239 238 240 New(tmpPLanguageItem); 241 tmpPLanguageItem^.pLabel := NewStr(aLabel); 239 242 tmpPLanguageItem^.pValue := NewStr(aValue); 240 243 tmpPLanguageItem^.wasUsed := false; … … 259 262 if tmpPLanguageItem^.wasUsed then 260 263 begin 261 tmpLabel := t ranslationsList.Names[i];264 tmpLabel := tmpPLanguageItem^.pLabel^; 262 265 263 266 tmpQuotedValue := tmpPLanguageItem^.pValue^; … … 294 297 end; 295 298 296 tmpLabel := t ranslationsList.Names[i];299 tmpLabel := tmpPLanguageItem^.pLabel^; 297 300 298 301 tmpQuotedValue := tmpPLanguageItem^.pValue^; … … 498 501 end; 499 502 500 languageItems.setValue( UpperCase(tmpLabel), tmpValue);503 languageItems.setValue(tmpLabel, tmpValue); 501 504 end; 502 505 end; … … 523 526 if anApplyFlag then 524 527 begin 525 aValue := languageItems.getValue( UpperCase(aLabel), aDefaultValue)528 aValue := languageItems.getValue(aLabel, aDefaultValue) 526 529 end 527 530 else 528 531 begin 529 languageItems.getValue( UpperCase(aLabel), aDefaultValue)532 languageItems.getValue(aLabel, aDefaultValue) 530 533 end 531 534 end; … … 599 602 if tmpMenuItem.Caption <> '-' then 600 603 begin 601 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Caption'), tmpMenuItem.Caption);604 tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpMenuItem.Caption); 602 605 if '' <> tmpValue then tmpMenuItem.Caption := tmpValue; 603 606 604 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Hint'), tmpMenuItem.Hint);607 tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpMenuItem.Hint); 605 608 if '' <> tmpValue then tmpMenuItem.Hint := tmpValue; 606 609 end; … … 611 614 tmpButton := TButton(aComponent); 612 615 613 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Caption'), tmpButton.Caption);616 tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpButton.Caption); 614 617 if '' <> tmpValue then tmpButton.Caption := tmpValue; 615 618 616 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Hint'), tmpButton.Hint);619 tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpButton.Hint); 617 620 if '' <> tmpValue then tmpButton.Hint := tmpValue; 618 621 end … … 622 625 tmpLabel := TLabel(aComponent); 623 626 624 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Caption'), tmpLabel.Caption);627 tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpLabel.Caption); 625 628 if '' <> tmpValue then tmpLabel.Caption := tmpValue; 626 629 627 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Hint'), tmpLabel.Hint);630 tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpLabel.Hint); 628 631 if '' <> tmpValue then tmpLabel.Hint := tmpValue; 629 632 end … … 633 636 tmpRadioGroup := TRadioGroup(aComponent); 634 637 635 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Caption'), tmpRadioGroup.Caption);638 tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpRadioGroup.Caption); 636 639 if '' <> tmpValue then tmpRadioGroup.Caption := tmpValue; 637 640 638 641 for i := 0 to tmpRadioGroup.Items.Count - 1 do 639 642 begin 640 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Item' + IntToStr(i)), tmpRadioGroup.Items[i]);643 tmpValue := languageItems.getValue(tmpComponentPath + 'Item' + IntToStr(i), tmpRadioGroup.Items[i]); 641 644 if '' <> tmpValue then tmpRadioGroup.Items[i] := tmpValue; 642 645 end; … … 649 652 for i := 0 to tmpTabSet.Tabs.Count - 1 do 650 653 begin 651 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Tab' + IntToStr(i)), tmpTabSet.Tabs[i]);654 tmpValue := languageItems.getValue(tmpComponentPath + 'Tab' + IntToStr(i), tmpTabSet.Tabs[i]); 652 655 if '' <> tmpValue then tmpTabSet.Tabs[i] := tmpValue; 653 656 end; … … 659 662 for i := 0 to tmpTabbedNotebook.Pages.Count - 1 do 660 663 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]); 662 665 if '' <> tmpValue then tmpTabbedNotebook.Pages[i] := tmpValue; 663 666 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); 665 668 if '' <> tmpValue then tmpTabbedNotebook.Pages.Pages[i].Hint := tmpValue; 666 669 end; … … 671 674 tmpForm := TForm(aComponent); 672 675 673 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Caption'), tmpForm.Caption);676 tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpForm.Caption); 674 677 if '' <> tmpValue then tmpForm.Caption := tmpValue; 675 678 … … 685 688 tmpRadioButton := TRadioButton(aComponent); 686 689 687 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Caption'), tmpRadioButton.Caption);690 tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpRadioButton.Caption); 688 691 if '' <> tmpValue then tmpRadioButton.Caption := tmpValue; 689 692 690 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Hint'), tmpRadioButton.Hint);693 tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpRadioButton.Hint); 691 694 if '' <> tmpValue then tmpRadioButton.Hint := tmpValue; 692 695 end … … 696 699 tmpCheckBox := TCheckBox(aComponent); 697 700 698 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Caption'), tmpCheckBox.Caption);701 tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpCheckBox.Caption); 699 702 if '' <> tmpValue then tmpCheckBox.Caption := tmpValue; 700 703 701 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Hint'), tmpCheckBox.Hint);704 tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpCheckBox.Hint); 702 705 if '' <> tmpValue then tmpCheckBox.Hint := tmpValue; 703 706 end … … 708 711 for i := 0 to tmpCoolBar2.Sections.Count - 1 do 709 712 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); 711 714 if '' <> tmpValue then tmpCoolBar2.Sections[i].Text := tmpValue; 712 715 end; … … 717 720 tmpGroupBox := TGroupBox(aComponent); 718 721 719 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Caption'), tmpGroupBox.Caption);722 tmpValue := languageItems.getValue(tmpComponentPath + 'Caption', tmpGroupBox.Caption); 720 723 if '' <> tmpValue then tmpGroupBox.Caption := tmpValue; 721 724 722 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Hint'), tmpGroupBox.Hint);725 tmpValue := languageItems.getValue(tmpComponentPath + 'Hint', tmpGroupBox.Hint); 723 726 if '' <> tmpValue then tmpGroupBox.Hint := tmpValue; 724 727 end … … 730 733 for i := 0 to tmpMultiColumnListBox.HeaderColumns.Count - 1 do 731 734 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); 733 736 if '' <> tmpValue then tmpMultiColumnListBox.HeaderColumns[i].Text := tmpValue; 734 737 end; … … 739 742 tmpSystemOpenDialog := TSystemOpenDialog(aComponent); 740 743 741 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'OKName'), tmpSystemOpenDialog.OKName);744 tmpValue := languageItems.getValue(tmpComponentPath + 'OKName', tmpSystemOpenDialog.OKName); 742 745 if '' <> tmpValue then tmpSystemOpenDialog.OKName := tmpValue; 743 746 744 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Title'), tmpSystemOpenDialog.Title);747 tmpValue := languageItems.getValue(tmpComponentPath + 'Title', tmpSystemOpenDialog.Title); 745 748 if '' <> tmpValue then tmpSystemOpenDialog.Title := tmpValue; 746 749 end … … 750 753 tmpSystemSaveDialog := TSystemSaveDialog(aComponent); 751 754 752 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'OKName'), tmpSystemSaveDialog.OKName);755 tmpValue := languageItems.getValue(tmpComponentPath + 'OKName', tmpSystemSaveDialog.OKName); 753 756 if '' <> tmpValue then tmpSystemSaveDialog.OKName := tmpValue; 754 757 755 tmpValue := languageItems.getValue( UpperCase(tmpComponentPath + 'Title'), tmpSystemSaveDialog.Title);758 tmpValue := languageItems.getValue(tmpComponentPath + 'Title', tmpSystemSaveDialog.Title); 756 759 if '' <> tmpValue then tmpSystemSaveDialog.Title := tmpValue; 757 760 end;
Note:
See TracChangeset
for help on using the changeset viewer.