View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

Bloc-Notes

Solution originale postée sur le mailing list

On startup of Comanche, a text file containing the app strings is loaded. The file format is simply a key/value pair that gets read and transformed in a dictionary. The values of the dictionary are accessed with the #msgAt: selector.

One class, MessageCatalog is responsible for loading the file and handling accesses to the dictionary while the class UserMessage handles the parsing of every line to transform them into instances of UserMessage.

To simplify code, class Object implements #msgAt:, #msgAt:with:, #msgAt:with:with:,
#msgAt:with:with:with:, #msgAt:with:with:with:with:, and #msgAt:with:with:with:with:.
These selectors just redirect the message to the MessageCatalog class.

We just need to changes the Comanche files with the

(swiki/refs/addresses/12)

Actual file (swiki/refs/addresses/12)
=====================================================================
"Close the Individual Log File"
(book setup at: 'logging' ifAbsent: ['none']) caseOf: {
['none']->[book modulesRemove: 'logFile'].
['individual']->[
(book modulesAt: 'logFile') close.
book modulesRemove: 'logFile'].
['site']->["Do nothing"]}
otherwise: [shelf error: 'That is not a valid value for logging']


Modified file (swiki/refs/addresses/12)
=====================================================================
"Close the Individual Log File"
(book setup at: 'logging' ifAbsent: ['none']) caseOf: {
['none']->[book modulesRemove: 'logFile'].
['individual']->[
(book modulesAt: 'logFile') close.
book modulesRemove: 'logFile'].
['site']->["Do nothing"]}
otherwise: [shelf error: (self msgAt: 'Kom0002') "That is not a valid value for logging"]



English.msg
=====================================================================
Kom0001 Congratulations! This is a new Swiki.
Kom0002 That is not a valid value for logging


French.msg
=====================================================================
Kom0001 Félicitations! Ceci est un nouveau Swiki.
Kom0002 Ceci n'est pas une valeur acceptable pour le carnet de bord



Début

Only Hope - Mandy Moore
power of two

Link to this Page