Index: openacs-4/packages/acs-core-docs/www/i18n-convert.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-convert.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/i18n-convert.html 22 Mar 2004 12:46:36 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/i18n-convert.html 25 Mar 2004 18:09:11 -0000 1.7 @@ -12,10 +12,10 @@ package and then click on Internationalization, then Convert ADP, Tcl, and SQL files to using the - message catalog.. This pass only changes the adp files; it does not affect catalog files or the catalog in the database.

You will now be walked through all of the selected adp pages. The UI shows you the intended changes and lets you edit or cancel them key by key.

Note

The automatic process can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

  <p class="form-help-text"><b>Invitations</b> are sent,
-    when this wizard is completed and casting begins.</p>

has a bold tag which confuses the converter into thinking there are two message keys for the text beginning "Invitations ..." where there should be one:

Instead, we cancel those keys, edit the file manually, and put in a single temporory message tag:

  <p class="form-help-text"> <#Invitations_are_sent <b>Invitations</b> are sent,
+        message catalog..  This pass only changes the adp files; it does not affect catalog files or the catalog in the database.

You will now be walked through all of the selected adp pages. The UI shows you the intended changes and lets you edit or cancel them key by key.

  • The automatic process can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

      <p class="form-help-text"><b>Invitations</b> are sent,
    +    when this wizard is completed and casting begins.</p>

    has a bold tag which confuses the converter into thinking there are two message keys for the text beginning "Invitations ..." where there should be one:

    Instead, we cancel those keys, edit the file manually, and put in a single temporary message tag:

      <p class="form-help-text"> <#Invitations_are_sent <b>Invitations</b> are sent,
         when this wizard is completed and casting begins.#>
    -  </p>

Note

Complex if statements may produce convoluted message keys that are very hard to localize. Rewrite these if statements. For example:

+  </p>
  • Complex if statements may produce convoluted message keys that are very hard to localize. Rewrite these if statements. For example:

     Select which case <if @simulation.casting_type@ eq "open">and
     role</if> to join, or create a new case for yourself.  If you do not
     select a case <if @simulation.casting_type@ eq "open">and role</if>
    @@ -36,7 +36,18 @@
     be automatically assigned to a case when the simulation
     begins.
     
    -</else>
  • Replace the temporary message tags in ADP files.�From the same Convert ADP ... page in /acs-admin/apm as in the last step, repeat the process but deselect Find human language text ... and select Replace <# ... #> tags ... and click OK. This step replaces all of the temporary tags with "short" message lookups, inserts the message keys into the database message catalog, and then writes that catalog out to an xml file.

  • 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:

    +</else>
  • Check for duplicate keys. For common words such as + Yes and No, you can use a library of keys at acs-kernel. + For example, instead of using + myfirstpackage.Yes, you + can use acs-kernel.Yes. + You can also use the Message Key Search facility to find duplicates. + Be careful, however, building up sentences from keys + because grammar and other elements may not be consistent + across different locales.

    Additional discussion: Re: + Bug 961 ("Control Panel" displayed instead of + "Administer"), Translation + server upgraded, and Localization questions.

  • Replace the temporary message tags in ADP files.�From the same Convert ADP ... page in /acs-admin/apm as in the last step, repeat the process but deselect Find human language text ... and select Replace <# ... #> tags ... and click OK. This step replaces all of the temporary tags with "short" message lookups, inserts the message keys into the database message catalog, and then writes that catalog out to an xml file.

  • 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:

     set title "Messages for $a(name) in $b(label)"
     set context [list [list . "SimPlay"] \
                       [list [export_vars -base case-admin { case_id }] \