Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

Commit

Permalink
Merge branch 'feature/1415' into develop
Browse files Browse the repository at this point in the history
Close #1415
  • Loading branch information
weierophinney committed Mar 26, 2015
2 parents 66d283b + bd1e6b7 commit 3e43bdc
Show file tree
Hide file tree
Showing 1,508 changed files with 38 additions and 143,483 deletions.
47 changes: 1 addition & 46 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ We only ask you to use a couple of conventions:
- To fix or update a document we use the `fix/<doc>` branch name convention,
where `<doc>` is the name of the document that you want to fix or update;

If you want to work on a document in a language different from English, please
include the name of the language in the branch name.

For instance, if you want to propose a new document in Italian you have to use the
following naming convention: `feature/it/<doc>`, where `it` is Italian.
The same convention is applied on the fix or update: `fix/it/<doc>`.

You can find the supported languages in the `docs/languages` subdirectory.


## DOCUMENT FORMAT

The Zend Framework 2 documentation is written using the
Expand Down Expand Up @@ -65,39 +55,4 @@ To render the documentation in HTML format:

The HTML documentation will be generated in `docs/_build/html`.

By default, the `make html` command renders the documentation in English.
To render in a different language you have to specify the LANG in the command line.

For instance, to render the documentation in Italian (`it`), execute the following command:

make html LANG=it

You can find the supported languages in the `docs/languages` subdirectory.

After you've made changes to .rst files, you can run `make html` again to update HTML for changed pages.

## TRANSLATION

If you want to begin a new translation, you need to create a new subdirectory in the 'docs/languages' directory.
The name of the directory must be the [ISO 639-1 code](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
for your language.

The compilation process takes all English files in the directory 'docs/languages/en' and overwrites them with those
in your language directory if it exists with the same filename in the same tree. If you want to translate a file,
copy the English file to your directory and start the translation. When the translation is completed, you have
to add a revcheck tag like '.. EN-Revision: 1a526e4' at the top of the file. '1a526e4' are the 7 first characters
of the English commit on which your translation is based. This helps the maintainer of the translation to know if
there exist one or multiple modifications of the English file that need to be added to the translation.

All revcheck tags have been initialized to 'none'. This indicates to all maintainers of translations that it needs
at least one review of the file after the automatic migration from ZF1 (Docbook to reST). We will provide in a
next future a visual tool for translators to be able to detect non-translated files or outdated files (based on
the revcheck tag).

In this philosophy, you can translate an image if you want. But there are 2 specific files at the
root of the English directory that you must not translate:
- 'index.rst'
- 'snippets.rst'

All sentences in these files that need a translation are handled by the reST substitution syntax. You can find them
in the 'translated-snippets.rst' file.
After you've made changes to .rst files, you can run `make html` again to update HTML for changed pages.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can read the development online documentation in
[http://zf2.readthedocs.org](http://zf2.readthedocs.org/en/latest/index.html).

You can read the last stable documentation in
[http://packages.zendframework.com/docs/latest/manual/en/](http://packages.zendframework.com/docs/latest/manual/en/).
[http://packages.zendframework.com/docs/latest/manual/](http://packages.zendframework.com/docs/latest/manual/).

## BUILDING DOCUMENTATION

Expand Down
35 changes: 4 additions & 31 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,22 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
LANG = en

CALIBRE ?= ebook-convert

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) tmp/$(LANG)
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) tmp/
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

pre-build:
@rm -rf tmp/$(LANG)
@mkdir -p tmp/$(LANG)
@cp -Rp languages/en/* tmp/$(LANG)/
ifneq ($(LANG),en)
@for f in $$(cd languages/$(LANG) && find . -type f \( ! -iname ".*" \) | sort); do \
if [ -f languages/en/$$f ]; then \
if [ $$(stat -c %s languages/$(LANG)/$$f) = $$(stat -c %s languages/en/$$f) ]; then \
echo "The file '$$f' seems to be exactly the same as English one, perhaps it could be deleted"; \
fi; \
cp languages/$(LANG)/$$f tmp/$(LANG)/$$f; \
else \
echo "The file '$$f' is not anymore in English directory, check if it's renamed or deleted"; \
fi; \
done
endif
@cp languages/en/conf.py tmp/$(LANG)/conf.py
@sed -i.bak 's/#language = None/language = "$(LANG)"/' tmp/$(LANG)/conf.py
@rm -f tmp/$(LANG)/conf.py.bak
@rm -rf tmp/
@mkdir -p tmp/
@cp -Rp src/* tmp/

# Process latex to strip non-ascii characters and perform other necessary
# changes
Expand Down Expand Up @@ -186,14 +170,3 @@ doctest: pre-build
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

add-missing-revchecktag:
ifneq ($(LANG),en)
@for f in $$(cd languages/$(LANG) && find . -type f \( ! -iname ".*" \)); do \
if [ -f languages/en/$$f ]; then \
rev=$$(head -n 3 languages/$(LANG)/$$f | grep -i EN-Revision | cut -f2 -d ':' | tr -d ' '); \
if [ "$$rev" = "" ]; then \
echo ".. EN-Revision: none"|cat - languages/$(LANG)/$$f > /tmp/zftmpfile && mv /tmp/zftmpfile languages/$(LANG)/$$f; \
fi; \
fi; \
done
endif
2 changes: 0 additions & 2 deletions docs/languages/de/.gitignore

This file was deleted.

0 comments on commit 3e43bdc

Please sign in to comment.