User Tools

Site Tools


admin:nls

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
admin:nls [2012/05/24 10:38] jwarrioradmin:nls [2012/05/24 10:50] (current) jwarrior
Line 1: Line 1:
 +====== NLS ======
 +
 +  * NLS messages are referenced in pool dictionaries
 +  * Pool dictionaries that refer to .cat files have names of the form _PRAGMA_NlsCatSomeCatFile. For instance, the pool dictionary that refers to krn.cat is called _PRAGMA_NlsCatKRN.
 +  * To add NLS messages to your application, follow these steps:
 +  * Identify all the classes that have hard-coded strings by selecting the app, then running VA Assist Pro Tools -> Find Hard Coded Strings -> Include subApplications.
 +  * Add the appropriate pool dictionary to these classes.
 +  * Transcript -> NLS Tools -> Enable Application then select the app that has the pool dictionary
 +  * A window appears with all methods that have strings.
 +  * Each method should have the entire string highlighted (including the quotes but not any adjoining spaces).
 +  * If the string is something like self error: 'Oh, no', simply right click and select Replace With Named Message. Smalltalk will suggest something like MxKRN77 which you should generally accept.
 +  * If the string is something like self error: 'Hello ', user, ' from Smalltalk', you must first change this message to 'Hello %1 from Smalltalk' bindWith: user, save the method, re-highlight the string if necessary, then right click and select Replace With Named Message
 +  * When done. select Generate Pragma from the menu.
 +  * Do not delete old messages
 +  * Do not change old messages except for minor spelling corrections
 +  * If the meaning of a message changes, add a new one.
 +  * Repeat for all apps and subApps that have hard-coded strings.
 +  * Remember to submit the changed .cat file for integration along with the new code.