2006/unicorn/WebContent/WEB-INF/resources/templates language.vm,1.13,1.14 language.form.vm,1.4,1.5

Update of /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates
In directory hutz:/tmp/cvs-serv31069/WebContent/WEB-INF/resources/templates

Modified Files:
	language.vm language.form.vm 
Log Message:
added JavaScript links to display only missing or modified values
+ missing values first

Index: language.vm
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/language.vm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- language.vm	9 Oct 2009 15:13:14 -0000	1.13
+++ language.vm	12 Oct 2009 15:29:22 -0000	1.14
@@ -13,17 +13,39 @@
 	<p>Unicorn is currently available in $langNb languages. <!--The translations are mainly contributed by <a href="thanks.html">volunteers</a>.--></p>
 
 	<h3>Translate Unicorn in a new language</h3>
+	
 	<p>If Unicorn is not yet available in your native language and you would like to translate it:</p>
-	<ol>
-		<li><a href="http://dev.w3.org/2006/unicorn/WebContent/WEB-INF/languages/en.properties">Download the english properties file</a>.</li>
-		<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>
-		<li>Translate. Congratulations, you have made Unicorn more accessible to a lot more Web developers and designers.</li>
-	</ol>
+	
+	<ul>
+		<li>You can select your language in the dropdown menu and start translating online: 
+			<form method="get" action="./translations" id="lang_select">
+				<fieldset>
+				<select name="${param_prefix}lang">
+					<optgroup label="Select a language">
+					#foreach ($key in $availableLocales.keySet())
+						<option value="$key">$availableLocales.get($key)</option>
+					#end
+					</optgroup>
+				</select>
+				<input id="lang_code" type="submit" value="OK" />
+				</fieldset>
+			</form>
+		</li>
+		<li>Or you can follow these steps:
+			<ol>
+				<li><a href="http://dev.w3.org/2006/unicorn/WebContent/WEB-INF/languages/en.properties">Download the english properties file</a>.</li>
+				<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>
+				<li>Translate.<!-- Congratulations, you have made Unicorn more accessible to a lot more Web developers and designers.--></li>
+			</ol>
+		</li>
+	</ul>
+	
+	
 
-	<h3>Help complete the translation Unicorn in your language</h3>
+	<h3>Help complete the translation of Unicorn in your language</h3>
 	<p>The table below lists all the text strings used to translate the CSS validator:</p>
 	<ul>
-		<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>
+		<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>
 		<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>
 	</ul>
 	<p>You can help fill the blanks and complete the translation in <strong>your</strong> language!</p>
@@ -36,7 +58,7 @@
 				<th scope="col">Property</th>
 			#foreach($prop in $languageProps)
 				#set($percent = 100 * $math.div($math.sub($prop.size(), 2), $math.sub($defaultProps.size(), 2)))
-				<th scope="col">$prop.get("language") <a href="./translations?ucn_lang=$prop.get('lang')">Edit</a><br />$percent.intValue()%</th>
+				<th scope="col">$prop.get("language")<br />$percent.intValue()% <a href="./translations?ucn_lang=$prop.get('lang')">Edit</a></th>
 			#end
 			</tr>
 		</thead>

Index: language.form.vm
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/language.form.vm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- language.form.vm	9 Oct 2009 15:13:15 -0000	1.4
+++ language.form.vm	12 Oct 2009 15:29:22 -0000	1.5
@@ -18,7 +18,11 @@
 		</fieldset>
 		
 		<fieldset class="translation">
-			<legend>Translation</legend>
+			<legend>Translation 
+				<a id="a_miss" title="Display only missings" href="#" style="display: none">Display only missings</a>
+				<a id="a_mod" title="Display only modified" href="#" style="display: none">Display only modified</a>
+				<a id="a_all" title="Display all" href="#" style="display: none">Display all</a>
+			</legend>
 			
 			<table style="width:100%">
 				<thead>
@@ -30,7 +34,15 @@
 				</thead>
 				<tbody>
 					#foreach($key in $defaultProps.keySet())
-						#if ($key != "lang" && $key != "language")
+						#if (!$prop.get($key))
+						<tr>
+							<th class="property_name" scope="row">$key <p>$!esc.html($defaultProps.get($key))</p></th>
+							<td class="missing"><input type="text" name="$prop.get('lang')_$key" value="$!esc.html($!prop.get($key))" /></td>
+						</tr>
+						#end
+					#end
+					#foreach($key in $defaultProps.keySet())
+						#if ($key != "lang" && $key != "language" && $prop.get($key))
 						<tr>
 							<th class="property_name" scope="row">$key <p>$!esc.html($defaultProps.get($key))</p></th>
 							<td #if(!$prop.get($key))class="missing"#end><input type="text" name="$prop.get('lang')_$key" value="$!esc.html($!prop.get($key))" /></td>

Received on Monday, 12 October 2009 15:29:28 UTC