home *** CD-ROM | disk | FTP | other *** search
- ————————————————————————
- Message file utilities
- ————————————————————————
-
-
- MsgUpdate
- ¯¯¯¯¯¯¯¯¯
- Despite being a very simple program, this little utility can be incredibly
- useful when updating a Message file’s translation.
-
- Syntax:
- *MsgUpdate [-ForeignOld]|[-fo] <filename> [-ForeignNew]|[-fn] <filename>
- [-MyOld]|[-mo] <filename> [-Output]|[-o] <filename>
-
- • ForeignOld file is the original Message file.
- • MyOld is your translation of ForeinOld, containing the same tags, but with
- translated values.
- • ForeignNew is the new version of the original Message file, which may
- contain some new tags, or in which the values of some old tags have been
- changed.
- • the new file that MsgUpdate creates goes to Output
-
- The program goes through ForeignNew line by line, writing any empty lines and
- comments it finds directly to Output (which means that any comments in MyOld
- are lost).
-
- For each token *value* of ForeignNew, it searches for the same token *value*
- in ForeignOld. If this is found (i.e. the value didn’t change), it writes the
- corresponding translated value from MyOld to Output. If it is not found (i.e.
- the token value has changed, or a new token has been introduced), the
- original token and token value from ForeignNew are written to Output, but are
- preceded with “•” to make the line stand out so it can be easily found.
-
- If an inconsistency between ForeignOld and MyOld is found, the line from
- ForeignNew is output, also preceded with “•”.
-
- The program cannot handle tags that appear in the file more than once.
-
-
-
- MsgDecode, MsgEncode
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- These two small BASIC programs were designed to work on ArcWeb’s messages,
- but could also be adapted to work with those of other programs.
-
- ArcWeb has a dictionary of the form:
-
- dict0:Click SELECT to
- dict1:Click ADJUST to
- dict2:M%34 %11 open the submenu
-
- The dictionary entries are substituted for “%xx” in the strings, e.g.:
-
- mhM4:%0 quit %23
-
- becomes “Click SELECT to quit ArcWeb”. As you can see above, even the
- dictionary entries can reference other dictionary entries.
-
- MsgDecode expands all references, so that all dictionary tags and tags in the
- Message file after the last “dict” tag don’t contain any “%” codes any
- longer.
-
- MsgEncode does the opposite, replacing strings with “%” codes. However, for
- this to work there must be no “%” references in the dictionary tags — if you
- change dictionary values, write the values out, the program will do the
- encoding for you.
-
-
- __ _
- |_) /| Richard Atterer
- | \/¯| atterer@augsburg.baynet.de
- ¯ ´` ¯