|
Check Resource KeysOnce you have set up a Resource File for one or more of your Project's Scans in Manage Scans String Externalization dialog, and externalized some embedded strings, you can run checks on your base resource file to ensure that there are no duplicate, missing or unused string keys. Select Fix Code=>Resources, and then one of the following menu items. Check Duplicate Resource KeysIf there are multiple resource files associated with the current Scan, a dialog box displays, listing all the resource files. Check the ones you are interested in and select OK. Those resource files will be checked for duplicate keys. If duplicates are found, those resource files with duplicates will be opened in the editor area and the duplicate entries will be marked with a red X in the left margin. If you mouse over the X, you will get more information. If you open the Problems tab, then click on the X in the resource file, the corresponding entry in the Problems tab will be selected. This provides even more information on the duplicate entry error. Once you fix the duplicate key (by removing the entry or renaming the key and updating the corresponding references in the source files), if you re-run the duplicate check, the X will be removed from the resource file and the entry will be removed from the Problems tab. Check Missing Resource KeysSelecting this menu option checks all the source files in the current Scan to make sure that all externalized strings have matching keys in the resource file(s). If missing keys are found, entries are made in the Problems tab. If you double-click an entry in the Problems tab, the source file containing the missing key will open and the reference to the missing key will be highlighted. Once you update the resource files to include the missing key references, or update the source files to reference keys already in the resource files, re-running the missing key check will remove the entries from the Problems tab. Check Unused Resource KeysSelecting this menu option checks the resource file(s) associated with the current Scan for unused key entries. If there are multiple resource files associated with the Scan, a dialog box displays, listing all the resource files. Check the ones you are interested in and select OK. Those resource files will be checked for unused keys. If unused keys are found, those resource files with unused keys will be opened in the editor area and the unused entries will be marked with a red X in the left margin. If you mouse over the X, you will get more information. If you open the Problems tab, then click on the X in the resource file, the corresponding entry in the Problems tab will be selected. This provides even more information on the unused resource key. Once you fix the unused key error (by removing the entry from the resource file), if you re-run the unused key check, the X will be removed from the resource file and the entry will be removed from the Problems tab.
|