Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml,v diff -u -N -r1.27.2.6 -r1.27.2.7 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml 21 Apr 2017 15:07:52 -0000 1.27.2.6 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml 22 Apr 2017 17:18:48 -0000 1.27.2.7 @@ -280,8 +280,8 @@ For each message call in the text, decide on a variable name and replace the procedure call with a variable lookup on the syntax %var_name%. Remember - to initialize a tcl variable with the same name on some line above the text. - If the text is in a tcl file you must replace variable lookups + to initialize a Tcl variable with the same name on some line above the text. + If the text is in a Tcl file you must replace variable lookups (occurrences of $var_name or ${var_name}) with %var_name% You are now ready to follow the normal procedure and mark up the text using a tempoarary message tag (<#_ text_with_percentage_vars#>) and run the action @@ -321,7 +321,7 @@ - When we were done going through the tcl files we ran the following + When we were done going through the Tcl files we ran the following commands to check for mistakes: @@ -334,7 +334,7 @@ # Check if you've forgotten space between default key and text in message tags (should return nothing) find -iname '*.tcl'|xargs egrep -i '<#_[^ ]' -# Review the list of tcl files with no message lookups +# Review the list of Tcl files with no message lookups for tcl_file in $(find -iname '*.tcl'); do egrep -L '(<#|\[_)' $tcl_file; done @@ -514,7 +514,7 @@ Replace human-readable text in Tcl files with temporary tags - Examine all of the tcl files in the packages for human-readable text and replace it with temporary tags. The temporary tags in Tcl are slightly different from those in ADP. If the first character in the temporary tag is an underscore (_), then the message keys will be auto-generated from the original message text. Here is an unmodified tcl file: + Examine all of the Tcl files in the packages for human-readable text and replace it with temporary tags. The temporary tags in Tcl are slightly different from those in ADP. If the first character in the temporary tag is an underscore (_), then the message keys will be auto-generated from the original message text. Here is an unmodified Tcl file: set title "Messages for $a(name) in $b(label)" @@ -538,7 +538,7 @@ Replace the temporary message tags in Tcl files - Repeat step 2 for tcl files. Here is the example Tcl file after conversion: + Repeat step 2 for Tcl files. Here is the example Tcl file after conversion: set title [_ simulation.admin_title] @@ -664,7 +664,7 @@ message lookups in tcl, adp, and info files and the set of keys in the catalog file are identical. The scripts below assume that message lookups in adp and info files are on the format - \#package_key.message_key\#, and that message lookups in tcl files + \#package_key.message_key\#, and that message lookups in Tcl files are always is done with one of the valid lookups described above. The script further assumes that you have perl installed and in your path. Run the script like this: @@ -882,7 +882,7 @@ Watch out for quoting and escaping when editing text that is also code. For example, the original string set title "Patch \"$patch_summary\" is nice." - breaks if the message text retains all of the escaping that was in the tcl command: + breaks if the message text retains all of the escaping that was in the Tcl command: <msg>Patch \"$patch_summary\" is nice.</msg> When it becomes a key, it should be: <msg>Patch "$patch_summary" is nice.</msg>