- From: Julien Grand-Mourcel via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 30 Jul 2007 13:47:50 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/servlet In directory hutz:/tmp/cvs-serv6349/org/w3c/css/servlet Modified Files: CssValidator.java Log Message: Changing the servlet so that the lang of the output page is the same than the index page also in doPost Index: CssValidator.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/servlet/CssValidator.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- CssValidator.java 30 Jul 2007 12:24:17 -0000 1.32 +++ CssValidator.java 30 Jul 2007 13:47:48 -0000 1.33 @@ -430,15 +430,6 @@ catch(Exception e) { lang = null; } - - if(lang == null || lang.equals("")) { - lang = req.getHeader("Accept-Language"); - } - else { - lang += ',' + req.getHeader("Accept-Language"); - } - ApplContext ac = new ApplContext(lang); - ac.setLink(req.getQueryString()); boolean errorReport = true; int warningLevel = 2; @@ -508,6 +499,8 @@ file = (FakeFile) tmp[i].getValue(); } else if (tmp[i].getName().equals("text")) { text = (String) tmp[i].getValue(); + } else if (tmp[i].getName().equals("lang")) { + lang = (String) tmp[i].getValue(); } else if (tmp[i].getName().equals("output")) { output = (String) tmp[i].getValue(); } else if (tmp[i].getName().equals("warning")) { @@ -530,6 +523,16 @@ e.printStackTrace(); } + + if(lang == null || lang.equals("")) { + lang = req.getHeader("Accept-Language"); + } + else { + lang += ',' + req.getHeader("Accept-Language"); + } + + ApplContext ac = new ApplContext(lang); + ac.setLink(req.getQueryString()); ac.setMedium(usermedium); if (output == null) {
Received on Monday, 30 July 2007 13:47:52 UTC