Glossaries in GlotPress is a way for common terms, used across multiple translations, to be used consistently. For example, quite often technical terms or abbreviations are hard for translators to understand if they are not familiar with the details of a given industry or knowledge domain.
A glossary gives the translator additional information that may be useful during translation. For example if the term “create” was included in a glossary, you would see it highlighted in the translation list for any entry that contained it:
Then, when you expand the entry, you will once more see it underlined and if you hover over it, get additional details:
This gives translators additional details that may be useful to keep term consistent or give more details to aid in translating entries.
13.2 Creating a Glossary
By default, glossaries are not created for a locale, but are easy to add. Simply go to any locale that does not have one currently, and over on the right hand side you will see the “Create Glossary” option:
Which will take you to the creation page. Here you can add an optional description to the glossary.
Once created, you can start adding terms to it.
13.3 Adding Glossary Terms
Once on the Glossary page, you can add terms through the provided UI:
Under “Create an entry”, there are four fields to fill out:
- Original term: This is the term you want a glossary entry for, it will always be in the source language of your project (usually “en”).
- Part of speech: This is the part of speech that the term is, which can be. You can select this from the pull down.
- Translation: this is what the translation of the original term will be for this locale.
- Comments: This is a free form entry that allows you to provide additional information to the translator. This is the only optional field.
After filling in the required details, you can then click the “Create” button and your entry will be added to the glossary.
Note that you can create multiple entries for the same original term as long as they have a different part of speech.
13.4 Importing Glossary Terms
You can create your glossary terms outside of GlotPress and import them in as CSV file. On the Glossary page for a locale, you can select the “Import” link, which is found under the “Create” button near the bottom of the page.
An easy way to see the CSV format is to create a few glossary entries and then export them as in the next section.
The format for the CSV file is as follows:
- Column 1 – Original term locale: The original term locale header column must contain a valid locale code that the source strings are in. Note, this is almost always “en”.
- Column 2 – Translation locale: The translation locale header column must contain a valid locale code that the glossary entry is for. Note you cannot include multiple destination locales in a single import file.
- Column 3 – Part-of-speech column: The part-of-speech header column. This should contain only one value: pos.
- Column 4 – Description column: The description header column. This should contain only one value: description.
- Column 1 – Original Term: Under the original term column the corresponding glossary entry for the source locale must be entered.
- Column 2 – Translation: Under the translation column the corresponding glossary entry for the destination locale must be entered.
- Column 4 – Part-of-speech column: The part-of-speech is an informational field that indicates the sense in which the terms in the row should be used. Sample parts-of-speech include adjective, adverb, noun, and verb.
- Column 5 – Description column: The description should provide any notes for the translator, including the meaning of the terms in the row.
- Blank rows are ignored.
- Commas in a cell must be escaped by double-quotes (“). For example, to add the term hello, world!, use “hello, world!”. Quotes within quotes are escaped by \. For example, She said, “hello.” should be entered as “She said, \”hello.\””.
- The CSV file should be in UTF-8 format.
13.5 Export Glossary Terms
It may be useful to export your current glossary if you want to do some bulk editing or import it in to another GlotPress installation.
On the Glossary page for a locale, you can select the “Export as CSV” link, which is found under the “Create” button near the bottom of the page.
This will create a CSV file, and allow you to download it, for all entries in the given glossary.