https://bugs.documentfoundation.org/show_bug.cgi?id=139891
Bug ID: 139891
Summary: Create a (XSLT) script to clean up the locale info
from the templates.
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Create an XSLT filter to remove the language-specific pieces of LibreOffice
templates, so any random template can be made language-/locale-independent.
The XSLT filter will remove the language-specific details from a .ott file and
then repack it as a new .ott.
Each of the template files needs to be unpacked so that the fo:language="en"
fo:country="US" and other language-related details can be removed from the
files.
Follow the below steps to unpack the template files,
1. Add .zip to the file name.
2. Extract the zip into a folder.
3. Open the folder and remove the string `fo:language="en" fo:country="US"`
from the style.xml file
And finally can also be repacked using:
>from zipfile import ZipFile, ZIP_STORED, ZIP_DEFLATED
>
> with ZipFile('path/to/document.ott', 'w') as myzip:
> myzip.write('path/to/mimetype', 'mimetype', ZIP_STORED)
> myzip.write('path/to/META-INF/manifest.xml', 'META-INF/manifest.xml',
> ZIP_DEFLATED)
> myzip.write('path/to/content.xml', 'content.xml', ZIP_DEFLATED)
And the result passes https://odfvalidator.org.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs