Re: X Strike Force XFree86 SVN commit: r1762 - trunk/debian
On Mon, Aug 30, 2004 at 02:30:32AM -0500, X Strike Force SVN Repository Admin wrote:
> Author: fabbione
> Date: 2004-08-30 02:30:28 -0500 (Mon, 30 Aug 2004)
> New Revision: 1762
>
> Modified:
> trunk/debian/CHANGESETS
> trunk/debian/changelog
> trunk/debian/xserver-xfree86.config.in
> Log:
> Add french and danish translation of "Generic Monitor" to
> xserver-xfree86.config.in. Thanks to Christian Perrier and Anders Dybdal.
Please don't do that, config scripts must not contain non-English
strings. For instance your implementation does not consider the
LANGUAGE environment variable and user's encoding.
Here is a patch.
Denis
Index: xserver-xfree86.config.in
===================================================================
--- xserver-xfree86.config.in (revision 1765)
+++ xserver-xfree86.config.in (working copy)
@@ -293,6 +293,25 @@
set -e
}
+set_debconf_default () {
+ # Syntax: set_debconf_default template default_answer
+ #
+ # Set a default value if this question has never been seen.
+ if [ $# -ne 2 ]; then
+ echo "internal error: set_debconf_default() called with wrong number of arguments: $*" >&2
+ exit 1
+ fi
+ TEMPLATE=$1
+ DEFAULT_ANSWER=$2
+ set +e
+ db_fget "$TEMPLATE" seen
+ if [ "$RET" = "false" ]; then
+ debug_echo "set_debconf_default: setting default value for $TEMPLATE to \"$DEFAULT_ANSWER\""
+ db_set "$TEMPLATE" "$DEFAULT_ANSWER"
+ fi
+ set -e
+}
+
auto_answer () {
# Syntax: auto_answer input_command priority template default_answer
#
@@ -718,29 +737,14 @@
if which discover > /dev/null 2>&1; then
if [ "$AUTODETECT_VIDEO_CARD" = "true" ]; then
DEFAULT=$(echo "$DISCOVERED_VIDEO" | awk 'BEGIN { FS="\t" } {print $1}')
+ if [ -n "$DEFAULT" ]; then
+ set_debconf_default xserver-xfree86/config/device/identifier "$DEFAULT"
+ fi
fi
fi
fi
-if [ -z "$DEFAULT" ]; then
- # fall back to some language-specific generic text
- case "${LC_ALL:-${LC_MESSAGES:-$LANG}}" in
- ca_*) DEFAULT="Targeta de vídeo genèrica" ;;
- da_*) DEFAULT="Standard Video Kort" ;;
- de_*) DEFAULT="Standardgrafikkarte" ;;
- es_*) DEFAULT="Tarjeta de vídeo genérica" ;;
- fr_*) DEFAULT="Carte vidéo générique" ;;
- gl_*) DEFAULT="Tarxeta de Video Xenérica" ;;
- it_*) DEFAULT="Scheda video generica" ;;
- # ja
- # nl
- pt_BR) DEFAULT="Placa de Vídeo Genérica" ;;
- # ru
- # sv
- *) DEFAULT="Generic Video Card" ;;
- esac
-fi
# this question requires input validation
-MAY_BE_NULL= auto_answer validate_string_db_input "$(priority_ceil low)" xserver-xfree86/config/device/identifier "$DEFAULT"
+MAY_BE_NULL= validate_string_db_input "$(priority_ceil low)" xserver-xfree86/config/device/identifier
# BusID
PRIORITY=low
@@ -1040,7 +1044,7 @@
MONITOR_IDENTIFIER=$(echo "$EDID_DUMP" | grep Identifier | cut -f2 -d\")
if [ -n "$MONITOR_IDENTIFIER" ]; then
debug_echo "get-edid reports monitor identifier of \"$MONITOR_IDENTIFIER\""
- DEFAULT_MONITOR_IDENTIFIER="$MONITOR_IDENTIFIER"
+ set_debconf_default xserver-xfree86/config/monitor/identifier "$MONITOR_IDENTIFIER"
else
debug_echo "got null monitor identifier from get-edid"
fi
@@ -1076,29 +1080,8 @@
# priority of xserver-xfree86/config/monitor/identifier
PRIORITY=low
-# monitor identifier; try to set a sensible default
-if [ -n "$DEFAULT_MONITOR_IDENTIFIER" ]; then
- DEFAULT="$DEFAULT_MONITOR_IDENTIFIER"
-else
- # fall back to some language-specific generic text
- case "${LC_ALL:-${LC_MESSAGES:-$LANG}}" in
- ca_*) DEFAULT="Monitor genèric" ;;
- da_*) DEFAULT="Standard Skærm" ;;
- de_*) DEFAULT="Standardbildschirm" ;;
- es_*) DEFAULT="Monitor genérico" ;;
- fr_*) DEFAULT="Écran générique" ;;
- # gl
- it_*) DEFAULT="Monitor Generico" ;;
- # ja
- # nl
- pt_BR) DEFAULT="Monitor Genérico" ;;
- # ru
- # sv
- *) DEFAULT="Generic Monitor" ;;
- esac
-fi
# this question requires input validation
-MAY_BE_NULL= auto_answer validate_string_db_input "$(priority_ceil $PRIORITY)" xserver-xfree86/config/monitor/identifier "$DEFAULT"
+MAY_BE_NULL= validate_string_db_input "$(priority_ceil $PRIORITY)" xserver-xfree86/config/monitor/identifier
# priority of xserver-xfree86/config/monitor/{several things}
PRIORITY=high
Index: xserver-xfree86.templates
===================================================================
--- xserver-xfree86.templates (revision 1765)
+++ xserver-xfree86.templates (working copy)
@@ -116,6 +116,7 @@
Template: xserver-xfree86/config/device/identifier
Type: string
+_Default: Generic Video Card
_Description: Enter an identifier for your video card.
The X server configuration file associates your video card with a name that
you may provide. This is usually the vendor or brand name followed by the
@@ -450,6 +451,7 @@
Template: xserver-xfree86/config/monitor/identifier
Type: string
+_Default: Generic Monitor
_Description: Enter an identifier for your monitor.
The X server configuration file associates your monitor with a name that you
may provide. This is usually the vendor or brand name followed by the model
_Description: Please enter only a numeric value.
Characters other than digits are not allowed in the entry.
Index: po/gl.po
===================================================================
--- po/gl.po (revision 1765)
+++ po/gl.po (working copy)
@@ -519,6 +519,12 @@
"para que soporten unha configuración de varias pantallas."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr "Tarxeta de Video Xenérica"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1293,6 +1299,12 @@
"posible no monitor, se quere."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/cs.po
===================================================================
--- po/cs.po (revision 1765)
+++ po/cs.po (working copy)
@@ -574,6 +574,12 @@
"můşete pozdÄ?ji pÅ?idat úpravou konfiguraÄ?nÃho souboru X serveru."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1427,6 +1433,12 @@
"displeji by mÄ?li vybrat reÅŸim doporuÄ?enÃœ vÃœrobcem monitoru."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/pt_BR.po
===================================================================
--- po/pt_BR.po (revision 1765)
+++ po/pt_BR.po (working copy)
@@ -611,6 +611,12 @@
"para suportarem uma configuração de diversos monitores."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr "Placa de Vídeo Genérica"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1510,6 +1516,12 @@
"caso de dúvidas, use o modo de vídeo recomendado pelo fabricante de seu LCD."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr "Monitor Genérico"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/es.po
===================================================================
--- po/es.po (revision 1765)
+++ po/es.po (working copy)
@@ -614,6 +614,12 @@
"head»)."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr "Tarjeta de vídeo genérica"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1509,6 +1515,12 @@
"dudas, use el modo de vídeo recomendado por el fabricante de su LCD."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr "Monitor genérico"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/fr.po
===================================================================
--- po/fr.po (revision 1765)
+++ po/fr.po (working copy)
@@ -618,6 +618,12 @@
"pour accepter des systèmes multi-écrans."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr "Carte vidéo générique"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1540,6 +1546,12 @@
"certain, utilisez le mode vidéo recommandé par le fabricant de votre écran."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr "Écran générique"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/nl.po
===================================================================
--- po/nl.po (revision 1765)
+++ po/nl.po (working copy)
@@ -614,6 +614,12 @@
"configuratiebestanden zelf aan te passen."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1511,6 +1517,12 @@
"beeldmodus."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/pl.po
===================================================================
--- po/pl.po (revision 1765)
+++ po/pl.po (working copy)
@@ -504,6 +504,12 @@
msgstr ""
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1196,6 +1202,12 @@
msgstr ""
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/it.po
===================================================================
--- po/it.po (revision 1765)
+++ po/it.po (working copy)
@@ -584,6 +584,12 @@
"permettere di avere una configurazione con più monitor."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr "Scheda video generica"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1482,6 +1488,12 @@
"produttore del vostro LCD."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr "Monitor Generico"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/templates.pot
===================================================================
--- po/templates.pot (revision 1765)
+++ po/templates.pot (working copy)
@@ -473,6 +473,12 @@
msgstr ""
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1164,6 +1170,12 @@
msgstr ""
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/ca.po
===================================================================
--- po/ca.po (revision 1765)
+++ po/ca.po (working copy)
@@ -610,6 +610,12 @@
"suporte una configuració amb múltiples caps."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr "Targeta de vÃdeo genÚrica"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1510,6 +1516,12 @@
"mode de vÃdeo recomanat pel fabricant del vostre monitor LCD."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr "Monitor genÚric"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/da.po
===================================================================
--- po/da.po (revision 1765)
+++ po/da.po (working copy)
@@ -592,6 +592,12 @@
"flere."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr "Standard Video Kort"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1452,6 +1458,12 @@
"bruge den opløsning, som anbefales af din LCD-skærms producent."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr "Standard Skærm"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/tr.po
===================================================================
--- po/tr.po (revision 1765)
+++ po/tr.po (working copy)
@@ -598,6 +598,12 @@
"etkinleÅ?tirmek için X sunucu yapılandırma dosyaları dÃŒzenlenebilir."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1475,6 +1481,12 @@
"seçin."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/ru.po
===================================================================
--- po/ru.po (revision 1765)
+++ po/ru.po (working copy)
@@ -596,6 +596,12 @@
"Ó ÎÅÓËÏÌØËÉÍÉ ÄÉÓÐÌÅÑÍÉ."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1473,6 +1479,12 @@
"ÐÒÏÉÚ×ÏÄÉÔÅÌÅÍ ×ÁÛÅÇÏ öëé-ÍÏÎÉÔÏÒÁ."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/sv.po
===================================================================
--- po/sv.po (revision 1765)
+++ po/sv.po (working copy)
@@ -518,6 +518,12 @@
"konfigurationsfiler kan redigeras för att stödja en flerskärmskonfiguration."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1275,6 +1281,12 @@
"om du vill."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/de.po
===================================================================
--- po/de.po (revision 1765)
+++ po/de.po (working copy)
@@ -611,6 +611,12 @@
"Betrieb zu unterstützen."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr "Standardgrafikkarte"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1506,6 +1512,12 @@
"verwendet werden, den der Hersteller des LCDs empfiehlt."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr "Standardbildschirm"
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/ja.po
===================================================================
--- po/ja.po (revision 1765)
+++ po/ja.po (working copy)
@@ -600,6 +600,12 @@
"¥Ø¥Ã¥É€ÎÀßÄê€â€Ç€€Þ€¹¡£"
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1463,6 +1469,12 @@
"€é€Ê€±€ì€Ð¡¢LCD €ÎÀœÂ€žµ€¬¿äŸ©€¹€ë¥Ó¥Ç¥ª¥â¡Œ¥É€ò»È€Ã€Æ€¯€À€µ€€¡£"
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Index: po/el.po
===================================================================
--- po/el.po (revision 1765)
+++ po/el.po (working copy)
@@ -628,6 +628,12 @@
"ΌιαÏ? κάÏ?Ï?Ï?Îœ οΞÏ?ΜηÏ?."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:119
+msgid "Generic Video Card"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:119
msgid "Enter an identifier for your video card."
@@ -1548,6 +1554,12 @@
"Ï?οÏ? Ï?Ï?οÏ?είΜεÏ?αι αÏ?Ï? Ï?οΜ καÏ?αÏ?κεÏ?αÏ?Ï?ή Ï?ηÏ? LCD οΞÏ?ΜηÏ? Ï?αÏ?."
#. Type: string
+#. Default
+#: ../xserver-xfree86.templates:454
+msgid "Generic Monitor"
+msgstr ""
+
+#. Type: string
#. Description
#: ../xserver-xfree86.templates:453
msgid "Enter an identifier for your monitor."
Reply to: