{"ygPerms":{"resourceCapabilityList":[{"resourceType":"GROUP","capabilities":[{"name":"UPDATE"},{"name":"READ"},{"name":"WELCOME_MSG"},{"name":"PENDING_COUNT"},{"name":"ACTIVITY_LOGS"}]},{"resourceType":"PHOTO","capabilities":[{"name":"READ"},{"name":"READ"},{"name":"UPLOAD"},{"name":"UPDATE"},{"name":"DELETE"},{"name":"COPY"},{"name":"MOVE"},{"name":"APPROVE"},{"name":"UPLOADTEMP"},{"name":"GROUPCOVER"}]},{"resourceType":"FILE","capabilities":[{"name":"READ"},{"name":"CREATE"},{"name":"UPDATE"},{"name":"DELETE"},{"name":"AUTO_SEND"}]},{"resourceType":"MEMBER","capabilities":[{"name":"READ"},{"name":"READ"},{"name":"EDIT_MODERATOR"},{"name":"DELETE"},{"name":"CREATE"},{"name":"UPDATE"},{"name":"BAN"}]},{"resourceType":"LINK","capabilities":[{"name":"READ"},{"name":"CREATE"},{"name":"UPDATE"},{"name":"DELETE"},{"name":"MOVE_LINK"}]},{"resourceType":"CALENDAR","capabilities":[{"name":"READ"}]},{"resourceType":"DATABASE","capabilities":[{"name":"READ_DATA"},{"name":"CREATE"},{"name":"READ"}]},{"resourceType":"POLL","capabilities":[{"name":"READ"},{"name":"VOTE"},{"name":"UPDATE"},{"name":"CREATE"},{"name":"DELETE"},{"name":"CLOSE"}]},{"resourceType":"MESSAGE","capabilities":[{"name":"CREATE"},{"name":"READ"},{"name":"DELETE"}]},{"resourceType":"PENDING_MESSAGE","capabilities":[{"name":"READ"},{"name":"UPDATE"},{"name":"DELETE"}]},{"resourceType":"ATTACHMENTS","capabilities":[{"name":"READ"},{"name":"DELETE"}]},{"resourceType":"PHOTOMATIC_ALBUMS","capabilities":[{"name":"READ"},{"name":"UPLOAD"}]},{"resourceType":"MEMBERSHIP_TYPE","capabilities":[{"name":"READ"},{"name":"CREATE"},{"name":"DELETE"},{"name":"UPDATE"}]},{"resourceType":"POST","capabilities":[{"name":"DELETE"},{"name":"UPDATE"},{"name":"CREATE"},{"name":"READ"}]},{"resourceType":"PIN","capabilities":[{"name":"DELETE"},{"name":"UPDATE"},{"name":"CREATE"},{"name":"READ"}]}],"modStatus":"MODERATOR","subStatus":"NORMAL","groupUrl":"groups.yahoo.com","intlCode":"us"},"comscore":"pageview_candidate","ygData":{"userId":261302706,"authorName":"anthony baldwin","from":"anthony baldwin &lt;anthony@baldwinlinguas.com&gt;","profile":"photodharma","replyTo":"LIST","senderId":"opASkIstXpdVn9Hz_YT2rHcFT30P-PPLgr6zBwuL79qtOz0sveYyd8-8-Hst8mbdOAnEjtwxrnQDUd2nGClImzTg71DYnJYUy0JTydXaFAGxvoI","spamInfo":{"isSpam":false,"reason":"12"},"subject":"Re: [OmT] how to work with xml?","postDate":"1208617228","msgId":10332,"canDelete":true,"contentTrasformed":false,"systemMessage":false,"headers":{"messageIdInHeader":"PDQ4MEEwOTBDLjkwMDAyMDJAYmFsZHdpbmxpbmd1YXMuY29tPg==","inReplyToHeader":"PEUxRTM2NDlBLTI0N0QtNEU3Ri1COUZELTZBRURFNDA1RUNEQkBteDYudGlraS5uZS5qcD4=","referencesHeader":"PGZ1YmptMitkZG45QGVHcm91cHMuY29tPiA8NkM1QjEwMDAtQUQxNi00M0JFLUFCNEYtNUJGQ0Q4MzI2Q0M2QG14Ni50aWtpLm5lLmpwPiA8NDgwOUVDQzYuNDA3MDMwMUBiYWxkd2lubGluZ3Vhcy5jb20+IDxBRjgwRTVEMS1GRDVELTQyNzEtOTgxMS03MEU3MTg3RThGMTlAbXg2LnRpa2kubmUuanA+IDw0ODA5RjVGQS45MDkwNTA3QGJhbGR3aW5saW5ndWFzLmNvbT4gPDQ4MDlGODUyLjYwMTA0MDlAbWFyY3ByaW9yLmRlPiA8RTFFMzY0OUEtMjQ3RC00RTdGLUI5RkQtNkFFREU0MDVFQ0RCQG14Ni50aWtpLm5lLmpwPg=="},"prevInTopic":10331,"nextInTopic":10333,"prevInTime":10331,"nextInTime":10333,"topicId":10309,"numMessagesInTopic":22,"msgSnippet":"I ll go get my coat in a minute, but, couldn t something like this*  be used in OmegaT (after all, it is GPL code) to give us support for ttx? (yes, I m","rawEmail":"Return-Path: &lt;anthony@baldwinlinguas.com&gt;\r\nX-Sender: anthony@baldwinlinguas.com\r\nX-Apparently-To: omegat@yahoogroups.com\r\nX-Received: (qmail 44693 invoked from network); 19 Apr 2008 15:00:35 -0000\r\nX-Received: from unknown (66.218.67.95)\n  by m43.grp.scd.yahoo.com with QMQP; 19 Apr 2008 15:00:35 -0000\r\nX-Received: from unknown (HELO QMTA08.westchester.pa.mail.comcast.net) (76.96.62.80)\n  by mta16.grp.scd.yahoo.com with SMTP; 19 Apr 2008 15:00:35 -0000\r\nX-Received: from OMTA10.westchester.pa.mail.comcast.net ([76.96.62.28])\n\tby QMTA08.westchester.pa.mail.comcast.net with comcast\n\tid FQLV1Z0020cZkys5808p00; Sat, 19 Apr 2008 14:59:15 +0000\r\nX-Received: from [192.168.1.103] ([71.234.192.212])\n\tby OMTA10.westchester.pa.mail.comcast.net with comcast\n\tid FT0U1Z00C4bR3XK3W00000; Sat, 19 Apr 2008 15:00:29 +0000\r\nX-Authority-Analysis: v=1.0 c=1 a=mDV3o1hIAAAA:8 a=o8meOYmdAAAA:8\n a=jLfpXq6zAAAA:8 a=hoKdFVL9AAAA:8 a=Bc7hqjIhGGCTCcn4z0MA:9\n a=Wo85z6VNBBg2FfXAdO4A:7 a=HxFqG3RVDHaA_p7Q6A9oYPYDkBkA:4 a=CWfAmLVWKswA:10\r\nMessage-ID: &lt;480A090C.9000202@baldwinlinguas.com&gt;\r\nDate: Sat, 19 Apr 2008 11:00:28 -0400\r\nUser-Agent: Thunderbird 2.0.0.12 (X11/20080213)\r\nMIME-Version: 1.0\r\nTo: OmegaT@yahoogroups.com\r\nReferences: &lt;fubjm2+ddn9@eGroups.com&gt; &lt;6C5B1000-AD16-43BE-AB4F-5BFCD8326CC6@mx6.tiki.ne.jp&gt; &lt;4809ECC6.4070301@baldwinlinguas.com&gt; &lt;AF80E5D1-FD5D-4271-9811-70E7187E8F19@mx6.tiki.ne.jp&gt; &lt;4809F5FA.9090507@baldwinlinguas.com&gt; &lt;4809F852.6010409@marcprior.de&gt; &lt;E1E3649A-247D-4E7F-B9FD-6AEDE405ECDB@mx6.tiki.ne.jp&gt;\r\nIn-Reply-To: &lt;E1E3649A-247D-4E7F-B9FD-6AEDE405ECDB@mx6.tiki.ne.jp&gt;\r\nContent-Type: text/plain; charset=ISO-8859-1; format=flowed\r\nContent-Transfer-Encoding: 7bit\r\nX-Originating-IP: 76.96.62.80\r\nX-eGroups-Msg-Info: 1:12:0:0:0\r\nFrom: anthony baldwin &lt;anthony@baldwinlinguas.com&gt;\r\nSubject: Re: [OmT] how to work with xml?\r\nX-Yahoo-Group-Post: member; u=261302706; y=EYTOIFG7-uRhvV76_4_xyZBpbnkghDm3tNlVcampv2bDG-XzIIc\r\nX-Yahoo-Profile: photodharma\r\n\r\nI&#39;ll go get my coat in a minute, but, couldn&#39;t something like this*  be \nused in OmegaT (after all, it is GPL code) to give us support for ttx?\n(yes, I &#39;m digging around the Okapi cvs....)\n\n*\n/*===========================================================================*/\n     2 /* Copyright (C) 2007 ENLASO Corporation, Okapi Development Team \n             */\n     3 \n/*---------------------------------------------------------------------------*/\n     4 /* This library is free software; you can redistribute it and/or \nmodify it   */\n     5 /* under the terms of the GNU Lesser General Public License as \npublished by  */\n     6 /* the Free Software Foundation; either version 2.1 of the \nLicense, or (at   */\n     7 /* your option) any later version. \n             */\n     8 /* \n             */\n     9 /* This library is distributed in the hope that it will be \nuseful, but       */\n    10 /* WITHOUT ANY WARRANTY; without even the implied warranty of \n             */\n    11 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \nGNU Lesser   */\n    12 /* General Public License for more details. \n             */\n    13 /* \n             */\n    14 /* You should have received a copy of the GNU Lesser General \nPublic License  */\n    15 /* along with this library; if not, write to the Free Software \nFoundation,   */\n    16 /* Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA \n             */\n    17 /* \n             */\n    18 /* See also the full LGPL text here: \nhttp://www.gnu.org/copyleft/lesser.html */\n    19 \n/*===========================================================================*/\n    20\n    21 using System;\n    22 using System.Runtime.InteropServices;\n    23 using System.IO;\n    24 using System.Text;\n    25 using System.Windows.Forms;\n    26 using System.Xml;\n    27 using System.Collections.Generic;\n    28 using Okapi.Library.Base;\n    29 using Okapi.Library.Utility;\n    30 using Okapi.Format.TTX;\n    31 using Okapi.Format.TMX;\n    32 using Okapi.Library.Filter;\n    33\n    34\n    35 namespace Okapi.Utilities.Set04\n    36 {\n    37 \t[ComVisible(false)]\n    38 \tinternal class TTXToTMXOptions\n    39 \t{\n    40 \t\tpublic string          m_sPath;\n    41 \t\tpublic bool            m_bSingleOutput;\n    42 \t\tpublic bool            m_bAppend;\n    43 \t\tpublic bool            m_bUseBPT;\n    44 \t\tpublic bool            m_bUseTTXLangs;\n    45 \t\tpublic List&lt;string&gt;    m_aAttrNames;\n    46 \t\tpublic List&lt;string&gt;    m_aAttrValues;\n    47 \t\tpublic bool            m_bForceDatatype;\n    48 \t\tpublic string          m_sDatatype;\n    49 \t\tpublic string          m_sOTmf;\n    50\n    51\n    52 \t\tpublic TTXToTMXOptions ()\n    53 \t\t{\n    54 \t\t\tm_aAttrNames = new List&lt;string&gt;();\n    55 \t\t\tm_aAttrValues = new List&lt;string&gt;();\n    56 \t\t}\n    57 \t}\n    58\n    59\n    60 \t[ComVisible(false)]\n    61 \tinternal class TTXToTMX : BaseUtility\n    62 \t{\n    63 \t\tprivate TTXToTMXOptions     m_Opt;\n    64 \t\tprivate Format.TTX.Filter   m_Flt = null;\n    65 \t\tprivate TMXWriter           m_TMXW = null;\n    66 \t\tprivate bool                m_bNeedSingleOutput;\n    67 \t\tprivate int                 m_nTotalItems;\n    68 \t\tprivate int                 m_nTotalExported;\n    69 \t\tprivate int                 m_nTotalUnTranslated;\n    70\n    71\n    72 \t\tpublic TTXToTMX ()\n    73 \t\t{\n    74 \t\t\tm_Opt = new TTXToTMXOptions();\n    75 \t\t\tSetDefaultOptions(); // Make sure we have the defaults to start\n    76 \t\t}\n    77\n    78\n    79 \t\tpublic override bool HasOptions ()\n    80 \t\t{\n    81 \t\t\treturn true;\n    82 \t\t}\n    83\n    84\n    85 \t\tpublic override string GetOptions ()\n    86 \t\t{\n    87 \t\t\tFieldsString Tmp = new FieldsString();\n    88\n    89 \t\t\tTmp.Add(&quot;path&quot;, m_Opt.m_sPath);\n    90 \t\t\tTmp.Add(&quot;singleoutput&quot;, m_Opt.m_bSingleOutput);\n    91 \t\t\tTmp.Add(&quot;append&quot;, m_Opt.m_bAppend);\n    92 \t\t\tTmp.Add(&quot;usebpt&quot;, m_Opt.m_bUseBPT);\n    93 \t\t\tTmp.Add(&quot;usettxlangs&quot;, m_Opt.m_bUseTTXLangs);\n    94 \t\t\tTmp.Add(&quot;forcedatatype&quot;, m_Opt.m_bForceDatatype);\n    95 \t\t\tTmp.Add(&quot;datatype&quot;, m_Opt.m_sDatatype);\n    96 \t\t\tTmp.Add(&quot;otmf&quot;, m_Opt.m_sOTmf);\n    97\n    98 \t\t\tTmp.Add(&quot;nbattr&quot;, m_Opt.m_aAttrNames.Count);\n    99 \t\t\tfor ( int i=0; i&lt;m_Opt.m_aAttrNames.Count; i++ )\n   100 \t\t\t{\n   101 \t\t\t\tTmp.Add(String.Format(&quot;attrname{0}&quot;, i), m_Opt.m_aAttrNames[i]);\n   102 \t\t\t\tTmp.Add(String.Format(&quot;attrval{0}&quot;, i), m_Opt.m_aAttrValues[i]);\n   103 \t\t\t}\n   104\n   105 \t\t\treturn Tmp.ToString();\n   106 \t\t}\n   107\n   108\n   109 \t\tpublic override void SetOptions (string p_sValue)\n   110 \t\t{\n   111 \t\t\tFieldsString Tmp = new FieldsString(p_sValue);\n   112\n   113 \t\t\tm_Opt.m_sPath = Tmp.Get(&quot;path&quot;, &quot;Output.tmx&quot;);\n   114 \t\t\tm_Opt.m_bSingleOutput = Tmp.Get(&quot;singleoutput&quot;, true);\n   115 \t\t\tm_Opt.m_bAppend = Tmp.Get(&quot;append&quot;, false);\n   116 \t\t\tm_Opt.m_bUseBPT = Tmp.Get(&quot;usebpt&quot;, true);\n   117 \t\t\tm_Opt.m_bUseTTXLangs = Tmp.Get(&quot;usettxlangs&quot;, true);\n   118 \t\t\tm_Opt.m_bForceDatatype = Tmp.Get(&quot;forcedatatype&quot;, false);\n   119 \t\t\tm_Opt.m_sDatatype = Tmp.Get(&quot;datatype&quot;, String.Empty);\n   120 \t\t\tm_Opt.m_sOTmf = Tmp.Get(&quot;otmf&quot;, &quot;TTXFile&quot;);\n   121\n   122 \t\t\tm_Opt.m_aAttrNames.Clear();\n   123 \t\t\tm_Opt.m_aAttrValues.Clear();\n   124 \t\t\tint nNb = Tmp.Get(&quot;nbattr&quot;, 0);\n   125 \t\t\tstring sTmp;\n   126 \t\t\tfor ( int i=0; i&lt;=nNb; i++ )\n   127 \t\t\t{\n   128 \t\t\t\tsTmp = Tmp.Get(String.Format(&quot;attrname{0}&quot;, i), null);\n   129 \t\t\t\tif ( sTmp != null )\n   130 \t\t\t\t{\n   131 \t\t\t\t\tm_Opt.m_aAttrNames.Add(sTmp);\n   132 \t\t\t\t\tm_Opt.m_aAttrValues.Add(Tmp.Get(String.Format(&quot;attrval{0}&quot;, \ni), String.Empty));\n   133 \t\t\t\t}\n   134 \t\t\t}\n   135 \t\t}\n   136\n   137\n   138 \t\tpublic override string GetOption (string p_sName)\n   139 \t\t{\n   140 \t\t\t//TODO: Implement better handling of GetOption()\n   141 \t\t\tFieldsString FS = new FieldsString(GetOptions());\n   142 \t\t\treturn FS.Get(p_sName, null);\n   143 \t\t}\n   144\n   145\n   146 \t\tpublic override void SetOption (string p_sName,\n   147 \t\t\tstring p_sValue)\n   148 \t\t{\n   149 \t\t\t//TODO: Implement better handling of GetOption()\n   150 \t\t\tFieldsString FS = new FieldsString(GetOptions());\n   151 \t\t\tFS.Set(p_sName, p_sValue);\n   152 \t\t\tSetOptions(FS.ToString());\n   153 \t\t}\n   154\n   155\n   156 \t\tpublic override bool EditOptions (bool p_bPriorExecution)\n   157 \t\t{\n   158 \t\t\tusing ( TTXToTMXForm Dlg = new TTXToTMXForm() )\n   159 \t\t\t{\n   160 \t\t\t   Dlg.SetData(p_bPriorExecution, m_RM, m_Opt);\n   161 \t\t\t   if ( Dlg.ShowDialog() != DialogResult.OK )\n   162 \t\t\t      return false;\n   163 \t\t\t   Dlg.GetData(m_Opt);\n   164 \t\t\t}\n   165\n   166 \t\t\treturn true;\n   167 \t\t}\n   168\n   169\n   170 \t\tpublic override int GetInputListCount ()\n   171 \t\t{\n   172 \t\t\t// Need the first list\n   173 \t\t\treturn 1;\n   174 \t\t}\n   175\n   176\n   177 \t\tpublic override bool NeedRoot (int p_nInputList)\n   178 \t\t{\n   179 \t\t\t// No root needed\n   180 \t\t\treturn false;\n   181 \t\t}\n   182\n   183\n   184 \t\tpublic override int GetInputListType (int p_nInputList)\n   185 \t\t{\n   186 \t\t\treturn 0;\n   187 \t\t}\n   188\n   189\n   190 \t\tpublic override bool NeedOutput ()\n   191 \t\t{\n   192 \t\t\treturn false;\n   193 \t\t}\n   194\n   195\n   196 \t\tpublic override bool NeedOutputEncoding ()\n   197 \t\t{\n   198 \t\t\treturn false;\n   199 \t\t}\n   200\n   201\n   202 \t\tpublic override bool StartProcess ()\n   203 \t\t{\n   204 \t\t\ttry\n   205 \t\t\t{\n   206 \t\t\t\tif ( !base.StartProcess () ) return false;\n   207\n   208 \t\t\t\tm_FA.Log.Message(m_RM.GetString(&quot;UTIL_ttxtotmx&quot;));\n   209 \t\t\t\tm_FA.Log.NewLine();\n   210\n   211 \t\t\t\tm_Flt = new Okapi.Format.TTX.Filter();\n   212 \t\t\t\tm_Flt.Initialize(m_FA.Log);\n   213\n   214 \t\t\t\tm_TMXW = new TMXWriter();\n   215 \t\t\t\tm_bNeedSingleOutput = m_Opt.m_bSingleOutput;\n   216\n   217 \t\t\t\tm_nTotalItems = 0;\n   218 \t\t\t\tm_nTotalExported = 0;\n   219 \t\t\t\tm_nTotalUnTranslated = 0;\n   220 \t\t\t}\n   221 \t\t\tcatch ( Exception E )\n   222 \t\t\t{\n   223 \t\t\t\tm_FA.Log.Error(E.Message + &quot;&#92;n&quot; + E.StackTrace);\n   224 \t\t\t\treturn false;\n   225 \t\t\t}\n   226\n   227 \t\t\treturn true;\n   228 \t\t}\n   229\n   230\n   231 \t\tpublic override bool ProcessFile (InputFileItem p_Input1,\n   232 \t\t\tInputFileItem p_Input2,\n   233 \t\t\tInputFileItem p_Input3,\n   234 \t\t\tOutputFileItem p_Output)\n   235 \t\t{\n   236 \t\t\tbool                bRes = true;\n   237 \t\t\tIFilterItem         SourceFI;\n   238 \t\t\tIFilterItem         TargetFI;\n   239 \t\t\tint                 nRes;\n   240 \t\t\tstring[]            aFields;\n   241 \t\t\tint                 nCount = 0;\n   242 \t\t\tint                 nTranslatedCount = 0;\n   243 \t\t\tint                 nUnTranslatedCount = 0;\n   244\n   245 \t\t\ttry\n   246 \t\t\t{\n   247 \t\t\t\tm_FA.Log.Message(m_RM.GetString(&quot;LOG_INPUT&quot;) + p_Input1.Path);\n   248 \t\t\t\tm_Flt.OpenInputFile(p_Input1.Path, m_sInputLanguage, \np_Input1.Encoding);\n   249 \t\t\t\tm_Flt.UseBPT = m_Opt.m_bUseBPT;\n   250\n   251 \t\t\t\t// Open the output file if needed\n   252 \t\t\t\tif ( !m_TMXW.IsOpen() )\n   253 \t\t\t\t{\n   254 \t\t\t\t\tif ( m_bNeedSingleOutput )\n   255 \t\t\t\t\t{\n   256 \t\t\t\t\t\tif ( m_Opt.m_bAppend )\n   257 \t\t\t\t\t\t{\n   258 \t\t\t\t\t\t\tm_TMXW.OpenToAppend(m_Opt.m_sPath, false);\n   259 \t\t\t\t\t\t}\n   260 \t\t\t\t\t\telse\n   261 \t\t\t\t\t\t{\n   262 \t\t\t\t\t\t\tm_TMXW.Create(m_Opt.m_sPath, false);\n   263 \t\t\t\t\t\t}\n   264 \t\t\t\t\t}\n   265 \t\t\t\t\telse\n   266 \t\t\t\t\t{\n   267 \t\t\t\t\t\tstring sPath = Path.ChangeExtension(p_Input1.Path, &quot;.tmx&quot;);\n   268 \t\t\t\t\t\tm_TMXW.Create(sPath, false);\n   269 \t\t\t\t\t}\n   270 \t\t\t\t}\n   271 \t\t\t\taFields = System.Reflection.Assembly.GetExecutingAssembly(\n   272 \t\t\t\t\t).ToString().Split(&quot;,=&quot;.ToCharArray());\n   273\n   274 \t\t\t\t// Process the input file\n   275 \t\t\t\tbool bFirstDone = false;\n   276\n   277 \t\t\t\tdo\n   278 \t\t\t\t{\n   279 \t\t\t\t\tnRes = m_Flt.ReadItem();\n   280 \t\t\t\t\tSourceFI = m_Flt.GetItem();\n   281 \t\t\t\t\tswitch ( nRes )\n   282 \t\t\t\t\t{\n   283 \t\t\t\t\t\tcase FilterItemType.TEXT:\n   284 \t\t\t\t\t\t\tif ( !bFirstDone )\n   285 \t\t\t\t\t\t\t{\n   286 \t\t\t\t\t\t\t\tstring sDatatype;\n   287 \t\t\t\t\t\t\t\tif ( m_Opt.m_bForceDatatype ) sDatatype = m_Opt.m_sDatatype;\n   288 \t\t\t\t\t\t\t\telse sDatatype = SourceFI.GetProperty(&quot;DataType&quot;);\n   289 \t\t\t\t\t\t\t\tif ( m_Opt.m_bUseTTXLangs )\n   290 \t\t\t\t\t\t\t\t\tm_TMXW.WriteHeader(aFields[0], aFields[2], &quot;sentence&quot;, \nm_Flt.GetInputLanguage(),\n   291 \t\t\t\t\t\t\t\t\t\tm_Flt.GetOutputLanguage(), sDatatype, m_Opt.m_sOTmf);\n   292 \t\t\t\t\t\t\t\telse\n   293 \t\t\t\t\t\t\t\t\tm_TMXW.WriteHeader(aFields[0], aFields[2], &quot;sentence&quot;, \nm_sInputLanguage,\n   294 \t\t\t\t\t\t\t\t\t\tm_sOutputLanguage, sDatatype, m_Opt.m_sOTmf);\n   295 \t\t\t\t\t\t\t\tbFirstDone = true;\n   296 \t\t\t\t\t\t\t}\n   297 \t\t\t\t\t\t\tnCount++;\n   298 \t\t\t\t\t\t\tif ( SourceFI.IsTranslated() )\n   299 \t\t\t\t\t\t\t{\n   300 \t\t\t\t\t\t\t\tTargetFI = m_Flt.GetTranslatedItem();\n   301 \t\t\t\t\t\t\t\tnTranslatedCount++;\n   302 \t\t\t\t\t\t\t\tif ( m_TMXW != null )\n   303 \t\t\t\t\t\t\t\t{\n   304 \t\t\t\t\t\t\t\t\tm_TMXW.WriteTU(SourceFI, TargetFI, m_Opt.m_aAttrNames, \nm_Opt.m_aAttrValues);\n   305 \t\t\t\t\t\t\t\t}\n   306 \t\t\t\t\t\t\t}\n   307 \t\t\t\t\t\t\telse\n   308 \t\t\t\t\t\t\t{\n   309 \t\t\t\t\t\t\t\tnUnTranslatedCount++;\n   310 \t\t\t\t\t\t\t\tTargetFI = null;\n   311 \t\t\t\t\t\t\t}\n   312 \t\t\t\t\t\t\tbreak;\n   313\n   314 \t\t\t\t\t\tcase FilterItemType.STARTGROUP:\n   315 \t\t\t\t\t\tcase FilterItemType.ENDGROUP:\n   316 \t\t\t\t\t\tcase FilterItemType.BINARY:\n   317 \t\t\t\t\t\tcase FilterItemType.STARTBINARY:\n   318 \t\t\t\t\t\tcase FilterItemType.ENDBINARY:\n   319 \t\t\t\t\t\tcase FilterItemType.ENDINPUT:\n   320 \t\t\t\t\t\tcase FilterItemType.USERCANCEL:\n   321 \t\t\t\t\t\tcase FilterItemType.ERROR:\n   322 \t\t\t\t\t\tcase FilterItemType.BLOCK:\n   323 \t\t\t\t\t\tdefault:\n   324 \t\t\t\t\t\t\t// Do nothing\n   325 \t\t\t\t\t\t\tbreak;\n   326 \t\t\t\t\t}\n   327 \t\t\t\t}\n   328 \t\t\t\twhile ( nRes &gt; FilterItemType.ENDINPUT );\n   329\n   330 \t\t\t\tif ( !bFirstDone )\n   331 \t\t\t\t{\n   332 \t\t\t\t\t// Empty file, but at least we have a valid one\n   333 \t\t\t\t\tm_TMXW.WriteHeader(aFields[0], aFields[2], &quot;sentence&quot;, \nm_sInputLanguage,\n   334 \t\t\t\t\t\tm_sOutputLanguage, &quot;plaintext&quot;, m_Opt.m_sOTmf);\n   335 \t\t\t\t}\n   336\n   337 \t\t\t \nm_FA.Log.Message(String.Format(m_RM.GetString(&quot;TTX2TMX_READ&quot;), nCount));\n   338 \t\t\t\tm_nTotalItems += nCount;\n   339 \t\t\t \nm_FA.Log.Message(String.Format(m_RM.GetString(&quot;TTX2TMX_EXPORTED&quot;), \nnTranslatedCount));\n   340 \t\t\t\tm_nTotalExported += nTranslatedCount;\n   341 \t\t\t \nm_FA.Log.Message(String.Format(m_RM.GetString(&quot;TTX2TMX_NOTTRANSLATED&quot;), \nnUnTranslatedCount));\n   342 \t\t\t\tm_nTotalUnTranslated += nUnTranslatedCount;\n   343\n   344 \t\t\t\tif ( nRes == FilterItemType.ERROR )\n   345 \t\t\t\t{\n   346 \t\t\t\t\tm_FA.Log.Error(m_RM.GetString(&quot;READING_ERROR&quot;));\n   347 \t\t\t\t}\n   348\n   349 \t\t\t}\n   350 \t\t\tcatch ( Exception E )\n   351 \t\t\t{\n   352 \t\t\t\tbRes = false;\n   353 \t\t\t\tm_FA.Log.Error(E.Message + &quot;&#92;n&quot; + E.StackTrace);\n   354 \t\t\t}\n   355 \t\t\tfinally\n   356 \t\t\t{\n   357 \t\t\t\tif ( m_Flt != null ) m_Flt.CloseInput();\n   358 \t\t\t\tif ( !m_bNeedSingleOutput && ( m_TMXW != null )) m_TMXW.Close();\n   359 \t\t\t\tif ( !m_FA.Log.NewLine() ) bRes = false;\n   360\n   361 \t\t\t\t// Set the output folder\n   362 \t\t\t\tif ( m_Opt.m_bSingleOutput )\n   363 \t\t\t\t\tm_sLastOutputFolder = Path.GetDirectoryName(m_Opt.m_sPath);\n   364 \t\t\t\telse\n   365 \t\t\t\t\tm_sLastOutputFolder = Routines.GetCommonRoot(p_Input1.Path, \nm_sLastOutputFolder);\n   366 \t\t\t}\n   367\n   368 \t\t\treturn bRes;\n   369 \t\t}\n   370\n   371\n   372 \t\tpublic override void FinishProcess ()\n   373 \t\t{\n   374 \t\t\tbase.FinishProcess();\n   375 \t\t\tif ( m_bNeedSingleOutput && ( m_TMXW != null )) m_TMXW.Close();\n   376\n   377 \t\t \nm_FA.Log.Message(String.Format(m_RM.GetString(&quot;TTX2TMX_TOTALREAD&quot;), \nm_nTotalItems));\n   378 \t\t \nm_FA.Log.Message(String.Format(m_RM.GetString(&quot;TTX2TMX_TOTALEXPORTED&quot;), \nm_nTotalExported));\n   379 \t\t \nm_FA.Log.Message(String.Format(m_RM.GetString(&quot;TTX2TMX_TOTALNOTTRANSLATED&quot;), \nm_nTotalUnTranslated));\n   380 \t\t\tm_FA.Log.NewLine();\n   381 \t\t}\n   382 \t}\n   383 }\n\n\n\n\n\n&gt; \n\n\n-- \nAnthony Baldwin\n\nhttp://www.BaldwinLinguas.com\nTranslation & Interpreting\n\nhttp://www.TransProCalc.org\nFree translation project mgmt software\n\nhttp://www.LinguasOS.org\nLinux for Translators\n\n\n"}}