~ubuntu-branches/ubuntu/wily/console-setup/wily

« back to all changes in this revision

Viewing changes to debian/keyboard-configuration.config

  • Committer: Bazaar Package Importer
  • Author(s): Christian Perrier, Christian Perrier, Anton Zinoviev, Debconf translations, Samuel Thibault
  • Date: 2010-11-16 20:00:38 UTC
  • mto: This revision was merged to the branch mainline in revision 114.
  • Revision ID: james.westby@ubuntu.com-20101116200038-51op82qczxo6wj6c
Tags: 1.59
* Team upload

[ Christian Perrier ]
* Activate keyboard-configuration.templates for translation.
  Re-use old translations we had in the past. Thanks to
  Samuel Thibault for the help. Closes: #581683

[ Anton Zinoviev]
* Fix the code detecting the presence of a hardware keyboard.  Thanks to
  Thibaut GIRKA for the patch, closes: #602425.
* keyboard-configuration.config: default keyboard layout for Sinhala language

[ Debconf translations ]
* French (Christian Perrier)
* Simplified Chinese (YunQiang Su).  Closes: #603072
* Portuguese (Miguel Figueiredo).  Closes: #603071
* Russian (Yuri Kozlov).  Closes: #603073
* Catalan (Jordi Mallach).  Closes: #603086
* Greek (Lampropoulos Anastasios).
* Slovak (Ivan Masár).  Closes: #603108
* Spanish (Javier Fernández-Sanguino).  Closes: #603120
* Icelandic (Sveinn í Felli).
* Bulgarian (Damyan Ivanov).  Closes: #603149
* Japanese (Kenshi Muto).  Closes: #603154
* Bosnian (Armin Beširović).
* Finnish (Esko Arajärvi).  Closes: #603200
* Esperanto (Felipe Castro).  Closes: #603226
* Gujarati (Kartik Mistry).  Closes: #603238
* Hindi (Kumar Appaiah).  Closes: #603098
* Estonian (Mattias Põldaru).
* Dzongkha (Jurmey Rabgay).
* Persian (Behrad Eslamifar).  Closes: #603312
* Danish (Ask Hjorth Larsen).  Closes: #603365
* German (Holger Wansing).  Closes: #603404
* Czech (Miroslav Kure).  Closes: #603449
* Serbian (Janos Guljas).  Closes: #603497
* Serbian (Latin) (Janos Guljas).  Closes: #603498
* Arabic (Ossama Khayat).  Closes: #603519, #603520
* Turkish (Mert Dirik).  Closes: #603522
* Bengali (Israt Jahan). 
* Kazakh (Baurzhan Muftakhidinov).  Closes: #603539
* Bokmål, Norwegian (Hans Fredrik Nordhaug).  Closes: #603576
* Slovenian (Vanja Cvelbar).  Closes: #603689
* Macedonian (Georgi Stanojevski).

[ Samuel Thibault ]
* Keyboard/kbdcompiler: Add np to nonlatin layouts.
* debian/keyboard-configuration.templates: Add simplified
  keyboard-configuration/xkb-keymap question (Closes: #581683).
* debian/keyboard-configuration.config:
  - Set default layouts for Bhutan, Ethiopia, France (for Basque in France),
  Cambodia, Korea, Kazakhstan, Sri Lanka, Nepal, Bengali, and Chinese,
  Swiss German to handle all languages supported by d-i.
  - Use latin9 variant of fr keyboard to get œ.
  - Raise priority for Esperanto to critical as it's typically used on any
  kind of keyboard.
  - Add np to nonlatin layouts.
  - Use phonetic variant by default for bg.
  - In d-i, skip all questions except the simplified
  keyboard-configuration/xkb-keymap and keyboard-configuration/toggle for
  non-latin languages.
* Import keyboard layout translations from console-data.

Show diffs side-by-side

added added

removed removed

Lines of Context:
451
451
        ;;
452
452
    *_BG*)
453
453
        XKBLAYOUT=us,bg  # Bulgaria
 
454
        XKBVARIANT=,phonetic
