Changeset 746:3ac198b22256

Show
Ignore:
Timestamp:
10/12/09 15:29:22 (4 years ago)
Author:
tgambet
Branch:
default
convert_revision:
svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@747
Message:

added JavaScript? links to display only missing or modified values
+ missing values first

Location:
WebContent/WEB-INF/resources/templates
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • WebContent/WEB-INF/resources/templates/language.form.vm

    r731 r746  
    1919                 
    2020                <fieldset class="translation"> 
    21                         <legend>Translation</legend> 
     21                        <legend>Translation  
     22                                <a id="a_miss" title="Display only missings" href="#" style="display: none">Display only missings</a> 
     23                                <a id="a_mod" title="Display only modified" href="#" style="display: none">Display only modified</a> 
     24                                <a id="a_all" title="Display all" href="#" style="display: none">Display all</a> 
     25                        </legend> 
    2226                         
    2327                        <table style="width:100%"> 
     
    3135                                <tbody> 
    3236                                        #foreach($key in $defaultProps.keySet()) 
    33                                                 #if ($key != "lang" && $key != "language") 
     37                                                #if (!$prop.get($key)) 
     38                                                <tr> 
     39                                                        <th class="property_name" scope="row">$key <p>$!esc.html($defaultProps.get($key))</p></th> 
     40                                                        <td class="missing"><input type="text" name="$prop.get('lang')_$key" value="$!esc.html($!prop.get($key))" /></td> 
     41                                                </tr> 
     42                                                #end 
     43                                        #end 
     44                                        #foreach($key in $defaultProps.keySet()) 
     45                                                #if ($key != "lang" && $key != "language" && $prop.get($key)) 
    3446                                                <tr> 
    3547                                                        <th class="property_name" scope="row">$key <p>$!esc.html($defaultProps.get($key))</p></th> 
  • WebContent/WEB-INF/resources/templates/language.vm

    r731 r746  
    1414 
    1515        <h3>Translate Unicorn in a new language</h3> 
     16         
    1617        <p>If Unicorn is not yet available in your native language and you would like to translate it:</p> 
    17         <ol> 
    18                 <li><a href="http://dev.w3.org/2006/unicorn/WebContent/WEB-INF/languages/en.properties">Download the english properties file</a>.</li> 
    19                 <li><a href="http://www.w3.org/Consortium/Translation/#discussions">Get in touch with us</a> <strong>before</strong> you start translating: someone may already be on the job. Someone from the W3C staff or validator development team will get back to you with details about how to translate the validator.</li> 
    20                 <li>Translate. Congratulations, you have made Unicorn more accessible to a lot more Web developers and designers.</li> 
    21         </ol> 
     18         
     19        <ul> 
     20                <li>You can select your language in the dropdown menu and start translating online:  
     21                        <form method="get" action="./translations" id="lang_select"> 
     22                                <fieldset> 
     23                                <select name="${param_prefix}lang"> 
     24                                        <optgroup label="Select a language"> 
     25                                        #foreach ($key in $availableLocales.keySet()) 
     26                                                <option value="$key">$availableLocales.get($key)</option> 
     27                                        #end 
     28                                        </optgroup> 
     29                                </select> 
     30                                <input id="lang_code" type="submit" value="OK" /> 
     31                                </fieldset> 
     32                        </form> 
     33                </li> 
     34                <li>Or you can follow these steps: 
     35                        <ol> 
     36                                <li><a href="http://dev.w3.org/2006/unicorn/WebContent/WEB-INF/languages/en.properties">Download the english properties file</a>.</li> 
     37                                <li><a href="http://www.w3.org/Consortium/Translation/#discussions">Get in touch with us</a> <strong>before</strong> you start translating: someone may already be on the job. Someone from the W3C staff or validator development team will get back to you with details about how to translate the validator.</li> 
     38                                <li>Translate.<!-- Congratulations, you have made Unicorn more accessible to a lot more Web developers and designers.--></li> 
     39                        </ol> 
     40                </li> 
     41        </ul> 
     42         
     43         
    2244 
    23         <h3>Help complete the translation Unicorn in your language</h3> 
     45        <h3>Help complete the translation of Unicorn in your language</h3> 
    2446        <p>The table below lists all the text strings used to translate the CSS validator:</p> 
    2547        <ul> 
    26                 <li>Cells marked <span class='missing'>✘</span> need a new or updated translation. Click on the relevant <span class='missing'>✘</span> to submit a translation by mail.</li> 
     48                <li>Cells marked <span class='missing'>✘</span> need a new or updated translation. You can click on any <span class='missing'>✘</span> to edit the coresponding language.</li> 
    2749                <li>Cells marked <span class='ok'>✔</span> are translated and up-to-date. Hover above <span class='ok'>✔</span> to read the current translation for each string.</li> 
    2850        </ul> 
     
    3759                        #foreach($prop in $languageProps) 
    3860                                #set($percent = 100 * $math.div($math.sub($prop.size(), 2), $math.sub($defaultProps.size(), 2))) 
    39                                 <th scope="col">$prop.get("language") <a href="./translations?ucn_lang=$prop.get('lang')">Edit</a><br />$percent.intValue()%</th> 
     61                                <th scope="col">$prop.get("language")<br />$percent.intValue()% <a href="./translations?ucn_lang=$prop.get('lang')">Edit</a></th> 
    4062                        #end 
    4163                        </tr>