Changes between Version 21 and Version 22 of Notifications


Ignore:
Timestamp:
Nov 3, 2009, 12:05:46 PM (14 years ago)
Author:
romw
Comment:

Add localizing server messages section

Legend:

Unmodified
Added
Removed
Modified
  • Notifications

    v21 v22  
    104104    </item>
    105105    <item>
    106         <description>I need more memory</description>
     106        <description>I need more memory ({1} MB)</description>
    107107        <pubDate>Sun, 29 Sep 2002 19:59:01 GMT</pubDate>
    108108        <guid>http://www.example.com/2</guid>
     109        <parameter1>64</parameter1>
    109110    </item>
    110111</channel>
     
    117118|| pubDate || <scheduler reply time> || RFC 822 representation of the scheduler reply time ||
    118119|| guid || <null> || Unique message ID prefixed with the master URL of the project ||
     120|| param_1 || <null> || Optional parameter for the item description ||
     121|| param_2 || <null> || Optional parameter for the item description ||
     122|| param_3 || <null> || Optional parameter for the item description ||
     123|| param_4 || <null> || Optional parameter for the item description ||
     124|| param_5 || <null> || Optional parameter for the item description ||
    119125
    120126'''NOTE''': While on face value the inclusion of the GUID to the BOINC client stream might seem overkill, it serves two important purposes.
    121127 * It can be used to prevent duplication messages from the same project from appearing in the project list across multiple scheduler requests.
    122128 * Provides a mechanism to display localizable server messages within the client software.
     129
     130=== Localizing Server Messages ===
     131Messages being passed to the client by way of the server will now be identified by a message identifier. 
     132
     133Message identifier rules:
     134 * Message identifiers start at 1.
     135 * Message identifiers should not be removed from the message list and cannot be removed if no longer used.
     136 * Messages should be enclosed in the _(“Test Message”) macro syntax.
     137 * Message parameters are enclosed in ‘{}‘ braces with an index to the position in which the parameter should replace the marker.
     138
     139When new messages are added poEdit or some other string extraction tool should be used to update the BOINC-Server-Messages.pot template file.  After the localization process has been completed the resulting BOINC-Server-Messages.mo file should be shipped with the client software.
     140
     141A string in need of localization would look like this:
     142{{{
     143_(“This client needs {1} of additional memory. {2} detected in total.”)
     144}}}
     145
     146After translation it could look like this:
     147{{{
     148_(“Your computer has {2} of total detected memory, but the client needs an additional {1} in order to be assigned work.”)
     149}}}
     150
     151The client software should replace the positional markers with the optional parameter values specified for the message.
    123152
    124153== Project Website ==