I'm not sure where to begin.
I have a tedious task to perform across a huge number of files, let me describe the scenario:
1. I open a template file that contains mainly HTML and some template syntax (Fluid in this case, for TYPO3)
2. I need to find any hard-coded content output, like "Submit issue" and replace it with a language placeholder, in this case something like:
<f:translate key="submit_issue" />
3. Now the string that was formerly at the place of the new `<f:translate>` needs to be inserted into a XML language file, like `
This would need to both contain the placeholder previously inserted, as well as the old text at that place.
So the problem is two-fold:
1. The action is performed across two files, the HTML source files (many many files) and a (known, singular) XML file
2. The action needs to get a unique placeholder, that usually needs to be entered manually and cannot be derived.
How I imagine it could work for me:
- Select the static HTML string
- Hit a button/key
- A popup lets me enter the unique string like "submit_issue"
- The selected portion gets cut, replaced by a fixed replacement text plus the entered unique string placeholder
- Then the editor would automatically tab out to a specified file (the XML file), go to the end of the file and add a fixed replacement text, PLUS the unique string placeholder (as key) PLUS the clipboard content in its value.
Any ideas how I could get that interactive part solved? Or am I doomed to perform this manually? Could I at least get the "tabbing to the fixed file, inserting the cut text, create a auto-incremented value like string1, string2, string3.. as string placeholders in there, then tab back, and re-use that auto-incremented value back"-part of this to work with macros (that I've never used before)?
It seems macros don't support the dynamic part, and live templates don't support switching between files or executing recorded functionality... and when I use a macro to record opening another file by entering the filename it replaces "?" instead of "_" and "-" instead of "/", so it won't find a file when playbacked. Also the typing is suuuuuper slow and painful to watch...
Thanks for any suggestions. :-)