Index: ChangeLog
===================================================================
--- ChangeLog	(revision 2285)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2007-04-13  Willie Walker <william.walker@sun.com>
+
+        * src/orca/phonnames.py: work on bug 412200 to provide a more
+        flexible means to define the military spelling dictionary.
+        The new means allows translators to better support the nuances
+        of their particular language.
+
 2007-04-11  Willie Walker <william.walker@sun.com>
 
         * src/orca/scripts/gedit.py, src/orca/scripts/liferea.py,
Index: src/orca/phonnames.py
===================================================================
--- src/orca/phonnames.py	(revision 2285)
+++ src/orca/phonnames.py	(working copy)
@@ -1,6 +1,6 @@
 # Orca
 #
-# Copyright 2007 Sun Microsystems Inc.
+# Copyright 2006-2007 Sun Microsystems Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Library General Public
@@ -23,147 +23,65 @@
 __id__        = "$Id$"
 __version__   = "$Revision$"
 __date__      = "$Date$"
-__copyright__ = "Copyright (c) 2005-2007 Sun Microsystems Inc."
+__copyright__ = "Copyright (c) 2006-2007 Sun Microsystems Inc."
 __license__   = "LGPL"
 
 from orca_i18n import _ # for gettext support
 
-# __phonnames is a dictionary where the keys represent a UTF-8
-# character (possibly multibyte) and the values represent the common
-# 'military' term used for the character.
-#
-__phonnames = {}
+try:
+    # Translators: this is a structure to assist in the generation of
+    # military-style spelling.  For example, 'abc' becomes 'alpha bravo
+    # charlie'.
+    #
+    # It is a simple structure that consists of pairs of
+    #
+    # 'letter': 'word(s)'
+    #
+    # where the 'letter' and 'word(s)' are separate by colons and each
+    # pair is separated by commas.  For example, we see:
+    #
+    # 'c': 'charlie'
+    #
+    # The complete set should consist of all the letters from the alphabet
+    # for your language paired with the common military/phonetic word(s)
+    # used to describe that letter. If more than one word is to be used,
+    # they should all be inside the single quotes.  For example:
+    #
+    # 'w': 'double bourbon'
+    #
+    # Note that the form of this string is a Python programming language
+    # construct, so you need to get the syntax right.  If you want to test
+    # the syntax, build/install Orca and then type the following command
+    # in a terminal with the locale set to the locale you're translating
+    # to.  If no errors are emitted, and you get the correct name for
+    # the character you type in (e.g., we choose "a" here and we should
+    # get back "alpha" for English) you got it right:
+    #
+    # python -c 'import orca.phonnames; \
+    #            print orca.phonnames.getPhoneticName("a")'
+    #
+    __phonnames = eval(_("{'a': 'alpha', 'b': 'bravo', 'c': 'charlie', "
+                          "'d': 'delta', 'e': 'echo', 'f': 'foxtrot', "
+                          "'g': 'golf', 'h': 'hotel', 'i': 'india', "
+                          "'j': 'juliet', 'k': 'kilo', 'l': 'lima', "
+                          "'m': 'mike', 'n': 'november', 'o': 'oscar', "
+                          "'p': 'papa', 'q': 'quebec', 'r': 'romeo', "
+                          "'s': 'sierra', 't': 'tango', 'u': 'uniform', "
+                          "'v': 'victor', 'w': 'whiskey', 'x': 'xray', "
+                          "'y': 'yankee', 'z': 'zulu'}"))
+except:
+    print "WARNING: Translation problem with phonnames.py dictionary."
+    print "WARNING: Reverting to English military spelling."
+    __phonnames = eval(   "{'a': 'alpha', 'b': 'bravo', 'c': 'charlie', "
+                          "'d': 'delta', 'e': 'echo', 'f': 'foxtrot', "
+                          "'g': 'golf', 'h': 'hotel', 'i': 'india', "
+                          "'j': 'juliet', 'k': 'kilo', 'l': 'lima', "
+                          "'m': 'mike', 'n': 'november', 'o': 'oscar', "
+                          "'p': 'papa', 'q': 'quebec', 'r': 'romeo', "
+                          "'s': 'sierra', 't': 'tango', 'u': 'uniform', "
+                          "'v': 'victor', 'w': 'whiskey', 'x': 'xray', "
+                          "'y': 'yankee', 'z': 'zulu'}")
 
