Index: UI/FileTranslator/dlgMakeUpSource.cls.xml =================================================================== diff -u --- UI/FileTranslator/dlgMakeUpSource.cls.xml (revision 0) +++ UI/FileTranslator/dlgMakeUpSource.cls.xml (revision 187) @@ -0,0 +1,2433 @@ + + + +serial +KeyCodesCNTs,%ApiCNTs +Default +%Library.TMFormClass + + +%Library.TMForm + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMPanel + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMComboBox + + + +%TMComboBox + + + +%TMCheckBox + + + +%TMCheckBox + + + +UI.Lib.Dlg.TListView + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMMemo + + + +%Library.String + + + +%Library.String + + + +%Library.String + + + +%Library.String + + + +%Library.Integer +-1 + + + +%Library.Integer +0 + + + +%Library.String + + + +%Library.Integer +-1 + + + +%Library.Integer +0 + + + +%Library.String + + + +%TMPopupMenu + + + +%TMPopupMenu + + + +%TMPopupMenu + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMPanel + + + +%TMPanel + + + +%TMPanel + + + +%TMRadioButton + + + +%TMRadioButton + + + +%TMRadioButton + + + +%TMRadioButton + + + +%TMRichEdit + + + +%TMSaveDialog + + + +%TMShape + + + +%TMEdit + + + +%TMEdit + + + +%TMEdit + + + +initvalue:%String +cache +0 +%Status +document +literal + + + + +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +cache +0 +document +literal + + + + +initvalue:%String +cache +0 +MApplication +document +literal + + + + +initvalue:%String +cache +0 +%Library.Status +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal +" opties="K|TBW|U">tekst of tekstblok + ;Compacte vorm : >TekstIntern + + ;Checken of selectie de begin en eindtag bevat + New CharLoop,InStr,EndOfBeginTagPos + Set InStr=0 + Set EndOfBeginTagPos=-1 + ;op zoek gaan naar afsluiter pBeginEndTag, let wel het teken kan ook voorkomen in intern/opties, weliswaar ts quotes + For CharLoop=1:1:$L(Selection) Do Quit:(EndOfBeginTagPos'=-1) + . If $E(Selection,CharLoop)="""" Do + .. Set InStr='InStr + . If 'InStr && ($E(Selection,CharLoop)=..pBeginEndTag) Do + .. Set EndOfBeginTagPos=CharLoop + + ;afsluiter niet gevonden? gewoon de originele selectie teruggeven + Quit:(EndOfBeginTagPos=-1) Selection + + New Tekst,Attrib,Intern,Params + Set Tekst=$E(Selection,EndOfBeginTagPos+1,999999) + Set Attrib=$E(Selection,1,EndOfBeginTagPos-1) + Set Intern=$P($P(Attrib, "intern=""",2), """") + Set Params=$P($P(Attrib, "opties=""",2), """") + + ;Indien intern leeg is, dan bevat Tekst de interne waarde en kan de selectie gewoon wo teruggegeven + Quit:(Intern="") Selection + + New Type,Groep + Set Type=$P(Params,..pParamSep,1) + Set Groep=$P(Params,..pParamSep,2) + + Quit Attrib_..pBeginEndTag_##class(Res.Vertaling).GetVertalingPlus(Groep,Intern,Type,"N",,1) +]]> + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +cache +0 +document +literal + + + + +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +LineNr:%Library.Integer +cache +0 +document +literal + + + + +Msg:%Library.String,Type:%Library.Integer=$$$MBICONINFORMATION +cache +0 +document +literal + + + + +FileName:%Library.String,GoToLineNr:%Library.Integer=-1,FindItemInLine:%Library.Boolean=0 +cache +0 +%Library.Boolean +document +literal + + + + +Group:%Library.String +cache +0 +document +literal + + + + +Type:%Library.String +cache +0 +document +literal + + + + +Selection:%Library.String +cache +0 +document +literal +" opties="K|TBW|U">tekst of tekstblok + ;Compacte vorm : TekstIntern + + ;Checken of selectie de begin en eindtag bevat + If ($E(Selection,1,BeginLen)=..pBeginTag) && ($E(Selection,SelLen-EndLen+1,SelLen)=..pEndTag) Do + . Set Selection=$E(Selection,BeginLen+1,SelLen-EndLen) + . New CharLoop,InStr,EndOfBeginTagPos + . Set InStr=0 + . Set EndOfBeginTagPos=-1 + . ;op zoek gaan naar afsluiter pBeginEndTag, let wel het teken kan ook voorkomen in intern/opties, weliswaar ts quotes + . For CharLoop=1:1:$L(Selection) Do Quit:(EndOfBeginTagPos'=-1) + .. If $E(Selection,CharLoop)="""" Do + ... Set InStr='InStr + .. If 'InStr && ($E(Selection,CharLoop)=..pBeginEndTag) Do + ... Set EndOfBeginTagPos=CharLoop + . If EndOfBeginTagPos=-1 Do Quit + .. Set ..txtIntern.Text="" + .. Set ..mmoTekst.Lines.Text=Selection + .. Do ..rLocateType("") + .. Do ..rLocateGroup("") + .. Do rpsSelectCapital("") + . New Tekst,Attrib + . Set Tekst=$E(Selection,EndOfBeginTagPos+1,999999) + . Set Attrib=$E(Selection,1,EndOfBeginTagPos-1) + . Set Intern=$P($P(Attrib, "intern=""",2), """") + . If Intern="" Do + .. Set ..txtIntern.Text=Tekst + .. Set ..mmoTekst.Lines.Text="" + . Else Do + .. Set ..txtIntern.Text=Intern + .. Set ..mmoTekst.Lines.Text=Tekst + . New Params + . Set Params=$P($P(Attrib, "opties=""",2), """") + . Do ..rLocateType($P(Params,..pParamSep,1)) + . Do ..rLocateGroup($P(Params,..pParamSep,2)) + . Do rpsSelectCapital($P(Params,..pParamSep,3)) + . Do ..rSelectPlainText($P(Params,..pParamSep,4)) + Else Do + . Set ..txtIntern.Text="" + . Set ..mmoTekst.Lines.Text=Selection + . Do ..rLocateType("") + . Do ..rLocateGroup("") + . Do rpsSelectCapital("") + . Do ..rSelectPlainText("") + + Quit + + ;------------------------------------------------------------------------------ +rpsSelectCapital(Capital) + If Capital="" Do + . Set ..rbFormatNone.Checked="True" + Else If Capital="U" Do Quit + . Set ..rbFormatUC.Checked="True" + Else If Capital="L" Do Quit + . Set ..rbFormatLC.Checked="True" + Else If Capital="F" Do Quit + . Set ..rbFormatFC.Checked="True" + + Quit +]]> + + + +PlainText:%String +cache +0 +document +literal + + + + +NoTranslation:%Library.Boolean=0 +cache +0 +document +literal +0 Do + . Set Type=$P(..cbbTransType.Items.GetStrings(..cbbTransType.ItemIndex),": ",1) + . Set $P(ParamStr,..pParamSep,1)=Type + + New Group + If ..cbbTransGroup.ItemIndex>0 Do + . Set Group=$P(..cbbTransGroup.Items.GetStrings(..cbbTransGroup.ItemIndex),": ",1) + . Set $P(ParamStr,..pParamSep,2)=Group + + New PlainText + If ..pmiPlainText.Checked="True" Do + . Set PlainText="T" + Else If ..pmiHTML.Checked="True" Do + . Set PlainText="H" + Else Do + . Set PlainText="" + + Set:(PlainText'="") $P(ParamStr,..pParamSep,4)=PlainText + + New Capital + If ..rbFormatNone.Checked="True" Do + . Set Capital="" + Else If ..rbFormatFC.Checked="True" Do + . Set Capital="F" + Else If ..rbFormatLC.Checked="True" Do + . Set Capital="L" + Else If ..rbFormatUC.Checked="True" Do + . Set Capital="U" + + Set:(Capital'="") $P(ParamStr,..pParamSep,3)=Capital + + If NoTranslation Do + . Set Selection=..mmoTekst.Lines.Text + Else Do + . If ..mmoTekst.Lines.Text="" Do + .. Set Selection=Selection_$S(ParamStr="":"",1:" opties="""_ParamStr_"""")_..pBeginEndTag_..txtIntern.Text_..pEndTag + . Else Do + .. Set Selection=Selection_$S(ParamStr="":"",1:" opties="""_ParamStr_"""")_..pBeginEndTag_..mmoTekst.Lines.Text_..pEndTag + + Set ..reSource.SelText=Selection + + Set ..reSource.SelStart=OrigSelStart + Set ..reSource.SelLength=$L(Selection) + + Quit +]]> + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +%Library.CacheSerialState + +"%Library.TMFormClass" + +Address + + +Form + + +pnlBottom + + +pnlTop + + +reSource + + +Button1 + + +ComboBox1 + + +ComboBox2 + + +Edit1 + + +Label1 + + +Label2 + + +Label3 + + +Label4 + + +lblFileName + + +shExample + + +ComboBox3 + + +ComboBox4 + + +Edit2 + + +Label5 + + +Label6 + + +Label7 + + +Label8 + + +Panel1 + + +RadioButton1 + + +RadioButton2 + + +RadioButton3 + + +txtIntern + + +Button2 + + +Button3 + + +Button4 + + +Panel2 + + +RadioButton4 + + +cbbTransGroup + + +cbbTransType + + +CheckBox1 + + +CheckBox2 + + +btnChangeSelection + + +btnReadSelection + + +chkWordWrap + + +Label9 + + +chkAutoSelectionRead + + +btnClose + + +btnSave + + +rbFormatFC + + +rbFormatLC + + +rbFormatNone + + +rbFormatUC + + +txtLineNr + + +pBeginTag + + +pEndTag + + +pParamSep + + +pFileName + + +btnHighlight + + +btnNoTransItem + + +Label10 + + +pSearchPos + + +txtSearch + + +pItemPos + + +btnNextItem + + +btnPrevItem + + +pmSave + + +pmiSave + + +pmiSaveAs + + +sdSaveAs + + +pmSource + + +pmiCopy + + +pmiCut + + +pmiPaste + + +pmiRemove + + +pmiSelectAll + + +pmiSep1 + + +pmiSep2 + + +pmiUndo + + +lblLineNr + + +pFormHandle + + +pREHandle + + +btnLookUp + + +pfrmLookUp + + +frmLookUp + + +Label11 + + +mmoTekst + + +btnInternToTekst + + +btnTekstDefault + + +pBeginEndTag + + +chkPlainText + + +pStdPlainText + + +lblTekst + + +pmPlainText + + +pmiHTML + + +pmiPlainText + + +pmiTextDefault + + +pnlTrans + + + + + Index: UI/FileTranslator/MainForm.cls.xml =================================================================== diff -u --- UI/FileTranslator/MainForm.cls.xml (revision 0) +++ UI/FileTranslator/MainForm.cls.xml (revision 187) @@ -0,0 +1,4362 @@ + + + +serial +KeyCodesCNTs,%ApiCNTs +Default +%Library.TMFormClass + + +%TMBevel + + + +%TMBevel + + + +%TMBevel + + + +%TMBevel + + + +%Library.TMForm + + + +%TMLabel + + + +%TMLabel + + + +%Library.String + + + +%Library.Boolean +0 + + + +%Library.String +1 + + + +%Library.String +1 + + + +%Library.String +1 + + + +%Library.String +1 + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMSpeedButton + + + +%TMComboBox + + + +%TMComboBox + + + +%TMComboBox + + + +%TMCheckBox + + + +%TMCheckBox + + + +%TMCheckBox + + + +%TMCheckBox + + + +%TMCheckBox + + + +%TMCheckBox + + + +%TMCheckListBox + + + +%TMCheckListBox + + + +UI.Res.Vertaling.dlgDetail + + + +UI.Res.Vertaling.dlgDetailLink + + + +UI.WEB.FileTranslator.dlgMakeUpSource + + + +UI.Lib.Dlg.TSelectDir + + + +%TMImageList + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMLabel + + + +%TMListView + + + +%TMOpenDialog + + + +%Library.String +"Internet bestanden (*.htm, *.html, *.xml, *.xsl)|*.htm;*.html;*.xml;*.xsl|Vertaal bestanden (*_TL.*)|*_TL.*|Alle bestanden (*.*)|*.*" + + + +%Library.String +"Uitvoerbare bestanden (*.exe)|*.exe|Alle bestanden (*.*)|*.*" + + + +%Library.String + + + +%Library.String + + + +%TMProgressBar + + + +%TMPopupMenu + + + +%TMPopupMenu + + + +%TMPopupMenu + + + +%TMPopupMenu + + + +%TMPopupMenu + + + +%TMPopupMenu + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMMenuItem + + + +%TMPanel + + + +%TMPanel + + + +%TMPanel + + + +%TMPanel + + + +%TMPanel + + + +%TMRichEdit + + + +%TMShape + + + +%TMSplitter + + + +%TMSplitter + + + +%TMEdit + + + +%TMEdit + + + +%TMEdit + + + +%TMEdit + + + +%TMEdit + + + +%TMEdit + + + +%TMEdit + + + +%TMEdit + + + +initvalue:%String +cache +0 +%Status +document +literal + + + + +Msg:%Library.String,Color:%Library.Integer=$$$clBlack +cache +0 +document +literal + + + + +Msg:%Library.String="",WhiteLine:%Library.Boolean=0,Color:%Library.Integer=$$$clBlack +cache +0 +document +literal + + + + +Msg:%Library.String,Color:%Library.Integer=$$$clBlack +cache +0 +document +literal + + + + +cache +0 +document +literal +' + ; end + ; object txtParamSep: CEdit + ; Left = 154 + ; Top = 404 + ; Width = 17 + ; Height = 21 + ; Font.Charset = DEFAULT_CHARSET + ; Font.Color = clWindowText + ; Font.Height = -11 + ; Font.Name = 'MS Sans Serif' + ; Font.Style = [] + ; ParentFont = False + ; TabOrder = 5 + ; Text = '|' + ; end + ; object clbLanguages: CCheckListBox + ; Left = 5 + ; Top = 450 + ; Width = 239 + ; Height = 56 + ; OnClickCheck = clbLanguagesClickCheck + ; Anchors = [akLeft, akTop, akRight] + ; Columns = 1 + ; ItemHeight = 13 + ; TabOrder = 6 + ; end + ; object pbProgress: CProgressBar + ; Left = 5 + ; Top = 661 + ; Width = 239 + ; Height = 12 + ; Anchors = [akLeft, akRight, akBottom] + ; Min = 0 + ; Max = 100 + ; TabOrder = 7 + ; end + ; object chkConfirmOverwriteDest: CCheckBox + ; Left = 5 + ; Top = 353 + ; Width = 193 + ; Height = 17 + ; Caption = 'Bevestig overschrijven doelbestand' + ; Checked = True + ; State = cbChecked + ; TabOrder = 8 + ; end + ; object chkShowTransItems: CCheckBox + ; Left = 4 + ; Top = 529 + ; Width = 153 + ; Height = 17 + ; Caption = 'Toon reeds vertaalde items' + ; TabOrder = 9 + ; end + ; object chkOpenDestFiles: CCheckBox + ; Left = 4 + ; Top = 545 + ; Width = 209 + ; Height = 17 + ; Caption = 'Open doelbestand(en) na verwerking' + ; TabOrder = 10 + ; end + ; object txtDestFNExample: CEdit + ; Left = 45 + ; Top = 278 + ; Width = 193 + ; Height = 13 + ; BorderStyle = bsNone + ; Color = 14024703 + ; Font.Charset = DEFAULT_CHARSET + ; Font.Color = clNavy + ; Font.Height = -11 + ; Font.Name = 'MS Sans Serif' + ; Font.Style = [] + ; ParentFont = False + ; ReadOnly = True + ; TabOrder = 11 + ; Text = 'Ingave is onvolledig.' + ; end + ; object chkVertalingPlus: CCheckBox + ; Left = 4 + ; Top = 560 + ; Width = 224 + ; Height = 17 + ; Caption = 'Lege vertalingen voorzien van inhoud' + ; TabOrder = 12 + ; end + ; object chkReplaceDestFNStr: CCheckBox + ; Left = 5 + ; Top = 335 + ; Width = 65 + ; Height = 17 + ; Caption = 'Vervang ' + ; Checked = True + ; State = cbChecked + ; TabOrder = 13 + ; OnClick = chkReplaceDestFNStrClick + ; end + ; object txtReplaceDestFNStr: CEdit + ; Left = 68 + ; Top = 335 + ; Width = 33 + ; Height = 19 + ; Ctl3D = False + ; ParentCtl3D = False + ; TabOrder = 14 + ; Text = '_TL.' + ; OnChange = txtReplaceDestFNStrChange + ; end + ; object txtReplaceDestFNStrInto: CEdit + ; Left = 135 + ; Top = 335 + ; Width = 33 + ; Height = 19 + ; Ctl3D = False + ; ParentCtl3D = False + ; TabOrder = 15 + ; Text = '_%Ls.' + ; OnChange = txtReplaceDestFNStrChange + ; end + ; object txtBeginEndTag: CEdit + ; Left = 78 + ; Top = 404 + ; Width = 17 + ; Height = 21 + ; Font.Charset = DEFAULT_CHARSET + ; Font.Color = clWindowText + ; Font.Height = -11 + ; Font.Name = 'MS Sans Serif' + ; Font.Style = [] + ; ParentFont = False + ; TabOrder = 16 + ; Text = '>' + ; end + ; object chkLangFromTag: CCheckBox + ; Left = 4 + ; Top = 513 + ; Width = 217 + ; Height = 17 + ; Caption = 'Te verwerken talen uit bronbestand halen' + ; TabOrder = 17 + ; OnClick = chkLangFromTagClick + ; end + ; end + ; object pnlClient: CPanel + ; Left = 252 + ; Top = 0 + ; Width = 781 + ; Height = 677 + ; Align = alClient + ; BevelOuter = bvNone + ; Constraints.MinWidth = 692 + ; TabOrder = 1 + ; object pnlTop: CPanel + ; Left = 0 + ; Top = 0 + ; Width = 781 + ; Height = 33 + ; Align = alTop + ; TabOrder = 0 + ; object Label1: CLabel + ; Left = 6 + ; Top = 10 + ; Width = 82 + ; Height = 13 + ; Caption = 'Standaard groep:' + ; Font.Charset = DEFAULT_CHARSET + ; Font.Color = clWindowText + ; Font.Height = -11 + ; Font.Name = 'MS Sans Serif' + ; Font.Style = [] + ; ParentFont = False + ; end + ; object btnNewGroup: CSpeedButton + ; Left = 285 + ; Top = 6 + ; Width = 19 + ; Height = 21 + ; Flat = False + ; NumGlyphs = 2 + ; OnClick = btnNewGroupClick + ; end + ; object Label12: CLabel + ; Left = 318 + ; Top = 10 + ; Width = 75 + ; Height = 13 + ; Caption = 'Standaard type:' + ; Font.Charset = DEFAULT_CHARSET + ; Font.Color = clWindowText + ; Font.Height = -11 + ; Font.Name = 'MS Sans Serif' + ; Font.Style = [] + ; ParentFont = False + ; end + ; object lblFileTranslatorShadow: CLabel + ; Left = 621 + ; Top = 9 + ; Width = 153 + ; Height = 18 + ; Anchors = [akTop, akRight] + ; Caption = 'FILE TRANSLATOR' + ; Font.Charset = ANSI_CHARSET + ; Font.Color = clWhite + ; Font.Height = -16 + ; Font.Name = 'Arial' + ; Font.Style = [fsBold, fsItalic] + ; ParentFont = False + ; Transparent = True + ; end + ; object lblFileTranslator: CLabel + ; Left = 620 + ; Top = 8 + ; Width = 153 + ; Height = 18 + ; Anchors = [akTop, akRight] + ; Caption = 'FILE TRANSLATOR' + ; Font.Charset = ANSI_CHARSET + ; Font.Color = clWindowText + ; Font.Height = -16 + ; Font.Name = 'Arial' + ; Font.Style = [fsBold, fsItalic] + ; ParentFont = False + ; Transparent = True + ; end + ; object cbbTransGroup: CComboBox + ; Left = 94 + ; Top = 6 + ; Width = 193 + ; Height = 21 + ; Style = csDropDownList + ; Font.Charset = DEFAULT_CHARSET + ; Font.Color = clWindowText + ; Font.Height = -11 + ; Font.Name = 'MS Sans Serif' + ; Font.Style = [] + ; ItemHeight = 13 + ; ParentFont = False + ; TabOrder = 0 + ; end + ; object cbbTransType: CComboBox + ; Left = 398 + ; Top = 6 + ; Width = 129 + ; Height = 21 + ; Style = csDropDownList + ; Font.Charset = DEFAULT_CHARSET + ; Font.Color = clWindowText + ; Font.Height = -11 + ; Font.Name = 'MS Sans Serif' + ; Font.Style = [] + ; ItemHeight = 13 + ; ParentFont = False + ; TabOrder = 1 + ; end + ; end + ; object pnlBottom: CPanel + ; Left = 0 + ; Top = 636 + ; Width = 781 + ; Height = 41 + ; Align = alBottom + ; TabOrder = 1 + ; object btnProcess: CSpeedButton + ; Left = 6 + ; Top = 8 + ; Width = 95 + ; Height = 25 + ; DropdownMenu = pmProcess + ; Caption = '&Verwerk' + ; Flat = False + ; end + ; object btnStop: CSpeedButton + ; Left = 110 + ; Top = 8 + ; Width = 95 + ; Height = 25 + ; Caption = '&Stop' + ; Enabled = False + ; Flat = False + ; OnClick = btnStopClick + ; end + ; object btnDelay: CSpeedButton + ; Left = 214 + ; Top = 8 + ; Width = 95 + ; Height = 25 + ; Hint = + ; 'De niet-vertaalde items opslaan in de database om op een later t' + + ; 'ijdstip te vertalen.' + ; Caption = '&Uitstellen' + ; Enabled = False + ; Flat = False + ; NumGlyphs = 2 + ; ParentShowHint = False + ; ShowHint = True + ; OnClick = btnDelayClick + ; end + ; object btnExit: CButton + ; Left = 679 + ; Top = 8 + ; Width = 95 + ; Height = 25 + ; Caption = '&Afsluiten' + ; TabOrder = 0 + ; OnClick = btnExitClick + ; end + ; end + ; object pnlRightClient: CPanel + ; Left = 0 + ; Top = 33 + ; Width = 781 + ; Height = 603 + ; Align = alClient + ; TabOrder = 2 + ; object splMid: CSplitter + ; Left = 1 + ; Top = 502 + ; Width = 779 + ; Height = 3 + ; Cursor = crVSplit + ; Align = alBottom + ; end + ; object lvTranslations: CListView + ; Left = 1 + ; Top = 1 + ; Width = 779 + ; Height = 501 + ; Align = alClient + ; Color = 14548991 + ; Columns = < + ; item + ; Caption = 'Groep' + ; Width = 75 + ; end + ; item + ; Caption = 'Type' + ; Width = 40 + ; end + ; item + ; Caption = 'Intern' + ; Width = 400 + ; end + ; item + ; Caption = 'Taal' + ; Width = 100 + ; end + ; item + ; Alignment = taRightJustify + ; Caption = 'Positie' + ; end + ; item + ; Caption = 'dataTaalKort' + ; Width = 0 + ; end> + ; HideSelection = False + ; HotTrackStyles = [] + ; ReadOnly = True + ; RowSelect = True + ; SmallImages = ilTranslations + ; TabOrder = 0 + ; ViewStyle = vsReport + ; OnKeyDown = lvTranslationsKeyDown + ; OnMouseDown = lvTranslationsMouseDown + ; OnSelectItem = lvTranslationsSelectItem + ; ControlClass = 'UI.Lib.Ctrl.TSortableListView' + ; end + ; object reOutput: CRichEdit + ; Left = 1 + ; Top = 505 + ; Width = 779 + ; Height = 97 + ; Align = alBottom + ; HideSelection = False + ; ScrollBars = ssBoth + ; TabOrder = 1 + ; WordWrap = False + ; end + ; end + ; end + ; object pmAddSourceFile: CPopupMenu + ; Left = 19 + ; Top = 38 + ; object pmiAddSourceFile: TMenuItem + ; Caption = 'Aan lijst...' + ; OnClick = pmiAddSourceFileClick + ; end + ; object pmiAddSrcFileToEmptyList: TMenuItem + ; Caption = 'Wis lijst en voeg toe...' + ; OnClick = pmiAddSrcFileToEmptyListClick + ; end + ; end + ; object pmDelSourceFile: CPopupMenu + ; Left = 48 + ; Top = 38 + ; object pmiDelSelectedSourceFile: TMenuItem + ; Caption = 'Geselecteerde bestand' + ; OnClick = pmiDelSelectedSourceFileClick + ; end + ; object pmiDelCheckedSourceFile: TMenuItem + ; Caption = 'Aangevinkt(e) bestand(en)' + ; OnClick = pmiDelCheckedSourceFileClick + ; end + ; object pmiClearSourceFiles: TMenuItem + ; Caption = 'Alles' + ; OnClick = pmiClearSourceFilesClick + ; end + ; end + ; object odSourceFiles: COpenDialog + ; Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing] + ; Left = 19 + ; Top = 70 + ; end + ; object pmOpenSourceFile: CPopupMenu + ; Left = 77 + ; Top = 38 + ; object pmiFormatSrc: TMenuItem + ; Caption = '&Opmaken' + ; OnClick = pmiFormatSrcClick + ; end + ; object pmiSep4: TMenuItem + ; Caption = '-' + ; end + ; object pmiOpenSrcFileExpl: TMenuItem + ; Caption = '&Verkenner' + ; OnClick = pmiOpenSrcFileExplClick + ; end + ; object pmiSep2: TMenuItem + ; Caption = '-' + ; end + ; object pmiOpenSrcFileEdit: TMenuItem + ; Caption = '&Kladblok' + ; OnClick = pmiOpenSrcFileEditClick + ; end + ; object pmiOpenSrcFileEditTP: TMenuItem + ; Caption = '&Textpad' + ; OnClick = pmiOpenSrcFileEditTPClick + ; end + ; object pmiSep3: TMenuItem + ; Caption = '-' + ; end + ; object pmiOpenSrcFileWith: TMenuItem + ; Caption = '&Openen met' + ; object pmiOpenSrcFileProgSel: TMenuItem + ; Caption = '&Programma selecteren...' + ; OnClick = pmiOpenSrcFileProgSelClick + ; end + ; end + ; end + ; object pmProcess: CPopupMenu + ; Left = 572 + ; Top = 535 + ; object pmiProcessSource: TMenuItem + ; Caption = 'Bronbestand(en)' + ; OnClick = pmiProcessSourceClick + ; end + ; object pmiProcessSrcGenDest: TMenuItem + ; Caption = 'Bronbestand(en) en maak doelbestand(en) aan' + ; OnClick = pmiProcessSrcGenDestClick + ; end + ; end + ; object pmSrcFileOptions: CPopupMenu + ; Left = 106 + ; Top = 38 + ; object pmiSelectAllSFs: TMenuItem + ; Caption = '&Selecteer alles' + ; OnClick = pmiSelectAllSFsClick + ; end + ; object pmiDeselectAllSFs: TMenuItem + ; Caption = '&Deselecteer alles' + ; OnClick = pmiDeselectAllSFsClick + ; end + ; object pmiSep1: TMenuItem + ; Caption = '-' + ; end + ; object pmiInvertSelSFs: TMenuItem + ; Caption = 'Selectie &inverteren' + ; OnClick = pmiInvertSelSFsClick + ; end + ; end + ; object ilTranslations: CImageList + ; Left = 270 + ; Top = 436 + ; Bitmap = '' + ; end + ; object pmSettings: CPopupMenu + ; Left = 14 + ; Top = 458 + ; object pmiTagPreset: TMenuItem + ; Caption = 'Tag preset' + ; object pmiTagPreset1: TMenuItem + ; Caption = '' + ; OnClick = pmiTagPreset1Click + ; end + ; object pmiTagPreset2: TMenuItem + ; Caption = '[VH:T]' + ; OnClick = pmiTagPreset2Click + ; end + ; end + ; end + ;end +]]> + + + +cache +0 +document +literal + + + + +SourceFN:%Library.String,CreateDestFiles:%Library.Boolean=0,DestDir:%Library.String,TalenFromTag:%Library.String +cache +0 +%Library.List +document +literal +1048575) $FNUMBER(Size/1048576,".",2)_" MB" + Quit:(Size>1024) $FNUMBER(Size/1024,".",2)_" KB" + Quit Size_" bytes" + + ;============================================================================== + ; READABLE FILE SIZE (bytes, KB and MB) + ;============================================================================== +epsGetTalenFromTag(SrcStr) ;SrcStr: geopende sourcestream + Do SrcStr.Rewind() + ;Volgende lijn kan in principe niet voorkomen aangezien reeds eerder op leeg is gechecked + Quit:(SrcStr.AtEnd) $LB(..#lbsOk) + + New BeginTagPos + Set BeginTagPos=SrcStr.FindAt(1,..txtBeginTag.Text) + Quit:(BeginTagPos=-1) $LB(..#lbsError,"Begintag '"_..txtBeginTag.Text_"' niet aangetroffen in document.") + + New EndTagPos + Set EndTagPos=SrcStr.FindAt(BeginTagPos,..txtEndTag.Text) + Quit:(EndTagPos=-1) $LB(..#lbsError,"Eindtag '"_..txtEndTag.Text_"' niet aangetroffen in document.") + + Do SrcStr.MoveTo(BeginTagPos) + New ReadLen,Line + Set ReadLen=EndTagPos-BeginTagPos + Set Line=SrcStr.Read(.ReadLen) + Do epsReplaceHtmlQuot(.Line) + + New ShortTalen + Set ShortTalen=$P($P(Line, "talen=""",2), """") + Quit:(ShortTalen="") $LB(..#lbsError,"Eerste tag bevat geen talen.") + + Do ..AddLineToLog("Te verwerken talen ingesteld op "_ShortTalen_".") + + New Loop,ShortLang,lbStatus + Kill ..aLanguages + For Loop=1:1:$L(ShortTalen,";") Do + . Set ShortLang=$P(ShortTalen,";",Loop) + . If $D(..aShortToLongLang(ShortLang)) Do + .. Set ..aLanguages(ShortLang)=..aShortToLongLang(ShortLang) + . Else Do + .. Do ..AddLineToLog("Onbekende taal: "_ShortLang_".",$$$clRed) + + Quit $LB(..#lbsOk) + + ;============================================================================== + ; CREATE DESTINATION STREAMs + ;============================================================================== +epsCreateDestFiles() + New FullFileName,Extension,SmallFileName,Cancel,Error + Set FullFileName=$P(SourceFN,"\",$L(SourceFN,"\")) + Set Extension=$$GetFileExtension^vhLib(FullFileName) + Set SmallFileName=$$GetFileNoExt^vhLib(FullFileName) ; $P(FullFileName,".",1,$L(FullFileName,".")-1) + Set Cancel=0, Error=0 + + New ConfirmOverwrite + Set ConfirmOverwrite=(..chkConfirmOverwriteDest.Checked="True") + + New Loop,ShortLanguage,LongLanguage,DestFN,SkipFile,DestStr,LinkSuccess + Kill ..aDestStreams + Set ShortLanguage="" + For Set ShortLanguage=$O(..aLanguages(ShortLanguage)) Quit:((ShortLanguage="") || Cancel) Do + . Set LongLanguage=..aLanguages(ShortLanguage) + . Set DestFN=DestDir_"\"_..rGetFileName(SmallFileName,ShortLanguage,LongLanguage,Extension) + . Set SkipFile=0 + . If ConfirmOverwrite && ##class(%File).Exists(DestFN) Do Quit:(SkipFile) + .. New Question,Answer + .. Set Question="Het doelbestand '"_DestFN_"' bestaat reeds. Overschrijven?" + .. Set Answer=MApplication.MessageBox(Question,..Form.Caption,$$$MBICONQUESTION+$$$MBYESNOCANCEL+$$$MBDEFBUTTON2) + .. If Answer=$$$mrNo Do + ... Set SkipFile=1 + .. Else If Answer=$$$mrCancel Do + ... Set Cancel=1 + ... Set SkipFile=1 + ... Do ..AddLineToLog("") + ... Do ..AddLineToLog("Verwerking geannuleerd door gebruiker.",$$$clBlue) + . Do ..AddToLog("Aanmaken doelbestand '"_DestFN_"'...") + . Set DestStr=##class(%FileCharacterStream).%New() + . If DestStr=$$$NULLOREF Do Quit + .. Do ..AddToEndOfLog("ERROR: kan geen nieuwe characterstream aanmaken.",,$$$clRed) + .. Set Error=1 + . Set LinkSuccess=DestStr.LinkToFile(DestFN) + . If $$$ISERR(LinkSuccess) Do Quit + .. Do ..AddToEndOfLog($$ParseStatus^vhLib(LinkSuccess)_".",,$$$clRed) + .. Set Error=1 + . Set ..aDestStreams(ShortLanguage)=DestStr + . Do ..AddToEndOfLog("Ok.") + + Quit $S(Error:$LB(..#lbsError),Cancel:$LB(..#lbsStop),1:$LB(..#lbsOk)) + + ;============================================================================== + ; PARSE SOURCE DOC + ;============================================================================== +epsProcessSourceDoc(varTransCnt,varNoTransCnt) + ;Setup some vars + New BeginTag,BeginEndTag,EndTag,BeginTagFirstChar,EndTagFirstChar,BeginTagLen,EndTagLen + Set BeginTag=..txtBeginTag.Text + Set BeginEndTag=..txtBeginEndTag.Text + Set EndTag=..txtEndTag.Text + Set BeginTagFirstChar=$E(BeginTag) + Set EndTagFirstChar=$E(EndTag) + Set BeginTagLen=$L(BeginTag) + Set EndTagLen=$L(EndTag) + + ;Run through the doc + New Char,CharCnt,Size,InTrans,TransCode,ShortLanguage,LineNr,RemLineNr,Line,Loop,MaxLen,aLineToStream + Set Size=SrcStr.Size, LineNr=1, InTrans=0, CharCnt=0 + Do SrcStr.Rewind() + For Quit:(SrcStr.AtEnd || ..UserStopped) Do + . Set MaxLen=5000 ;Lees per blokken van 5000 bytes uit + . Set Line=SrcStr.Read(.MaxLen) + . If CreateDestFiles Do + .. Set ShortLanguage="" + .. For Set ShortLanguage=$O(..aLanguages(ShortLanguage)) Quit:(ShortLanguage="") Do + ... Set aLineToStream(ShortLanguage)="" + . For Loop=1:1:MaxLen Do + .. Set Char=$E(Line,Loop) + .. Set:($ASCII(Char)=13) LineNr=LineNr+1 + .. Set CharCnt=CharCnt+1 + .. If CharCnt#100=0 Do + ... Set ..pbProgress.Position=(CharCnt*100)\Size + ... Do MApplication.ProcessMessages() + ... Set:(..UserStopped) Loop=MaxLen + .. If 'InTrans && (Char=BeginTagFirstChar) Do Quit:(InTrans) + ... If Char_$E(Line,Loop+1,Loop+BeginTagLen-1)=BeginTag Do + .... Set InTrans=1, TransCode="", RemLineNr=LineNr + .... Set Loop=Loop+BeginTagLen-1 + .... Set CharCnt=CharCnt+BeginTagLen-1 + .. If InTrans && (Char=EndTagFirstChar) Do Quit:('InTrans) + ... If Char_$E(Line,Loop+1,Loop+EndTagLen-1)=EndTag Do + .... Set Loop=Loop+EndTagLen-1 + .... Set CharCnt=CharCnt+EndTagLen-1 + .... Do epsProcessTransCode(TransCode,RemLineNr,.varTransCnt,.varNoTransCnt) + .... Do MApplication.ProcessMessages() + .... Set InTrans=0 + .. If InTrans Do Quit + ... Set TransCode=TransCode_Char + .. If CreateDestFiles Do + ... Set ShortLanguage="" + ... For Set ShortLanguage=$O(..aLanguages(ShortLanguage)) Quit:(ShortLanguage="") Do + .... Set aLineToStream(ShortLanguage)=aLineToStream(ShortLanguage)_Char + . If CreateDestFiles Do + .. Set ShortLanguage="" + .. For Set ShortLanguage=$O(..aDestStreams(ShortLanguage)) Quit:(ShortLanguage="") Do + ... Do ..aDestStreams(ShortLanguage).Write(aLineToStream(ShortLanguage)) + + Quit:(..UserStopped) $LB(..#lbsStop) + + ;Eventueel niet afgesloten tag opvangen + New Msg + If InTrans Do Quit $LB(..#lbsError,Msg) + . Set Msg="Geen eindtag '"_EndTag_"' gevonden." + + Quit $LB(..#lbsOk) + + ;============================================================================== + ; PROCESS TRANSCODE + ;============================================================================== +epsProcessTransCode(TransCode,CharPos,varTransCnt,varNoTransCnt) + New CharLoop,InStr,EndOfBeginTagPos + Set InStr=0 + Set EndOfBeginTagPos=-1 + ;op zoek gaan naar BeginEndTag, let wel het teken kan ook voorkomen in intern/opties, weliswaar ts quotes + For CharLoop=1:1:$L(TransCode) Do Quit:(EndOfBeginTagPos'=-1) + . If $E(TransCode,CharLoop)="""" Do + .. Set InStr='InStr + . If 'InStr && ($E(TransCode,CharLoop)=BeginEndTag) Do + .. Set EndOfBeginTagPos=CharLoop + If EndOfBeginTagPos=-1 Do Quit + . Do ..AddToEndOfLog("Regel "_CharPos_": geen geldige afsluiter ('"_BeginEndTag_"') van de begintag gevonden.",,$$$clRed) + + New TextBlok,Intern,Params,ParamSep,Attrib + Set TextBlok=$E(TransCode,EndOfBeginTagPos+1,999999) + Set Attrib=$E(TransCode,1,EndOfBeginTagPos-1) + Do epsReplaceHtmlQuot(.Attrib) ; Zal $L(attrib) wijzigen. EndOfBeginTagPos zal niet meer correct zijn !!!!! + + ;Intern + Set Intern=$P($P(Attrib, "intern=""",2), """") + Set:(Intern="") Intern=TextBlok + Set ParamSep=..txtParamSep.Text + + ;opties + Set Params=$P($P(Attrib, "opties=""",2), """") + Set Type=$P(Params,ParamSep,1) + Set Group=$P(Params,ParamSep,2) + Set Capital=$P(Params,ParamSep,3) + Set PlainText=$P(Params,ParamSep,4) + + ;huidige standaard instellingen tot nieuwe standaard wo tegengekomen + If Intern="" Do Quit + . If (Type'="") && (StdType'=Type) Do + .. Do ..AddLineToLog("Regel "_CharPos_": standaard vertalingstype ingesteld op '"_Type_"'.") + .. Set StdType=Type + . If (Group'="") && (StdGroup'=Group) Do + .. Do ..AddLineToLog("Regel "_CharPos_": standaard vertalingsgroep ingesteld op '"_Group_"'.") + .. Set StdGroup=Group + . If (PlainText'="") && (StdPlainText'=PlainText) Do + .. Do ..AddLineToLog("Regel "_CharPos_": standaard plaintext ingesteld op '"_PlainText_"'.") + .. Set StdPlainText=PlainText + + If Type="" Do + . Set Type=StdType + If Group="" Do + . Set Group=StdGroup + If PlainText="" Do + . Set PlainText=StdPlainText + + ;translate in verschillende talen + New ShortLanguage,Translation,LongLanguage,ReturnsHTML + Set ShortLanguage="" + For Set ShortLanguage=$O(..aLanguages(ShortLanguage)) Quit:(ShortLanguage="") Do + . Set Translation=##class(Res.Vertaling).GetVertaling(Group,Intern,Type,ShortLanguage,,1,.ReturnsHTML) + . Set LongLanguage=..aLanguages(ShortLanguage) + . If Translation="" Do + .. Set varNoTransCnt=varNoTransCnt+1 + .. Do ..lvTranslations.Items.AddItem(Group,..#ilNoTrans,..clbSourceFiles.ItemIndex,$LB(Type,Intern,LongLanguage,CharPos,ShortLanguage)) + .. If ..chkVertalingPlus.Checked="True" Do + ... Set Translation=##class(Res.Vertaling).GetVertalingPlus(Group,Intern,Type,ShortLanguage,,1,.ReturnsHTML) + ... Set:(Translation="") Translation=Intern_" ("_Type_"-"_ShortLanguage_")" + . If Translation'="" Do + .. If Capital="U" Do Set Translation=$ZCVT(Translation,"U") + .. Else If Capital="L" Do Set Translation=$ZCVT(Translation,"L") + .. Else If Capital="F" Do Set Translation=$$FirstCase^vhLib(Translation) + .. Set:((PlainText'="T") && '$G(ReturnsHTML)) Translation=$$ConvertToHTML^vhRtn1(Translation) + .. Set varTransCnt=varTransCnt+1 + .. If ..chkShowTransItems.Checked="True" Do + ... Do ..lvTranslations.Items.AddItem(Group,..#ilTransOk,..clbSourceFiles.ItemIndex,$LB(Type,Intern,LongLanguage,CharPos,ShortLanguage)) + .. Set:(CreateDestFiles) aLineToStream(ShortLanguage)=aLineToStream(ShortLanguage)_Translation + + Quit + + ;============================================================================== + ; SAVE DESTINATION FILEs + ;============================================================================== +epsSaveDestinationFiles() + New ShortLanguage,DestStr,SaveSuccess,Error + Set ShortLanguage="" + Set Error=0 + For Set ShortLanguage=$O(..aDestStreams(ShortLanguage)) Quit:(ShortLanguage="") Do + . Set DestStr=..aDestStreams(ShortLanguage) + . Set SaveSuccess=DestStr.SaveStream() + . Do ..AddToLog("Bezig met opslaan van '"_DestStr.Filename_"'...") + . If $$$ISERR(SaveSuccess) Do + .. Do ..AddToEndOfLog($$ParseStatus^vhLib(SaveSuccess)_".",,$$$clRed) + .. Set Error=1 + . Else Do + .. Do ..AddToEndOfLog("Ok.") + + Quit $S(Error:$LB(..#lbsError,"Fout tijdens opslaan."),1:$LB(..#lbsOk)) + + ;============================================================================== + ; OPEN DESTINATION FILEs + ;============================================================================== +epsOpenDestFiles() + New ShortLanguage,DestFile,StatusOK,Error + Set ShortLanguage="" + Set Error=0 + For Set ShortLanguage=$O(..aLanguages(ShortLanguage)) Quit:(ShortLanguage="") Do + . Set DestFile=..aDestStreams(ShortLanguage).Filename + . Do ..AddToLog(DestFile_"...") + . Set StatusOK=MApplication.Execute("explorer "_DestFile) + . If StatusOK="True" Do + .. Do ..AddToEndOfLog("Ok.") + . Else Do + .. Set Error=1 + .. Do ..AddToEndOfLog(StatusOK,,$$$clRed) + + Quit $S(Error:$LB(..#lbsError,"Fout tijdens openen."),1:$LB(..#lbsOk)) + + ;============================================================================== + ; REPLACE " FROM Attrib INTO """" + ;============================================================================== +epsReplaceHtmlQuot(Attrib) ; Attrib als .local doorgeven +#define Quote """ + If (Attrib'["""")&&(Attrib[$$$Quote) Do + . ; Zal $L(attrib) wijzigen!!!! EndOfBeginTagPos zal niet meer correct zijn !!!!! + . Set Attrib=$$REPLACE^vhRtn1(Attrib,$$$Quote,"""") + Quit + +]]> + + + +CreateDestFiles:%Library.Boolean=0 +cache +0 +document +literal +1 Do + . Do ..rInfoMsgBox(ErrCnt_" bronbestanden konden niet worden verwerkt.",$$$MBICONEXCLAMATION) + + Kill ..aDestStreams + + Set ..btnDelay.Enabled=$$BoolToStr^vhLib(..lvTranslations.Items.Count'=0) + + Quit +]]> + + + +initvalue:%String +cache +0 +MApplication +document +literal +")) + d %this.txtEndTag.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$DEFAULTCHARSET,$$$clWindowText,-11,"MS Sans Serif",$lb())) + d %this.txtParamSep.SetMultiProperty($lb("Left","Top","Width","Height","ParentFont","TabOrder","Text"),$lb(154,404,17,21,"False",5,"|")) + d %this.txtParamSep.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$DEFAULTCHARSET,$$$clWindowText,-11,"MS Sans Serif",$lb())) + d %this.clbLanguages.SetMultiProperty($lb("Left","Top","Width","Height","OnClickCheck","Anchors","Columns","ItemHeight","TabOrder"),$lb(5,450,239,56,$lb(%this,"clbLanguagesClickCheck"),$lb("akLeft","akTop","akRight"),1,13,6)) + d %this.pbProgress.SetMultiProperty($lb("Left","Top","Width","Height","Anchors","Min","Max","TabOrder"),$lb(5,661,239,12,$lb("akLeft","akRight","akBottom"),0,100,7)) + d %this.chkConfirmOverwriteDest.SetMultiProperty($lb("Left","Top","Width","Height","Caption","Checked","State","TabOrder"),$lb(5,353,193,17,"Bevestig overschrijven doelbestand","True","cbChecked",8)) + d %this.chkShowTransItems.SetMultiProperty($lb("Left","Top","Width","Height","Caption","TabOrder"),$lb(4,529,153,17,"Toon reeds vertaalde items",9)) + d %this.chkOpenDestFiles.SetMultiProperty($lb("Left","Top","Width","Height","Caption","TabOrder"),$lb(4,545,209,17,"Open doelbestand(en) na verwerking",10)) + d %this.txtDestFNExample.SetMultiProperty($lb("Left","Top","Width","Height","BorderStyle","Color","ParentFont","ReadOnly","TabOrder","Text"),$lb(45,278,193,13,"bsNone",14024703,"False","True",11,"Ingave is onvolledig.")) + d %this.txtDestFNExample.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$DEFAULTCHARSET,$$$clNavy,-11,"MS Sans Serif",$lb())) + d %this.chkVertalingPlus.SetMultiProperty($lb("Left","Top","Width","Height","Caption","TabOrder"),$lb(4,560,224,17,"Lege vertalingen voorzien van inhoud",12)) + d %this.chkReplaceDestFNStr.SetMultiProperty($lb("Left","Top","Width","Height","Caption","Checked","State","TabOrder","OnClick"),$lb(5,335,65,17,"Vervang ","True","cbChecked",13,$lb(%this,"chkReplaceDestFNStrClick"))) + d %this.txtReplaceDestFNStr.SetMultiProperty($lb("Left","Top","Width","Height","Ctl3D","ParentCtl3D","TabOrder","Text","OnChange"),$lb(68,335,33,19,"False","False",14,"_TL.",$lb(%this,"txtReplaceDestFNStrChange"))) + d %this.txtReplaceDestFNStrInto.SetMultiProperty($lb("Left","Top","Width","Height","Ctl3D","ParentCtl3D","TabOrder","Text","OnChange"),$lb(135,335,33,19,"False","False",15,"_%Ls.",$lb(%this,"txtReplaceDestFNStrChange"))) + d %this.txtBeginEndTag.SetMultiProperty($lb("Left","Top","Width","Height","ParentFont","TabOrder","Text"),$lb(78,404,17,21,"False",16,">")) + d %this.txtBeginEndTag.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$DEFAULTCHARSET,$$$clWindowText,-11,"MS Sans Serif",$lb())) + d %this.chkLangFromTag.SetMultiProperty($lb("Left","Top","Width","Height","Caption","TabOrder","OnClick"),$lb(4,513,217,17,"Te verwerken talen uit bronbestand halen",17,$lb(%this,"chkLangFromTagClick"))) + d %this.pnlClient.SetMultiProperty($lb("Left","Top","Width","Height","Align","BevelOuter","TabOrder"),$lb(252,0,781,677,"alClient","bvNone",1)) + d %this.pnlClient.Constraints.SetMultiProperty($lb("MinWidth"),$lb(692)) + d %this.pnlTop.SetMultiProperty($lb("Left","Top","Width","Height","Align","TabOrder"),$lb(0,0,781,33,"alTop",0)) + d %this.Label1.SetMultiProperty($lb("Left","Top","Width","Height","Caption","ParentFont"),$lb(6,10,82,13,"Standaard groep:","False")) + d %this.Label1.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$DEFAULTCHARSET,$$$clWindowText,-11,"MS Sans Serif",$lb())) + d %this.btnNewGroup.SetMultiProperty($lb("Left","Top","Width","Height","Flat","NumGlyphs","OnClick"),$lb(285,6,19,21,"False",2,$lb(%this,"btnNewGroupClick"))) + d %this.Label12.SetMultiProperty($lb("Left","Top","Width","Height","Caption","ParentFont"),$lb(318,10,75,13,"Standaard type:","False")) + d %this.Label12.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$DEFAULTCHARSET,$$$clWindowText,-11,"MS Sans Serif",$lb())) + d %this.lblFileTranslatorShadow.SetMultiProperty($lb("Left","Top","Width","Height","Anchors","Caption","ParentFont","Transparent"),$lb(621,9,153,18,$lb("akTop","akRight"),"FILE TRANSLATOR","False","True")) + d %this.lblFileTranslatorShadow.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$ANSICHARSET,$$$clWhite,-16,"Arial",$lb("fsBold","fsItalic"))) + d %this.lblFileTranslator.SetMultiProperty($lb("Left","Top","Width","Height","Anchors","Caption","ParentFont","Transparent"),$lb(620,8,153,18,$lb("akTop","akRight"),"FILE TRANSLATOR","False","True")) + d %this.lblFileTranslator.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$ANSICHARSET,$$$clWindowText,-16,"Arial",$lb("fsBold","fsItalic"))) + d %this.cbbTransGroup.SetMultiProperty($lb("Left","Top","Width","Height","Style","ItemHeight","ParentFont","TabOrder"),$lb(94,6,193,21,"csDropDownList",13,"False",0)) + d %this.cbbTransGroup.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$DEFAULTCHARSET,$$$clWindowText,-11,"MS Sans Serif",$lb())) + d %this.cbbTransType.SetMultiProperty($lb("Left","Top","Width","Height","Style","ItemHeight","ParentFont","TabOrder"),$lb(398,6,129,21,"csDropDownList",13,"False",1)) + d %this.cbbTransType.Font.SetMultiProperty($lb("Charset","Color","Height","Name","Style"),$lb($$$DEFAULTCHARSET,$$$clWindowText,-11,"MS Sans Serif",$lb())) + d %this.pnlBottom.SetMultiProperty($lb("Left","Top","Width","Height","Align","TabOrder"),$lb(0,636,781,41,"alBottom",1)) + d %this.btnProcess.SetMultiProperty($lb("Left","Top","Width","Height"),$lb(6,8,95,25)) + s %this.btnProcess.DropdownMenu=%this.pmProcess + d %this.btnProcess.SetMultiProperty($lb("Caption","Flat"),$lb("&Verwerk","False")) + d %this.btnStop.SetMultiProperty($lb("Left","Top","Width","Height","Caption","Enabled","Flat","OnClick"),$lb(110,8,95,25,"&Stop","False","False",$lb(%this,"btnStopClick"))) + d %this.btnDelay.SetMultiProperty($lb("Left","Top","Width","Height","Hint","Caption","Enabled","Flat","NumGlyphs","ParentShowHint","ShowHint","OnClick"),$lb(214,8,95,25,"De niet-vertaalde items opslaan in de database om op een later tijdstip te vertalen.","&Uitstellen","False","False",2,"False","True",$lb(%this,"btnDelayClick"))) + d %this.btnExit.SetMultiProperty($lb("Left","Top","Width","Height","Caption","TabOrder","OnClick"),$lb(679,8,95,25,"&Afsluiten",0,$lb(%this,"btnExitClick"))) + d %this.pnlRightClient.SetMultiProperty($lb("Left","Top","Width","Height","Align","TabOrder"),$lb(0,33,781,603,"alClient",2)) + d %this.splMid.SetMultiProperty($lb("Left","Top","Width","Height","Cursor","Align"),$lb(1,502,779,3,$$$crVSplit,"alBottom")) + n item + s item=%this.lvTranslations.Columns.Add() + s item.Caption="Groep" + s item.Width=75 + s item=%this.lvTranslations.Columns.Add() + s item.Caption="Type" + s item.Width=40 + s item=%this.lvTranslations.Columns.Add() + s item.Caption="Intern" + s item.Width=400 + s item=%this.lvTranslations.Columns.Add() + s item.Caption="Taal" + s item.Width=100 + s item=%this.lvTranslations.Columns.Add() + s item.Alignment="taRightJustify" + s item.Caption="Positie" + s item=%this.lvTranslations.Columns.Add() + s item.Caption="dataTaalKort" + s item.Width=0 + d %this.lvTranslations.SetMultiProperty($lb("Left","Top","Width","Height","Align","Color","HideSelection","HotTrackStyles","ReadOnly","RowSelect"),$lb(1,1,779,501,"alClient",14548991,"False",$lb(),"True","True")) + s %this.lvTranslations.SmallImages=%this.ilTranslations + d %this.lvTranslations.SetMultiProperty($lb("TabOrder","ViewStyle","OnKeyDown","OnMouseDown","OnSelectItem"),$lb(0,"vsReport",$lb(%this,"lvTranslationsKeyDown"),$lb(%this,"lvTranslationsMouseDown"),$lb(%this,"lvTranslationsSelectItem"))) + d %this.reOutput.SetMultiProperty($lb("Left","Top","Width","Height","Align","HideSelection","ScrollBars","TabOrder","WordWrap"),$lb(1,505,779,97,"alBottom","False","ssBoth",1,"False")) + d %this.pmiAddSourceFile.SetMultiProperty($lb("Caption","OnClick"),$lb("Aan lijst...",$lb(%this,"pmiAddSourceFileClick"))) + d %this.pmiAddSrcFileToEmptyList.SetMultiProperty($lb("Caption","OnClick"),$lb("Wis lijst en voeg toe...",$lb(%this,"pmiAddSrcFileToEmptyListClick"))) + d %this.pmiDelSelectedSourceFile.SetMultiProperty($lb("Caption","OnClick"),$lb("Geselecteerde bestand",$lb(%this,"pmiDelSelectedSourceFileClick"))) + d %this.pmiDelCheckedSourceFile.SetMultiProperty($lb("Caption","OnClick"),$lb("Aangevinkt(e) bestand(en)",$lb(%this,"pmiDelCheckedSourceFileClick"))) + d %this.pmiClearSourceFiles.SetMultiProperty($lb("Caption","OnClick"),$lb("Alles",$lb(%this,"pmiClearSourceFilesClick"))) + d %this.odSourceFiles.SetMultiProperty($lb("Options"),$lb($lb("ofHideReadOnly","ofAllowMultiSelect","ofEnableSizing"))) + d %this.pmiFormatSrc.SetMultiProperty($lb("Caption","OnClick"),$lb("&Opmaken",$lb(%this,"pmiFormatSrcClick"))) + d %this.pmiSep4.SetMultiProperty($lb("Caption"),$lb("-")) + d %this.pmiOpenSrcFileExpl.SetMultiProperty($lb("Caption","OnClick"),$lb("&Verkenner",$lb(%this,"pmiOpenSrcFileExplClick"))) + d %this.pmiSep2.SetMultiProperty($lb("Caption"),$lb("-")) + d %this.pmiOpenSrcFileEdit.SetMultiProperty($lb("Caption","OnClick"),$lb("&Kladblok",$lb(%this,"pmiOpenSrcFileEditClick"))) + d %this.pmiOpenSrcFileEditTP.SetMultiProperty($lb("Caption","OnClick"),$lb("&Textpad",$lb(%this,"pmiOpenSrcFileEditTPClick"))) + d %this.pmiSep3.SetMultiProperty($lb("Caption"),$lb("-")) + d %this.pmiOpenSrcFileWith.SetMultiProperty($lb("Caption"),$lb("&Openen met")) + d %this.pmiOpenSrcFileProgSel.SetMultiProperty($lb("Caption","OnClick"),$lb("&Programma selecteren...",$lb(%this,"pmiOpenSrcFileProgSelClick"))) + d %this.pmiProcessSource.SetMultiProperty($lb("Caption","OnClick"),$lb("Bronbestand(en)",$lb(%this,"pmiProcessSourceClick"))) + d %this.pmiProcessSrcGenDest.SetMultiProperty($lb("Caption","OnClick"),$lb("Bronbestand(en) en maak doelbestand(en) aan",$lb(%this,"pmiProcessSrcGenDestClick"))) + d %this.pmiSelectAllSFs.SetMultiProperty($lb("Caption","OnClick"),$lb("&Selecteer alles",$lb(%this,"pmiSelectAllSFsClick"))) + d %this.pmiDeselectAllSFs.SetMultiProperty($lb("Caption","OnClick"),$lb("&Deselecteer alles",$lb(%this,"pmiDeselectAllSFsClick"))) + d %this.pmiSep1.SetMultiProperty($lb("Caption"),$lb("-")) + d %this.pmiInvertSelSFs.SetMultiProperty($lb("Caption","OnClick"),$lb("Selectie &inverteren",$lb(%this,"pmiInvertSelSFsClick"))) + d %this.ilTranslations.SetMultiProperty($lb("Bitmap"),$lb("")) + d %this.pmiTagPreset.SetMultiProperty($lb("Caption"),$lb("Tag preset")) + d %this.pmiTagPreset1.SetMultiProperty($lb("Caption","OnClick"),$lb("",$lb(%this,"pmiTagPreset1Click"))) + d %this.pmiTagPreset2.SetMultiProperty($lb("Caption","OnClick"),$lb("[VH:T]",$lb(%this,"pmiTagPreset2Click"))) + s MApplication.ClientState="Wait" + q +]]> + + + +initvalue:%String +cache +0 +%Library.Status +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal +1 Do + . Do ..rInfoMsgBox(ErrCnt_" vertalingen hebben fouten gegenereerd.",$$$MBICONEXCLAMATION) + + ;End of user code + s Args=$lb(Sender) + q +]]> + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +cache +0 +document +literal + + + + +cache +0 +document +literal + + + + +cache +0 +document +literal +long & long->short + . Set ..aShortToLongLang(ShortLang)=LongLang + . Set ..aLongToShortLang(LongLang)=ShortLang + . Do ..clbLanguages.SetChecked(Index,"True") + + Quit +]]> + + + +ClearList:%Library.Boolean=0 +cache +0 +document +literal +0) Do + . New SourceFN + . Set SourceFN=..clbSourceFiles.Items.GetStrings(0) + . Set ..txtDestDir.Text=$P(SourceFN,"\",1,$L(SourceFN,"\")-1) + + ;Indien bestand(en) in lijst, eerste selecteren + If ..clbSourceFiles.Items.Count>0 Do + . Set ..clbSourceFiles.ItemIndex=0 + + Quit + + ;============================================================================== +dcwcsLoadCurList() + New Loop + For Loop=0:1:..clbSourceFiles.Items.Count-1 Do + . Set aCurList(..clbSourceFiles.Items.GetStrings(Loop))=1 + Quit + + ;------------------------------------------------------------------------------ +dcwcsfIsInList(FileName) + Quit $D(aCurList(FileName)) +]]> + + + +cache +0 +document +literal +0) LanguageFound=0 + + If LanguageFound=-1 Do Quit + . Set ..txtDestFNExample.Text="Geen taal geselecteerd." + + New ShortLanguage,LongLanguage + Set LongLanguage=..clbLanguages.Items.GetStrings(LanguageFound) + Set ShortLanguage=..aLongToShortLang(LongLanguage) + + ;Ok! + Set ..txtDestFNExample.Text=..rGetFileName(SmallFileName,ShortLanguage,LongLanguage,Extension) + + Quit +]]> + + + +CreateDestFiles:%Library.Boolean=0,varDestDir:%Library.String +cache +0 +%Library.Boolean +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal +" + Set ..txtParamSep.Text="|" + Set ..txtEndTag.Text="" + + ;End of user code + s Args=$lb(Sender) + q +]]> + + + +Args:%String +cache +0 +document +literal + + + + +Group,Type,Intern,Language:%Library.String +cache +0 +%Library.List +document +literal + + + + +cache +0 +document +literal + + + + +SourceFN:%Library.String,GoToLineNr:%Library.Integer=-1 +cache +0 +%Library.Boolean +document +literal +Network voor size te kunnen opvragen + New lbStatus,NetworkSourceFileName + Set lbStatus=..rLocalToNetworkPath(SourceFN) + If $LI(lbStatus)=..#lbsError Do Quit 0 + . Do ..AddToEndOfLog("ERROR: "_$LI(lbStatus,2),,$$$clRed) + Set NetworkSourceFileName=$LI(lbStatus,2) + + ;Source Stream controleren op grootte + New SrcStr,sc + Set SrcStr=##class(%FileCharacterStream).%New() + Set sc=SrcStr.LinkToFile(NetworkSourceFileName) + If $$$ISERR(sc) Do Quit 0 + . Do ..rInfoMsgBox($$ParseStatus^vhLib(sc)_".",,$$$clRed) + If (SrcStr.Size>$$$MAXSHORT) Do Quit 0 + . Do ..rInfoMsgBox("Het bestand '"_SourceFN_"' is te groot en kan niet opgemaakt worden.") + + Set ..frmMakeUpSource.pBeginTag=..txtBeginTag.Text + Set ..frmMakeUpSource.pBeginEndTag=..txtBeginEndTag.Text + Set ..frmMakeUpSource.pEndTag=..txtEndTag.Text + Set ..frmMakeUpSource.pParamSep=..txtParamSep.Text + + Quit:('..frmMakeUpSource.rLoadFile(SourceFN,GoToLineNr)) 0 + + Do ..frmMakeUpSource.Form.ShowModal() + + Quit 1 +]]> + + + +SmallFileName,ShortLanguage,LongLanguage,Extension:%Library.String +cache +0 +%Library.String +document +literal + + + + +Msg:%Library.String,Type:%Library.Integer=$$$MBICONINFORMATION +cache +0 +document +literal + + + + +VertalingsType:%Library.String +cache +0 +document +literal + + + + +LocalPath:%Library.String +cache +0 +%Library.List +document +literal + + + + +Program:%Library.String +cache +0 +%Library.Boolean +document +literal + + + + +Group,Type,Intern,Language:%Library.String +cache +0 +%Library.List +document +literal + + + + +Checked:%Library.String +cache +0 +document +literal + + + + +Msg:%Library.String +cache +0 +document +literal + + + + +Show:%Library.Boolean=1 +cache +0 +document +literal + + + + +Args:%String +cache +0 +document +literal + + + + +STRING +H + + + +L + + + +L/O/K + + + +1 + + + +0 + + + +-1 + + + +1 + + + +0 + + + +1 + + + +3 + + + +2 + + + +0 + + + +4 + + + +%Library.CacheSerialState + +"%Library.TMFormClass" + +Address + + +Form + + +pnlClient + + +pnlLeft + + +ListView1 + + +pnlBottom + + +pnlRightClient + + +pnlTop + + +Label1 + + +CheckListBox1 + + +SpeedButton1 + + +splLeft + + +SpeedButton2 + + +clbSourceFiles + + +lblBronBestanden + + +txtDestDir + + +SpeedButton3 + + +SpeedButton4 + + +btnBrowseDestDir + + +btnDelSourceFile + + +btnOpenDestDir + + +btnOpenSourceFile + + +lblDestDir + + +Label10 + + +Label11 + + +Label8 + + +Label9 + + +cbbDestFN + + +Shape1 + + +Label13 + + +lblDestFNExample + + +Bevel1 + + +Bevel2 + + +Label14 + + +btnAddSourceFile + + +lblEg + + +lblInstellingen + + +lblOpmaakDoelbestand + + +lblWildCardE + + +lblWildCardFN + + +lblWildCardL + + +lblWildCardLs + + +lvTranslations + + +shExample + + +Edit1 + + +Label2 + + +Label3 + + +Label4 + + +txtBeginTag + + +txtEndTag + + +clbLanguages + + +lblBeginTag + + +lblEndTag + + +lblLanguages + + +lblScheiding + + +txtParamSep + + +Label12 + + +btnNewGroup + + +cbbTransGroup + + +cbbTransType + + +Bevel3 + + +ProgressBar1 + + +btnExit + + +lblFileTranslator + + +lblFileTranslatorShadow + + +lblMessage + + +btnDelay + + +btnGenerate + + +btnStop + + +pmAddSourceFile + + +pmDelSourceFile + + +pmiAddSourceFile + + +pmiAddSourceFileToEmptyList + + +pmiClearSourceFiles + + +pmiDelCheckedSourceFile + + +pmiDelSelectedSourceFile + + +odSourceFiles + + +pmiAddSrcFileToEmptyList + + +pmOpenSourceFile + + +pmiOpenSrcFileEdit + + +pmiOpenSrcFileExpl + + +pmiOpenSrcFileWith + + +pmiOpenSrcFileProg + + +pmiOpenSrcFileProgSel + + +frmSelectDir + + +MenuItem1 + + +MenuItem2 + + +btnProcess + + +pmProcess + + +reOutput + + +splMid + + +chkConfirmOverwriteDest + + +pmiProcessSource + + +pmiProcessSrcGenDest + + +pbProgress + + +UserStopped + + +LastProgram + + +btnNewDestDir + + +pmSrcFileOptions + + +pmiDeselectAllSFs + + +pmiSelectAllSFs + + +pmiInvertSelSFs + + +pmiSep1 + + +frmDetailForm + + +frmDetailLinkForm + + +pmiOpenSrcFileEditTP + + +pmiSep2 + + +pmiSep3 + + +pSelectProgDir + + +pSrcFileDir + + +Bevel4 + + +Button1 + + +frmMakeUpSource + + +pmiFormatSrc + + +pmiSep4 + + +chkShowTransItems + + +ilTranslations + + +chkOpenDestFiles + + +pFilterBrowseSource + + +pFilterOpenSource + + +txtDestFNExample + + +chkVertalingPlus + + +chkReplaceDestFNStr + + +txtReplaceDestFNStr + + +txtReplaceDestFNStrInto + + +lblReplaceDestFNStrMid + + +txtBeginEndTag + + +pmSettings + + +pmiTagPreset + + +pmiTagPreset1 + + +pmiTagPreset2 + + +chkLangFromTag + + + + +