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

Jan Holesovsky kendy at collabora.com
Wed Dec 21 16:41:24 UTC 2016


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 :-) - would like to go ahead with this sometime
after the ESC.

All the best,
Kendy



More information about the LibreOffice mailing list