uPortal
  1. uPortal
  2. UP-3454

Bug of the processing language in pages

    Details

      Description

      The language is hard-coded in the pages (for desktop) or is not set in the pages (for mobile).
      Solving this problem would correct a accessibility bug and will offer an elegant way to patch the layout for internationalization.

      Statement of the Problem
      In Accessibility, there is a major criterion:
      Criterion WCAG 2.0: 3.1.1
      3.1.1 Language of Page: The default human language of each Web page can be programmatically determined. (Level A)
      ( http://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-doc-lang-id.html )

      Thus, the server returns the HTTP header Content-Language correctly. And even when you change the portal language, the HTTP header changes, it is verified with Firebug, into the panel "network".
      The HTTP header indicates the language or languages of pages (several possible).
      Unfortunately, the processing language of the page is hard-coded in the page. Namely the attributes of the <html> tag , "lang" and xml: lang ". Language processing indicates the primary language of the page (one possible).

      in uportal-war/src/main/resources/layout/theme/universality/page.xsl
      86. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

      We must do the same in Mobile to view and set the lang attribute to the tag "html":

      in uportal-war/src/main/resources/layout/theme/muniversality/muniversality.xsl
      301. <xsl:template match="/">

      302. <html>

      Resolution of the problem
      we should be able to dynamically change the main language in the XSL, 

      namely, to have in French: 

      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
      
 and have in English: 

      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

      and so on ...

      Benefits
      In Internationalization, there are often differences in word length, resulting in interfaces, buttons, titles blocks that go beyond their scope.
      correcting this bug and we can patch and "overload" elegantly the portal's css (without changing the English css) of the graphic themes "uportal3", "ivy", "coal" and "hight contrast" in French, using css selectors that would apply only in French.
      Like this:
      // only in french:
      html[lang=fr] .up .myclass

      { property: value-in-french; }

      that we will avoid a complex system of css files for each language, which would be complex to manage. Because the whole layout of the portal for all languages will be in one file ...

        Activity

        Hide
        Christian Cousquer added a comment -

        in the benefits:
        you have also the css3 pseudo attribute :lang() that could work also...
        for the legacy browsers, you need to have a ie7.css with the patches...

        Show
        Christian Cousquer added a comment - in the benefits: you have also the css3 pseudo attribute :lang() that could work also... for the legacy browsers, you need to have a ie7.css with the patches...
        Hide
        Eric Dalquist added a comment -

        Thanks for the pull request!

        Show
        Eric Dalquist added a comment - Thanks for the pull request!
        Hide
        Christian Cousquer added a comment - - edited

        I will make a small improvement just after the release of the 4.0.6 ...
        (you have plenty of work right now, I will not bother ..)
        Without causing problems for accessibility*, we can have:
        <html lang="en-US">
        or
        <html lang="en-GB">
        or
        <html lang="fr-FR">
        or
        <html lang="fr-CA">.
        The displays can be adapted very precisely according css for Americans, English**, French, Canadian French, etc..
        * I got the confirmation by the WCAG2 working group.
        ** Yeah, with this you can distinguish in css between American and English...

        Show
        Christian Cousquer added a comment - - edited I will make a small improvement just after the release of the 4.0.6 ... (you have plenty of work right now, I will not bother ..) Without causing problems for accessibility*, we can have: <html lang="en-US"> or <html lang="en-GB"> or <html lang="fr-FR"> or <html lang="fr-CA">. The displays can be adapted very precisely according css for Americans, English**, French, Canadian French, etc.. * I got the confirmation by the WCAG2 working group. ** Yeah, with this you can distinguish in css between American and English...

          People

          • Assignee:
            Eric Dalquist
            Reporter:
            Christian Cousquer
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Estimated End Date:

              Time Tracking

              Estimated:
              Original Estimate - 30 minutes
              30m
              Remaining:
              Remaining Estimate - 30 minutes
              30m
              Logged:
              Time Spent - Not Specified
              Not Specified