Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Itstool experimental branch #303

Open
wants to merge 19 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
fe7107e
Bug 796855. Bringing Chapter 3 of Help into Chapter 2 of Guide. Note:…
sunfish62 Sep 13, 2018
d002aec
Committing broken version with ch_accts.xml and ch_txns.xml in separa…
sunfish62 Sep 13, 2018
98648ac
no message
sunfish62 Sep 14, 2018
2a06b97
Fix error in file structure.
sunfish62 Sep 14, 2018
4ce507a
Replace closing sect1 tag that was mistakenly commented out in Help_c…
sunfish62 Sep 14, 2018
32ca395
Bug-796855 - Add lengthy text to ch_Importing from David C. that was …
sunfish62 Sep 17, 2018
11310a4
Adding changes to Makefile.am, per fellen comment.
sunfish62 Sep 19, 2018
7ebab26
Deleting commented out content per jralls.
sunfish62 Sep 19, 2018
1d8f1f0
Adding back two entity declarations to Makefile.am, per fellen
sunfish62 Sep 19, 2018
a065e68
Add rule to generate a pot file based on our two documents
gjanssens Oct 11, 2018
4bb344a
Merge branch 'bug-796855' of https://github.com/sunfish62/gnucash-doc…
gjanssens Oct 15, 2018
0651f65
Reduce C books to a minimum test set
gjanssens Oct 18, 2018
f07439c
Line up xml tag structure in retained files
gjanssens Nov 12, 2018
ecee1e7
Add temporary makefile rules and targets to generate support files fo…
gjanssens Nov 13, 2018
400b086
Commit first version of pot and de.po
gjanssens Nov 14, 2018
3b37c09
Merge branch 'merge-sunfish62-pr' into itstool
gjanssens Nov 14, 2018
8dc33e7
Updated pot file after merge of sunfish62's branch
gjanssens Nov 14, 2018
02917a9
Add rule to update <lang>.po file
gjanssens Nov 14, 2018
38e595c
de.po after merging with newest pot file
gjanssens Nov 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,54 @@ epub-recursive $(MOBI_RECURSIVE):
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; test -z "$$fail"

pot: $(abs_top_srcdir)/po/gnucash-docs.pot

$(abs_top_srcdir)/po/gnucash-docs.pot: $(abs_top_srcdir)/guide/C/*.xml $(abs_top_srcdir)/help/C/*.xml
mkdir -p $(abs_top_srcdir)/po
cd $(abs_top_srcdir)/po; \
itstool -dk -o gnucash-docs.pot $(subst $(abs_top_srcdir),..,$(sort $^))

$(abs_top_srcdir)/po/%.po: $(abs_top_srcdir)/po/gnucash-docs.pot
msgmerge $(abs_top_srcdir)/po/$*.po $(abs_top_srcdir)/po/gnucash-docs.pot > $(abs_top_srcdir)/po/$*.po-new
mv $(abs_top_srcdir)/po/$*.po-new $(abs_top_srcdir)/po/$*.po

# A set of temporary rules to help in the conversion from separate documents per
# language to a single base document with translations in po format.
LANGUAGES = de it ja pt ru
fpots := $(foreach L,$(LANGUAGES),fpot-$(L))
.PHONY: $(fpots)

$(foreach L,$(LANGUAGES),$(eval fpot-$(L): po/gnucash-docs-$(L)-english.fpot po/gnucash-docs-$(L)-english.struct po/gnucash-docs-$(L)-native.fpot po/gnucash-docs-$(L)-native.struct))

po/gnucash-docs-de-english.fpot po/gnucash-docs-it-english.fpot po/gnucash-docs-pt-english.fpot : $(abs_top_srcdir)/guide/C/*.xml $(abs_top_srcdir)/help/C/*.xml
po/gnucash-docs-ja-english.fpot po/gnucash-docs-ru-english.fpot : $(abs_top_srcdir)/guide/C/*.xml
po/gnucash-docs-de-native.fpot : $(abs_top_srcdir)/guide/de/*.xml $(abs_top_srcdir)/help/de/*.xml
po/gnucash-docs-it-native.fpot : $(abs_top_srcdir)/guide/it/*.xml $(abs_top_srcdir)/help/it/*.xml
po/gnucash-docs-ja-native.fpot : $(abs_top_srcdir)/guide/ja/*.xml
po/gnucash-docs-pt-native.fpot : $(abs_top_srcdir)/guide/pt/*.xml $(abs_top_srcdir)/help/pt/*.xml
po/gnucash-docs-ru-native.fpot : $(abs_top_srcdir)/guide/ru/*.xml

po/gnucash-docs-%.fpot :
mkdir -p po
cd $(abs_top_srcdir)/po; \
itstool -dk -o $(abs_builddir)/$@ $(subst $(abs_top_srcdir),..,$(sort $^))

po/gnucash-docs-%.struct: po/gnucash-docs-%.fpot
POTLANG=$(subst -native,,$(patsubst %-english,C,$*)); \
grep -E '[(]itstool[)]|^#:' $< | sed -E -e "s!/$${POTLANG}/!/<lang>/!" -e 's/xml:[0-9]*/xml:<line>/' > $@

