How to run locally the gettext status page?
Moderator: Forum Moderators
How to run locally the gettext status page?
I am wondering if the tools to run the
I have looked around from the
I assume we need at least:
gettext
status page similar to this page are available in the wesnoth release so they can be run locally.I have looked around from the
utils/
directory but found nothing that rung a bell.
Much thanks.octalot wrote: ↑April 26th, 2022, 11:17 am It's in a separate repo, https://github.com/wesnoth/website
I assume we need at least:
- A tool to generate the static data from the po files in that release (I am going to assume the output is in flat files not stored in database)
So it can be installed locally by doing something likegit clone https://github.com/wesnoth/website.git wesnoth-website.git
.
The different instances of wesnoth we want to generate stats for should be available locally (sourceforge download or git checkout).
We just need to modify the content ofincludes/config.php
under the local directorygettext.wesnoth.org/
and modify the settings (esp.branch = '...'
,master_basedir = '...'
,branch_basedir = '...'
) based on the local copies.
Then runphp ./bin/grab-stats.php
from the same directory to generate the static data for the server.
Mind that it will create a lock file under/tmp/grab-stats.lock
that you will have to delete by hand if you interrupt with CTRL+C.
- A web server configuration
You just need to run the default server provided by php (php5 -S localhost:8080
) from the directorygettext.wesnoth.org/
. It will be configured using the index.php on that directory.
- A set of templates for web pages to render that data
It seems the templates are retrieved directly fromwesnoth.org/wesmere
, so on one hand, they don't need to be installed and on the other hand the local server still needs direct access to the resources on line.
Last edited by demario on May 6th, 2022, 9:04 am, edited 2 times in total.
Re: How to run locally the gettext status page?
It's in a separate repo, https://github.com/wesnoth/website
The stats themselves are calculated by running
https://github.com/wesnoth/website/blob ... ns.php#L91
There's some mentions of WesCamp in the code, but those aren't used - it was a project for translating UMCs but is no longer running.
The stats themselves are calculated by running
msgfmt -o /dev/null --statistics
https://github.com/wesnoth/website/blob ... ns.php#L91
There's some mentions of WesCamp in the code, but those aren't used - it was a project for translating UMCs but is no longer running.