February 20, 2015

GDF User Guide - Tutorial 1

This tutorial walks you through the steps to use Genggoro Dictionary Framework (GDF) by installing the following components.

  • Genggoro Dictionary Server Basic (GDS-B)

  • Genggoro Chinese-English Dictionary (GCED)

  • Genggoro Dictionary Client for Google Chrome™ (GDC-CR)

As already mentioned in the previous page, there are two versions of GDS (GDS Basic and GDS Advanced (GDS-A)). In this tutorial, we use GDS-B which is freely available in Chrome Web Store (CWS). Even if you intend to use GDS-A, I recommend that you try GDS-B first. If GDS-B works properly on your machine, so does GDS-A because both versions share the same code base as far as the functionalities needed in this tutorial are concerned.

You can use other GDD in place of GCED if you want. In that case, replace the sample text used in a later step to test the search functionality with text appropriate for your GDD of choice.

The GDC-CR works a little bit differently from other GDCs. The steps to use non-Chrome GDCs will be explained in the next page.

Install GDS-B

Install GDS-B from CWS.

Install GCED

Install GCED from CWS.

Register GCED to GDS-B

After installing a GDD (GCED in this case), you need to register it to the GDS using the dictionary manager.

  1. Open the apps page (chrome://apps) and click the app icon of GDS-B to open the dictionary manager (read here for other ways to open the dictionary manager).

  2. Open the extensions management page (chrome://extensions) and check "Developer mode" at the top right of the page.

  3. Copy the app ID of GCED.

    The ID may be different from the one shown above.
  4. Paste the ID onto the text field and click the "Add" button as shown below.

  5. You should see an item labeled "Genggoro Chinese Dictionary" added to the dictionary list as shown above.

Install GDC-CR

Install GDC-CR from CWS.

Test the search functionality

  1. Click the "balloon" icon on the toolbar to connect to the GDS and get a list of the available GDDs. Then, click "Genggoro Chinese Dictionary" (or check the checkbox next to the label) to select GCED. A small icon (badge) containing the two-letter code for the selected GDD ("ZH" in this case) will be shown on top of the "balloon" icon if the selected GDD is ready to use.

    It's important to understand the difference between "connecting" and "selecting" here. The purpose of connecting one component to another is to establish a communication channel between the two. The purpose of selecting GDDs from a GDC is to tell the GDS which GDDs to use to look up text from that GDC. When you select a GDD, a communication channel between the selected GDD and the GDS is established automatically if not established yet. Note also that GDCs and GDDs never communicate with each other directly.

    GDC-1, 2 and GDD-1, 2 are connected to GDS. GDD-3 is already registered but isn't connected to GDS. GDD-1 is selected (used) by GDC-1 and GDC-2. GDD-2 is connected to GDS but isn't selected by any GDCs.
  2. Press the Ctrl key, then (while holding down the Ctrl key) move the cursor to the first character of the sample text below (), then wait a while without moving the cursor.

    成功

  3. You should see a popup as shown below.

    It the popup is displayed behind the browser window (this is often the case for Linux), open the settings window by clicking the "Settings" button on the dictionary manager and check the "Focus popup" option, then try again.

  4. Click the "(-)" icon (or press the Esc key) to hide the popup.

  5. Open the panel again and click "Genggoro Chinese Dictionary" (or uncheck the checkbox) to deselect GCED. Once the number of the selected GDDs becomes 0, the connection between the GDC and the GDS is closed automatically.

  6. By default, closing the connection between a GDC and the GDS doesn't close the connection between the GDS and GDDs previously selected by that GDC (you can change this behavior by enabling the "auto disconnection" option explained later in this user guide). If you keep the GDD connected, the next time you want to use it, it loads faster at the expense of higher memory usage to keep it loaded. If you close the connection, the GDD is unloaded and the memory used by it is released.

    Since this is the last step of this tutorial, let's close the connection between the GDS and GCED. To do that, open the dictionary manager and click the "Disconnect" button.

Next: Tutorial 2

No comments:

Post a Comment