Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Profile statements i18n #3010

Merged
merged 22 commits into from
Dec 26, 2014
Merged

Profile statements i18n #3010

merged 22 commits into from
Dec 26, 2014

Conversation

Changaco
Copy link
Contributor

Implements #2669 and closes #1659. Also refactors and cleans up a lot of stuff, including some of the JS code.

@Changaco
Copy link
Contributor Author

Screenshots:

gratipay-i18-statements-1


gratipay-i18-statements-2


gratipay-i18-statements-3

@rohitpaulk
Copy link
Contributor

!m @Changaco !

@Changaco Changaco force-pushed the i18n-statements branch 2 times, most recently from 06a06b3 to 51a9ec6 Compare December 14, 2014 17:51
@Changaco
Copy link
Contributor Author

Rebased on master.

@Changaco Changaco mentioned this pull request Dec 15, 2014
39 tasks
@clone1018
Copy link
Contributor

Testing this out, getting the following error on my profile page. I made clean and tried a fresh checkout. What do you recommend?

Traceback (most recent call last):
  File "/home/clone1018/Companies/Gratipay/gratipay.com/env/lib/python2.7/site-packages/algorithm.py", line 288, in run
    new_state = function(**deps.as_kwargs)
  File "/home/clone1018/Companies/Gratipay/gratipay.com/env/lib/python2.7/site-packages/aspen/algorithms/website.py", line 100, in get_response_for_resource
    return {'response': resource.respond(request, dispatch_result)}
  File "/home/clone1018/Companies/Gratipay/gratipay.com/env/lib/python2.7/site-packages/aspen/resources/simplate.py", line 65, in respond
    response = self.get_response(context)
  File "/home/clone1018/Companies/Gratipay/gratipay.com/env/lib/python2.7/site-packages/aspen/resources/simplate.py", line 219, in get_response
    response.body = render(context)
  File "/home/clone1018/Companies/Gratipay/gratipay.com/env/lib/python2.7/site-packages/aspen/renderers/__init__.py", line 103, in __call__
    return self.render_content(context)
  File "/home/clone1018/Companies/Gratipay/gratipay.com/env/lib/python2.7/site-packages/aspen_jinja2_renderer.py", line 66, in render_content
    return self.compiled.render(context).encode(charset)
  File "/home/clone1018/Companies/Gratipay/gratipay.com/env/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/clone1018/Companies/Gratipay/gratipay.com/env/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/clone1018/Companies/Gratipay/gratipay.com/www/%username/index.html.spt", line 1, in top-level template code
    """Show information about a single participant. It might be you!
  File "/home/clone1018/Companies/Gratipay/gratipay.com/templates/profile.html", line 1, in top-level template code
    {% extends "templates/participant.html" %}
  File "/home/clone1018/Companies/Gratipay/gratipay.com/templates/participant.html", line 3, in top-level template code
    {% extends "templates/base.html" %}
  File "/home/clone1018/Companies/Gratipay/gratipay.com/templates/base.html", line 79, in top-level template code
    {% block whole_page %}
  File "/home/clone1018/Companies/Gratipay/gratipay.com/templates/base.html", line 87, in block "whole_page"
    {% block page %}{% endblock %}
  File "/home/clone1018/Companies/Gratipay/gratipay.com/www/%username/index.html.spt", line 40, in block "page"
    PATRON_NO_GIFTS = _("I'm here as a patron, and politely decline to receive gifts.")
  File "/home/clone1018/Companies/Gratipay/gratipay.com/templates/profile-edit.html", line 33, in top-level template code
    {{ markdown.render(statement) }}
  File "/home/clone1018/Companies/Gratipay/gratipay.com/gratipay/utils/markdown.py", line 6, in render
    , render_flags=m.HTML_SKIP_HTML | m.HTML_TOC | m.HTML_SMARTYPANTS
  File "misaka.pyx", line 59, in misaka.html (src/misaka.c:813)
  File "misaka.pyx", line 221, in misaka.Markdown.render (src/misaka.c:1694)
TypeError: expected string or Unicode object, NoneType found

@rohitpaulk
Copy link
Contributor

@clone1018 - Did you apply branch.sql to your local db?

@clone1018
Copy link
Contributor

Yeah I did psql gratipay < branch.sql

@rohitpaulk
Copy link
Contributor

Weird, seems to work fine on my side.

@Changaco
Copy link
Contributor Author

@clone1018 Good catch, I've fixed the bug.

@chadwhitacre
Copy link
Contributor

Looks good at first blush, digging deeper ...

WHERE statement <> ''
AND number = 'plural';

CREATE FUNCTION enumerate(anyarray) RETURNS TABLE (rank bigint, value anyelement) AS $$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

I'd also like to call them Organizations instead of Teams but for now I
guess this is the nomenclature we're using.
@clone1018
Copy link
Contributor

All issues I've had have been fixed, I'd like to get this merged but I'm not sure where you stand on it @whit537

clone1018 added a commit that referenced this pull request Dec 26, 2014
@clone1018 clone1018 merged commit 2fca73e into master Dec 26, 2014
@clone1018 clone1018 deleted the i18n-statements branch December 26, 2014 15:16
@clone1018
Copy link
Contributor

Woo, thanks @Changaco !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retire "I am making the world better by" in profile statement
4 participants