- From: Mercurial notifier <nobody@w3.org>
- Date: Thu, 29 Jul 2010 22:35:46 +0000
- To: Unicorn Updates <www-validator-cvs@w3.org>
changeset: 1400:430797ff2a60 tag: tip user: Thomas Gambet <tgambet@w3.org> date: Thu Jul 29 18:35:29 2010 -0400 files: WebContent/WEB-INF/resources/templates/language.vm description: + lang attributes ~ fixed locale name diff -r 3cc10bd57411 -r 430797ff2a60 WebContent/WEB-INF/resources/templates/language.vm --- a/WebContent/WEB-INF/resources/templates/language.vm Thu Jul 29 18:18:13 2010 -0400 +++ b/WebContent/WEB-INF/resources/templates/language.vm Thu Jul 29 18:35:29 2010 -0400 @@ -24,7 +24,7 @@ <optgroup label="Select a language"> #foreach ($locale in $availableLocales) #set($localeKey = $strUtils.replace($locale.getName(), '_', '-')) - <option value="$localeKey" xml:lang="$localeKey" #if($native_lang == $localeKey)selected="selected"#end>$esc.html($strUtils.capitalize($locale.getDisplayName($defaultLocale))) - $esc.html($strUtils.capitalize($locale.getDisplayName($locale)))</option> + <option value="$localeKey" lang="$localeKey" xml:lang="$localeKey" #if($native_lang == $localeKey)selected="selected"#end>$esc.html($strUtils.capitalize($locale.getDisplayName($defaultLocale))) - $esc.html($strUtils.capitalize($locale.getDisplayName($locale)))</option> #end </optgroup> </select> @@ -62,7 +62,8 @@ #set($prop = $languageProps.get($locale)) #set($meta = $metadataProps.get($locale)) #set($percent = 100 * $math.div($math.add($prop.size(), $meta.size()), $math.add($defaultProps.size(), $defaultMetadata.size()))) - <th scope="col">$strUtils.capitalize($locale.getDisplayName($defaultLocale))<br /><span xml:lang="$locale.getName()">$strUtils.capitalize($locale.getDisplayName($locale))</span><br />$percent.intValue()%<br /><a href="./translations?ucn_lang=$locale.getName()">Edit</a></th> + #set($localeKey = $strUtils.replace($locale.getName(), '_', '-')) + <th scope="col">$strUtils.capitalize($locale.getDisplayName($defaultLocale))<br /><span lang="$localeKey" xml:lang="$localeKey">$strUtils.capitalize($locale.getDisplayName($locale))</span><br />$percent.intValue()%<br /><a href="./translations?ucn_lang=$locale.getName()">Edit</a></th> #end #end </tr> @@ -73,10 +74,10 @@ <th class="property_name" scope="row" title="$esc.xml($defaultProps.get($key))">$key</th> #foreach($locale in $uiLocales) #if ($locale != $defaultLocale) - #set($localeKey = $locale.getName()) + #set($localeKey = $strUtils.replace($locale.getName(), '_', '-')) #set($prop = $languageProps.get($locale)) #if($prop.get($key)) - <td class="ok"><span xml:lang="$localeKey" title="$!esc.xml($prop.get($key))">✔</span></td> + <td class="ok"><span lang="$localeKey" xml:lang="$localeKey" title="$!esc.xml($prop.get($key))">✔</span></td> #{else} <td class="missing"><span title="Missing translation of "$esc.xml($defaultProps.get($key))" in $locale.getDisplayName($defaultLocale)"><a href="./translations?ucn_lang=$localeKey">✘</a></span></td> #end @@ -89,10 +90,10 @@ <th class="property_name" scope="row" title="$esc.xml($defaultMetadata.get($key))">$key</th> #foreach($locale in $uiLocales) #if ($locale != $defaultLocale) - #set($localeKey = $locale.getName()) + #set($localeKey = $strUtils.replace($locale.getName(), '_', '-')) #set($meta = $metadataProps.get($locale)) #if($meta.get($key)) - <td class="ok"><span xml:lang="localeKey" title="$!esc.xml($meta.get($key))">✔</span></td> + <td class="ok"><span lang="localeKey" xml:lang="localeKey" title="$!esc.xml($meta.get($key))">✔</span></td> #{else} <td class="missing"><span title="Missing translation of "$esc.xml($defaultMetadata.get($key))" in $locale.getDisplayName($defaultLocale)"><a href="./translations?ucn_lang=$localeKey">✘</a></span></td> #end
Received on Thursday, 29 July 2010 22:35:47 UTC