-
-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add statistics of localization to the docs #6646
Conversation
Nice work @DelazJ !!!! |
@rduivenvoorde did you have time to check if there's something we can use? Thanks |
@DelazJ nice, I'm able to create/output the stats! If you only want this rst table, we could run some cronjob to run this script during the build of the docs? If you want a widget, another route would be:
In the qgis.org site (and earlier also in the docs site), we do/did that kind of things in this script file which runs on every page: (which started as a js script to only build the language dropdown (also for every page), but evoluated to also inject the Flickr screenshots and atom feeds into the frontpage... In that script I fetch the language from the url: https://github.com/qgis/QGIS-Website/blob/master/themes/qgis-theme/languageswitch.html#L62 because I also need the page path... https://github.com/qgis/QGIS-Website/blob/master/scripts/updatefeeds.sh Those 'fetch scripts' then also can do some tests on the fetched data, to only write a new json if it is valid? The ThankYou popup code is also 'injecting' some html into the DOM: |
and update the corresponding table
Hi @rduivenvoorde late reply, sorry.
Yes I want that table for translation statistics exposure of/to the whole community (and probably raise some discussion about minimal rate for build). I think I solved that issue, adding a transifex token to the repo (I did not know that I had enough rights to set one) with a weekly-scheduled github action branched on the script. This allows automated and manual/local run by everyone (preferable for me to something running server side, under few people maintenance). I think a week fetch is enough for what we have here.
Yes I want a widget, or some nice way to display the current language translation rate (like the godot project - just above this section). If I'm not wrong, what we need is:
About your suggestions, well... TBH, I wished I had time to deeply explore your links and try to understand the differences and come with a sensible reply but... May I just say, please do the way you think is better and easily maintainable? TIA |
@rduivenvoorde I opened a new issue report to handle the "widget" part of the issues. I'd like to merge this one, to test the GH action (should run tomorrow) and have a first part closed. May I? |
It looks nice work @DelazJ 👍 |
In that case, it should be safe to merge... and watch together |
Afaict, it worked: df9842e |
Cool ! |
Add a script that loads and format the stats (code highly inspired from Alexandre's expression script) in a rst file we can include in other parts of the docs.
The real objective (following #6645) is to be able to provide something like in the godot-engine page: see widget in en vs fr: you get the stats corresponding to the locale used to build. I fail to find which Sphinx variable hold the build language.
Another issue related to the script is that we need to run it regularly to have it make sense --> automate the calls --> find a way to run it a the project level --> find credentials of the qgis user in Transifex. I have no idea where this could be added/found and who could be in help. @rduivenvoorde @mbernasocchi ?
Last point (an upcoming thread): we should really consider setting a threshold translation to allow language builds, otherwise we are filling our servers with duplicate English docs