diff --git a/.ci/after_success.sh b/.ci/after_success.sh index 16ca8aa5d..930281e9a 100755 --- a/.ci/after_success.sh +++ b/.ci/after_success.sh @@ -9,6 +9,16 @@ set +e if [ -z "${CIRCLE_PULL_REQUEST}" ] && [ "${CIRCLE_BRANCH}" = 'master' ]; then echo "CIRCLE_NODE_INDEX: ${CIRCLE_NODE_INDEX}" if [ "$CIRCLE_NODE_INDEX" = 1 ]; then + echo -e "\\n${ANSI_GREEN}Updating translation source file." + make pot + pushd l10n && { + git checkout master + git -c user.name="KOReader build bot" -c user.email="non-reply@koreader.rocks" \ + commit templates/koreader.pot -m "Updated translation source file" + git push --quiet "https://${TRANSLATIONS_GITHUB_TOKEN}@github.com/koreader/koreader-translations.git" master + echo -e "\\n${ANSI_GREEN}Translation update pushed." + } && popd || exit + echo -e "\\n${ANSI_GREEN}Checking out koreader/doc for update." git clone git@github.com:koreader/doc.git koreader_doc diff --git a/Makefile b/Makefile index de17e18da..5419af5cb 100644 --- a/Makefile +++ b/Makefile @@ -489,7 +489,7 @@ DOMAIN=koreader TEMPLATE_DIR=l10n/templates XGETTEXT_BIN=xgettext -pot: +pot: po mkdir -p $(TEMPLATE_DIR) $(XGETTEXT_BIN) --from-code=utf-8 \ --keyword=C_:1c,2 --keyword=N_:1,2 --keyword=NC_:1c,2,3 \ @@ -498,14 +498,9 @@ pot: `find plugins -iname "*.lua"` \ `find tools -iname "*.lua"` \ -o $(TEMPLATE_DIR)/$(DOMAIN).pot - # push source file to Transifex - $(MAKE) -i -C l10n bootstrap - $(MAKE) -C l10n push po: - $(MAKE) -C l10n pull - # After Weblate migration - #git submodule update --remote l10n + git submodule update --remote l10n static-check: diff --git a/README.md b/README.md index 47cb0cfff..2aee018d6 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ [![Mobileread][badge-mobileread]][link-forum] [![Build Status][badge-circleci]][link-circleci] [![Coverage Status][badge-coverage]][link-coverage] +[![Weblate Status][badge-weblate]][link-weblate] [Download](https://github.com/koreader/koreader/releases) • [Wiki](https://github.com/koreader/koreader/wiki) • @@ -62,7 +63,7 @@ Please follow the model specific steps for your device: KOReader is developed and supported by volunteers all around the world. There are many ways you can help: - [fix bugs][link-issues-bugs] and [implement new features][link-issues-features] -- [translate the program into your language][link-translations-transifex] or improve an existing translation +- [translate the program into your language][link-weblate] or improve an existing translation - document lesser-known features on the [wiki][link-wiki] - help others with your knowledge on the [forum][link-forum] @@ -93,6 +94,7 @@ Also if you have and old Pocketbook device you don't want, we might find it usef [badge-license]:https://img.shields.io/github/license/koreader/koreader [badge-release]:https://img.shields.io/github/release/koreader/koreader.svg [badge-mobileread]:https://img.shields.io/badge/forum-on_mobileread-lightgrey +[badge-weblate]:https://hosted.weblate.org/widgets/koreader/-/koreader/svg-badge.svg [link-bountysource]:https://www.bountysource.com/teams/koreader [link-circleci]:https://circleci.com/gh/koreader/koreader @@ -104,5 +106,5 @@ Also if you have and old Pocketbook device you don't want, we might find it usef [link-gitter]:https://gitter.im/koreader/koreader [link-issues-bugs]:https://github.com/koreader/koreader/issues?q=is%3Aopen+is%3Aissue+label%3Abug [link-issues-features]:https://github.com/koreader/koreader/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement -[link-translations-transifex]:https://www.transifex.com/projects/p/koreader/ +[link-weblate]:https://hosted.weblate.org/engage/koreader/?utm_source=widget [link-wiki]:https://github.com/koreader/koreader/wiki