forked from google/eng-practices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
37 lines (27 loc) · 810 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
builddir := eng-practices
all:
cat makefile
clean:
rm -rf book
build:
mdbook build -d "$(builddir)"
MDBOOK_BOOK__LANGUAGE=ja mdbook build -d "$(builddir)/ja"
# なぜか1箇所リンクがおかしくなる。
find . -name *.html | xargs sed -i 's;href="ja/;href=";'
serve:
mdbook serve -d "$(builddir)"
MDBOOK_BOOK__LANGUAGE=ja mdbook serve -d "$(builddir)/ja"
install-nkf:
sudo apt update
sudo apt install -y nkf
install-mdbook:
cargo binstall -y mdbook
cargo binstall -y mdbook-i18n
cargo binstall -y mdbook-i18n-helpers
create-po-template:
MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' mdbook build -d po
# po/messages.pot が生成される
gettext-init-ja:
msginit -i po/messages.pot -l ja -o po/ja.po
gettext-update-ja:
msgmerge --update po/ja.po po/messages.pot