VBA can be helpful...
Oct. 22nd, 2013 09:45 pmSo it occurred to me that the easiest way to measure my progress through a file that includes both translation of "new" words and editing of "pretranslated" segments was to create a Word macro that counts the overall number of words left in the document, subtracts the number of words within remaining pretranslated segments, and then does another word count. Whatever is left is the "new" word count and the difference between the first two numbers is the "pretranslated" word count.
The key obstacle would seem to be getting rid of the pretranslated segments, but that's actually something I've learned to do a long time ago, and consists of doing a search-and-replace using Word regular expressions and the fact that pretranslated segments start with the string "{0>" and end with the string "<0}".
The resulting macro works, mostly. One thing I cannot figure out is why sometimes the result shows 0 new words and all of the remaining words to be of the pretranslated category. (When that happens, I just run the macro again, and so far, the strategy has been successful.) Perhaps I need to do a better job initializing variable values (i.e., actually do an initialization) within the macro?
My goal for today was to get 33% of the job past my fingertips by the end of the day. I expected this figure to take the form of two different percentages of new words done and edited words done, where the two are combined by counting two edited words as equivalent to one translated word.
At one point earlier in the day, my progress stood at 27% of new words done and 16% of pretranslated words done, for a composite score of 23% done. At the end of the day, by complete coincidence, I was at 36% for both new words and pretranslated words, and I was gratified to see that my composite score was also 36%. This gives me a minuscule head start on tomorrow, but hey, minuscule is better than nothing.
Looking ahead to tomorrow's slug of this job, I found a place where I will be 83% of the way through the new words and 41% of the way through the pretranslated stuff, which will put me at 68% of the way through the job overall.
Cheers...
The key obstacle would seem to be getting rid of the pretranslated segments, but that's actually something I've learned to do a long time ago, and consists of doing a search-and-replace using Word regular expressions and the fact that pretranslated segments start with the string "{0>" and end with the string "<0}".
The resulting macro works, mostly. One thing I cannot figure out is why sometimes the result shows 0 new words and all of the remaining words to be of the pretranslated category. (When that happens, I just run the macro again, and so far, the strategy has been successful.) Perhaps I need to do a better job initializing variable values (i.e., actually do an initialization) within the macro?
My goal for today was to get 33% of the job past my fingertips by the end of the day. I expected this figure to take the form of two different percentages of new words done and edited words done, where the two are combined by counting two edited words as equivalent to one translated word.
At one point earlier in the day, my progress stood at 27% of new words done and 16% of pretranslated words done, for a composite score of 23% done. At the end of the day, by complete coincidence, I was at 36% for both new words and pretranslated words, and I was gratified to see that my composite score was also 36%. This gives me a minuscule head start on tomorrow, but hey, minuscule is better than nothing.
Looking ahead to tomorrow's slug of this job, I found a place where I will be 83% of the way through the new words and 41% of the way through the pretranslated stuff, which will put me at 68% of the way through the job overall.
Cheers...