~ubuntu-branches/ubuntu/oneiric/localization-config/oneiric

« back to all changes in this revision

Viewing changes to conffiles.d/woody/xfree86-kbd

  • Committer: Bazaar Package Importer
  • Author(s): Konstantinos Margaritis
  • Date: 2004-12-10 19:10:18 UTC
  • Revision ID: james.westby@ubuntu.com-20041210191018-wdjfbljdie570dld
Tags: 0.109
* Translations
  - Added Finnish by Tapio Lehtonen. Closes: #281040
  - Fixed Spanish translation (was too long). Closes: #284570

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
# This script configures XFree86 (woody version 4.2.x)
 
3
 
 
4
use strict;
 
5
use warnings;
 
6
 
 
7
# We use preseed() helper subroutine so we have to include
 
8
# its definition
 
9
require '/usr/lib/localization-config/common/preseed.pl';
 
10
 
 
11
# Define the package name
 
12
my $package = "xserver-xfree86";
 
13
 
 
14
# If no locale is given as argument, quit
 
15
my $lang = $ARGV[0] or die "No language given";
 
16
 
 
17
# We define an associative arrays with the debconf keys
 
18
# These will be used in combination with the values in the
 
19
# next array
 
20
my %keynames = ( LAYOUT     => 'xserver-xfree86/config/inputdevice/keyboard/layout',
 
21
                 XKBOPTIONS => 'xserver-xfree86/config/inputdevice/keyboard/options',
 
22
                 XKBMODEL   => 'xserver-xfree86/config/inputdevice/keyboard/model',
 
23
                 XKBVARIANT => 'xserver-xfree86/config/inputdevice/keyboard/variant'
 
24
               );
 
25
 
 
26
# keyboard layout name
 
27
# one of: am, az, be, bg, br, ca, cs, de, dk, dvorak, ee, el, es, fi, 
 
28
# fr, gb, hu, il, is, it, la, lt, mk, no, pl, pt, ro, ru, se, si, sr,
 
29
# th, tr, ua, us, vn
 
30
# The XKBOPTIONS holds the value of the corresponding XkbOptions found
 
31
# in the XF86Config-4 file. For example to enable keymap switching for
 
32
# the Greek keyboard, one possible option is 'grp:ctrl_shift_toggle'.
 
