2022-07-21 05:38:11 -05:00
|
|
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
|
|
|
# This file is part of the LibreOffice project.
|
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#
|
|
|
|
|
|
|
|
$(eval $(call gb_CustomTarget_CustomTarget,extras/source/templates))
|
|
|
|
|
|
|
|
# # for OTT templates: mimetype, styles.xml, META-INF/manifest.xml and
|
|
|
|
# Thumbnails/thumbnail.png files are automatically added for each template
|
|
|
|
# # for OTG templates: mimetype, content.xml, styles.xml, META-INF/manifest.xml and
|
|
|
|
# Thumbnails/thumbnail.png files are automatically added for each template
|
|
|
|
# list of meta.xml files (one per template) + other files (content.xml, manifest.rdf, settings.xml, pictures...)
|
|
|
|
extras_TEMPLATES_XMLFILES := \
|
|
|
|
officorr/Modern_business_letter_sans_serif/meta.xml \
|
|
|
|
officorr/Modern_business_letter_serif/meta.xml \
|
|
|
|
offimisc/Businesscard-with-logo/meta.xml \
|
|
|
|
personal/CV/meta.xml \
|
|
|
|
personal/Resume1page/meta.xml \
|
|
|
|
styles/Default/meta.xml \
|
|
|
|
styles/Modern/meta.xml \
|
|
|
|
styles/Simple/meta.xml \
|
|
|
|
officorr/Modern_business_letter_sans_serif/content.xml \
|
|
|
|
officorr/Modern_business_letter_serif/content.xml \
|
|
|
|
offimisc/Businesscard-with-logo/content.xml \
|
|
|
|
personal/CV/content.xml \
|
|
|
|
personal/Resume1page/content.xml \
|
|
|
|
officorr/Modern_business_letter_sans_serif/manifest.rdf \
|
|
|
|
officorr/Modern_business_letter_serif/manifest.rdf \
|
|
|
|
offimisc/Businesscard-with-logo/manifest.rdf \
|
|
|
|
personal/CV/manifest.rdf \
|
|
|
|
personal/Resume1page/manifest.rdf \
|
|
|
|
offimisc/Businesscard-with-logo/settings.xml \
|
|
|
|
offimisc/Businesscard-with-logo/Pictures/10000201000001F4000000A0108F3F06.png \
|
|
|
|
draw/bpmn/meta.xml \
|
Templates: tdf#86483: Add "Localization" category and add a template for zh_CN
This patch adds a new template category named "Localization", to be used for
templates created by our l10n team for each locale, so that languages which
requires special layout or formatting (such as CJK or CTL) can have their own
templates bundled by default.
This patch aslo adds a (general purpose) Writer template for the Simplified
Chinese language. Chinese language, by convention, need to format the
document to have the first line of the paragraph be indented by 2 characters.
The font size, line spacing, paragraph margin etc also need special treatment.
If the Chinese users start writing using the current default Writer template,
they need to adjust the style formatting every time to meet their needs.
Although this template can be provided as an "extension" on the extension
website, in practice very few people will go to the extension website and
look for such templates.
Such bundled templates can also be added by other l10n teams. The
extras/README.md will be updated in a separate patch to include documentation
on how to add such templates and have their template names translatable on
weblate.
This does not completely resolve the issue in tdf#86483, which requests to
"Implement different default templates per locale". However, with this patch,
we are a step closer to set a choosen template when the user switch to a
certain UI.
Change-Id: Ic295482354f343e981eb20908907bd6a945b7120
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140802
Tested-by: Jenkins
Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
2022-09-30 05:03:13 -05:00
|
|
|
l10n/zh_CN_ott_normal/meta.xml \
|
|
|
|
l10n/zh_CN_ott_normal/content.xml \
|
Template: tdf#86483: Add Japanese template to the Localization category
As Kevin Suo noted in tdf#86483, CJK and CTL use different formatting than
the US and Europe. Japanese is no exception, and must be formatted according
to Japanese typesetting rules[1][2] before the document is created. However,
many Japanese language users use LibreOffice without knowing this, resulting
in strange Japanese documents. This template sets up the necessary Japanese
formatting to reduce this.
Originally, the template was supposed to be provided by the language pack.
However, since a localization category was created, we thought it would be
a good idea to provide the template first, as we did with Chinese, so we
added it.
This template has the following settings And the template is inspired by
the OpenOffice.org Japanese Environment Improvement Extension Template[3]
and Kevin Suo's Chinese template, which we have previously attempted to do
the same.
* Western and Asian languages are in the same font.
* Paragraphs have been set to be justified.
* Japanese paragraphs are originally indented by one character. However,
since some documents do not use it, it is not set. Instead, the original
Japanese paragraphs are set to First line indent style.
* Italics has been removed from the style. Japanese does not use italics.
[1] Requirements for Japanese Text Layout:
<https://www.w3.org/TR/jlreq/>
[2] Japanese Industrial Standards - JIS X 4051:2004(Japanese):
<https://kikakurui.com/x4/X4051-2004-02.html>
[3] OpenOffice.org Japanese Environment Improvement Extension:
<https://ja.osdn.net/projects/openoffice-docj/releases/40804#note>
Change-Id: Ieaf57c8e018d479e7922fbd9d616b9a6c271b1ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155764
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-08-17 07:04:47 -05:00
|
|
|
l10n/ja_ott_normal/meta.xml \
|
|
|
|
l10n/ja_ott_normal/content.xml \
|
2022-07-21 05:38:11 -05:00
|
|
|
|
|
|
|
# param: style-base (e.g. Modern)
|
|
|
|
extras_TEMPLATES_XMLFILES_RELATIVE = $(subst $(1)/,,$(filter $(1)/%,$(extras_TEMPLATES_XMLFILES)))
|
|
|
|
|
|
|
|
.SECONDEXPANSION:
|
|
|
|
# secondexpansion since the patterns not just cover a filename portion, but also include a
|
|
|
|
# directory portion with different number of elements
|
|
|
|
# copy regular files (mimetype, *.jpg, *.png, *.rdf, *.svg, *.svm, …)
|
|
|
|
$(call gb_CustomTarget_get_workdir,extras/source/templates)/% : $(SRCDIR)/extras/source/templates/% \
|
|
|
|
| $$(dir $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*).dir
|
|
|
|
$(call gb_Output_announce,templates/$*,$(true),CPY,1)
|
|
|
|
$(call gb_Trace_StartRange,templates/$*,CPY)
|
|
|
|
cp $< $@
|
|
|
|
$(call gb_Trace_EndRange,templates/$*,CPY)
|
|
|
|
|
|
|
|
# test and copy xml files
|
|
|
|
$(call gb_CustomTarget_get_workdir,extras/source/templates)/%.xml : $(SRCDIR)/extras/source/templates/%.xml \
|
|
|
|
| $(call gb_ExternalExecutable_get_dependencies,xsltproc) \
|
|
|
|
$$(dir $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*.xml).dir
|
|
|
|
$(call gb_Output_announce,templates/$*.xml,$(true),XSL,1)
|
|
|
|
$(call gb_Trace_StartRange,templates/$*.xml,XSL)
|
|
|
|
$(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $<
|
|
|
|
$(call gb_Trace_EndRange,templates/$*.xml,XSL)
|
|
|
|
|
|
|
|
# zip files to OTT
|
|
|
|
$(call gb_CustomTarget_get_workdir,extras/source/templates)/%.ott : \
|
|
|
|
$$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*/,\
|
|
|
|
mimetype $$(call extras_TEMPLATES_XMLFILES_RELATIVE,$$*) ) \
|
|
|
|
$$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*/,\
|
|
|
|
styles.xml $$(call extras_TEMPLATES_XMLFILES_RELATIVE,$$*) ) \
|
|
|
|
$$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*/,\
|
|
|
|
META-INF/manifest.xml $$(call extras_TEMPLATES_XMLFILES_RELATIVE,$$*) ) \
|
|
|
|
$$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*/,\
|
|
|
|
Thumbnails/thumbnail.png $$(call extras_TEMPLATES_XMLFILES_RELATIVE,$$*) )
|
|
|
|
$(call gb_Output_announce,templates/$*.ott,$(true),ZIP,2)
|
|
|
|
$(call gb_Trace_StartRange,templates/$*.ott,ZIP)
|
|
|
|
$(call gb_Helper_abbreviate_dirs,\
|
|
|
|
cd $(dir $<) && \
|
|
|
|
zip -q0X --filesync --must-match $@ mimetype && \
|
|
|
|
zip -qrX --must-match $@ styles.xml META-INF/manifest.xml Thumbnails/thumbnail.png && \
|
|
|
|
zip -qrX --must-match $@ $(call extras_TEMPLATES_XMLFILES_RELATIVE,$*) \
|
|
|
|
)
|
|
|
|
$(call gb_Trace_EndRange,templates/$*.ott,ZIP)
|
|
|
|
|
|
|
|
# zip files to OTG
|
|
|
|
$(call gb_CustomTarget_get_workdir,extras/source/templates)/%.otg : \
|
|
|
|
$$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*/,\
|
|
|
|
mimetype $$(call extras_TEMPLATES_XMLFILES_RELATIVE,$$*) ) \
|
|
|
|
$$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*/,\
|
|
|
|
content.xml $$(call extras_TEMPLATES_XMLFILES_RELATIVE,$$*) ) \
|
|
|
|
$$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*/,\
|
|
|
|
styles.xml $$(call extras_TEMPLATES_XMLFILES_RELATIVE,$$*) ) \
|
|
|
|
$$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*/,\
|
|
|
|
META-INF/manifest.xml $$(call extras_TEMPLATES_XMLFILES_RELATIVE,$$*) ) \
|
|
|
|
$$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates)/$$*/,\
|
|
|
|
Thumbnails/thumbnail.png $$(call extras_TEMPLATES_XMLFILES_RELATIVE,$$*) )
|
|
|
|
$(call gb_Output_announce,templates/$*.otg,$(true),ZIP,2)
|
|
|
|
$(call gb_Trace_StartRange,templates/$*.otg,ZIP)
|
|
|
|
$(call gb_Helper_abbreviate_dirs,\
|
|
|
|
cd $(dir $<) && \
|
|
|
|
zip -q0X --filesync --must-match $@ mimetype && \
|
|
|
|
zip -qrX --must-match $@ content.xml styles.xml META-INF/manifest.xml Thumbnails/thumbnail.png && \
|
|
|
|
zip -qrX --must-match $@ $(call extras_TEMPLATES_XMLFILES_RELATIVE,$*) \
|
|
|
|
)
|
|
|
|
$(call gb_Trace_EndRange,templates/$*.otg,ZIP)
|
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|