From 0d959ba78d9363936b4c2eef4620f8bf7897801e Mon Sep 17 00:00:00 2001 From: Andrea-Paz Date: Sat, 11 Jan 2020 15:03:27 +0100 Subject: [PATCH 1/1] add chapters 20 - 21 --- CinelerraGG_Manual.tex | 2 + parts/Licenses.tex | 49 +++++++++++++++++++++ parts/Translations.tex | 98 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 parts/Licenses.tex create mode 100644 parts/Translations.tex diff --git a/CinelerraGG_Manual.tex b/CinelerraGG_Manual.tex index a75c299..f8792ee 100644 --- a/CinelerraGG_Manual.tex +++ b/CinelerraGG_Manual.tex @@ -46,6 +46,8 @@ svgnames \include{parts/Stuff} \include{parts/Trouble} \include{parts/Tips} +\include{parts/Translations} +\include{parts/Licenses} \include{parts/Glossary} diff --git a/parts/Licenses.tex b/parts/Licenses.tex new file mode 100644 index 0000000..bee4bb1 --- /dev/null +++ b/parts/Licenses.tex @@ -0,0 +1,49 @@ +\chapter{Licenses}% +\label{cha:licenses} + +Cinelerra-GG codebase is licensed GPLv2+ + +GREYcstoration plugin is licensed CeCILL v2.0 + +Google SHA1 implementation is licensed BSD 3-clause + +Cinfinity icons are licensed Creative Commons CC-BY 4.0 + +Neophyte theme is licensed Creative Commons CC-BY 4.0 + +OpenCV is licensed 3-clause BSD License + +freeverb components and the Tapeworm font are in the public Domain + +License: GPLv2+ and CeCILL and BSD and CC-BY and Public Domain + +\vspace{2ex} \textbf{GPLv2+ \qquad GNU General Public License version 2} + +Cinelerra-GG codebase is licensed GPLv2+ + +\noindent See: {\small \url{https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html }} + +\vspace{2ex} \textbf{Creative Commons Attribution 4.0 International License} + +Cinfinity icons (c) by "Sam" and Neophyte theme by "Olaf" are licensed under a +Creative Commons Attribution 4.0 International License. + +\noindent see: {\small \url{http://creativecommons.org/licenses/by/4.0/}} + +\vspace{2ex} \textbf{License Agreement for OpenCV} + +\begin{center} +For Open Source Computer Vision Library + +(3-clause BSD License) +\end{center} + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +\begin{itemize} + \item Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + \item Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + \item Neither the names of the copyright holders nor the names of the contributors may be used to endorse or promote products derived from this software without specific prior written permission. +\end{itemize} + +This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall copyright holders or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. \ No newline at end of file diff --git a/parts/Translations.tex b/parts/Translations.tex new file mode 100644 index 0000000..6b063a9 --- /dev/null +++ b/parts/Translations.tex @@ -0,0 +1,98 @@ +\chapter{Translations}% +\label{cha:translations} + +There are several \textit{po} files for various languages to make Cinelerra more usable for non-English countries. A program, \texttt{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 \textit{po} files are located in Cinelerra’s \texttt{/po} subdirectory. There are 3 different ways to proceed described below. + +Because Cinelerra frequently is changin, it is a good idea to start by building a new \texttt{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 line from a window: + +\begin{lstlisting}[language=bash] +/{your cinelerra directory}/po/xlat.sh > /tmp/cin.po +\end{lstlisting} + +\begin{description} + \item[Method 1] use the freely-available \textit{poedit} program to provide translations to the current \texttt{x.po} where x is your language such as fr.po, de.po, ru.po, etc. The drawback to this is that x.po files are not recreated monthly so they do not have all of the newest phrases included. + \item[Method 2] using \textit{msgmerge} is probably the simplest method for user translation. +\end{description} + +To use the msgmerge command after creating a new cin.po as suggested previously: + +\begin{lstlisting}[language=bash] +/{your cinelerra directory}/po/xlat.sh > /tmp/cin.po # use /tmp as a temporary place +cp /{your cinelerra directory}/po/x.po /tmp/x.po # substitute your language for x +msgmerge -U /tmp/x.po /tmp/cin.po # x.po will be overwritten to include updates +\end{lstlisting} + +Then use any editor or poedit to provide messages/words translations in the new x.po file. + +\begin{description} + \item[Method 3 ] using \textit{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. +\end{description} + +To use the xlat.C program, first compile it with “c++ xlat.C”. You can see the usage help here: + +\begin{lstlisting}[language=bash] + ./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 +\end{lstlisting} + +This program has 6 commands where the desired command is the first parameter to a.out.: + +\begin{enumerate} + \item \textit{csv} = comma separated value file; to recreate a po from a csv file. + \item \textit{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 \textit{key $\rightarrow$ value} replacements + (fields separated by "," only and check quoted fields as text during import). These results can + be \textit{Saved As} a csv file, and then used by xlat.C to reformulate a \texttt{po}. + \item \textit{dups} = list only key/value items where either the \textit{key=value} or \textit{value=" "}. + \item \textit{nodups} = list only key/value items where \textit{key$\ne$value} and \textit{value$\ne$" "}. + \item \textit{key} = list cin.po key set. + \item \textit{xlat} = overlay translation. This is the most important use and is described next. +\end{enumerate} + +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, 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: + +\begin{lstlisting}[language=bash] +c++ xlat.C +./a.out po < xx.po > /tmp/xx.csv +./a.out po < new.po > /tnp/new.csv +./a.out xlat xx.po /tmp/xx.csv /tmp/new.csv > /tmp/new.po +\end{lstlisting} + +The first run preserves the existing mapping of xx.po, the second creates new mappings from new.po, and the third merges the original and new mappings to create a po with new included/overriding xx.po. + +\paragraph{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: + +\vspace{2ex} \texttt{C\_(“msgstr”)} is translated to \texttt{D\_(“qual\#msgstr”)} by \textit{xlat.sh}, and invokes gettext with \texttt{msgid = “qual\#msgstr”} + +\vspace{2ex} When no \textit{po} translation is supplied, the qual\# is removed, and only the default \textit{msgstr} text is displayed. If a \textit{po} translation is defined for the current locale, then the translated\texttt{ msgid = “qual\#msgstr”} is used to access the translated msgstr. + +\vspace{2ex} \noindent The default MSGQUAL is the basename of the C source file. For the file \texttt{src\_file.C}, the default MSGQUAL is: + +\vspace{2ex} \texttt{\# define MSGQUAL “src\_file”} + +\vspace{2ex} \noindent It is used to define the qualifier needed to transform: + +\vspace{2ex} \texttt{C\_(“str”)} to \texttt{D\_(“src\_file\#str”)} + +\vspace{2ex} \noindent The resulting xlat.sh'd source is scanned by xgettext to create the initial cin.po. In other words: + +\vspace{2ex} \_(s) does normal international text translation as always - + +\vspace{2ex} \noindent The msgid line is: msgid “s” + +\vspace{2ex} \texttt{C\_(s)} makes it appear as if you used \texttt{D\_(“src\_file\#” s)} - + +\vspace{2ex} \noindent The msgid line is:\texttt{ msgid “src\_file\#s”} +If it does not translate, the default msgtext is \texttt{“s”}, not \texttt{“src\_file\#s”} + +\vspace{2ex} \texttt{D\_(qual\#s)} tries to look up \texttt{\_(qual\#s)} - + +\vspace{2ex} \noindent This msgid line is: \texttt{msgid “qual\#s”}, +If it does not translate, the default msgtext is \texttt{“s”}, not \texttt{“qual\#s”} + -- 2.26.2