Skip to content

Commit

Permalink
SAK-32708 HTML lang should be en-US not en_US (sakaiproject#4619)
Browse files Browse the repository at this point in the history
  • Loading branch information
ottenhoff authored and ern committed Jul 18, 2017
1 parent 84a6dc2 commit 74bbfe9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
5 changes: 2 additions & 3 deletions calendar/calendar-summary-tool/tool/src/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=utf-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ public void handleAccess(HttpServletRequest req, HttpServletResponse res, Refere
String body = Web.escapeHtml(message.getBody());

sw
.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n"
.write("<!DOCTYPE html>\n"
+ "<html>\n"
+ "<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n"
+ "<link href=\"");
sw.write(skinRepo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ public void encodeBegin(FacesContext context, UIComponent component) throws IOEx

String countryCode = locale.getCountry();
if(countryCode != null && countryCode.length() > 0) {
lang += "_" + countryCode;
lang += "-" + countryCode;
}

writer.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
writer.write("<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"" + lang + "\" xml:lang=\"" + lang + "\" dir=\"" + LocaleUtil.getOrientation(locale) + "\">\n");
writer.write("<!DOCTYPE html>\n");
writer.write("<html lang=\"" + lang + "\" dir=\"" + LocaleUtil.getOrientation(locale) + "\">\n");
writer.write("<head>\n");
String title = (String) RendererUtil.getAttribute(context, component, "title");
if (title != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2305,8 +2305,8 @@ public void handleAccess(HttpServletRequest req, HttpServletResponse res, Refere
res.setContentType("text/html; charset=UTF-8");
PrintWriter out = res.getWriter();
out
.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
out.println("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />");
out.println("<meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
##
## Standard Header used by all portal views
## Don't put anything before the <!DOCTYPE or it breaks IE9
## DOCTYPE detection and puts it in quirks mode.
##

<!DOCTYPE html>
<html lang="$!{locale}" dir="$!{dir}" class="Mrphs-html">
<head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ protected void toolModeDispatch(String methodBase, String methodExt, HttpServlet
String languageCode = locale.getLanguage();
String countryCode = locale.getCountry();
if(countryCode != null && countryCode.length() > 0) {
languageCode += "_" + countryCode;
languageCode += "-" + countryCode;
}
context.put("language",languageCode);
context.put("dir", rl.getOrientation(locale));
Expand Down

0 comments on commit 74bbfe9

Please sign in to comment.