scifabric / pybossa-default-theme Goto Github PK
View Code? Open in Web Editor NEWPyBossa default theme for the Server
License: GNU Affero General Public License v3.0
PyBossa default theme for the Server
License: GNU Affero General Public License v3.0
Sorry to bother again.
Just noticed that if there's capital letters in the language, such as pt_BR, this language will not be translated.
Root cause:
def setup_babel(app):
"""Return babel handler."""
babel.init_app(app)
@babel.localeselector
def _get_locale():
locales = [l[0] for l in app.config.get('LOCALES')]
if current_user.is_authenticated():
lang = current_user.locale
else:
lang = request.cookies.get('language')
if (lang is None or lang == '' or
lang.lower() not in locales):
lang = request.accept_languages.best_match(locales)
if (lang is None or lang == '' or
lang.lower() not in locales):
lang = app.config.get('DEFAULT_LOCALE') or 'en'
if request.headers.get('Content-Type') == 'application/json':
lang = 'en'
return lang.lower()
return babel
When comparing the string, it's using lang.lower() not in locales.
When I'm debugging it, the lang is pt_BR, changed to pt_br, will not match any of the locales in locale array
The API exists but we need a front end solution built with VUE.JS
Label warning class missing an l. Pull request coming shortly.
Currently, when one clicks in an answer button in some of the templates, if this is done precisely in the icon within the button, then the answer is not correctly submited, and an undefined value is used instead.
Hi,
this js file is called before jquery and thus causes an error.
so slugifying the fullname is not working.
I think it should be inserted later in the dedicated extrajs block
{% block extrajs %}
<script... form.js></script>
{% endblock %}
If a project has been published and has results, it doesn't seem to be possible to delete task runs, tasks or the project itself, neither through the web interface nor through the REST API. But the web interface suggests otherwise, since it has a button "Delete all Tasks and Task Runs" along with a message "If you delete all the tasks and task runs they will be gone forever!" (although particularly attentive users may notice that the feedback post-deletion says "TASKS AND TASKRUNS WITH NO ASSOCIATED RESULTS HAVE BEEN DELETED"). With the help of Daniel's pointers, I was able to solve this directly through the database (updating the published flag and deleting the project's results). But it would be good if this was facilitated (maybe with an optional "force=1" parameter in the REST API) or documented somewhere and/or a better warning was given of what you can't do after publishing a project.
Hi Daniel,
I wonder if this could be made a little clearer:
http://docs.pybossa.com/en/latest/customizing.html?highlight=theme#creating-your-own-theme
"PyBossa supports themes. By default, it provides its own theme that you can use or if you prefer, copy it and create your own." Do you create a theme by the name that you want it to be called and then deploy to the themes folder? Or does it need to maintain the current pybossa-default-theme naming convention? At the moment I am a little unclear.
Dan
I am uploading to transifex for convenience (the project is here: https://www.transifex.com/codeforeurope/pybossa/) and discover that files are broken. I have managed to fix a lot of them; but french is difficult with a lot of duplicate strings.
I want to do a pull request with all languages except french. Then I will use handwork to get the french translation up to speed.
The theme should ask for user's age when registering. If the user is below 16 years old, the user will not be able to create an account and will be invited to participate anonymously.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.