454
455
        layout_priority=critical
455
456
        ;;
456
457
    *_BR*)
457
458
        XKBLAYOUT=br  # Brazil
458
459
        ;;
 
460
    *_BT*)
 
461
        XKBLAYOUT=us,bt  # Bhutan
 
462
        ;;
459
463
    *_BY*)
460
464
        XKBLAYOUT=us,by  # Belarus
461
465
        ;;
465
469
    *_CA*)
466
470
        XKBLAYOUT=us  # U.S. English
467
471
        ;;
 
472
    de_CH*)
 
473
        XKBLAYOUT=ch  # Switzerland
 
474
        XKBVARIANT=de # German
 
475
        ;;
468
476
    fr_CH*)
469
477
        XKBLAYOUT=ch  # Switzerland
470
478
        XKBVARIANT=fr # French
494
502
    *_ES*)
495
503
        XKBLAYOUT=es  # Spain
496
504
        ;;
 
505
    *_ET*)
 
506
        XKBLAYOUT=et  # Ethiopia
 
507
        ;;
497
508
    se_FI*)
498
509
        XKBLAYOUT=fi  # Finland
499
510
        XKBVARIANT=smi # Northern Saami
502
513
        XKBLAYOUT=fi  # Finland
503
514
        XKBVARIANT=fi # Finland
504
515
        ;;
 
516
    *_FR*)
 
517
        XKBLAYOUT=fr  # French
 
518
        XKBVARIANT=latin9
 
519
        ;;
505
520
    *_GB*)
506
521
        XKBLAYOUT=gb  # United Kingdom
507
522
        ;;
546
561
    *_KG*)
547
562
        XKBLAYOUT=us,kg  # Kyrgyzstan
548
563
        ;;
 
564
    *_KH*)
 
565
        XKBLAYOUT=us,kh  # Cambodia
 
566
        ;;
 
567
    *_KP*)
 
568
        XKBLAYOUT=kr  # Korea
 
569
        ;;
 
570
    *_KZ*)
 
571
        XKBLAYOUT=us,kz  # Kazakhstan
 
572
        ;;
 
573
    *_LK*)
 
574
        XKBLAYOUT=us,lk  # Sri Lanka
 
575
        ;;
549
576
    *_MA*)
550
577
        XKBLAYOUT=us,ma  # Morocco
551
578
        ;;
569
596
    *_NO*)
570
597
        XKBLAYOUT=no  # Norway (se_NO is not in this case)
571
598
        ;;
 
599
    *_NP*)
 
600
        XKBLAYOUT=us,np  # Nepal
 
601
        ;;
572
602
    *_PL*)
573
603
        XKBLAYOUT=pl  # Poland
574
604
        ;;
623
653
    ar_*)
624
654
        XKBLAYOUT=us,ara # Arabic
625
655
        ;;
 
656
    bn_*)
 
657
        XKBLAYOUT=us,in  # India
 
658
        XKBVARIANT=,ben # Bengali
 
659
        ;;
626
660
    bs_*)
627
661
        XKBLAYOUT=ba  # Bosnia and Herzegovina
628
662
        ;;
637
671
        ;;
638
672
    eo|eo.*|eo_*|eo\@*)
639
673
        XKBLAYOUT=epo  # Esperanto
 
674
        layout_priority=critical
640
675
        ;;
641
676
    fr_*)
642
677
        XKBLAYOUT=fr  # France
 
678
        XKBVARIANT=latin9
643
679
        layout_priority=critical
644
680
        ;;
645
681
    gu_*)
675
711
        XKBLAYOUT=us,in  # India
676
712
        XKBVARIANT=,guru # Gurmukhi
677
713
        ;;
 
714
    si_*)
 
715
        XKBLAYOUT=us,si  # Sri Lanka
 
716
        XKBVARIANT=,sin_phonetic # Sinhala
 
717
        ;;
678
718
    sr_*)
679
719
        XKBLAYOUT=cs,cs  # Serbia and Montenegro
680
720
        XKBVARIANT=latin,basic
