Skip to content

Commit

Permalink
Adding 2x Chinese to build + fix for Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
rduivenvoorde committed Jun 9, 2018
1 parent c34e3bf commit 91bd651
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
19 changes: 14 additions & 5 deletions Makefile
Expand Up @@ -133,14 +133,23 @@ output/html/version.txt: source/conf.py source/schedule.py
fullhtml: pulldocsources html

full: springclean
@-if [ $(LANG) != "en" ]; then \
@-if [ $(LANG) = "en" ]; then \
echo; \
elif [ $(LANG) = "zh_CN" ]; then \
echo; \
echo Pulling zh-Hans (Simplified) from transifex but renaming it to zh_CN; \
tx pull --minimum-perc=1 --skip -f -l zh-Hans; \
mv i18n/zh-Hans i18n/zh_CN; \
elif [ $(LANG) = "zh_TW" ]; then \
echo; \
echo Pulling zh-Hant (Traditional) from transifex but renaming it to zh_TW; \
tx pull --minimum-perc=1 --skip -f -l zh-Hant; \
mv i18n/zh-Hant i18n/zh_TW; \
else \
echo; \
echo Pulling $$LANG from transifex; \
# --minimum-perc=1 so only files which have at least 1% translation are pulled \
# -f to force, --skip to not stop with errors \
# -l lang \
tx pull --minimum-perc=1 --skip -f -l $$LANG; \
fi
fi
make html

world: full
Expand Down
2 changes: 1 addition & 1 deletion docker-world.sh
Expand Up @@ -24,7 +24,7 @@ git stash drop
git pull

# only languages which have translations in transifex
: ${langs:=en ca da de es fa fi fr gl hu id it ja km_KH ko lt nl pl pt_BR pt_PT ro tr ru uk zh_CN}
: ${langs:=en ca da de es fa fi fr gl hu id it ja km_KH ko lt nl pl pt_BR pt_PT ro tr ru uk zh_CN zh_TW}

# if you only want to build one language, do:
# $ langs=de ./docker-world.sh
Expand Down
3 changes: 2 additions & 1 deletion themes/qgis-theme/languageswitch.html
Expand Up @@ -25,7 +25,8 @@
<option value="tr" title="{{ _('Turkish') }}">Turkish</option>
<option value="ru" title="{{ _('Russian') }}">Русский</option>
<option value="uk" title="{{ _('Ukrainian') }}">Українська</option>
<option value="zh_CN" title="{{ _('Chinese (China)') }}">中文</option>
<option value="zh_CN" title="{{ _('Chinese (Simplified)') }}">中文</option>
<option value="zh_TW" title="{{ _('Chinese (Traditional)') }}">中文</option>
</select>

<script>
Expand Down

0 comments on commit 91bd651

Please sign in to comment.