home

SpeakGoodChinese Translation Guide

Introduction

SpeakGoodChinese has been designed to allow straightforward translation of the User Interface. All texts seen by the user have been isolated in separate tables and text files. These files have names that end in a language code name. All files are plain text (ASCII and  Unicode texts), using the character and formating codes of Praat.

The SpeakGoodChinese user interface contains two main screens, or pages: The Main page and the Config, or Settings, page. Both contain buttons with text labels and associated short help texts. The Main page also will print out other information called Feedback. Feedback on tone pronunciation is contained in the ToneFeedback.

In addition to these primary files, there are some other specialized page files: Credits (About page) and a Manual.

We suggest translations start with the user interface files describing the Main and Config pages, as these are crucial for the use of SpeakGoodChinese, followed by the Evaluation, the Feedback and the ToneFeedback texts.

Translation principles

The basic principle in the translations is to keep to common use of technical terms. If a certain term has common use as a menu option in the source language version of a widely used application, e.g., MS Windows or Firefox, a translator should use the corresponding term as used in the translated version of that application in the target language.

Language naming standard

Translations are named after their shortest ISO 639-1 codes, or using one of the longer codes (ISO 693-2/3) when a language is not in the ISO 639-1 list. Use UPPERCASE letters. Each language specific file ends in “_<ISO 639-1 code>”.

Examples are:

How to obtain existing tables

Spreadsheet versions of the existing tables can be downloaded from the SpeakGoodChinese Google Drive. However, you can export the existing tables from the SpeakGoodChinese application itself.

On the Settings page, click the Export Words button. Select the directory where you want the table to be saved. Then enter as a filename any of the existing table names with extension .Table or .tsv. That could be Config_ZH.Table, ToneFeedback_EN.tsv, or MainPage_NL.tsv. SpeakGoodChinese will export the table and save it to the directory indicated.

Note that SpeakGoodChinese uses the .Table extension, but spreadsheet programs can often better handle files with the .tsv extension.

Main page

The labels used on the Main page are stored in a four column table like those of the Config page. The first row contains the column names. The first three rows, all starting with a ! are for internal use. The first column, Label, is for internal use (it identifies the button). Do not change these.

The second column, Text, contains the button labels shown to the user. The font size is adapted to fit the label into the button area. This means that long labels can end up too small to be readable.

The third column, Key, contains the keyboard shortcut keys. These should be unique and, preferably, also part of the label of that button. When displaying the button text, the shortcut character will be printed in italic if it is part of the text. So, in English, the shortcut key for the button with the Record text label is chosen as R, and will be printed italic.

The fourth column, Helptext, contains a short phrase that describes the use or function of the button. It will be shown if Help is clicked. The shortcut character(s) are automatically added to the help text when it is displayed.MainPage.png

Config or Settings page

The labels used on the Config page are stored in a four column table like those of the Main page. The first row contains the column names. The first three rows, all starting with a ! are for internal use. The first column, Label, is for internal use (it identifies the button). Do not change these.

The second column, Text, contains the button labels shown to the user. The font size is adapted to fit the label into the button area. This means that long labels can end up too small to be readable.

The third column, Key, contains the keyboard shortcut keys. These should be unique and, preferably, also part of the label of that button. When displaying the button text, the shortcut character will be printed in italic if it is part of the text. So, in English, the shortcut key for the button with the Pinyin text label is chosen as P, and will be printed italic.

The fourth column, Helptext, contains a short phrase that describes the use or function of the button. It will be shown if Help is clicked. The shortcut character(s) are automatically added to the help text when it is displayed.ConfigPage.png

There will be at least one line of the form:

Language_EN

English

E

English language version

Lines of this form should not be translated, as they define the language buttons. Obviously, students should find the label on the button indicating their own language in that language. For a new language, you have to change the language code from EN, or the code used in your source table, to the code of the target language. The name of the language should be entered instead of English. And the phrase “English language version” should be translated into a phrase indicating the target language. For instance, for Chinese as a target language, the line reads:

Language_ZH

汉语 Z

Z

汉语版

Feedback, ToneFeedback, and Evaluation

All messages to the user that are not a fixed part of the pages are collected in the Feedback tables. A Feedback table consists of two columns: Key and Text. The key part is for internal use and should not be changed. The Text part should be translated. All words ending in a ‘$’ character are internal variables which will be substituted with calculated or measured values. They should not be changed.

There are three such feedback tables: Feedback, ToneFeedback, and Evaluation. Feedback and Evaluation are short and contain some common phrases as Continue and Correct. ToneFeedback contains three columns with a short comment on how to pronounce two tone combinations.

Other pages

Credits page

The Credits (About) page contains information about contributions, copyrights, and the licensing of SpeakGoodChinese. It also contains information on the current version and date of the application.

There are three columns: font, size and text. The first column, font, contains the name of the font family, e.g, Times. The second column, size, contains the point size of the font, e.g., 12. The last column, text, contains the actual text to be written. The standard Praat character and formating codes apply. The absolute font sizes will be scaled relative to the size of the window. Text between single ‘-quotes is interpreted as Praat substitution commands and should not be changed.

Manual

The manual is a help text in the usual format of Praat Man Pages. These consist of a number of files which can be translated individually. The default language is English. Manual pages in other languages are identified by the same language code as other files in that language. All pages written in a language are chained together by links.

If you plan to translate the manual you should contact the maintainer of SpeakGoodChinese.

Advanced: Testing out a translation

Translated tables can be tested on a binary version of SpeakGoodChinese. In this manual, we will assume you want to create a (new) translation into Spanish, with language code _ES and label Español. Replace these with the code and name of your language.

For the testing of a new language interface for SpeakGoodChinese, you need to create a folder with the name GUI in the preferences folder of SpeakGoodChinese. This preferences folder can be found at the following locations:

Create a folder GUI inside your preferences folder.

Export your translated tables as csv files (comma separated values) with <tab> as the separator. Start with the Config_ES table in a spreadsheet form. Make sure that the Config_ES table contains an entry Language_ES. Exporting can be done as follows:

Google Documents

OpenOffice or LibreOffice

MS Excel

Change the extension of the files to Table if you did not do that while saving the files.

After having exported the files, including at least the Config table, e.g., Config_ES.Table, move them into the preferences GUI directory you created before. When you start up SpeakGoodChinese you should find that there is now a button Labelled, say, Español (or what the label was you chose) on the Config page. When you click it, you will get the user interface of your target language. You can test this out with the tables of one of the existing languages and change the language code.

You do not have to use all the table files. When no table file is found with the label _ES, the English equivalent is used instead.

Note: When there is a serious error in the table, SpeakGoodChinese will crash. Removing the GUI folder for the Preferences folder will cure that. It is very well possible that you get no, or an incomprehensible error message. Compare your table(s) with the originals from another language and try to find the offending difference.

Do not forget to remove the test GUI table when you are ready!