View | Details | Raw Unified | Return to bug 41909
Collapse All | Expand All

(-)ucs-4.1-2/doc/developer-reference/translation.xml (-58 / +20 lines)
Lines 19-47 Link Here
19
		<remark></remark>
19
		<remark></remark>
20
20
21
		<para>
21
		<para>
22
			By default UCS includes English and German localization.
22
			By default UCS includes English and German localizations.
23
			A package is provided to enable users to create additional translations for the &ucsUMC;.
23
			Univention provides a set of tools that faciliates the process of creating translations for &ucsUMC;.
24
		</para>
24
		</para>
25
		<para>
25
		<para>
26
			This section describes all steps necessary to create a working translation package for UCS.
26
			This section describes all steps necessary to create a working translation package for UCS.
27
			To create a new translation package it is advised to have a running UCS server where the package can be setup.
27
			We recommend having a running UCS installation where the tools can be set up in an easy manner.
28
			A current Subversion checkout of the UCS source code is required.
28
			Further more a current Subversion checkout of the UCS source code is required.
29
			After installing the translation template package, a new translation for a target language can be created.
30
		</para>
29
		</para>
31
30
32
		<section id="misc:translation:preparation">
31
		<section id="misc:translation:preparation">
33
			<title>Prepare a new translation</title>
32
			<title>Install needed tools</title>
34
			<para>
33
			<para>
35
				The following steps are required to setup a UCS server to create a new translation package.
34
				The following steps are required to set up the tools for translation package creation.
36
			</para>
35
			</para>
37
				<variablelist>
36
				<variablelist>
38
					<varlistentry>
37
					<varlistentry>
39
						<term>Package <package>univention-ucs-translation-template</package></term>
38
						<term>Step 1: Install <package>univention-ucs-translation-template</package> package</term>
40
						<listitem>
39
						<listitem>
41
							<para>
40
							<para>
42
								The package <package>univention-ucs-translation-template</package> contains all tools required to setup and update a translation package.
41
								The package <package>univention-ucs-translation-template</package> contains all tools required to setup and update a translation package.
43
								It requires some additional Debian tools to build the package.
42
								It requires some additional Debian tools to build the package.
44
								The following packages must be installed on an UCS server by running the following command:
43
								Run the following command on your UCS to install all needed packages.
45
								<programlisting language="sh">
44
								<programlisting language="sh">
46
univention-install univention-ucs-translation-template dpkg-dev subversion
45
univention-install univention-ucs-translation-template dpkg-dev subversion
47
								</programlisting>
46
								</programlisting>
Lines 49-59 Link Here
49
						</listitem>
48
						</listitem>
50
					</varlistentry>
49
					</varlistentry>
51
					<varlistentry>
50
					<varlistentry>
52
						<term>A current checkout of the UCS Subversion repository</term>
51
						<term>Step 2: Obtain a current checkout of the UCS Subversion repository</term>
53
						<listitem>
52
						<listitem>
54
							<para>
53
							<para>
55
								The base translation files are available in the UCS Subversion repository.
54
								The Subversion repository is later processed to get initial files for a new translation(often referred to as PO file or Portable Objects).
56
								A current checkout can be obtained by running the following commands:
57
							</para>
55
							</para>
58
								<programlisting language="sh">
56
								<programlisting language="sh">
59
mkdir ~/translation
57
mkdir ~/translation
Lines 61-70 Link Here
61
svn co http://forge.univention.org/svn/dev/branches/ucs-4.1/ucs-4.1-0
59
svn co http://forge.univention.org/svn/dev/branches/ucs-4.1/ucs-4.1-0
62
								</programlisting>
60
								</programlisting>
63
								<!-- TODO: Use &websvn; after it has been updated -->
61
								<!-- TODO: Use &websvn; after it has been updated -->
64
							<para>
65
								Changes made to the &ucsUMC; should be synchronized regularly to the local Subversion checkout.
66
								This can be done by executing <command>svn up ~/translation/ucs-4.1-0</command>.
67
							</para>
68
						</listitem>
62
						</listitem>
69
					</varlistentry>
63
					</varlistentry>
70
				</variablelist>
64
				</variablelist>
Lines 73-85 Link Here
73
		<section id="misc:translation:createpackage">
67
		<section id="misc:translation:createpackage">
74
			<title>Create a new translation package</title>
68
			<title>Create a new translation package</title>
75
			<para>
69
			<para>
76
				To create a new translation package for e.g. French in the users home directory, the following command must be executed:
70
				To create a new translation package for e.g. French in the current working directory, the following command must be executed:
77
				<programlisting language="sh">
71
				<programlisting language="sh">
78
cd ~/translation
72
cd ~/translation
79
univention-ucs-translation-build-package.py \
73
univention-ucs-translation-build-package \
80
	-s ~/translation/ucs-4.1-0 -c fr -l fr_FR.UTF-8:UTF-8 -n French
74
	-s ~/translation/ucs-4.1-0 -c fr -l fr_FR.UTF-8:UTF-8 -n French
81
				</programlisting>
75
				</programlisting>
82
				This creates a new directory <filename class="directory">univention-ucs-translation-fr/</filename>, which contains a Debian source package of the same name.
76
				This creates a new directory <filename class="directory">~/translation/univention-ucs-translation-fr/</filename>, which contains a Debian source package of the same name.
83
				It includes all source and target files for the translation.
77
				It includes all source and target files for the translation.
84
			</para>
78
			</para>
85
		</section>
79
		</section>
Lines 110-116 Link Here
110
								The first line provides a hint, were the text is used.
104
								The first line provides a hint, were the text is used.
111
								The second line is optional and contains flags, which indicate the type and state of the translation.
105
								The second line is optional and contains flags, which indicate the type and state of the translation.
112
								The string <literal>fuzzy</literal> indicates an entry, which was copied by <command>gettext</command> from a previous version and needs to be updated.
106
								The string <literal>fuzzy</literal> indicates an entry, which was copied by <command>gettext</command> from a previous version and needs to be updated.
113
								The flag has to be removed afterwards.
114
							</para>
107
							</para>
115
							<para>
108
							<para>
116
								The line starting with <literal>msgid</literal> contains the original text.
109
								The line starting with <literal>msgid</literal> contains the original text.
Lines 157-200 Link Here
157
		<section id="misc:translation:updatepackage">
150
		<section id="misc:translation:updatepackage">
158
			<title>Update the translation package</title>
151
			<title>Update the translation package</title>
159
			<para>
152
			<para>
160
				The following steps are needed to upgrade the translation to a new UCS release, or if changes have been made in the translation.
153
				If changes affecting translations are made in the Subversion repository, existing translation packages need to be updated to reflect those changes.
161
				<variablelist>
154
				Given a path to an updated Subversion checkout, univention-ucs-translation-merge can update a previously created translation source package. 
162
					<varlistentry>
155
				Following example will update a translation package <filename class="directory">univention-ucs-translation-fr/</filename> using an updated Subversion checkout in <filename class="directory">ucs-4.1-0</filename>:
163
						<term>Update translation source files</term>
156
					<programlisting language="sh">
164
						<listitem>
157
univention-ucs-translation-merge ~/translation/ucs-4.1-0 \
165
							<para>
158
		~/translation/univention-ucs-translation-fr
166
								If changes occur in the UCS source packages that need a change of the translation files, the source files should be updated.
159
					</programlisting>
167
								To update the source files, change the directory of the translation package and update the files by executing the following commands:
168
							</para>
169
							<programlisting language="sh">
170
cd ~/translation/univention-ucs-translation-fr
171
univention-ucs-translation-update-source-files \
172
	-s ~/translation/ucs-4.1-0 -c fr
173
							</programlisting>
174
						</listitem>
175
					</varlistentry>
176
					<varlistentry>
177
						<term>Update translation target files</term>
178
						<listitem>
179
						<important>
180
							<para>
181
								This step is necessary each time before compiling the translation package.
182
								If the translation target files are not updated, the translation will not be shown in the &ucsUMC;
183
							</para>
184
						</important>
185
							<para>
186
								After the translation the source files have to be compiled.
187
								This step can also be done in an early stage of the translation, when it is not yet complete.
188
								To update the target files, change to the directory of the translation package and compile the source files by executing the following commands:
189
							</para>
190
							<programlisting language="sh">
191
cd ~/translation/univention-ucs-translation-fr
192
univention-ucs-translation-update-target-files \
193
	-s ~/translation/ucs-4.1-0 -c fr
194
							</programlisting>
195
						</listitem>
196
					</varlistentry>
197
				</variablelist>
198
			</para>
160
			</para>
199
		</section>
161
		</section>
200
162

Return to bug 41909