Translations

There are several po files for various languages to make CINELERRA-GG more usable for non-English countries. These are listed below along with the po file name with the translations, the frequency of updates, and date of last update as of this writing.

English cin.po Baseline (en_US)
French fr.po Updated often Last update 2019 May
German de.po Updated often Last update 2019 December
Russian ru.po Updated often Last update 2019 October
Spanish es.po Updated often Last update 2021 July
Basque eu.po From CV with Google Translate Last update 2016 October
Italian it.po From CV with Google Translate Last update 2016 October
Norwegian nb.po From CV with Google Translate Last update 2016 October
Portuguese pt.po From CV with Google Translate Last update 2016 October
Slovenian sl.po From CV with Google Translate Last update 2016 October
Chinese zh.po Only Google Translate 2016 October
Greek el.po Only Google Translate 2016 October
Hindi hi.po Only Google Translate 2016 October
Hungarian hu.po Only Google Translate 2021 October
Japanese ja.po Only Google Translate 2016 October
Korean ko.po Only Google Translate 2016 October
Ukrainian uk.po Only Google Translate 2016 October
Vietnamese vi.po Only Google Translate 2016 October

A program, xlat.C, assists in providing several variations of text files that can be used in order to allow anyone to help make meaningful translations. All of the po files are located in CINELERRA-GG’s /po subdirectory. There are 3 different ways to proceed described below.

Because CINELERRA-GG frequently is changing, it is a good idea to start by building a new cin.po file which contains the latest messages/words in English to be translated, along with a comment line of the routine name and line number. To create this, run the following lines from a window:

cd /{your top level cinelerra directory}
./po/xlat.sh > /tmp/cin.po

Method 1
use the freely-available poedit program to provide translations to the current xx.po where xx is your language such as fr.po, de.po, ru.po, etc. The drawback to this is that xx.po files are not recreated monthly so they do not have all of the newest phrases included.
Method 2
using msgmerge is probably the simplest method for user translation.

To use the msgmerge command after creating a new cin.po as suggested previously:

cd /{your top level cinelerra directory}
./po/xlat.sh > /tmp/cin.po			       # use /tmp as a temporary place
cp /{your cinelerra directory}/po/xx.po /tmp/xx.po     # substitute your language for x
msgmerge -U /tmp/xx.po /tmp/cin.po                    # xx.po will be overwritten to include updates

Then use any editor or poedit to provide messages/words translations in the new xx.po file.

Method 3
using xlat.C program is the most versatile with a variety of features. When a non-existent language translation is first set up, you would want to use this methodology to get started.

To use the xlat.C program, first compile it with c++ xlat.C. You can see the usage help here:

	./a.out 
list csv    ./a.out csv < data.csv > data.po
list po     ./a.out po < data.po > data.csv
list po     ./a.out dups < data.po
list po     ./a.out nodups < data.po
get strings ./a.out key  < xgettext.po
gen xlation ./a.out xlat   xgettext.po xlat.csv
gen xlation ./a.out xlat - text,xlat ... < xgettext.po

This program has 6 commands where the desired command is the first parameter to a.out.:

  1. csv = comma separated value file; to recreate a po from a csv file.
  2. po = convert po to csv data; for example, what you need to convert ru.po to ru.csv. You can even open the resulting *.csv in LibrOffice and update the key value replacements (fields separated by "," only and check quoted fields as text during import). These results can be Saved As a csv file, and then used by xlat.C to reformulate a po.
  3. dups = list only key/value items where either the key=value or value=" ".
  4. nodups = list only key/value items where keyvalue and value" ".
  5. key = list cin.po key set.
  6. xlat = overlay translation. This is the most important use and is described next.

The xlat command line parameters specify a new cin.po template, usually created with xlat.sh, and a list of key/value files which are used to build a mapping for the desired translation. The mapping files are added to the mapping in the order they appear on the command line, and any existing key is replaced with the newest definition; so typically the newest key/value data is last in the command parameters. Once the mapping is built, the first parameter which is the new po template is scanned and the keys it contains are used to find the latest mapping in the key/value files. The new value replaces the existing value in the template. For example, to overlay a new map onto an existing po using the Spanish es.po file and where cin.po represents the latest english words:

c++ xlat.C
./a.out po < es.po > /tmp/es.csv
./a.out po < cin.po > /tmp/cin.csv
./a.out xlat cin.po /tmp/es.csv > /tmp/new_es.po

The first run preserves the existing mapping of es.po, the second creates new mappings from cin.po, and the third merges the original and new mappings to create a po with new included/overriding es.po.

NOTE:

some words and abbreviations can lead to ambiguous language translations. Therefore, the usage of C_ and D_ in the program code was added to represent Contextual and Definitional exceptions to the usual _ and N_ . You will see the following:




C_(“msgstr”) is translated to D_(“qual#msgstr”) by xlat.sh, and invokes gettext with msgid = “qual#msgstr”




When no po translation is supplied, the qual# is removed, and only the default msgstr text is displayed. If a po translation is defined for the current locale, then the translated msgid = “qual#msgstr” is used to access the translated msgstr.




The default MSGQUAL is the basename of the C source file. For the file src_file.C, the default MSGQUAL is:




# define MSGQUAL “src_file”




It is used to define the qualifier needed to transform:




C_(“str”) to D_(“src_file#str”)




The resulting xlat.sh'd source is scanned by xgettext to create the initial cin.po. In other words:




_(s) does normal international text translation as always -




The msgid line is: msgid “s”




C_(s) makes it appear as if you used D_(“src_file#” s) -




The msgid line is: msgid “src_file#s” If it does not translate, the default msgtext is “s”, not “src_file#s”




D_(qual#s) tries to look up _(qual#s) -




This msgid line is: msgid “qual#s”, If it does not translate, the default msgtext is “s”, not “qual#s”

The CINELERRA-GG Community, 2021
https://www.cinelerra-gg.org