Skip to content

Commit 8c030a8

Browse files
committed
rollup merge of #19966: steveklabnik/remove_l10n
@brson suggested that I remove this stuff in https://github.com/rust-lang/rust/pull/19897/files#r22014810, but it seems more appropriate to do separate from that.
2 parents 9f4f6cf + 11a94f2 commit 8c030a8

File tree

3 files changed

+0
-108
lines changed

3 files changed

+0
-108
lines changed

mk/docs.mk

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -216,36 +216,6 @@ endef
216216
$(foreach docname,$(DOCS),$(eval $(call DEF_DOC,$(docname))))
217217

218218

219-
# Localized documentation
220-
221-
# FIXME: I (huonw) haven't actually been able to test properly, since
222-
# e.g. (by default) I'm doing an out-of-tree build (#12763), but even
223-
# adjusting for that, the files are too old(?) and are rejected by
224-
# po4a.
225-
#
226-
# As such, I've attempted to get it working as much as possible (and
227-
# switching from pandoc to rustdoc), but preserving the old behaviour
228-
# (e.g. only running on the guide)
229-
.PHONY: l10n-mds
230-
l10n-mds: $(D)/po4a.conf \
231-
$(foreach lang,$(L10N_LANG),$(D)/po/$(lang)/*.md.po)
232-
$(warning WARNING: localized documentation is experimental)
233-
po4a --copyright-holder="The Rust Project Developers" \
234-
--package-name="Rust" \
235-
--package-version="$(CFG_RELEASE)" \
236-
-M UTF-8 -L UTF-8 \
237-
$(D)/po4a.conf
238-
239-
define DEF_L10N_DOC
240-
DOC_L10N_TARGETS += doc/l10n/$(1)/$(2).html
241-
doc/l10n/$(1)/$(2).html: l10n-mds $$(HTML_DEPS) $$(RUSTDOC_DEPS_$(2))
242-
@$$(call E, rustdoc: $$@)
243-
$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) doc/l10n/$(1)/$(2).md
244-
endef
245-
246-
$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang),guide)))
247-
248-
249219
######################################################################
250220
# Rustdoc (libstd/extra)
251221
######################################################################
@@ -294,7 +264,3 @@ endif
294264

295265
docs: $(DOC_TARGETS)
296266
compiler-docs: $(COMPILER_DOC_TARGETS)
297-
298-
docs-l10n: $(DOC_L10N_TARGETS)
299-
300-
.PHONY: docs-l10n

src/doc/README.md

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
document converter, is required to generate docs as HTML from Rust's
77
source code.
88

9-
[po4a](http://po4a.alioth.debian.org/) is required for generating translated
10-
docs from the master (English) docs.
11-
12-
[GNU gettext](http://www.gnu.org/software/gettext/) is required for managing
13-
the translation data.
14-
159
## Building
1610

1711
To generate all the docs, just run `make docs` from the root of the repository.
@@ -44,43 +38,3 @@ The syntax for pandoc flavored markdown can be found at:
4438
A nice quick reference (for non-pandoc markdown) is at:
4539

4640
- http://kramdown.gettalong.org/quickref.html
47-
48-
## Notes for translators
49-
50-
Notice: The procedure described below is a work in progress. We are working on
51-
translation system but the procedure contains some manual operations for now.
52-
53-
To start the translation for a new language, see `po4a.conf` at first.
54-
55-
To generate `.pot` and `.po` files, do something like:
56-
57-
~~~~
58-
po4a --copyright-holder="The Rust Project Developers" \
59-
--package-name="Rust" \
60-
--package-version="0.13.0" \
61-
-M UTF-8 -L UTF-8 \
62-
src/doc/po4a.conf
63-
~~~~
64-
65-
(the version number must be changed if it is not `0.13.0` now.)
66-
67-
Now you can translate documents with `.po` files, commonly used with gettext. If
68-
you are not familiar with gettext-based translation, please read the online
69-
manual linked from http://www.gnu.org/software/gettext/ . We use UTF-8 as the
70-
file encoding of `.po` files.
71-
72-
When you want to make a commit, do the command below before staging your
73-
change:
74-
75-
~~~~
76-
for f in src/doc/po/**/*.po; do
77-
msgattrib --translated $f -o $f.strip
78-
if [ -e $f.strip ]; then
79-
mv $f.strip $f
80-
else
81-
rm $f
82-
fi
83-
done
84-
~~~~
85-
86-
This removes untranslated entries from `.po` files to save disk space.

src/doc/po4a.conf

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)