Derby
  1. Derby
  2. DERBY-5909

The lang attribute in toc.html always says 'en-us'

    Details

      Description

      The lang and xml:lang attributes in the table of content (toc.html) files in all the manuals say that the language is 'en-us'. In the Japanese and Brazilian Portuguese translations they should say 'ja' and 'pt-br' instead. In the topics, however, the correct language is specified.

      1. d5909-1a.diff
        6 kB
        Knut Anders Hatlen

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        I think there are two things that must be fixed:

        1) The ditamap source files, from which the toc.html files are generated, should have an xml:lang attribute in their <map> elements (the DTD for map says xml:lang is allowed).

        2) map2htmtoc.xsl must be updated to check for xml:lang in <map> (currently, it assumes the source is structured like a dita file, probably because of copy and paste from dita2htmlImpl.xsl, and it won't find the attribute in the <map> element, even if it's there).

        Show
        Knut Anders Hatlen added a comment - I think there are two things that must be fixed: 1) The ditamap source files, from which the toc.html files are generated, should have an xml:lang attribute in their <map> elements (the DTD for map says xml:lang is allowed). 2) map2htmtoc.xsl must be updated to check for xml:lang in <map> (currently, it assumes the source is structured like a dita file, probably because of copy and paste from dita2htmlImpl.xsl, and it won't find the attribute in the <map> element, even if it's there).
        Hide
        Knut Anders Hatlen added a comment -

        The attached patch seems to fix the problem. It makes map2htmtoc.xsl get the language from the <map> element (instead of the child of the non-existing <dita> element as it currently does), and adds an xml:lang attribute to the <map> element of all the ditamap files.

        I diffed the original HTML docs with the new ones, and only the toc.html files of the translated manuals were changed as a result of this fix.

        Show
        Knut Anders Hatlen added a comment - The attached patch seems to fix the problem. It makes map2htmtoc.xsl get the language from the <map> element (instead of the child of the non-existing <dita> element as it currently does), and adds an xml:lang attribute to the <map> element of all the ditamap files. I diffed the original HTML docs with the new ones, and only the toc.html files of the translated manuals were changed as a result of this fix.
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1377616.

        Show
        Knut Anders Hatlen added a comment - Committed revision 1377616.
        Hide
        Kim Haase added a comment -

        Thanks very much for catching this problem, Knut.

        Show
        Kim Haase added a comment - Thanks very much for catching this problem, Knut.
        Hide
        Knut Anders Hatlen added a comment -

        Backported to 10.9 (revision 1378858) and 10.8 (revision 1378860).

        Show
        Knut Anders Hatlen added a comment - Backported to 10.9 (revision 1378858) and 10.8 (revision 1378860).

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development