-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
155 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# -*- coding: utf-8-unix -*- | ||
|
||
# EDITOR must wait! | ||
EDITOR = nano | ||
|
||
check: | ||
flake8 bin/gaupol | ||
flake8 aeidon | ||
flake8 gaupol | ||
flake8 data/extensions/*/*.py | ||
flake8 *.py | ||
|
||
clean: | ||
./setup.py clean | ||
|
||
install: | ||
./setup.py install | ||
|
||
publish-aeidon: | ||
$(MAKE) check test clean | ||
./setup-aeidon.py sdist bdist_wheel | ||
test -s dist/aeidon-*-py3-none-any.whl | ||
test -s dist/aeidon-*.tar.gz | ||
ls -l dist | ||
printf "Press Enter to upload or Ctrl+C to abort: "; read _ | ||
twine upload dist/* | ||
sudo pip3 uninstall -y aeidon || true | ||
sudo pip3 uninstall -y aeidon || true | ||
sudo pip3 install -U aeidon | ||
cd && python3 -c "import aeidon; print(aeidon.__file__, aeidon.__version__)" | ||
|
||
# Interactive! | ||
release: | ||
$(MAKE) check test clean | ||
@echo "BUMP VERSION NUMBERS" | ||
$(EDITOR) aeidon/__init__.py | ||
$(EDITOR) gaupol/__init__.py | ||
$(EDITOR) data/extensions/*/*.in | ||
$(EDITOR) win32/gaupol.iss | ||
@echo "ADD RELEASE NOTES" | ||
$(EDITOR) NEWS.md | ||
$(EDITOR) data/io.otsaloma.gaupol.appdata.xml.in | ||
sudo ./setup.py install --prefix=/usr/local clean | ||
/usr/local/bin/gaupol | ||
tools/release | ||
@echo "REMEMBER TO make publish-aeidon" | ||
@echo "REMEMBER TO UPDATE FLATPAK" | ||
@echo "REMEMBER TO UPDATE WEBSITE" | ||
|
||
test: | ||
py.test -xs aeidon gaupol data/extensions | ||
|
||
# Interactive! | ||
translations: | ||
tools/update-translations | ||
|
||
warnings: | ||
python3 -Wd bin/gaupol | ||
|
||
.PHONY: check clean install publish-aeidon release test translations warnings |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/bin/sh | ||
|
||
cd "$(dirname "$0")/.." || exit 1 | ||
truncate -s0 po/gaupol.pot | ||
|
||
# Python code | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
--language=Python \ | ||
--keyword=_:1 \ | ||
--keyword=d_:2 \ | ||
--keyword=n_:1,2 \ | ||
--add-comments=TRANSLATORS: \ | ||
$(find . -name "*.py" -not -path "*/test/*") | ||
|
||
# GtkBuilder XML files | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
$(find data -name "*.ui") | ||
|
||
# Extension metadata files | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
--language=Desktop \ | ||
--keyword= \ | ||
--keyword=Name \ | ||
--keyword=Description \ | ||
--add-comments=TRANSLATORS: \ | ||
data/extensions/*/*.extension.in | ||
|
||
# Pattern files | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
--language=Desktop \ | ||
--keyword= \ | ||
--keyword=Name \ | ||
--keyword=Description \ | ||
--add-comments=TRANSLATORS: \ | ||
data/patterns/*.in | ||
|
||
# AppData XML file | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
data/io.otsaloma.gaupol.appdata.xml.in | ||
|
||
# Desktop file | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
--language=Desktop \ | ||
--keyword= \ | ||
--keyword=GenericName \ | ||
--keyword=Comment \ | ||
--keyword=Keywords \ | ||
--add-comments=TRANSLATORS: \ | ||
data/io.otsaloma.gaupol.desktop.in | ||
|
||
# XXX: Fix charset=CHARSET which causes msggrep to fail. | ||
sed -i s/charset=CHARSET/charset=UTF-8/ po/gaupol.pot | ||
|
||
# Remove AppData entries that shouldn't be translated. | ||
msggrep \ | ||
--invert-match \ | ||
--msgid \ | ||
--regexp="^Gaupol$" \ | ||
--regexp="^Osmo Salomaa$" \ | ||
--output-file=po/tmp.pot \ | ||
po/gaupol.pot && mv -f po/tmp.pot po/gaupol.pot |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,17 @@ | ||
#!/bin/sh | ||
|
||
#!/bin/bash | ||
set -e | ||
cd "$(dirname "$0")/.." || exit 1 | ||
truncate -s0 po/gaupol.pot | ||
|
||
# Python code | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
--language=Python \ | ||
--keyword=_:1 \ | ||
--keyword=d_:2 \ | ||
--keyword=n_:1,2 \ | ||
--add-comments=TRANSLATORS: \ | ||
$(find . -name "*.py" -not -path "*/test/*") | ||
|
||
# GtkBuilder XML files | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
$(find data -name "*.ui") | ||
|
||
# Extension metadata files | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
--language=Desktop \ | ||
--keyword= \ | ||
--keyword=Name \ | ||
--keyword=Description \ | ||
--add-comments=TRANSLATORS: \ | ||
data/extensions/*/*.extension.in | ||
|
||
# Pattern files | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
--language=Desktop \ | ||
--keyword= \ | ||
--keyword=Name \ | ||
--keyword=Description \ | ||
--add-comments=TRANSLATORS: \ | ||
data/patterns/*.in | ||
|
||
# AppData XML file | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
data/io.otsaloma.gaupol.appdata.xml.in | ||
|
||
# Desktop file | ||
xgettext \ | ||
--output=po/gaupol.pot \ | ||
--join-existing \ | ||
--from-code=UTF-8 \ | ||
--language=Desktop \ | ||
--keyword= \ | ||
--keyword=GenericName \ | ||
--keyword=Comment \ | ||
--keyword=Keywords \ | ||
--add-comments=TRANSLATORS: \ | ||
data/io.otsaloma.gaupol.desktop.in | ||
|
||
# Remove AppData entries that shouldn't be translated. | ||
msggrep \ | ||
--invert-match \ | ||
--msgid \ | ||
--regexp="^Gaupol$" \ | ||
--regexp="^Osmo Salomaa$" \ | ||
--output-file=po/tmp.pot \ | ||
po/gaupol.pot && mv -f po/tmp.pot po/gaupol.pot | ||
tools/extract-translations | ||
tx push -s | ||
tx pull -af --minimum-perc=50 | ||
emacs1 po/fi.po | ||
tx push -tf --no-interactive -l fi | ||
for PO in po/*.po; do | ||
LANG=$(basename $PO .po) | ||
tools/check-translations $LANG | ||
read -p "Keep? [Y/n] " | ||
[ "$REPLY" = "n" ] && rm -fv $PO | ||
done | ||
# rm -f po/LINGUAS | ||
# ls po/*.po | cut -d/ -f2 | cut -d. -f1 > po/LINGUAS | ||
git status |