I’m trying to learn Japanese, and the spaced repetition software Anki
is one of my favourite tools. I usually use premade decks for learning
Japanese (Core 2k, etc), but when I discovered the Chrono Trigger
Retranslation Project
a few days ago, I just had to make a deck.

I downloaded the spreadsheet translation, and exported it as a CSV,
using | as column delimiter, and no string delimiter. Since the
sentences are split over several rows, I had to clean it up a bit.

# clean.py

import csv

with open("translation.csv", "rb") as csvfile:
    reader = csv.reader(csvfile, delimiter="|")
    columns = len(reader.next())

    # A list of lists for building strings
    currentstr = [[] for i in range(columns)]

    for row in reader:
        # Build strings for each column
        for idx, string in enumerate(row):

        # Check if we are done building strings
        if "".join(row) == "":
            # Done. Print useful columns.
            print "".join(currentstr[0]), "|", # Original translation
            print "".join(currentstr[2]), "|",# Japanese
            print "".join(currentstr[4]), # Retranslation

            # Empty strings
            currentstr = [[] for i in range(columns)] 

Save the cleaned file:

clean.py > cleaned.csv    

Then I used Vim to remove things like item names, extra spaces
and switch delimiter to tabs, since Anki didn’t like pipes.

And there you go. You can download the deck here.

When I posted this on Reddit some people commented on the quality of the translation. It is worth reading those comments if you are considering using this deck.