Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits) (+1)

Alternative for those with just Office and similar programs:

  • In a text editor like VS Code or Notepad++, that supports Search & Replace with regular expressions, look for the pattern ^(t\[\d+]\s+=)\s+(".*")\s+(--) and replace it with $1\t$2\t$3.
  • Delete all lines at the start of the file that start with -- (i.e. all the comment lines).
  • Open/import the file in your favorite spreadsheet editor (like Excel) and use Tab Separated Values (TSV) or TSV File as the file format.
  • You should see the translation in the second column.
  • No need to convert anything back, the file should run just fine.

Note this might screw with quotes in your text, so you should double-check them in a regular text editor once you’re done.

(+2)

Hi! Could you please point out where I went wrong?
The text editor didn't find any matches for the pattern ^(t[\d+]\s+=\s+")(.*)("\s+--), so I changed it to ^(t.[\d]+.\s+=\s+")(.*)("\s+--) which seemed to work (I by no means know what I'm doing when it comes to regex, so the issue probably lies here). I replaced the matches with $1\t$2\t$3 and converted the file to TSV.
However, when I opened it as a TSV in Excel, all the lines were in one long row (see the screenshot).
How do I fix this? Is there another regex pattern I could try?

Oops! Sorry, I wrote this from memory and actually didn’t try it! And it seems like it’s not interpreted the way I expected!

I have a tested method now and will update the instructions above in a moment.

(1 edit) (+1)

Updated the original post. The old regular expression didn’t work since the editor ate a \ at the start and \[t] means something different than [t].

You can do this replacement in two steps without regular expressions:

  • Replace all = " with =<tab>".
  • Replace all " --" with "<tab>--".

Then remove the lines at the start just like I mentioned above and it should work. (Does so for me in Excel.)

(+1)

The new regular expression still didn't work for me, but the two-step method did! Thank you very much for your help!