CopperSpice API  1.7.2
Linguist Application

Linguist is a program for adding translations to CopperSpice applications. Minimal computer experience is required for a translator to add the necessary text translations. Simply start the Linguist application from your desktop icon or the command line.

The main window is divided into several dockable subwindows or areas. The areas can be resized, moved around, or detached from the main GUI application. The Translations area will always be visible and can not be closed.

Adding Translations

Choose File|Open from the menu bar and select an existing TS file. Once it is loaded select any context from the Context area. This will display the available translatable strings in the String area. Selecting one of the source strings will display this text and any existing translations in the Translation area.

Now click in the box (under the source text) located in the Translation area to add a translation for that string. An optional comment can be entered which will be stored in the TS file. The comment is only used by other translators and not used at run time.

To mark the translation as finished either press the green check mark button on the toolbar or click the icon to the left of the selected source string in the String area. Repeat this process until all strings are marked with one of the following icons.

Now select the next context and continue with the entire process until all translations have been added for the given language. At the end of the session choose File|Save from the menu bar and then File|Exit to quit.

Using Guesses

The phrases and guesses area shows possible translations for the current string. These translation guesses have been read from phrase books or existing translations. To use a guess double click in the Phrases and Guesses area or use the keyboard shortcut shown to the right of the guess.

Warnings

Linguist can automatically check whether your translations pass a list of validation tests. Validation test failures are shown in the warnings area.

Context Area

The column labeled Context shows the context names in alphabetical order. Each context is typically the name of a class. To the left of the Context column is a column with an icon as described below.

  • All strings in the context have been translated and all the translations pass the validation tests.
  • All strings in the context have been translated or marked as translated, but at least one translation failed the validation tests.
  • At least one string in the context has not been translated or is not marked as translated.
  • None of the translated strings still appears in the context. This usually means the context itself no longer exists in the application.

To the right of the Context column is the Items column. Each entry in this column is a pair of numbers separated by a slash. The first number denotes how many translatable strings are finished. The second number is how many translatable strings exist.

Strings Area

The Strings area displays a list of all the translatable strings found in the current context and their translation acceptance state. When a string is highlighted it will be shown in the translation area.

To the left of the Source text column is a column containing icons. This column is similar to the one in the context window, but here you can click on the icon to change the translation acceptance state for each string in the list.

StateIconDescription
Accepted/Correct Translation has been accepted and marked as finished. Click the icon to revoke acceptance and cycle through the other icon images.
Accepted / Warnings Translation has been accepted but the translation does not pass all the validation tests.
Not Accepted Translation is present however it has not been marked as accepted. Click the icon or press Ctrl+Enter to accept the translation.
No Translation There is no translation. You can click the icon to accept the empty translation.
Validation Failures Translation exists however not all of the validations tests pass. Validation test failures are shown in the warnings area.
Obsolete String is obsolete and is no longer used. Refer to Linguist lupdate for instructions on how to remove obsolete messages from the current TS file.

Translation Area

The translation area can not be closed, resized, or detached.

Any spaces in the source text will be replaced by a dot centered between the words. This provides a visual inspection for the translator. To toggle this setting click on View|Visualize whitespace.

If the developer entered a comment for the translator it will shown right below the source text, under the label Developer comments. This comment is used to distinguish between different meanings for the same source text.

Below the source text an optional developer comments are two text entry widgets for the translator, one for entering the translation of the current string, and one for the translator to enter an optional comment to be read by other translators.

When multiple languages are being translated, this sequence of fields is repeated for each language.

Phrases and Guesses Area

If the current string appears in one or more of the phrase books which have been loaded, the current string and phrase book translation(s) will be listed in this window. If the current string is the same as, or similar to, another string that has already been translated, that other string and its translation will also be listed in this window.

To use a translation from the Phrases and Guesses area double click on the guess or use the hotkey shown to the right.

Source Code Area

If the source code for the contexts is accessible the source code area will show the context where the current string was found.

Warnings Area

If the translation for the current string fails any of the active validation tests, these will be listed in the warnings area. The first of these failure messages is also shown in the status bar at the bottom of the main window. Only active validation tests are reported.

To see which validation tests are currently active, or to activate or deactivate tests, use the Validation menu from the menu bar.

General Information

Validation Tests

Linguist provides four kinds of validation tests for translations.

Accelerator validation
Translated phrases that are missing an ampersand when the source phrase contains one, or the other way around
Punctuation validation
Detects differences in the terminating punctuation between source and translated phrases, for example the source phrase ends with an ellipsis, exclamation mark or question mark and the translated phrase does not show these punctuations
Phrases validation
Detects source phrases that are in the phrase book but whose current translation differs from the one shown in the phrase book
Place marker validation
Verifies if the same variables (like %1 or %2) are used in the source and translation text

Validation may be switched on or off from the menu bar or using the toolbar buttons. Unfinished phrases that fail validation are marked with an exclamation mark in the source text area. Finished phrases will show a yellow check mark. If you switch validation off and then switch it on later, Linguist will recheck all phrases and mark any that fail validation.

Translating Multiple Languages Simultaneously

You can load and edit multiple translation files at the same time.

The Context area and String area will display multiple columns of icons, one for each TS file. The Translation area will show the source text at the top and translations for each language.

Phrase Books

A Linguist phrase book is a set of source phrases, target translated phrases, and optional definitions. Typically one phrase book will be created per language or family of applications. Phrase books are used to provide a common set of translations to help ensure consistency. They can also be used to avoid duplication of effort since the translations for a family of applications can be produced once in the phrase book. If the translator reaches a non-translated phrase that is the same as a source phrase in a phrase book, Linguist will show the phrase book entry in the Phrases and Guesses Window.

Creating and Editing Phrase Books

Before a phrase book can be used or modified it must be opened. If none exists a new one can be created by selecting Phrase|New Phrase Book from the menu bar. To open an existing phrase book use Phrase|Open Phrase Book from the menu bar.

The phrase book contents can be displayed and changed by selecting Phrase|Edit Phrase Book. To add a new phrase click the New Phrase button (or press Alt+N) and type in a new source phrase. Press Tab and type in the translation. Optionally press Tab and enter a definition, this is useful to distinguish different translations of the same source phrase. You can delete a phrase by selecting it in the phrases list and clicking Remove Phrase.

Click the Close button press ESC once you have finished adding and removing phrases.

Shortcuts for Editing Phrase Books

You can create a new phrase book entry from the current translation you are working on. Click on Phrases|Add to Phrase Book or press Ctrl+T to add the source text and the content of the first translation field to the current phrase book. If multiple phrase books are loaded, you will need to specify the target phrase book.

If you find an error in a phrase book entry shown in the Phrases and Guesses Window, you can edit in place by right clicking on the entry, and selecting Edit. After correcting the error press Return to leave the editing mode.

Batch Translation

Use the batch translation feature of Linguist to automatically translate source texts that are also in a phrase book. Selecting Edit|Batch Translation will show you the batch translation dialog, which let you configure which phrase books to use in what order during the batch translation process. Furthermore you can set whether only entries with no present translation should be considered and whether batch translated entries should be set to finished