po/%.po: po/gnucash-docs-%-english.fpot po/gnucash-docs-%-native.fpot po/gnucash-docs-%-english.struct po/gnucash-docs-%-native.struct
@cd po; \
if diff -q gnucash-docs-$*-english.struct gnucash-docs-$*-native.struct >/dev/null; \
then \
$(abs_top_srcdir)/util/gen-pot.pl gnucash-docs-$*-english.fpot gnucash-docs-$*-native.fpot > $*.po; \
echo "Generation of $@ complete."; \
else \
echo "Error: Can't automatically generate $*.po."; \
echo " Msgid order differs differs between gnucash-docs-$*-english.fpot and gnucash-docs-$*-native.fpot."; \
echo " Please adjust the original xml files such that the fpot msgid order aligns perfectly."; \
echo " You can use gnucash-docs-$*-english.fpot, gnucash-docs-$*-native.fpot"; \
echo " gnucash-docs-$*-english.struct and gnucash-docs-$*-native.struct in $(abs_top_builddir)/po"; \
echo " to help determine where the adjustments need to be made."; \
fi
11 changes: 11 additions & 0 deletions docbook/gnc-docbookx.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ own entity definitions to use across all of our DocBook pages. -->
<!ENTITY % local.common.attrib
"xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude'">

<!-- HTML codes unknown to xmllint and xml2po: -->
<!ENTITY lsquo "‘">
<!ENTITY rsquo "’">
<!ENTITY ldquo "“">
<!ENTITY rdquo "”">
<!ENTITY mdash "—">
<!ENTITY ndash "–">
<!ENTITY minus "−">
<!ENTITY hellip "…">
<!ENTITY euro "€">

<!--
***** Include of the original DocBook DTD *****
***********************************************
Expand Down
23 changes: 2 additions & 21 deletions guide/C/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,12 @@ docname = gnucash-guide
lang = C
omffile = $(docname)-C.omf
entities = \
fdl-appendix.xml \
legal.xml \
ch_oview.xml \
ch_basics.xml \
ch_accts.xml \
ch_txns.xml \
ch_cbook.xml \
ch_cc.xml \
ch_expenses.xml \
ch_loans.xml \
ch_invest.xml \
ch_reports.xml \
ch_capgain.xml \
ch_currency.xml \
ch_dep.xml \
ch_bus_features.xml \
ch_budgets.xml \
ch_oth_assets.xml \
ch_python_bindings.xml \
ch_import_business_data.xml \
gnc-glossary.xml \
appendixa.xml \
appendixb.xml \
appendixc.xml \
appendixd.xml
ch_importing.xml \
ch_configuring.xml
DISTCLEANFILES = $(docname)-C.omf.out
CLEANFILES = $(DISTCLEANFILES)
if GNC_WINDOWS
Expand Down
131 changes: 0 additions & 131 deletions guide/C/appendixa.xml

This file was deleted.

Loading