W3C home > Mailing lists > Public > www-validator-cvs@w3.org > March 2010

2006/unicorn/WebContent/WEB-INF/resources/templates language.form.vm,1.11,1.12

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Sat, 20 Mar 2010 17:14:38 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Nt2Fy-0008Om-HS@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates
In directory hutz:/tmp/cvs-serv32269/WebContent/WEB-INF/resources/templates

Modified Files:
	language.form.vm 
Log Message:
updated to match new code regarding localization

Index: language.form.vm
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/language.form.vm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- language.form.vm	5 Mar 2010 13:51:14 -0000	1.11
+++ language.form.vm	20 Mar 2010 17:14:36 -0000	1.12
@@ -24,14 +24,12 @@
 				<a id="a_all" title="Display all" href="#" style="display: none">Display all</a>
 			</legend>
 			
-			<input type="hidden" name="${param_prefix}lang" value="$prop.get('lang')"/>
-			
 			<table style="width:100%">
 				<thead>
 					<tr>
-						<th scope="col" class="first_col">$defaultProps.get("language") properties</th>
-						#set($percent = 100 * $math.div($math.sub($math.add($prop.size(), $metadatas.size()), 4), $math.sub($math.add($defaultProps.size(), $defaultMetadata.size()), 4)))
-						<th scope="col">$prop.get("language") $percent.intValue()%</th>
+						<th scope="col" class="first_col">$strUtils.capitalize($defaultLocale.getDisplayName($defaultLocale)) properties</th>
+						#set($percent = 100 * $math.div($math.add($prop.size(), $metadatas.size()), $math.add($defaultProps.size(), $defaultMetadata.size())))
+						<th scope="col">$strUtils.capitalize($transLocale.getDisplayName($transLocale)) $percent.intValue()%</th>
 					</tr>
 				</thead>
 				<tbody>
@@ -39,32 +37,32 @@
 						#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>
+							<td class="missing"><input type="text" name="$transLocale.getName()_$key" value="$!esc.html($!prop.get($key))" /></td>
 						</tr>
 						#end
 					#end
 					#foreach($key in $defaultMetadata.keySet())
-						#if (!$metadatas.get($key) && $key != "lang" && $key != "language")
+						#if (!$metadatas.get($key))
 						<tr>
 							<th class="property_name" scope="row">$key <p>$!esc.html($defaultMetadata.get($key))</p></th>
-							<td class="missing"><input type="text" name="metadata_$metadatas.get('lang')_$key" value="$!esc.html($!metadatas.get($key))" /></td>
+							<td class="missing"><input type="text" name="metadata_$transLocale.getName()_$key" value="$!esc.html($!metadatas.get($key))" /></td>
 						</tr>
 						#end
 					#end
 					
 					#foreach($key in $defaultProps.keySet())
-						#if ($key != "lang" && $key != "language" && $prop.get($key))
+						#if ($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>
+							<td #if(!$prop.get($key))class="missing"#end><input type="text" name="$transLocale.getName()_$key" value="$!esc.html($!prop.get($key))" /></td>
 						</tr>
 						#end
 					#end
 					#foreach($key in $defaultMetadata.keySet())
-						#if ($key != "lang" && $key != "language" && $metadatas.get($key))
+						#if ($metadatas.get($key))
 						<tr>
 							<th class="property_name" scope="row">$key <p>$!esc.html($defaultMetadata.get($key))</p></th>
-							<td #if(!$metadatas.get($key))class="missing"#end><input type="text" name="metadata_$metadatas.get('lang')_$key" value="$!esc.html($!metadatas.get($key))" /></td>
+							<td #if(!$metadatas.get($key))class="missing"#end><input type="text" name="metadata_$transLocale.getName()_$key" value="$!esc.html($!metadatas.get($key))" /></td>
 						</tr>
 						#end
 					#end
@@ -72,7 +70,7 @@
 			</table>
 		
 			<div class="submit">
-				<input type="hidden" name="translation_language" value="$prop.get('lang')" />
+				<input type="hidden" name="translation_language" value="$transLocale.getName()" />
 				<input type="submit" value="Submit" />
 			</div>
 		</fieldset>
Received on Saturday, 20 March 2010 17:14:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:19 GMT