|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Any efficient way to lock text that’s always written in a certain format?
I have hundreds of RTFs in which regular text is embedded within programing instructions. The programming texts are consistently written in gray font. These files are being sent for translation and we need to lock all of those programming texts.
I would greatly appreciate any advice on the best way to proceed. Thank you! |
#2
|
||||
|
||||
Locking content methods in Word are only relevant if the translators are using Microsoft Word as the tool to do the translation.
If they are translation professionals, they are more likely to be using some other tool which is better suited to the task. The fact that you are asking about RTF files also implies that they aren't using Microsoft Word. Perhaps you need to do some investigation on the tool they are using and find out what they suggest as a way to avoid requesting translations of specific styles.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Thank you for your reply.
The files to be translated will be finally saved as, and handled in, Word format. Because of the translation memory that will be used, to get any matches with previous translations it is necessary to have those programming texts locked. That's essentially the problem, otherwise we could simply, for instance, change the gray programming text to hidden format but then we would loose essentially all of the otherwise 100% matches in the translation memory. |
#4
|
||||
|
||||
As I said, the files need to be in Word format and stay in Word format if you want to protect anything.
You can do some experiments with grouping content you want to lock by going to Developer>Group>Group. However I don't know whether that is supported if the file is saved in RTF. You might also put the content into a content control and change the properties of that CC to lock it. Again, i dont know whether this is preserved in RTF. I suspect neither option is preserved in the Translation tool but it is worth a try.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
|||
|
|||
Quote:
Does the programming text need to be editable text? If not, replace it with screenshots of that text. That way, you have an image rather than text. If necessary, save a backup with the actual text. |
#6
|
|||
|
|||
Thank you for the replies.
We can forget about the RTF issues. All of the files will be ultimately in Word format. Thank you, Guessed; I'll try the Grouping suggestion. Charles, the programming text must be locked, read-only. I don’t think Images would work because, as I mentioned before, the Translation Memory being used requires that the programming text must be Locked. |
#7
|
|||
|
|||
Hi again.
I can see that, in the Developer tab, by selecting a string of that programming text, selecting “Text Content Control” and then Properties, I have the option to select “Contents cannot be edited”. That seems to do it. The problem is that the gray font programming text appears all over each file and I have about 2000 files like those. I was thinking about a Macro that would allow me to select all that gray font text in each file and then lock it in the way I described. Would that be feasible? |
#8
|
||||
|
||||
Before the effort to code this is done, you need to test whether a locked CC actually does what your translators need. As I said, locking stuff in Word is easy but that doesn't mean it will round-trip to your translators and come back the way you want.
Assuming the CC or group is a valid method, the next problem is how does the macro determine what is grey. In some places it might be RGB(150, 150,150), in others it might be RGB(149,150,150) etc. The macro would have to be told exactly what RGB numbers it is looking for. If the 'grey' text has been applied by something consistent eg a paragraph or character style then it would be a piece of cake to code.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#9
|
|||
|
|||
Quote:
The only way you need locked text is if someone is going to copy it as text and paste elsewhere. I am not arguing, just pointing this out. I do not know your translation protocol. Personally, I would hate a bunch of images. Even if you do not have a reliable macro to find all of your text that you want locked, you would be able to have a macro that would do the placement in a locked content control easily. That could be attached to a keyboard shortcut. Not as easy as something you just run once, but still an improvement. Again, make sure that the locked content control will meet your needs before you spend time on macros to create them. If this works, it would be a lot less labor intensive than making and importing image files. |
#10
|
|||
|
|||
Hi again.
I really appreciate the feedback from both of you. Thank you! I did a little testing. To show what I have, I'm attaching 2 files. “Old file” is one of the files that were submitted to us last year with the programming text already locked. “New file” is one of the new files provided without any locking. Using “Rich Text Content Control” and then “Properties” and “Contents cannot be edited”, I manually locked the programming text to do a little testing with the translation application (Trados Studio) being used. As expected, Trados Studio showed the locked segments as tags (with the tag ID “<contentcontrol type=”Text” locked=”True”/>”). However, even though the translation memory (populated with files like “Old file”) shows the same tag ID, those “old” tags don't exactly coincide with the “new” tags and hence the needed matching with the translation memory doesn't occur. I notice that the locked segments in the “New file” appear boxed, which doesn't happen in the “Old file”. I don’t know if that's part of the explanation for the tag's discrepancy. I believe that this is the right route but cannot figure out this last “tag” issue. Thank you in advance for any advice you may give me. |
#11
|
||||
|
||||
The old file appears to be using the Grouping method of creating a Content Control whereas your new file is adding a different CC type. Both are content controls but the different type may be relevant. You can hide the box around the regular CCs by changing the Show As setting in the CC property dialog but you really should be using the Group command to tag the areas since that matches the Old file's method.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#12
|
|||
|
|||
Thank you, Guess!
I truly appreciate it. As you surely may have guessed. I'm a novice. I'll try to do what you mention. I'll let you know. Thanks again! |
#13
|
||||
|
||||
You don't need to be a novice to be confused by what you are trying to achieve. This is pretty advanced stuff and less than 5% of Word users would have any idea on what we are talking about.
I've been working in a vacuum somewhat because I have no knowledge of how Trados interfaces with the Word documents but now I've seen the old file I can make much better assumptions about how you might game the system and code a solution to lock those parts of the file. If you used the New file but removed each of the CCs that you added in your testing (right click and remove CC) then the following macro would group all the grey areas Code:
Sub GroupTags() Dim aRng As Range Set aRng = ActiveDocument.Range(0, 0) With aRng.Find .ClearFormatting .Font.Color = wdColorGray50 .Replacement.ClearFormatting .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False Do While .Execute aRng.ContentControls.Add (wdContentControlGroup) Loop End With End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#14
|
|||
|
|||
Andrew, thank you so very much!
You are too kind. I'm away today because of the Thanksgiving Holiday here at the US. Looking forward (immensely) to try it. I'll let you know. Thanks again! |
#15
|
|||
|
|||
Hi, Andrew.
I have a question: I'm not quite sure about what am I supposed to do on the file after running the Macro. Could you please let me know? (Just trying to be proactive before my return tomorrow morning). Thank you in advance! |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Save as .docx without content controls (just the text that was written in them) | vitesse | Word VBA | 6 | 08-12-2022 02:01 AM |
How do I lock an editable text box header and stop it moving with the rest of the main body text? | thegaffa | Word | 6 | 09-28-2018 09:21 AM |
Most efficient way to store numerous charts? | RAB | PowerPoint | 0 | 07-13-2015 07:17 AM |
Lock Text In a Document | la_gillespie25 | Word | 4 | 05-15-2013 07:09 AM |
Animation: text appears as if written by pen | ionas.iona | PowerPoint | 0 | 03-31-2011 05:23 PM |