[Libreoffice-commits] core.git: extras/CustomTarget_templates.mk extras/Package_templates.mk extras/source include/sfx2 sfx2/inc sfx2/source

2023-08-24 Thread Jun Nogata (via logerrit)
 extras/CustomTarget_templates.mk|2 
 extras/Package_templates.mk |1 
 extras/source/templates/l10n/ja_ott_normal/META-INF/manifest.xml|   11 
 extras/source/templates/l10n/ja_ott_normal/Thumbnails/thumbnail.png |binary
 extras/source/templates/l10n/ja_ott_normal/content.xml  |   58 ++
 extras/source/templates/l10n/ja_ott_normal/manifest.rdf |   18 
 extras/source/templates/l10n/ja_ott_normal/meta.xml |   13 
 extras/source/templates/l10n/ja_ott_normal/mimetype |1 
 extras/source/templates/l10n/ja_ott_normal/settings.xml |   12 
 extras/source/templates/l10n/ja_ott_normal/styles.xml   |  284 
++
 include/sfx2/strings.hrc|1 
 sfx2/inc/strings.hxx|1 
 sfx2/source/doc/doctempl.cxx|6 
 13 files changed, 406 insertions(+), 2 deletions(-)

New commits:
commit feeb3a4604daa113894bdaa8c8698e0ded97050c
Author: Jun Nogata 
AuthorDate: Thu Aug 17 21:04:47 2023 +0900
Commit: Thorsten Behrens 
CommitDate: Thu Aug 24 17:00:40 2023 +0200

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:

[2] Japanese Industrial Standards - JIS X 4051:2004(Japanese):

[3] OpenOffice.org Japanese Environment Improvement Extension:


