Bug#286858: gnome-cpufreq-applet: Please switch to gettext-based
debconf templates
Martin Quinson
Martin Quinson <Martin.Quinson@tuxfamily.org>,
286858@bugs.debian.org
Sun, 19 Dec 2004 10:39:44 +0100
This is a multi-part MIME message sent by reportbug.
--===============0145964276==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Package: gnome-cpufreq-applet
Version: 0.3.1-2
Severity: wishlist
Tags: patch l10n
Using the "new" gettext format for debconf templates helps for templates
translations. For instance, detecting outdated or untranslated strings
becomes considerably easier. It also keeps track of who did which
translation.
Patch description:
------------------
The attached patch does the required modifications:
- debian/control modification for dependencies:
build-dep: debhelper (>= 4.1.16) which depends on po-debconf
depend: debconf (>= 1.2.0) since old versions have problems with templates
specifying the encoding of their content
- Add 'debconf-updatepo' to the clean target of your debian/rules
(to make sure that the relevant files are ready for translation in the
distributed source packages, and thus help translators)
- execute "debconf-gettextize debian/*templates*". This does:
- generate po/ directory containing all the translation mecanism
- change the template file to mark some strings as translatable by putting
a _ before the field name.
- mark the right strings as translatable in the templates. This is a manual
check to make sure that fields containing stuff which cannot be
translated such as kernel module name, and the one not shown to the users
are not marked as translatable.
- update the style to the best current practice (see below)
For more details, see po-debconf documentation, especially "man 7
po-debconf"
This patch also document the most important modifications in the changelog.
Use this as a sample, and please feel free to change it to fit your taste.
If you want to give me credit for this, write my name but avoid to publish
my email address there since I already get enough spam.
About backports:
----------------
Please note that the suggested modifications will make your
package a little bit harder to backport to earlier Debian releases. If
this is a concern to you, you may try to adopt the method used by the
openssh package and detailed by Colin Watson in
http://lists.debian.org/debian-i18n/2003/debian-i18n-200307/msg00026.html
This patch does not includes this method as this would make it too
invasive, IMHO. So, preserving backportability is up to you...
Stylistic considerations:
-------------------------
While I was working on the convertion to po-debconf, I noticed that the
templates of your package may be easily improved by applying the advices
contained at the following address:
http://people.debian.org/~bubulle/dtsg.txt
I applied the advices from this document concerning the short descriptions,
but you may want to change the long descriptions accordingly as well, for
example to make them clearer even to newbies. Don't get me wrong, I don't
want to criticize, I just want the template to reach a translatable state
(ie quite stable) rather soon.
Future:
-------
Once the switch is achieved, and style improvements are done (if any), I
guess that you will receive translations of your templates rather soon. They
will consist in XX.po files where XX is the code of the language they
contain. Simply put them to debian/po, add a changelog entry, and your
package is ready for rebuilding and uploading after the usual checks.
If you modify your templates in the future, no action is absolutely
mandatory from you to take care of the translations (outdated translations
will be automatically discarded). But it is nicer to your translators and
your not english speaking users to include the updated translations in the
same upload. For that, run debconf-updatepo, and mail each translator the
XX.po file they provided you. Their adress can be found in the headers of
the po file. Wait a few days so that they can do their work, and put the new
version of the po file back in position in debian/po before upload.
Thanks for helping the translators, and thus your non english speaker
end-users.
Bye, Mt.
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-1-686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
Versions of packages gnome-cpufreq-applet depends on:
ii gconf2 2.8.1-4 GNOME configuration database syste
ii libart-2.0-2 2.3.16-6 Library of functions for 2D graphi
ii libatk1.0-0 1.8.0-3 The ATK accessibility toolkit
ii libbonobo2-0 2.8.0-3 Bonobo CORBA interfaces library
ii libbonoboui2-0 2.8.0-2 The Bonobo UI library
ii libc6 2.3.2.ds1-18 GNU C Library: Shared libraries an
ii libgconf2-4 2.8.1-4 GNOME configuration database syste
ii libglade2-0 1:2.4.0-1 Library to load .glade files at ru
ii libglib2.0-0 2.4.8-1 The GLib library of C routines
ii libgnome2-0 2.8.0-6 The GNOME 2 library - runtime file
ii libgnomecanvas2-0 2.8.0-1 A powerful object-oriented display
ii libgnomeui-0 2.8.0-3 The GNOME 2 libraries (User Interf
ii libgnomevfs2-0 2.8.3-6 The GNOME virtual file-system libr
ii libgnomevfs2-common 2.8.3-6 The GNOME virtual file-system libr
ii libgtk2.0-0 2.4.13-1 The GTK+ graphical user interface
ii libice6 4.3.0.dfsg.1-8 Inter-Client Exchange library
ii liborbit2 1:2.10.2-1.1 libraries for ORBit2 - a CORBA ORB
ii libpanel-applet2-0 2.8.1-2 Library for GNOME 2 Panel applets
ii libpango1.0-0 1.6.0-3 Layout and rendering of internatio
ii libpopt0 1.7-5 lib for parsing cmdline parameters
ii libsm6 4.3.0.dfsg.1-8 X Window System Session Management
ii libxml2 2.6.11-5 GNOME XML library
ii scrollkeeper 0.3.14-9.1 A free electronic cataloging syste
ii xlibs 4.3.0.dfsg.1-8 X Window System client libraries m
ii zlib1g 1:1.2.2-3 compression library - runtime
--===============0145964276==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: attachment; filename="diff-switch-gnome-cpufreq-applet"
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by imag.imag.fr id iBMH7DE4011843
diff -ruN gnome-cpufreq-applet-0.3.1.cpy/debian/changelog gnome-cpufreq-a=
pplet-0.3.1/debian/changelog
--- gnome-cpufreq-applet-0.3.1.cpy/debian/changelog 2004-12-19 10:22:22.0=
00000000 +0100
+++ gnome-cpufreq-applet-0.3.1/debian/changelog 2004-12-19 10:34:13.00000=
0000 +0100
@@ -1,3 +1,12 @@
+gnome-cpufreq-applet (0.3.1-3) unstable; urgency=3Dlow
+
+ * Switch to po-debconf [Martin Quinson] (Closes: ???)
+ - increase build-dep version on debhelper to (>=3D 4.1.16), which de=
pends
+ on po-debconf
+ - repharse a bit the templates for dfsg compliance.
+
+ --=20
+
gnome-cpufreq-applet (0.3.1-2) unstable; urgency=3Dmedium
=20
* Suppress harmless warning if package is preconfigured.
diff -ruN gnome-cpufreq-applet-0.3.1.cpy/debian/control gnome-cpufreq-app=
let-0.3.1/debian/control
--- gnome-cpufreq-applet-0.3.1.cpy/debian/control 2004-12-19 10:22:22.000=
000000 +0100
+++ gnome-cpufreq-applet-0.3.1/debian/control 2004-12-19 10:28:41.0000000=
00 +0100
@@ -2,7 +2,7 @@
Section: gnome
Priority: optional
Maintainer: Andrew Lau <netsnipe@users.sourceforge.net>
-Build-Depends: autotools-dev, cdbs, debhelper (>=3D 4.1), gnome-pkg-tool=
s, libpanel-applet2-dev (>=3D 2.0), libxml-parser-perl, scrollkeeper
+Build-Depends: autotools-dev, cdbs, debhelper (>=3D 4.1.16), gnome-pkg-t=
ools, libpanel-applet2-dev (>=3D 2.0), libxml-parser-perl, scrollkeeper
Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.=
debian.org>, Akira TAGOH <tagoh@debian.org>, Andreas Rottmann <rotty@debi=
an.org>, Carlos Perell=C3=B3 Mar=C3=ADn <carlos@pemas.net>, Edd Dumbill <=
ejad@debian.org>, Emil Soleyman-Zomalan <emil@nishra.com>, Gustavo Noronh=
a Silva <kov@debian.org>, J.H.M. Dassen (Ray) <jdassen@debian.org>, Joe D=
rew <drew@debian.org>, Johannes Rohr <j.rohr@comlink.org>, Jordi Mallach =
<jordi@debian.org>, Jose Carlos Garcia Sogo <jsogo@debian.org>, Josselin =
Mouette <joss@debian.org>, Marc 'HE' Brockschmidt <he@debian.org>, Ond=C5=
=99ej Sur=C3=BD <ondrej@debian.org>, Rob Bradford <rob@debianplanet.org>,=
Robert McQueen <robot101@debian.org>, Ross Burton <ross@debian.org>, Seb=
astien Bacher <seb128@debian.org>, Takuo KITAME <kitame@debian.org>
Standards-Version: 3.6.1
=20
diff -ruN gnome-cpufreq-applet-0.3.1.cpy/debian/po/POTFILES.in gnome-cpuf=
req-applet-0.3.1/debian/po/POTFILES.in
--- gnome-cpufreq-applet-0.3.1.cpy/debian/po/POTFILES.in 1970-01-01 01:00=
:00.000000000 +0100
+++ gnome-cpufreq-applet-0.3.1/debian/po/POTFILES.in 2004-12-19 10:24:08.=
000000000 +0100
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
diff -ruN gnome-cpufreq-applet-0.3.1.cpy/debian/po/templates.pot gnome-cp=
ufreq-applet-0.3.1/debian/po/templates.pot
--- gnome-cpufreq-applet-0.3.1.cpy/debian/po/templates.pot 1970-01-01 01:=
00:00.000000000 +0100
+++ gnome-cpufreq-applet-0.3.1/debian/po/templates.pot 2004-12-19 10:32:1=
1.000000000 +0100
@@ -0,0 +1,58 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-12-19 10:32+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=3DCHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Install cpufreq-selector with SUID root?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"You have the option of installing a component of the CPU Frequency Scal=
ing "
+"Monitor (cpufreq-selector) with the SUID bit set."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"If you make cpufreq-selector SUID, any user can then set the CPU's cloc=
k "
+"frequency without needing any additional privileges. This could, howeve=
r, "
+"potentially allow it to be used during a security attack on your comput=
er. "
+"If in doubt, I suggest you install it without SUID."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The applet will continue to work if you choose to disable SUID for cpuf=
req-"
+"selector, but only for monitoring the CPU clock frequency. You may need=
to "
+"restart this applet before this decision becomes effective."
+msgstr ""
diff -ruN gnome-cpufreq-applet-0.3.1.cpy/debian/rules gnome-cpufreq-apple=
t-0.3.1/debian/rules
--- gnome-cpufreq-applet-0.3.1.cpy/debian/rules 2004-12-19 10:22:22.00000=
0000 +0100
+++ gnome-cpufreq-applet-0.3.1/debian/rules 2004-12-19 10:37:04.000000000=
+0100
@@ -17,3 +17,7 @@
binary-post-install/gnome-cpufreq-applet::
find debian/gnome-cpufreq-applet/usr/share \
-type f | xargs chmod 644
+
+# Be nice to translators: Make sure the source pkg contains uptodate tra=
nslation file
+clean::
+ debconf-updatepo
diff -ruN gnome-cpufreq-applet-0.3.1.cpy/debian/templates gnome-cpufreq-a=
pplet-0.3.1/debian/templates
--- gnome-cpufreq-applet-0.3.1.cpy/debian/templates 2004-12-19 10:22:22.0=
00000000 +0100
+++ gnome-cpufreq-applet-0.3.1/debian/templates 2004-12-19 10:26:19.00000=
0000 +0100
@@ -1,18 +1,15 @@
Template: gnome-cpufreq-applet/SUID_bit
Type: boolean
Default: false
-Description: Do you want cpufreq-selector to be installed SUID root?
+_Description: Install cpufreq-selector with SUID root?
You have the option of installing a component of the CPU Frequency Scal=
ing
Monitor (cpufreq-selector) with the SUID bit set.
.
If you make cpufreq-selector SUID, any user can then set the CPU's cloc=
k
frequency without needing any additional privileges. This could, howeve=
r,
- potentially allow it to be used during a security attack on your comput=
er. If
- in doubt, I suggest you install it without SUID.
+ potentially allow it to be used during a security attack on your comput=
er.
+ If in doubt, I suggest you install it without SUID.
.
The applet will continue to work if you choose to disable SUID for
- cpufreq-selector, but only for monitoring the CPU clock frequency. Note=
that
- this applet may also require a restart for this decision to take affect.
- .
- If you change your mind later, you can run:
- # dpkg-reconfigure gnome-cpufreq-applet
+ cpufreq-selector, but only for monitoring the CPU clock frequency. You =
may
+ need to restart this applet before this decision becomes effective.
--===============0145964276==--