[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#348027: errors in Turkish keyboard setup



* Recai Oktaş [2006-02-09 02:57:23+0200]
> * Denis Barbier [2006-02-09 00:21:08+0100]
> > Thanks, I applied your patch and also reviewed all other layouts,
> > hopefully it should work better now for more people.
> 
> Great!  Thanks for all your help.

Hi Denis,

Could you please apply the attached patch as well?  As I stated in this bug
report, seeing the "f" variant, people tends to define the non-existed "q"
or "tr_q" variants because of the false assumption that Turkish should have
these variants[1].  This patch tries to be conservative for future changes
(i.e. "q" variant may be added in future).

[1] https://launchpad.net/distros/ubuntu/+source/xorg/+bug/23944

-- 
roktas
--- xserver-xorg.config.in.orig	2006-02-10 12:29:01.000000000 +0200
+++ xserver-xorg.config.in	2006-02-10 13:17:23.000000000 +0200
@@ -1259,6 +1259,17 @@
   TR_VARIANT="$RET"
 
   case ",$TR_VARIANT," in
+    *,q,*|*,tr_q,*)
+      # For extra sanity, remove bogus "tr_q" or "q" variants.
+      if [ -e "$TR_KEYMAP" ] &&
+        grep -q "^[[:space:]]*xkb_symbols[[:space:]]*\"q\"" $TR_KEYMAP; then
+        SANITIZED_TR_VARIANT="q"
+      else
+        # There is no such variant at least in X.Org <= 7.0.  Default variant
+        # "basic" points to the Q layout in these versions.
+        SANITIZED_TR_VARIANT="basic"
+      fi
+      ;;
     *,f,*|*,tr_f,*)
       # X.Org version < 6.9 uses "tr_f", while >= 6.9 uses only "f"
       if [ -e "$TR_KEYMAP" ] &&
@@ -1282,8 +1293,8 @@
   if [ -n "$SANITIZED_TR_VARIANT" ]; then
     # remove the unsanitized variant
     TR_VARIANT=$(echo $TR_VARIANT | \
-                 sed -e "s/\<\(tr_\)*\(f\|alt\)[[:space:]]*,//g" \
-                     -e "s/\(^\|,\)[[:space:]]*\(tr_\)*\(f\|alt\)[[:space:]]*$//g")
+                 sed -e "s/\<\(tr_\)*\(q\|f\|alt\)[[:space:]]*,//g" \
+                     -e "s/\(^\|,\)[[:space:]]*\(tr_\)*\(q\|f\|alt\)[[:space:]]*$//g")
 
     # add the sanitized variant
     if [ -n "$TR_VARIANT" ]; then

Attachment: signature.asc
Description: Digital signature


Reply to: