diff options
author | metamuffin <metamuffin@disroot.org> | 2024-10-12 13:11:38 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-10-12 13:11:38 +0200 |
commit | ae9ed982f7a69eadb40b424b73e7ba49e590cd11 (patch) | |
tree | 9c0e777fa438413a68f504d556e89c645e3453a9 | |
parent | 21a438f66bfcd1d6c6ad1f7ee8a6727e3b81f466 (diff) | |
download | hurrycurry-website-ae9ed982f7a69eadb40b424b73e7ba49e590cd11.tar hurrycurry-website-ae9ed982f7a69eadb40b424b73e7ba49e590cd11.tar.bz2 hurrycurry-website-ae9ed982f7a69eadb40b424b73e7ba49e590cd11.tar.zst |
use locales from dist-extra
m--------- | dist-extra | 0 | ||||
-rw-r--r-- | makefile | 4 | ||||
-rw-r--r-- | readme.md | 6 | ||||
-rw-r--r-- | translate.py | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/dist-extra b/dist-extra new file mode 160000 +Subproject e5aa509069e0193e98ba0b5dec06ea7aa9cb7d5 @@ -3,7 +3,7 @@ noop = space = $(noop) $(noop) comma = , -langs = $(patsubst main/locale/%.ini,%,$(wildcard main/locale/*.ini)) +langs = $(patsubst dist-extra/locale/%.ini,%,$(wildcard dist-extra/locale/*.ini)) s_langs = $(subst $(space),$(comma),$(langs)) out = $(shell echo index.{$(s_langs)}.html) index.html @@ -13,7 +13,7 @@ all: $(out) clean: rm -f $(out) -index.%.html: main/locale/%.ini main/locale/en.ini +index.%.html: dist-extra/locale/%.ini dist-extra/locale/en.ini python translate.py $(*) index.html: index.en.html cp $< $@ @@ -1,9 +1,9 @@ # Hurry Curry! Website The website is instantiated from `index_template.html` with the `translate.py` -python script. It uses the translation files from the main hurrycurry repository -at `main/locale/xx.ini`, so you should clone the main repo as `main`. Then just -`make` +python script. It uses the translation files from the hurrycurry-dist-extra +repository at `dist-extra/locale/xx.ini`, so you should clone the repo as +`dist-extra`. Then just `make` Finally one of the resulting files `index.xx.html` should be served respecting the browser locale. diff --git a/translate.py b/translate.py index c73a364..28c61c6 100644 --- a/translate.py +++ b/translate.py @@ -15,7 +15,7 @@ trmap = { '_lang': lang, } for l in ["en", lang]: - for line in open(f"main/locale/{l}.ini"): + for line in open(f"dist-extra/locale/{l}.ini"): line = line.strip() if line == "[hurrycurry]": continue if line == "": continue |