]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Update translation guide. master
authorMichael R Sweet <msweet@msweet.org>
Sun, 19 Apr 2026 18:20:52 +0000 (14:20 -0400)
committerMichael R Sweet <msweet@msweet.org>
Sun, 19 Apr 2026 18:20:52 +0000 (14:20 -0400)
doc/help/translation.html

index 50e3bbd6832c1ba296fbf9c6a931b5e53323c4e7..4d0bc681d031a48222123cff82265869eeb4390d 100644 (file)
@@ -8,7 +8,7 @@
 
 <H1 CLASS="title">Translating and Customizing CUPS</H1>
 
 
 <H1 CLASS="title">Translating and Customizing CUPS</H1>
 
-<P>Thanks to its extensive use of templates, images, and message catalogs, CUPS can be easily translated (or customized!) to suit your needs. This help file will guide you through the CUPS localization files so you can get the most out of it.</P>
+<P>Thanks to its extensive use of templates, images, and message catalogs, CUPS can be easily translated (or customized!) to suit your needs. This help file will guide you through the CUPS localization files so you can get the most out of it. The CUPS project also uses <a href="https://hosted.weblate.org" target="_blank">Weblate</a> for basic localization of the message catalogs.</P>
 
 
 <H2 CLASS="title" ID="INTRO">Getting Started</H2>
 
 
 <H2 CLASS="title" ID="INTRO">Getting Started</H2>
 
 <UL>
 
 
 <UL>
 
-       <LI><VAR>desktop/cups.desktop</VAR> - the GNOME/KDE desktop file pointing to the CUPS web interface</LI>
-
-       <LI><VAR>doc/index.html.in</VAR> - the web interface home page</LI>
+       <LI><VAR>desktop/cups.desktop{.in}</VAR> - the GNOME/KDE desktop file pointing to the CUPS web interface</LI>
 
        <LI><VAR>locale/cups.pot</VAR> - the message catalog</LI>
 
 
        <LI><VAR>locale/cups.pot</VAR> - the message catalog</LI>
 
