1 $FreeBSD: src/usr.bin/ee/ee.i18n.guide,v 1.1.1.1.8.1 2001/06/10 11:06:06 sobomax Exp $
3 Easy Editor ("ee") provides the ability to translate the messages
4 displayed to the user and the commands entered. This is done via message
5 catalogs, following X/Open standards. ee supports eight bit characters,
6 as well as 16-bit characters. The Chinese Big 5 code set is the 16-bit
7 code set that ee was modified to handle, as it is relatively easy to
8 support since two byte characters also take up two columns on the screen,
9 thereby simplifying the screen position calculations. Other multibyte
10 code sets may function, but have not been tested.
12 (The name ee.i18n.guide is for "ee internationalization guide". The i18n
13 abbreviation is used because there are 18 characters between the first
14 letter ("i") and last ("n") of "internationalization".)
16 All of the messages, warnings, information, and commands, are contained
17 in the message catalog. Each numbered entry represents an individual
18 string used by ee. Some strings contain formatting information for
19 formatted print statements, which are of the form "%s", or "%d", these
20 must be preserved in the translation, or the correct information will not
21 be displayed. For those strings containing multiple formatting codes,
22 the order of each item must be preserved as well.
25 1 title for modes, or settings menu
26 2 - 8 entries for modes menu, each line should be the same length
28 9 - 34 other menu titles and entries
30 57 - 61 actions assigned to control keys
31 62 - 66 commands information
32 67 message displayed when info window turned off
33 68 indication that no file name was entered when invoking ee
34 69 prompt for decimal value of character to be entered
35 70 message displaying the print command being invoked
37 72 prompt for name of file to be written
38 73 prompt for name of file to be read
39 74 string used to display the decimal value of the character
41 75 string displaying an unrecognized command
42 76 string indicating that the command entered is not a unique
43 substring of a valid command
44 77 string indicating the current line number
45 78 string for displaying the length of the line
46 79 string for displaying the name of the file
47 80 - 83 strings showing how to invoke ee, and its options
48 84 message indicating that the file entered is a directory, not a
50 85 message informing that the entered file does not yet exist
51 86 message informing that the file can't be opened (because of
53 87 message after file has been read with the file name and number
55 88 message indicating that the file has been read
56 89 message indicating that the file is being read
57 90 message indicating that permissions only allow the file to be
59 91 message after file has been read with the file name and number
61 92 prompt for name of file to be saved (used when no name was
62 entered for a file to edit)
63 93 message indicating that the file was not written, since no
64 name was entered at the prompt
65 94 prompt asking user if changes should not be saved ("yes_char"
66 will be expected for affirmative response)
67 95 "yes" character, single character expected to confirm action
68 (can be upper or lower case, will be converted to upper-case
72 98 message indicating that the named file is being written
73 99 message indicating the name of the file written, the number of
74 lines, and the number of characters (order of items must be
76 100 search in progress message
77 101 message that the string was not found
79 103 message that string could not be executed
81 105 message for menus, indicating that the Escape character will
82 allow the user to exit the menu
83 106 error message indicating the menu won't fit on the screen
85 108 prompt for shell command
86 109 message displayed while formatting a paragraph
87 110 string which places message for spell checking at top of
88 buffer (the portions 'list of unrecognized words' and
89 '-=-=-=-=-=-' may be replaced, but the rest must remain the
91 111 message informing that spell checking is in progress
92 112 prompt for right margin
93 113 error informing user that operation is not permitted in ree
94 114 string indicating mode is turned 'on' in modes menu
95 115 string indicating mode is turned 'off' in modes menu
96 116 - 131 strings used for commands (some also used for initialization)
97 132 - 144 strings used for initialization
98 145 entry for settings menu for emacs key bindings settings
99 146 - 153 help screen entries for emacs key bindings info
100 154 - 158 info window entries for emacs key bindings info
101 159 string for turning on emacs key bindings in the init file
102 160 string for turning off emacs key bindings in the init file
103 161 fifth line of usage statement
104 162 error message when unable to save configuration file
105 163 positive feedback about saving the configuration file
106 164 - 167 menu items for saving editor configuration
107 168 error message when unable to save configuration file
108 169 error message for ree when not specifying the file
110 181 - 182 indicators of more information in menu (for when scrolling
111 menus because menu contents won't fit vertically on screen)
112 183 menu entry for modes menu for 16 bit characters
113 184 - 185 strings for initialization to turn on or off 16 bit
116 Care should be taken when translating commands and initialization keywords
117 because the algorithm used for detecting uniqueness of entered commands
118 will not be able to distinguish words that are not unique before the end
119 of the shorter word, for example, it would not be able to distinguish the
120 command 'abcd' from 'abcde'.
122 After translating the messages, use the 'gencat' command to create the compiled
123 catalog used when running the software. The standard syntax would be:
127 Where ee.msg is the file containing the translations, and ee.cat is the
128 compiled catalog. If the file ee.cat does not exist, it will be created.
129 Check the documentation for your system for proper syntax.
131 Message catalog placement varies from system to system. A common location
132 for message catalogs is in /usr/lib/nls. In this directory are
133 directories with the names of other languages. The default language is
134 'C'. There is also an environment variable, named NLSPATH used to
135 determine where message catalogs can be found. This variable is similar
136 to the PATH variable used for commands, but with some differences. The
137 NLSPATH variable must have the ability to handle different names for
138 languages and the catalog files, so it has field descriptors for these. A
139 typical setting for NLSPATH could be:
141 NLSPATH=/usr/lib/nls/%L/%N.cat:/usr/local/lib/nls/%L/%N.cat
143 Where "%L" is the field descriptor for the language (obtained from the
144 LANG environment variable) and "%N" is the name of the file (with the
145 ".cat" appended by the path variable, it is not passed from the requesting
146 program). The colon (:) is used to separate paths, so in the above
147 example there are two paths possible for message catalogs. You may wish
148 to maintain catalogs for applications that are not supported by your
149 system vendor in a location unique for you, and this is facilitated by the
150 NLSPATH variable. Remember to set and export both the LANG and NLSPATH
151 variables for each user that expects to use localization either in a
152 system-wide profile or in each user's profile. See your system
153 documentation for more information.
155 The message catalog supplied with ee also uses the '$quote' directive to
156 specify a quote around strings to ensure proper padding. This directive
157 may not be supported on all systems, and lead to quotes being included in
158 the string used in ee, which will cause incorrect behavior. If the
159 '$quote' directive is not supported by your system's gencat command, edit
160 the msg file to remove the leading and trailing quotation marks.