Change-Id: Ieaf57c8e018d479e7922fbd9d616b9a6c271b1ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155764
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/extras/CustomTarget_templates.mk b/extras/CustomTarget_templates.mk
index c6bea14a27df..f64faeb7e359 100644
--- a/extras/CustomTarget_templates.mk
+++ b/extras/CustomTarget_templates.mk
@@ -38,6 +38,8 @@ extras_TEMPLATES_XMLFILES := \
draw/bpmn/meta.xml \
l10n/zh_CN_ott_normal/meta.xml \
l10n/zh_CN_ott_normal/content.xml \
+   l10n/ja_ott_normal/meta.xml \
+   l10n/ja_ott_normal/content.xml \
 
 # param: style-base (e.g. Modern)
 extras_TEMPLATES_XMLFILES_RELATIVE = $(subst $(1)/,,$(filter 
$(1)/%,$(extras_TEMPLATES_XMLFILES)))
diff --git a/extras/Package_templates.mk b/extras/Package_templates.mk
index af119188339a..4ffdaa950d6a 100644
--- a/extras/Package_templates.mk
+++ b/extras/Package_templates.mk
@@ -20,6 +20,7 @@ $(eval $(call 
gb_Package_add_files_with_dir,extras_templates,$(LIBO_SHARE_FOLDER
styles/Simple.ott \
draw/bpmn.otg \
l10n/zh_CN_ott_normal.ott \
+   l10n/ja_ott_normal.ott \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/extras/source/templates/l10n/ja_ott_normal/META-INF/manifest.xml 
b/extras/source/templates/l10n/ja_ott_normal/META-INF/manifest.xml
new file mode 100644
index ..9f3cd2c637d7
--- /dev/null
+++ b/extras/source/templates/l10n/ja_ott_normal/META-INF/manifest.xml
@@ -0,0 +1,11 @@
+
+
+  
+  
+  
+  
+  
+  
+  
+
diff --git 
a/extras/source/templates/l10n/ja_ott_normal/Thumbnails/thumbnail.png 
b/extras/source/templates/l10n/ja_ott_normal/Thumbnails/thumbnail.png
new file mode 100644
index ..9dfda9ab1bbf
Binary files /dev/null and 
b/extras/source/templates/l10n/ja_ott_normal/Thumbnails/thumbnail.png differ
diff --git a/extras/source/templates/l10n/ja_ott_normal/content.xml 

[Libreoffice-commits] core.git: extras/CustomTarget_templates.mk extras/Package_templates.mk extras/source include/sfx2 sfx2/inc sfx2/source

2022-11-04 Thread Kevin Suo (via logerrit)
 extras/CustomTarget_templates.mk   |2 
 extras/Package_templates.mk|1 
 extras/source/templates/l10n/zh_CN_ott_normal/META-INF/manifest.xml|8 
 extras/source/templates/l10n/zh_CN_ott_normal/Thumbnails/thumbnail.png |binary
 extras/source/templates/l10n/zh_CN_ott_normal/content.xml  |   15 
 extras/source/templates/l10n/zh_CN_ott_normal/meta.xml |   10 
 extras/source/templates/l10n/zh_CN_ott_normal/mimetype |1 
 extras/source/templates/l10n/zh_CN_ott_normal/styles.xml   |  446 
++
 include/sfx2/strings.hrc   |1 
 sfx2/inc/doctempl.hrc  |3 
 sfx2/inc/strings.hxx   |1 
 sfx2/source/doc/doctempl.cxx   |2 
 sfx2/source/doc/doctemplates.cxx   |3 
 13 files changed, 491 insertions(+), 2 deletions(-)

New commits:
commit 5da75fcb400579d11430ec3d4c29b4646797fc5c
Author: Kevin Suo 
AuthorDate: Fri Sep 30 18:03:13 2022 +0800
Commit: Laurent Balland 
CommitDate: Fri Nov 4 21:29:33 2022 +0100

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 

diff --git a/extras/CustomTarget_templates.mk b/extras/CustomTarget_templates.mk
index 3b7e8884f488..c6bea14a27df 100644
--- a/extras/CustomTarget_templates.mk
+++ b/extras/CustomTarget_templates.mk
@@ -36,6 +36,8 @@ extras_TEMPLATES_XMLFILES := \
offimisc/Businesscard-with-logo/settings.xml \

offimisc/Businesscard-with-logo/Pictures/120101F400A0108F3F06.png \
draw/bpmn/meta.xml \
+   l10n/zh_CN_ott_normal/meta.xml \
+   l10n/zh_CN_ott_normal/content.xml \
 
 # param: style-base (e.g. Modern)
 extras_TEMPLATES_XMLFILES_RELATIVE = $(subst $(1)/,,$(filter 
$(1)/%,$(extras_TEMPLATES_XMLFILES)))
diff --git a/extras/Package_templates.mk b/extras/Package_templates.mk
index e618b646030d..af119188339a 100644
--- a/extras/Package_templates.mk
+++ b/extras/Package_templates.mk
@@ -19,6 +19,7 @@ $(eval $(call 
gb_Package_add_files_with_dir,extras_templates,$(LIBO_SHARE_FOLDER
styles/Modern.ott \
styles/Simple.ott \
draw/bpmn.otg \
+   l10n/zh_CN_ott_normal.ott \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git 
a/extras/source/templates/l10n/zh_CN_ott_normal/META-INF/manifest.xml 
b/extras/source/templates/l10n/zh_CN_ott_normal/META-INF/manifest.xml
new file mode 100644
index ..301ca9d330d4
--- /dev/null
+++ b/extras/source/templates/l10n/zh_CN_ott_normal/META-INF/manifest.xml
@@ -0,0 +1,8 @@
+
+
+ 
+ 
+ 
+ 
+ 
+
diff --git 
a/extras/source/templates/l10n/zh_CN_ott_normal/Thumbnails/thumbnail.png 
b/extras/source/templates/l10n/zh_CN_ott_normal/Thumbnails/thumbnail.png
new file mode 100644
index ..d223e8b09881
Binary files /dev/null and 
b/extras/source/templates/l10n/zh_CN_ott_normal/Thumbnails/thumbnail.png differ
diff --git a/extras/source/templates/l10n/zh_CN_ott_normal/content.xml 
b/extras/source/templates/l10n/zh_CN_ott_normal/content.xml
new file mode 100644
index ..56ccdc140998
--- /dev/null
+++