33
 
 
34
my %lang_map = (
 
35
                    # entries sorted alphabetically
 
36
                    'bs_BA.ISO8859-2' => { LAYOUT => 'bs', XKBOPTIONS => 'grp:alt_shift_toggle', XKBMODEL => 'pc105' },
 
37
                    'bg_BG'        => { LAYOUT => 'bg', XKBVARIANT => ',bds', XKBOPTIONS => 'grp:alt_shift_toggle,grp_led:scroll' },
 
38
                    'ca_ES@euro'   => { LAYOUT => 'es', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
39
                    'cs_CZ'        => { LAYOUT => 'cz_qwerty', XKBOPTIONS => 'grp:shift_toggle,grp_led:scroll' },
 
40
                    'da_DK'        => { LAYOUT => 'dk', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
41
                    'de_BE@euro'   => { LAYOUT => 'de', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
42
                    'de_CH' => { LAYOUT => 'de_CH', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
43
                    'de_DE@euro'   => { LAYOUT => 'de', XKBOPTIONS => 'nodeadkeys', XKBMODEL => 'pc105' },
 
44
                    'el_GR.UTF-8'  => { LAYOUT => 'el', XKBOPTIONS => 'grp:alt_shift_toggle', XKBMODEL => 'pc105' },
 
45
                    'en_AU'        => { LAYOUT => 'us', XKBOPTIONS => '' },
 
46
                    'en_CA'        => { LAYOUT => 'us', XKBOPTIONS => '' },
 
47
                    'en_IE@euro'   => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
48
                    'ga_IE@euro'   => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
49
                    'en_GB'        => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
50
                    'gd_GB'        => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
51
                    'gv_GB'        => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
52
                    'kw_GB'        => { LAYOUT => 'gb', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
53
                    'en_US'        => { LAYOUT => 'us', XKBOPTIONS => '' },
 
54
                    'es_AR'        => { LAYOUT => 'es', XKBOPTIONS => '' },
 
55
                    'es_ES@euro'   => { LAYOUT => 'es', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
56
                    'es_MX'        => { LAYOUT => 'la', XKBOPTIONS => '' },
 
57
                    'es_PE'        => { LAYOUT => 'es_la', XKBOPTIONS => '' },
 
58
                    'fa_IR.UTF-8'  => { LAYOUT => 'us,fa', XKBOPTIONS => 'grp:ctrl_shift_toggle,grp_led:scroll', XKBMODEL => 'pc105' },
 
59
                    'fi_FI'        => { LAYOUT => 'fi', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
60
                    'fi_FI@euro'   => { LAYOUT => 'fi', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
61
                    'fr_BE'        => { LAYOUT => 'be', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
62
                    'fr_BE@euro'   => { LAYOUT => 'be', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
63
                    'fr_CA'        => { LAYOUT => 'us', XKBOPTIONS => '' },
 
64
                    'fr_CH'        => { LAYOUT => 'fr_CH', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
65
                    'fr_FR@euro'   => { LAYOUT => 'fr', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
66
                    'he_IL'        => { LAYOUT => 'il', XKBOPTIONS => 'grp:alt_shift_toggle' },
 
67
                    'it_IT@euro'   => { LAYOUT => 'it', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
68
                    'ja_JP.EUC-JP' => { LAYOUT => 'jp', XKBOPTIONS => '', XKBMODEL => 'jp106' },
 
69
                    'ko_KR'        => { LAYOUT => 'us', XKBOPTIONS => '' },
 
70
                    'lv_LV'        => { LAYOUT => 'lv', XKBOPTIONS => '' },
 
71
                    'lt_LT'        => { LAYOUT => 'lt', XKBOPTIONS => 'grp:ctrl_shift_toggle', XKBMODEL => 'pc105' },
 
72
                    'nb_NO'        => { LAYOUT => 'no', XKBOPTIONS => '', XKBMODEL => 'pc105' }, # Same as no_NO
 
73
                    'nds_DE'       => { LAYOUT => 'de', XKBOPTIONS => '' },
 
74
                    'nl_BE@euro'   => { LAYOUT => 'be', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
75
                    'nl_NL@euro'   => { LAYOUT => 'us', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
76
                    'nn_NO'        => { LAYOUT => 'no', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
77
                    'no_NO'        => { LAYOUT => 'no', XKBOPTIONS => '', XKBMODEL => 'pc105' }, # Same as nb_NO
 
78
                    'pl_PL'        => { LAYOUT => 'pl', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
79
                    'pt_BR'        => { LAYOUT => 'br', XKBOPTIONS => '', XKBMODEL => 'abnt2', XKBVARIANT => 'abnt2' },
 
80
                    'ru_RU'        => { LAYOUT => 'ru', XKBOPTIONS => 'grp:ctrl_shift_toggle,grp_led:scroll', XKBMODEL => 'pc105' },
 
81
                    'se_NO'        => { LAYOUT => 'sapmi', XKBOPTIONS => '' },
 
82
                    'sk_SK'        => { LAYOUT => 'sk_qwerty', XKBOPTIONS => 'grp:shift_toggle,grp_led:scroll' },
 
83
                    'sl_SI'        => { LAYOUT => 'si', XKBOPTIONS => 'grp:alt_shift_toggle', XKBMODEL => 'pc105' },
 
84
                    'sv_SE'        => { LAYOUT => 'se', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
85
                    'sv_FI'        => { LAYOUT => 'fi', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
86
                    'sv_FI@euro'   => { LAYOUT => 'fi', XKBOPTIONS => '', XKBMODEL => 'pc105' },
 
87
                    'tr_TR'        => { LAYOUT => 'tr', XKBOPTIONS => 'caps:shift', XKBMODEL => 'pc105' },
 
88
                    'uk_UA'        => { LAYOUT => 'ua', XKBOPTIONS => 'grp_led:caps,grp:ctrl_shift_toggle', XKBMODEL => 'pc105'},
 
89
                   ) ;
 
90
                   
 
91
sub get_lang_map() {
 
92
    return %lang_map;
 
93
}
 
94
 
 
95
# Print the supported locale entries.
 
96
if ("supported" eq $lang) {
 
97
    for $lang (sort keys %lang_map) {
 
98
        print "$lang\n";
 
99
    }
 
100
    exit 0;
 
101
}
 
102
 
 
103
# Call the preseed() subroutine to set the package debconf values.
 
104
preseed($package, $lang, \%lang_map, \%keynames);
 
105
 
 
106
1;