-       <LI><VAR>templates/*.tmpl</VAR> and <VAR>templates/header.tmpl.in</VAR> - the web interface     template files</LI>
+       <LI><VAR>templates/*.tmpl</VAR> - the web interface template files</LI>
 
 </UL>
 
 
 </UL>
 
-<P>With the exception of the message catalogs and desktop file, localization files are placed in subdirectories under the <VAR>doc</VAR> and <VAR>templates</VAR> using the locale name. Locale names are either <VAR>ll</VAR> or <VAR>ll_CC</VAR>, where "ll" is the 2-letter language code and "CC" is the 2-letter country code. <em>CUPS does not currently use or support the newer <VAR>ll-region</VAR> syntax for locale names.</em></P>
+<P>With the exception of the message catalogs and desktop file, localization files are placed in subdirectories under the <VAR>doc</VAR> and <VAR>templates</VAR> using the locale name. Locale names are either <VAR>ll</VAR> or <VAR>ll_CC</VAR>, where "ll" is the 2-letter ISO language code and "CC" is the 2-letter ISO country code. <strong>Note:</strong> CUPS does not currently use or support the newer <VAR>ll-region</VAR> syntax for locale names.</P>
 
 <P>All non-image files must be encoded using the UTF-8 character set.</P>
 
 
 <H2 CLASS="title" ID="SUBMIT">Submitting a Translation for CUPS</H2>
 
 
 <P>All non-image files must be encoded using the UTF-8 character set.</P>
 
 
 <H2 CLASS="title" ID="SUBMIT">Submitting a Translation for CUPS</H2>
 
-<P>To submit a translation for inclusion in CUPS, translate the desktop file, all of the template files, the <VAR>index.html.in</VAR> file, and the message catalog. Place these files in the correct subdirectories in the CUPS source code archive and run the following command to create an archive with your files:</P>
+<P>To submit a translation for inclusion in CUPS, translate the desktop file, all of the template files, and the message catalog. Place these files in the correct subdirectories in the CUPS source code archive and run the following command to create an archive with your files:</P>
 
 <PRE CLASS="command">
 
 <PRE CLASS="command">
-tar cvf <I>ll_CC</I>.tar.gz desktop/cups.desktop doc/<I>ll_CC</I> locale/cups_<I>ll_CC</I>.po templates/<I>ll_CC</I>
+tar cvf <I>ll_CC</I>.tar.gz desktop/cups.desktop locale/cups_<I>ll_CC</I>.po templates/<I>ll_CC</I>
 </PRE>
 
 <P>Replace "ll_CC" with the locale name for your translation. Once you have created the archive, go to the <A HREF="https://github.com/apple/cups" TARGET="_blank">CUPS project page</A> and submit a bug report, attaching the translation to the report.</P>
 </PRE>
 
 <P>Replace "ll_CC" with the locale name for your translation. Once you have created the archive, go to the <A HREF="https://github.com/apple/cups" TARGET="_blank">CUPS project page</A> and submit a bug report, attaching the translation to the report.</P>
@@ -55,11 +53,6 @@ Comment[<I>ll_CC</I>]=<I>Translation of "CUPS Web Interface"</I>
 </PRE>
 
 
 </PRE>
 
 
-<H2 CLASS="title" ID="HOMEPAGE">The Home Page</H2>
-
-<P>The <VAR>index.html.in</VAR> file is a complete HTML file that is displayed when the user visits "http://localhost:631/". Edit the existing <VAR>doc/index.html.in</VAR> and save it in the <VAR>doc/ll_CC</VAR> subdirectory so that the configure script can generate it. After configuring, run "make install" in the <VAR>doc</VAR> subdirectory to test the new home page.</P>
-
-
 <H2 CLASS="title" ID="CATALOGS">Message Catalogs</H2>
 
 <P>CUPS message catalogs are GNU gettext ".po" text files that provide a list of localized message strings for the CUPS software. Message catalogs are named <VAR>cups_ll.po</VAR> or <VAR>cups_ll_CC.po</VAR>, where "ll" is the standard 2-letter abbreviation for the language and "CC" is the standard 2-letter abbreviation for the country.</P>
 <H2 CLASS="title" ID="CATALOGS">Message Catalogs</H2>
 
 <P>CUPS message catalogs are GNU gettext ".po" text files that provide a list of localized message strings for the CUPS software. Message catalogs are named <VAR>cups_ll.po</VAR> or <VAR>cups_ll_CC.po</VAR>, where "ll" is the standard 2-letter abbreviation for the language and "CC" is the standard 2-letter abbreviation for the country.</P>
@@ -91,14 +84,7 @@ cd locale
 
 <P>Template files are HTML files with special formatting characters in them that allow substitution of variables and arrays. The CUPS CGI programs (<CODE>admin.cgi</CODE>, <CODE>classes.cgi</CODE>, <CODE>help.cgi</CODE>, <CODE>jobs.cgi</CODE>, and <CODE>printers.cgi</CODE>) use these template file to provide dynamic content for the web interface. Template files are installed in the <VAR>/usr/share/cups/templates</VAR> directory by default. <A HREF="table1">Table 1</a> lists the various template files and their purpose.</P>
 
 
 <P>Template files are HTML files with special formatting characters in them that allow substitution of variables and arrays. The CUPS CGI programs (<CODE>admin.cgi</CODE>, <CODE>classes.cgi</CODE>, <CODE>help.cgi</CODE>, <CODE>jobs.cgi</CODE>, and <CODE>printers.cgi</CODE>) use these template file to provide dynamic content for the web interface. Template files are installed in the <VAR>/usr/share/cups/templates</VAR> directory by default. <A HREF="table1">Table 1</a> lists the various template files and their purpose.</P>
 
-<P>Translated versions of the template files should be saved in
-the <VAR>templates/ll_CC</VAR> subdirectory. For example,
-Canadian French template files should be saved in the
-<VAR>templates/fr_CA</VAR> subdirectory. After you have
-translated all of the templates, add the locale to the
-<CODE>LANGUAGES</CODE> variable in the
-<VAR>Makedefs</VAR> file and run "make install" in the
-<VAR>templates</VAR> subdirectory to test the translation.</P>
+<P>Translated versions of the template files should be saved in the <VAR>templates/ll_CC</VAR> subdirectory. For example, Canadian French template files should be saved in the <VAR>templates/fr_CA</VAR> subdirectory. After you have translated all of the templates, add the locale to the <CODE>LANGUAGES</CODE> variable in the <VAR>Makedefs</VAR> file and run "make install" in the <VAR>templates</VAR> subdirectory to test the translation.</P>
 
 <DIV CLASS="table"><TABLE ID="table1" SUMMARY="Web Interface Template Files">
 <CAPTION>Table 1: Web Interface Template Files</CAPTION>
 
 <DIV CLASS="table"><TABLE ID="table1" SUMMARY="Web Interface Template Files">
 <CAPTION>Table 1: Web Interface Template Files</CAPTION>
@@ -190,8 +176,8 @@ translated all of the templates, add the locale to the
        <TD>This is the "unknown operation" error page.</TD>
 </TR>
 <TR>
        <TD>This is the "unknown operation" error page.</TD>
 </TR>
 <TR>
-       <TD>header.tmpl(.in)</TD>
-       <TD>This template is used as the standard header on all dynamic content. Edit the <VAR>header.tmpl.in</VAR> file and let the configure script generate the <VAR>header.tmpl</VAR> file.</TD>
+       <TD>header.tmpl</TD>
+       <TD>This template is used as the standard header.</TD>
 </TR>
 <TR>
        <TD>help-header.tmpl</TD>
 </TR>
 <TR>
        <TD>help-header.tmpl</TD>
@@ -205,6 +191,10 @@ translated all of the templates, add the locale to the
        <TD>help-trailer.tmpl</TD>
        <TD>This is the bottom part of the help page.</TD>
 </TR>
        <TD>help-trailer.tmpl</TD>
        <TD>This is the bottom part of the help page.</TD>
 </TR>
+<TR>
+       <TD>home.tmpl</TD>
+       <TD>This is the main home page.</TD>
+</TR>
 <TR>
        <TD>job-cancel.tmpl</TD>
        <TD>This template shows "job canceled".</TD>
 <TR>
        <TD>job-cancel.tmpl</TD>
        <TD>This template shows "job canceled".</TD>
@@ -472,13 +462,14 @@ translated all of the templates, add the locale to the
 
 <H3 ID="CGI">CGI Programs</H3>
 
 
 <H3 ID="CGI">CGI Programs</H3>
 
-<P>CUPS uses five CGI programs to manage the dynamic web interfaces:</P>
+<P>CUPS uses six CGI programs to manage the dynamic web interfaces:</P>
 
 <UL>
 
        <LI><CODE>admin.cgi</CODE></LI>
        <LI><CODE>classes.cgi</CODE></LI>
        <LI><CODE>help.cgi</CODE></LI>
 
 <UL>
 
        <LI><CODE>admin.cgi</CODE></LI>
        <LI><CODE>classes.cgi</CODE></LI>
        <LI><CODE>help.cgi</CODE></LI>
+       <LI><CODE>home.cgi</CODE></LI>
        <LI><CODE>jobs.cgi</CODE></LI>
        <LI><CODE>printers.cgi</CODE></LI>
 
        <LI><CODE>jobs.cgi</CODE></LI>
        <LI><CODE>printers.cgi</CODE></LI>
 
@@ -631,6 +622,11 @@ translated all of the templates, add the locale to the
 <P>The <CODE>help.cgi</CODE> program handles all of the on-line help functions and is run for all direct accesses to the <VAR>/help</VAR> resource.</P>
 
 
 <P>The <CODE>help.cgi</CODE> program handles all of the on-line help functions and is run for all direct accesses to the <VAR>/help</VAR> resource.</P>
 
 
+<H4 ID="home.cgi">home.cgi</H4>
+
+<P>The <CODE>home.cgi</CODE> program handles the home page and OAuth login/logout functions and is run for all direct accesses to the <VAR>/</VAR> resource.
+
+
 <H4 ID="jobs.cgi">jobs.cgi</H4>
 
 <P>The <CODE>jobs.cgi</CODE> program handles all of the job functions and is run for all direct accesses to the <VAR>/jobs</VAR> resource. For most operations it uses the <CODE>JOB_ID</CODE>, <CODE>OP</CODE>, and <CODE>WHICH_JOBS</CODE> form variables to specify the action requested. <A HREF="#table6">Table 6</A> shows the supported <CODE>OP</CODE> values.</P>
 <H4 ID="jobs.cgi">jobs.cgi</H4>
 
 <P>The <CODE>jobs.cgi</CODE> program handles all of the job functions and is run for all direct accesses to the <VAR>/jobs</VAR> resource. For most operations it uses the <CODE>JOB_ID</CODE>, <CODE>OP</CODE>, and <CODE>WHICH_JOBS</CODE> form variables to specify the action requested. <A HREF="#table6">Table 6</A> shows the supported <CODE>OP</CODE> values.</P>