Default value ("en-US") for the "xml-lang" attribute in XHP files

Hi,

This is one more from the 'cleaning up XHP files' series...

At the moment, the "xml-lang" attribute in the <paragraph> markup in the
XHP files is mandatory. But I see no reason for that, it is always just
"en-US", the different locales make sense only for extensions, so I have
created this patch:

  https://gerrit.libreoffice.org/#/c/32296/

This is supposed to ensure that when there is no xml-lang in a given
attribute, it will default to en-US.

It is yet to be tested with the actually removed xml-lang from our help
files via something like:

  git grep -l '\<xml-lang\>' | xargs sed -i 's/\(<paragraph[^>]*\) xml-lang="en-US"/\1/g'

and updated the DTD to specify xml-lang as optional.

This will not affect the translations in any way.

Comments appreciated :slight_smile: - would like to go ahead with this sometime
after the ESC.

All the best,
Kendy

OK for me.

Hi Tom,

Tom Davies píše v Čt 22. 12. 2016 v 10:12 +0000:

Perhaps a header section, like html rather than document-headers? Is
that even possible in xml?

Good point, in principle this would be possible; will keep this in mind.

Though, this is not the most important thing at the moment, as only the
extensions that have a translated help system are actually using a
non-en-US 'xml-lang'; the internal help system is not really using this
at all.

All the best,
Kendy