-# Translators: alpha is the spoken military/phonetic spelling for the
-# letter a
-#
-__phonnames["a"] = _("alpha")
-
-# Translators: bravo is the spoken military/phonetic spelling for the
-# letter b
-#
-__phonnames["b"] = _("bravo")
-
-# Translators: charlie is the spoken military/phonetic spelling for
-# the letter c
-#
-__phonnames["c"] = _("charlie")
-
-# Translators: delta is the spoken military/phonetic spelling for the
-# letter d
-#
-__phonnames["d"] = _("delta")
-
-# Translators: echo is the spoken military/phonetic spelling for the
-# letter e
-#
-__phonnames["e"] = _("echo")
-
-# Translators: foxtrot is the spoken military/phonetic spelling for
-# the letter f
-#
-__phonnames["f"] = _("foxtrot")
-
-# Translators: golf is the spoken military/phonetic spelling for the
-# letter g
-#
-__phonnames["g"] = _("golf")
-
-# Translators: hotel is the spoken military/phonetic spelling for the
-# letter h
-#
-__phonnames["h"] = _("hotel")
-
-# Translators: india is the spoken military/phonetic spelling for the
-# letter i
-#
-__phonnames["i"] = _("india")
-
-# Translators: juliet is the spoken military/phonetic spelling for the
-# letter j
-#
-__phonnames["j"] = _("juliet")
-
-# Translators: kilo is the spoken military/phonetic spelling for the
-# letter k
-#
-__phonnames["k"] = _("kilo")
-
-# Translators: lima is the spoken military/phonetic spelling for the
-# letter l
-#
-__phonnames["l"] = _("lima")
-
-# Translators: mike is the spoken military/phonetic spelling for the
-# letter m
-#
-__phonnames["m"] = _("mike")
-
-# Translators: november is the spoken military/phonetic spelling for
-# the letter n
-#
-__phonnames["n"] = _("november")
-
-# Translators: oscar is the spoken military/phonetic spelling for the
-# letter o
-#
-__phonnames["o"] = _("oscar")
-
-# Translators: papa is the spoken military/phonetic spelling for the
-# letter p
-#
-__phonnames["p"] = _("papa")
-
-# Translators: quebec is the spoken military/phonetic spelling for the
-# letter q
-#
-__phonnames["q"] = _("quebec")
-
-# Translators: romeo is the spoken military/phonetic spelling for the
-# letter r
-#
-__phonnames["r"] = _("romeo")
-
-# Translators: sierra is the spoken military/phonetic spelling for the
-# letter s
-#
-__phonnames["s"] = _("sierra")
-
-# Translators: tango is the spoken military/phonetic spelling for the
-# letter t
-#
-__phonnames["t"] = _("tango")
-
-# Translators: uniform is the spoken military/phonetic spelling for
-# the letter u
-#
-__phonnames["u"] = _("uniform")
-
-# Translators: victor is the spoken military/phonetic spelling for the
-# letter v
-#
-__phonnames["v"] = _("victor")
-
-# Translators: whiskey is the spoken military/phonetic spelling for
-# the letter w
-#
-__phonnames["w"] = _("whiskey")
-
-# Translators: xray is the spoken military/phonetic spelling for the
-# letter x
-#
-__phonnames["x"] = _("xray")
-
-# Translators: yankee is the spoken military/phonetic spelling for the
-# letter y
-#
-__phonnames["y"] = _("yankee")
-
-# Translators: zulu is the spoken military/phonetic spelling for the
-# letter z
-#
-__phonnames["z"] = _("zulu")
-
 def getPhoneticName(character):
     """Given a character, return its phonetic name, which is typically
     the 'military' term used for the character.