692
732
        XKBLAYOUT=us,in  # India
693
733
        XKBVARIANT=,tel # Telugu
694
734
        ;;
 
735
    zh_*)
 
736
        XKBLAYOUT=cn  # Chinese
 
737
        ;;
695
738
    # Fallback
696
739
    *)
697
740
        XKBLAYOUT=us
714
757
    XKBOPTIONS="$RET"
715
758
fi
716
759
 
717
 
# Use the value of debian-installer/keymap to get better default
 
760
# Use the value of console-data debian-installer/keymap to get better default
718
761
# layout.  This guesswork is copied from xserver-xorg.config.
719
762
# Lower the priority of the Debconf question to medium.
720
763
if db_get debian-installer/keymap && [ "$RET" ]; then
861
904
            unsupported_layout=no
862
905
            ;;
863
906
        # TODO: make s.t. to not forget to update this list
864
 
        cs,cs|us,am|us,af|us,ara|us,ben|us,bd|us,bg|us,bt|us,by|us,deva|us,ge|us,gh|us,gr|us,guj|us,guru|us,il|us,in|us,ir|us,iku|us,iq|us,ir|us,kan|us,kh|us,kz|us,la|us,lao|us,lk|us,lt|us,kg|us,ma|us,mal|us,mk|us,mm|us,mn|us,mv|us,ori|us,pk|us,ru|us,scc|us,sy|us,syr|us,tel|us,th|us,tj|us,tam|us,ua|us,uz)
 
907
        cs,cs|us,am|us,af|us,ara|us,ben|us,bd|us,bg|us,bt|us,by|us,deva|us,ge|us,gh|us,gr|us,guj|us,guru|us,il|us,in|us,ir|us,iku|us,iq|us,ir|us,kan|us,kh|us,kz|us,la|us,lao|us,lk|us,lt|us,kg|us,ma|us,mal|us,mk|us,mm|us,mn|us,mv|us,np|us,ori|us,pk|us,ru|us,scc|us,sy|us,syr|us,tel|us,th|us,tj|us,tam|us,ua|us,uz)
865
908
            if [ "${XKBVARIANT%,*}" = '' ]; then
866
909
                default_layout="${XKBLAYOUT#*,}"
867
910
                default_variant="${XKBVARIANT#*,}"
1003
1046
db_default keyboard-configuration/altgr "$default_altgr"
1004
1047
db_default keyboard-configuration/compose "$default_compose"
1005
1048
db_default keyboard-configuration/ctrl_alt_bksp "$default_ctrl_alt_bksp"
 
1049
if [ ! "$unsupported_layout" = yes ]
 
1050
then
 
1051
    if [ -n "$default_variant" ]
 
1052
    then
 
1053
        default_keymap="$default_layout($default_variant)"
 
1054
    else
 
1055
        default_keymap="$default_layout"
 
1056
    fi
 
1057
fi
 
1058
db_default keyboard-configuration/xkb-keymap "$default_keymap"
1006
1059
initial_xkbmodel="$XKBMODEL"
1007
1060
 
1008
1061
#######################################################################
1073
1126
            fi
1074
1127
            ;;
1075
1128
        2)
1076
 
            if [ "$unsupported_layout" = yes ]; then
 
1129
            if \
 
1130
                [ ! -f /usr/share/console-setup-mini/keyboard -a \
 
1131
                "$unsupported_layout" = yes ]; then
1077
1132
                case "$XKBVARIANT" in
1078
1133
                    ,|,,|,,,|'')
1079
1134
                        unsupported_variant=''
1123
1178
            fi
1124
1179
            ;;
1125
1180
        3)
1126
 
            if \
 
1181
            if [ -f /usr/share/console-setup-mini/keyboard ]; then
 
1182
                # ask simplified layout question in Debian installer
 
1183
                db_input critical keyboard-configuration/xkb-keymap || true
 
1184
                if db_go; then 
 
1185
                    STATE=$(($STATE + 1))
 
1186
                else
 
1187
                    STATE=$(($STATE - 1))
 
1188
                fi
 
1189
                db_get keyboard-configuration/xkb-keymap
 
1190
                keymap="$RET"
 
1191
                layout="${keymap%(*}"
 
1192
                variant="${keymap#$layout}"
 
1193
                variant="${variant%)}"
 
1194
                variant="${variant#(}"
 
1195
                default_layout="$layout"
 
1196
                default_variant="$variant"
 
1197
                db_fset keyboard-configuration/layout seen true
 
1198
                db_fset keyboard-configuration/variant seen true
 
1199
            elif \
1127
1200
                [ "$unsupported_layout" = yes \
1128
1201
                -o "$default_variant" != other ]
1129
1202
            then
1146
1219
        4)
1147
1220
            db_metaget keyboard-configuration/other description
1148
1221
            other="$RET"
 
1222
            RET="$default_variant"
1149
1223
            if [ "$unsupported_layout" = yes ]; then
1150
1224
                db_set keyboard-configuration/variantcode "$XKBVARIANT"
1151
1225
                # skip the question without making Debconf loop
1152
1226
                STATE=$(( $STATE + $STATE - $old_state ))
1153
1227
            elif \
 
1228
                [ ! -f /usr/share/console-setup-mini/keyboard ] && \
1154
1229
                ! ask_debconf keyboard-configuration/variant "$layout_priority" \
1155
1230
                    "variant*${layout}" "$default_variant" \
1156
1231
                    "variant*${layout}*other*$other"
1193
1268
                        ;;
1194
1269
                    # TODO: make s.t. to not forget to update this list.  Don't
1195
1270
                    # forget to update also the nonlatin list in kbdcompiler
1196
 
                    af|am|ara|ben|bd|bg|bt|by|deva|ge|gh|gr|guj|guru|il|in|iq|ir|iku|kan|kh|kz|la|lao|lk|kg|ma|mk|mm|mn|mv|mal|ori|pk|ru|scc|sy|syr|tel|th|tj|tam|ua|uz)
 
1271
                    af|am|ara|ben|bd|bg|bt|by|deva|ge|gh|gr|guj|guru|il|in|iq|ir|iku|kan|kh|kz|la|lao|lk|kg|ma|mk|mm|mn|mv|mal|np|ori|pk|ru|scc|sy|syr|tel|th|tj|tam|ua|uz)
1197
1272
                        latin=no
1198
1273
                        XKBLAYOUT=us,$layout
1199
1274
                        ;;
1237
1312
            ;;
1238
1313
        5)
1239
1314
            if \
1240
 
                [ ! "$unsupported_layout" = yes \
 
1315
                [ ! -f /usr/share/console-setup-mini/keyboard \
 
1316
                -a ! "$unsupported_layout" = yes \
1241
1317
                -a "$unsupported_options" = yes ]
1242
1318
            then
1243
1319
                if [ -f $CONFIGFILE ]; then
1298
1374
                    db_set keyboard-configuration/toggle 'No toggling'
1299
1375
                    db_set keyboard-configuration/switch 'No temporary switch'
1300
1376
                fi
 
1377
 
1301
1378
                db_beginblock
1302
1379
                if [ "$latin" = no ]; then
1303
1380
                    db_input high keyboard-configuration/toggle || true
1304
 
                    db_input medium keyboard-configuration/switch || true
1305
 
                fi
1306
 
                db_input medium keyboard-configuration/altgr || true
1307
 
                db_input medium keyboard-configuration/compose || true
 
1381
                    if [ ! -f /usr/share/console-setup-mini/keyboard ]; then
 
1382
                        db_input medium keyboard-configuration/switch || true
 
1383
                    fi
 
1384
                fi
 
1385
                if [ ! -f /usr/share/console-setup-mini/keyboard ]; then
 
1386
                    db_input medium keyboard-configuration/altgr || true
 
1387
                    db_input medium keyboard-configuration/compose || true
 
1388
                fi
1308
1389
                if [ -f /usr/bin/X ]; then
1309
1390
                    db_input medium keyboard-configuration/ctrl_alt_bksp || true
1310
1391
                fi