string-freeze exception request: add translated strings to GOK



Hi:

We'd like to add some translatable strings to GOK.  The additions fall
into two groups:

(1) mark g_warning strings for translation: we may be able to reduce
this to a single string and re-use, but the patch below uses two
different strings (more informative).

(2) add strings to support internationalization of some types of GOK
keyboards which cannot currently be internationalized.  This is in
service of gok i18n bugs 122117 and 122112.

The strings in #2 won't be exposed to users until 2.6 unless the users
customize their 'Compose' keyboards.  These strings are part of a set of
fixes to improve GOK's internationalization generally (see bug #107200
which these strings address, and GOK internationalization tracker bug
#122112).

I attach the patch which we'd like to apply.  

- Bill
? gok/keyboard-geometry
Index: gok/gok-keyboard.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-keyboard.c,v
retrieving revision 1.101
diff -u -r1.101 gok-keyboard.c
--- gok/gok-keyboard.c	1 Oct 2003 12:02:21 -0000	1.101
+++ gok/gok-keyboard.c	1 Oct 2003 13:04:57 -0000
@@ -118,7 +118,6 @@
 XkbDescPtr 
 gok_keyboard_get_xkb_desc (void)
 {
-	/* TODO: internationalize warnings */
 	if (m_XkbDescPtr == NULL) {
 		int ir, reason_return;
 		char *display_name = getenv ("DISPLAY");
@@ -127,20 +126,19 @@
 					       &ir, NULL, NULL, 
 					       &reason_return);
 		if (m_XkbDisplay == NULL)
-		        g_warning ("Xkb extension could not be initialized! (error code %x)", reason_return);
+		        g_warning (_("Xkb extension could not be initialized! (error code %x)"), reason_return);
 		else 
 			m_XkbDescPtr = XkbGetMap (m_XkbDisplay, 
 						  XkbAllComponentsMask,
 						  XkbUseCoreKbd);
 		if (m_XkbDescPtr == NULL)
-		        g_warning ("keyboard description not available!");
+		        g_warning (_("keyboard description not available!"));
 		else {
 			int status = XkbGetGeometry (m_XkbDisplay, m_XkbDescPtr);
 
 			if (status != Success)
 			{
-				g_warning ("Keyboard Geometry cannot be read from your X Server: error %d",
-					     status);
+				g_warning (_("Your keyboard geometry cannot be determined"));
 			}	
 			XkbGetNames (m_XkbDisplay, XkbAllNamesMask, m_XkbDescPtr);
 		}
@@ -337,7 +335,7 @@
 	}
 	else 
 	{
-		g_warning ("Your keyboard geometry cannot be determined!\n");
+		g_warning (_("Your keyboard geometry cannot be determined!\n"));
 		return FALSE;
 	}
 
@@ -609,12 +607,11 @@
 	 * billh@gnome.org or david.bolter@utoronto.ca for more information.
 	 *
 	 */
-	/* TODO: these strings are useless without localization, but string freeze prevents inclusion */
 	gok_keyboard_add_keys_from_charstrings (pKeyboard, 
-						"level 0|abcdefghijklmnopqrstuvwxyz1234567890-=[];'#\\,./",
-						"level 1|ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"3$%^&*()_+{}:@~<>?",
-						"level 2|",
-						"level 3|"); /* no level 2 or 3 in C locale */
+						_("level 0|abcdefghijklmnopqrstuvwxyz1234567890-=[];'#\\,./"),
+						_("level 1|ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"3$%^&*()_+{}:@~<>?"),
+						_("level 2|"),
+						_("level 3|")); /* no level 2 or 3 in C locale */
 
 
 	pKeyboard->bRequiresLayout = TRUE;
@@ -657,10 +654,10 @@
 	 * the characters in these two strings should occur in the same relative order.
 	 */
 	gok_keyboard_add_keys_from_charstrings (pKeyboard, 
-						"level 0|etaonrishdlfcmugypwbvkxjqz`1234567890-=\\[];'<,./",
-						"level 1|ETAONRISHDLFCMUGYPWBVKXJQZ~!@#$%^&*()_+|{}:\"><>?",
-						"level 2|\0",
-						"level 3|\0"); /* no level 2 or 3 in C locale */
+						_("level 0|etaonrishdlfcmugypwbvkxjqz`1234567890-=\\[];'<,./"),
+						_("level 1|ETAONRISHDLFCMUGYPWBVKXJQZ~!@#$%^&*()_+|{}:\"><>?"),
+						_("level 2|\0"),
+						_("level 3|\0")); /* no level 2 or 3 in C locale */
 	pKeyboard->bRequiresLayout = TRUE;
 	pKeyboard->bLaidOut = FALSE;
 	gok_keyboard_count_rows_columns (pKeyboard);


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