From: Michael R Sweet Date: Sun, 19 Apr 2026 18:20:52 +0000 (-0400) Subject: Update translation guide. X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=HEAD;p=thirdparty%2Fcups.git Update translation guide. --- diff --git a/doc/help/translation.html b/doc/help/translation.html index 50e3bbd683..4d0bc681d0 100644 --- a/doc/help/translation.html +++ b/doc/help/translation.html @@ -8,7 +8,7 @@

Translating and Customizing CUPS

-

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.

+

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 Weblate for basic localization of the message catalogs.

Getting Started

@@ -17,27 +17,25 @@ -

With the exception of the message catalogs and desktop file, localization files are placed in subdirectories under the doc and templates using the locale name. Locale names are either ll or ll_CC, where "ll" is the 2-letter language code and "CC" is the 2-letter country code. CUPS does not currently use or support the newer ll-region syntax for locale names.

+

With the exception of the message catalogs and desktop file, localization files are placed in subdirectories under the doc and templates using the locale name. Locale names are either ll or ll_CC, where "ll" is the 2-letter ISO language code and "CC" is the 2-letter ISO country code. Note: CUPS does not currently use or support the newer ll-region syntax for locale names.

All non-image files must be encoded using the UTF-8 character set.

Submitting a Translation for CUPS

-

To submit a translation for inclusion in CUPS, translate the desktop file, all of the template files, the index.html.in 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:

+

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:

-tar cvf ll_CC.tar.gz desktop/cups.desktop doc/ll_CC locale/cups_ll_CC.po templates/ll_CC
+tar cvf ll_CC.tar.gz desktop/cups.desktop locale/cups_ll_CC.po templates/ll_CC
 

Replace "ll_CC" with the locale name for your translation. Once you have created the archive, go to the CUPS project page and submit a bug report, attaching the translation to the report.

@@ -55,11 +53,6 @@ Comment[ll_CC]=Translation of "CUPS Web Interface" -

The Home Page

- -

The index.html.in file is a complete HTML file that is displayed when the user visits "http://localhost:631/". Edit the existing doc/index.html.in and save it in the doc/ll_CC subdirectory so that the configure script can generate it. After configuring, run "make install" in the doc subdirectory to test the new home page.

- -

Message Catalogs

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 cups_ll.po or cups_ll_CC.po, where "ll" is the standard 2-letter abbreviation for the language and "CC" is the standard 2-letter abbreviation for the country.

@@ -91,14 +84,7 @@ cd locale

Template files are HTML files with special formatting characters in them that allow substitution of variables and arrays. The CUPS CGI programs (admin.cgi, classes.cgi, help.cgi, jobs.cgi, and printers.cgi) use these template file to provide dynamic content for the web interface. Template files are installed in the /usr/share/cups/templates directory by default. Table 1 lists the various template files and their purpose.

-

Translated versions of the template files should be saved in -the templates/ll_CC subdirectory. For example, -Canadian French template files should be saved in the -templates/fr_CA subdirectory. After you have -translated all of the templates, add the locale to the -LANGUAGES variable in the -Makedefs file and run "make install" in the -templates subdirectory to test the translation.

+

Translated versions of the template files should be saved in the templates/ll_CC subdirectory. For example, Canadian French template files should be saved in the templates/fr_CA subdirectory. After you have translated all of the templates, add the locale to the LANGUAGES variable in the Makedefs file and run "make install" in the templates subdirectory to test the translation.

@@ -190,8 +176,8 @@ translated all of the templates, add the locale to the - - + + @@ -205,6 +191,10 @@ translated all of the templates, add the locale to the + + + + @@ -472,13 +462,14 @@ translated all of the templates, add the locale to the

CGI Programs

-

CUPS uses five CGI programs to manage the dynamic web interfaces:

+

CUPS uses six CGI programs to manage the dynamic web interfaces:

Table 1: Web Interface Template Files
This is the "unknown operation" error page.
header.tmpl(.in)This template is used as the standard header on all dynamic content. Edit the header.tmpl.in file and let the configure script generate the header.tmpl file.header.tmplThis template is used as the standard header.
help-header.tmplhelp-trailer.tmpl This is the bottom part of the help page.
home.tmplThis is the main home page.
job-cancel.tmpl This template shows "job canceled".