Skip to content

Commit

Permalink
Assignment of "preface" and "appendix" templates to chapters in Russian
Browse files Browse the repository at this point in the history
translation is fixed.

The regression of the change is that older versions of AsciiDoc are not
directly supported now, manual intervention in lang-$(LANG).conf is required
for that.
  • Loading branch information
Dmitry Azhichakov committed Jul 16, 2010
1 parent ad5e3e3 commit 00e0b5b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
7 changes: 2 additions & 5 deletions Makefile
Expand Up @@ -18,13 +18,10 @@ book.xml: $(addprefix $(LANG)/,$(TXTFILES))
# then substitute the English version.
# Kludge to make preface sections work for languages besides English
# for older AsciiDoc versions.
if [[ `asciidoc --version | cut -f 2 -d ' '` < "8.4.5" ]]; then \
echo '[specialsections]' > conf ; \
sed -n '/^== .* ==$$/p' $(LANG)/preface.txt | sed 's/^== \(.*\) ==$$/^\1$$=sect-preface/' >> conf ; \
else echo "" > conf ; fi; \
CONF=lang-$(LANG).conf; [ -f $$CONF ] || CONF=lang-en.conf; \
( for FILE in $^ ; do if [ -f $$FILE ]; then cat $$FILE; else \
cat en/$$(basename $$FILE); fi; echo ; done ) | \
asciidoc -a lang=$(LANG) -d book -b docbook -f conf - > $@
asciidoc -a lang=$(LANG) -d book -b docbook -f $$CONF - > $@

# This rule allows unfinished translations to build.
# Report an error if the English version of the text file is missing.
Expand Down
2 changes: 0 additions & 2 deletions conf

This file was deleted.

Empty file added lang-en.conf
Empty file.
4 changes: 4 additions & 0 deletions lang-ru.conf
@@ -0,0 +1,4 @@
[specialsections]
^От редактора перевода$=preface
^Предисловие$=preface
^Введение.*$=sect1
2 changes: 1 addition & 1 deletion ru/drawbacks.txt
@@ -1,4 +1,4 @@
== Приложение А: Недостатки Git ==
== Приложение A: Недостатки Git ==

Есть некоторые проблемы Git, которые я спрятал под сукно. Некоторые из них можно легко решить с помощью скриптов и хуков, некоторые требуют реорганизации или пересмотра проекта, а несколько оставшихся неприятностей придется потерпеть. А еще лучше — взяться за них и решить!

Expand Down
2 changes: 1 addition & 1 deletion ru/translate.txt
@@ -1,4 +1,4 @@
== Приложение Б: Перевод этого руководства ==
== Приложение B: Перевод этого руководства ==

Клонируйте исходные тексты, затем создайте каталог, отвечающий http://www.iana.org/assignments/language-subtag-registry[тегу IETF] целевого языка: см.
http://www.w3.org/International/articles/language-tags/Overview.en.php[статью W3C по интернационализации]. К примеру, английский язык это «en», японский — «ja», традиционный китайский — «zh-Hant». Скопируйте в каталог файлы +txt+ из "en" каталога и переведите их.
Expand Down

0 comments on commit 00e0b5b

Please sign in to comment.