VTES策略、卡片规则和TWD搜索界面网站
项目描述
Codex of the Damned
本站是《Vampire: The Eternal Struggle》策略资源的汇编。网站公开可在codex-of-the-damned.org访问。
部分材料是Paradox Interactive AB的版权和商标,并已获得许可使用。版权所有。更多信息请访问www.worldofdarkness.com。
贡献
欢迎贡献。如果拉取请求遵守通用风格,将合并。问题将尽快处理。
安装
要安装一个工作的开发版本,请使用pip
python3 -m venv venv
pip install -e ".[dev]"
翻译
安装一个PO编辑器,如POEdit,调用以下命令以生成感兴趣语言的消息
BABEL_LANG=es make po-update
然后打开生成的目录文件,codex_of_the_damned/translations/es/LC_MESSAGES/messages.po
,在您的PO编辑器中打开。
在翻译时,请注意保留如 HTML
标签 <p>
和 <em>
的原始格式,并确保翻译文本中格式参数的准确性。这包括任何动态内容,从学科如 %(cel)s
和氏族如 %(brujah)s
,到卡片如 %(alastor)s
和外部网址如 %(johns_deck)
。
翻译完成后,使用以下命令生成翻译文件:
make po
要将新语言添加到网站中,只需在全局布局的翻译 nav
标题中添加匹配的行 codex_of_the_damned/templates/layout.html
<nav role="translation">
{{ translation('en', "🇬🇧") }}
{{ translation('fr', "🇫🇷") }}
</nav>
运行开发服务器
您可以使用 codex
入口点运行网站的开发版本
$ codex
* Serving Flask app "codex_of_the_damned" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
您可以通过设置 DEBUG
环境变量来激活调试模式
DEBUG=1 codex
生产部署
要运行生产服务器,您需要一个像 uWSGI 这样的 Web 服务器
uwsgi --module codex_of_the_damned:app
或 Gunicorn
gunicorn codex_of_the_damned:app
有用工具
图标
使用 imagemagick
和 potrace
将图标从位图转换为 SVG,根据图标的不同,平滑处理可能更好或更差
convert -morphology Smooth Octagon:2 clan-ahrimanes.gif clan-ahrimanes.svg
Google 翻译
运行 make po
以在 codex-of-the-damned/translations
下构建翻译文件,使用 POEdit 进行编辑,完成后再次运行 make po
以优化它们。