Skip to content

Commit

Permalink
Disable en-US in the URL to avoid confusion with target project's loc…
Browse files Browse the repository at this point in the history
…ale. Consequently, disable i18n support.
  • Loading branch information
mathjazz committed Apr 9, 2014
1 parent 7061e12 commit 4489305
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 117 deletions.
10 changes: 5 additions & 5 deletions pontoon/administration/templates/admin.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}

{% block title %}{{ _('Pontoon · Admin') }}{% endblock %}
{% block title %}Pontoon · Admin{% endblock %}

{% block class %}admin{% endblock %}

Expand All @@ -10,11 +10,11 @@

<nav>
<ul class="links">
<li><a href="{{ url('pontoon.home') }}" title="{{ _('Pontoon Home') }}">Home</a></li>
<li><a href="{{ url('pontoon.home') }}" title="Pontoon Home">Home</a></li>
</ul>
</nav>

<h1 id="title"><a href="{{ url('pontoon.admin') }}">{{ _('Admin') }}</a></h1>
<h1 id="title"><a href="{{ url('pontoon.admin') }}">Admin</a></h1>
<h2 id="subtitle">Don't mess it up. Please.</h2>

<form>
Expand All @@ -31,13 +31,13 @@ <h2 id="subtitle">Don't mess it up. Please.</h2>
{% for project in projects %}
<li class="clearfix">
<span class="project-name"
data-slug={{ project.slug }}
data-slug="{{ project.slug }}"
data-locales="{% for l in project.locales.all() %}{{ l.code|lower }},{% endfor %}"
data-pages="{% if pages %}{% for p in pages.filter(project=project) %}{{ p.name }},{% endfor %}{% endif %}">{{ project.name }}</span>
<span class="project-url">{{ project.url }}</span>
</li>
{% endfor %}
<li class="no-match">{{ _('No results') }}</li>
<li class="no-match">No results</li>
</ul>
</div>
</div>
Expand Down
32 changes: 16 additions & 16 deletions pontoon/administration/templates/project.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}

{% block title %}{{ _('Pontoon &middot; %(subtitle)s')|format(subtitle=subtitle) }}{% endblock %}
{% block title %}Pontoon &middot; {{'%(subtitle)s' | format(subtitle=subtitle) }}{% endblock %}

{% block class %}admin-project{% endblock %}

Expand All @@ -9,13 +9,13 @@

<nav>
<ul class="links">
<li><a href="{{ url('pontoon.home') }}" title="{{ _('Pontoon Home') }}">Home</a></li>
<li><a href="{{ url('pontoon.admin') }}" title="{{ _('Pontoon Admin') }}">Admin</a></li>
<li><a href="{{ url('pontoon.home') }}" title="Pontoon Home">Home</a></li>
<li><a href="{{ url('pontoon.admin') }}" title="Pontoon Admin">Admin</a></li>
</ul>
</nav>
<form method="POST" action="{{ request.path }}" class="{% if pk %}edit{% else %}add{% endif %}">

<h1 id="title">{{ _('%(subtitle)s')|format(subtitle=subtitle) }}</h1>
<h1 id="title">{{ '%(subtitle)s' | format(subtitle=subtitle) }}</h1>
<ul class="notification{% if not messages %} hidden{% endif %}">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
Expand Down Expand Up @@ -47,7 +47,7 @@ <h1 id="title">{{ _('%(subtitle)s')|format(subtitle=subtitle) }}</h1>
{% for locale in locales_available %}
<li data-id="{{ locale.id }}"><span class="language {{ locale.code }}">{{ locale.name }}<span class="code">{{ locale.code }}</span></span></li>
{% endfor %}
<li class="no-match">{{ _('No results match') }} "<span></span>"</li>
<li class="no-match">No results match "<span></span>"</li>
</ul>
</div>
</div>
Expand All @@ -59,7 +59,7 @@ <h1 id="title">{{ _('%(subtitle)s')|format(subtitle=subtitle) }}</h1>
{% for locale in locales_selected %}
<li data-id="{{ locale.id }}"><span class="language {{ locale.code }}">{{ locale.name }}<span class="code">{{ locale.code }}</span></span></li>
{% endfor %}
<li class="no-match">{{ _('No results match') }} "<span></span>"</li>
<li class="no-match">No results match "<span></span>"</li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -93,8 +93,8 @@ <h2>Repository</h2>
{{ form.repository_url.label_tag() }}
{{ form.repository_url }}
{% if pk %}
<button title="{{ _('Update all locales from repository') }}" data-source="repository" class="button update">
<img class="update" src="{{ static('img/update.png') }}" alt="{{ _('Update all locales from repository') }}" />
<button title="Update all locales from repository" data-source="repository" class="button update">
<img class="update" src="{{ static('img/update.png') }}" alt="Update all locales from repository" />
</button>
{% endif %}
</div>
Expand All @@ -104,8 +104,8 @@ <h2>Repository</h2>
{{ form.transifex_project }}
{{ form.transifex_resource }}
{% if pk %}
<button title="{{ _('Update all locales from Transifex') }}" data-source="transifex" class="button update">
<img class="update" src="{{ static('img/update.png') }}" alt="{{ _('Update all locales from Transifex') }}" />
<button title="Update all locales from Transifex" data-source="transifex" class="button update">
<img class="update" src="{{ static('img/update.png') }}" alt="Update all locales from Transifex" />
</button>
<section class="authentication-form">
<label for="id_transifex_username">Username or email</label>
Expand All @@ -115,9 +115,9 @@ <h2>Repository</h2>
</section>
<div class="bottom">
<label class="remember">
<input name="remember" type="checkbox" />{{ _('Remember me') }}
<input name="remember" type="checkbox" />Remember me
</label>
<a class="new" target="_blank" href="http://www.transifex.com/signup/">{{ _('New to Transifex?') }}</a>
<a class="new" target="_blank" href="http://www.transifex.com/signup/">New to Transifex?</a>
</div>
{% endif %}
</div>
Expand Down Expand Up @@ -158,8 +158,8 @@ <h2>Subpages
{{ form.url.label_tag() }}
{{ form.name }}
{{ form.url }}
<button title="{{ _('Delete subpage') }}" class="button delete-subpage" tabindex="-1">
<img src="{{ static('img/cancel.png') }}" alt="{{ _('Delete subpage') }}" />
<button title="Delete subpage" class="button delete-subpage" tabindex="-1">
<img src="{{ static('img/cancel.png') }}" alt="Delete subpage" />
</button>
{{ form.DELETE }}
{{ form.name.errors }}
Expand All @@ -171,8 +171,8 @@ <h2>Subpages
{{ formset.empty_form.url.label_tag() }}
{{ formset.empty_form.name }}
{{ formset.empty_form.url }}
<button title="{{ _('Delete subpage') }}" class="button delete-subpage" tabindex="-1">
<img src="{{ static('img/cancel.png') }}" alt="{{ _('Delete subpage') }}" />
<button title="Delete subpage" class="button delete-subpage" tabindex="-1">
<img src="{{ static('img/cancel.png') }}" alt="Delete subpage" />
</button>
{{ formset.empty_form.DELETE }}
{{ formset.empty_form.name.errors }}
Expand Down
10 changes: 5 additions & 5 deletions pontoon/administration/views.py
Expand Up @@ -131,8 +131,8 @@ def manage_project(request, slug=None, template='project.html'):
if len(Entity.objects.filter(project=project)) is 0:
messages.warning(
request,
_("Before localizing projects, \
you need to import strings from the repository."))
"Before localizing projects, \
you need to import strings from the repository.")
else:
subtitle += '. Error.'
else:
Expand All @@ -150,8 +150,8 @@ def manage_project(request, slug=None, template='project.html'):
if len(Entity.objects.filter(project=project)) is 0:
messages.warning(
request,
_("Before localizing projects, \
you need to import strings from the repository."))
"Before localizing projects, \
you need to import strings from the repository.")
except Project.DoesNotExist:
form = ProjectForm(initial={'slug': slug})

Expand Down Expand Up @@ -194,7 +194,7 @@ def delete_project(request, pk, template=None):
transaction.rollback()
messages.error(
request,
_("There was an error during deleting this project."))
"There was an error during deleting this project.")
return HttpResponseRedirect(reverse(
'pontoon.admin.project',
args=[project.slug]))
Expand Down
4 changes: 2 additions & 2 deletions pontoon/base/templates/403.html
@@ -1,5 +1,5 @@
{% extends "404.html" %}

{% block title %}{{ _('Pontoon &middot; Forbidden page') }}{% endblock %}
{% block title %}Pontoon &middot; Forbidden page{% endblock %}

{% block subtitle %}{{ _('You don\'t have permission to access this page.') }}{% endblock %}
{% block subtitle %}You don't have permission to access this page.{% endblock %}
16 changes: 8 additions & 8 deletions pontoon/base/templates/404.html
@@ -1,24 +1,24 @@
{% extends "base.html" %}

{% block title %}{{ _('Pontoon &middot; Page not found') }}{% endblock %}
{% block title %}Pontoon &middot; Page not found{% endblock %}

{% block content %}
<section id="intro" class="visible">
<div class="inner">

<h1 id="title"><a href="/">{{ _('Oops') }}</a></h1>
<h2 id="subtitle">{% block subtitle %}{{ _('We couldn\'t find the page you\'re looking for.') }}{% endblock %}</h2>
<h1 id="title"><a href="/">Oops</a></h1>
<h2 id="subtitle">{% block subtitle %}We couldn't find the page you're looking for.{% endblock %}</h2>

<p id="action">
<a id="link" href="/">{{ _('Go Home') }}</a>
<a id="link" href="/">Go Home</a>
</p>

<nav>
<ul class="links">
<li><a href="https://developer.mozilla.org/en-US/docs/Localizing_with_Pontoon" target="_blank" title="{{ _('Localize') }}">{{ _('How it works') }}</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Implementing_Pontoon_Mozilla" target="_blank" title="{{ _('Integrate') }}">{{ _('Developers') }}</a></li>
<li><a href="https://github.com/mathjazz/pontoon" target="_blank" title="{{ _('Hack') }}">GitHub</a></li>
<li><a href="https://twitter.com/#!/mozillapontoon" target="_blank" title="{{ _('Follow') }}">Twitter</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Localizing_with_Pontoon" target="_blank" title="Localize">How it works</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Implementing_Pontoon_Mozilla" target="_blank" title="Integrate">Developers</a></li>
<li><a href="https://github.com/mathjazz/pontoon" target="_blank" title="Hack">GitHub</a></li>
<li><a href="https://twitter.com/#!/mozillapontoon" target="_blank" title="Follow">Twitter</a></li>
</ul>
</nav>

Expand Down
14 changes: 7 additions & 7 deletions pontoon/base/templates/500.html
Expand Up @@ -373,19 +373,19 @@
<section id="intro">
<div class="inner">

<h1 id="title"><a href="/">{{ _('Oops') }}</a></h1>
<h2 id="subtitle">{{ _('Something is wrong. We\'re going to fix it soon.') }}</h2>
<h1 id="title"><a href="/">Oops</a></h1>
<h2 id="subtitle">Something is wrong. We're going to fix it soon.</h2>

<p id="action">
<a id="link" href="/">{{ _('Go Home') }}</a>
<a id="link" href="/">Go Home</a>
</p>

<nav>
<ul class="links">
<li><a href="https://developer.mozilla.org/en-US/docs/Localizing_with_Pontoon" target="_blank" title="{{ _('Localize') }}">{{ _('How it works') }}</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Implementing_Pontoon_Mozilla" target="_blank" title="{{ _('Integrate') }}">{{ _('Developers') }}</a></li>
<li><a href="https://github.com/mathjazz/pontoon" target="_blank" title="{{ _('Hack') }}">GitHub</a></li>
<li><a href="https://twitter.com/#!/mozillapontoon" target="_blank" title="{{ _('Follow') }}">Twitter</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Localizing_with_Pontoon" target="_blank" title="Localize">How it works</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Implementing_Pontoon_Mozilla" target="_blank" title="Integrate">Developers</a></li>
<li><a href="https://github.com/mathjazz/pontoon" target="_blank" title="Hack">GitHub</a></li>
<li><a href="https://twitter.com/#!/mozillapontoon" target="_blank" title="Follow">Twitter</a></li>
</ul>
</nav>

Expand Down
4 changes: 2 additions & 2 deletions pontoon/base/templates/base.html
Expand Up @@ -7,9 +7,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>{% block title %}Pontoon{% endblock %}</title>
<meta name="description" content="{{ _('Live web localization tool') }}">
<meta name="description" content="Live web localization tool">
<meta name="author" content="Mozilla">
<base href="{{ settings.SITE_URL }}/{% if LANG %}{{ LANG }}/{% endif %}">
<base href="{{ settings.SITE_URL }}/">

{% block site_css %}
{% compress css %}
Expand Down
20 changes: 10 additions & 10 deletions pontoon/base/templates/home.html
Expand Up @@ -17,12 +17,12 @@

<nav>
<ul class="links">
<li><a href="https://developer.mozilla.org/en-US/docs/Localizing_with_Pontoon" target="_blank" title="{{ _('Localize') }}">How it works</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Implementing_Pontoon_Mozilla" target="_blank" title="{{ _('Integrate') }}">Developers</a></li>
<li><a href="https://github.com/mathjazz/pontoon" target="_blank" title="{{ _('Hack') }}">GitHub</a></li>
<li><a href="https://twitter.com/#!/mozillapontoon" target="_blank" title="{{ _('Follow') }}">Twitter</a></li>
<li id="admin"{% if not perms.base.can_manage %} class="hidden"{% endif %}><a href="{{ url('pontoon.admin') }}" title="{{ _('Admin') }}">{{ _('Admin') }}</a></li>
<li id="signout"{% if not user.is_authenticated() %} class="hidden"{% endif %}><a href="{{ url('signout') }}" title="{{ user.email }}">{{ _('Sign out') }}</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Localizing_with_Pontoon" target="_blank" title="Localize">How it works</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Implementing_Pontoon_Mozilla" target="_blank" title="Integrate">Developers</a></li>
<li><a href="https://github.com/mathjazz/pontoon" target="_blank" title="Hack">GitHub</a></li>
<li><a href="https://twitter.com/#!/mozillapontoon" target="_blank" title="Follow">Twitter</a></li>
<li id="admin"{% if not perms.base.can_manage %} class="hidden"{% endif %}><a href="{{ url('pontoon.admin') }}" title="Admin">Admin</a></li>
<li id="signout"{% if not user.is_authenticated() %} class="hidden"{% endif %}><a href="{{ url('signout') }}" title="{{ user.email }}">Sign out</a></li>
</ul>
</nav>

Expand Down Expand Up @@ -50,7 +50,7 @@ <h2 id="subtitle">Translate websites. In place.</h2>
<span class="project-url">{{ project.url }}</span>
</li>
{% endfor %}
<li class="no-match">{{ _('No results') }}</li>
<li class="no-match">No results</li>
</ul>
</div>
</div>
Expand All @@ -67,7 +67,7 @@ <h2 id="subtitle">Translate websites. In place.</h2>
{% for locale in locales %}
<li><span class="language {{ locale.code|lower }}">{{ locale.name }}<span class="code">{{ locale.code }}</span></span></li>
{% endfor %}
<li class="no-match">{{ _('No results') }}</li>
<li class="no-match">No results</li>
</ul>
</div>
</div>
Expand All @@ -81,9 +81,9 @@ <h2 id="subtitle">Translate websites. In place.</h2>

{% if not user.is_authenticated() %}
<p id="action">
<a id="link" href="/locale/de/project/Testpilot/">{{ _('Try it out') }}</a>
<a id="link" href="/locale/de/project/Testpilot/">Try it out</a>
<span id="loading" class="spacing">or</span>
<img id="browserid" src="{{ static('img/plain_sign_in_blue.png') }}" alt="{{ _('Sign in with Persona') }}" />
<img id="browserid" src="{{ static('img/plain_sign_in_blue.png') }}" alt="Sign in with Persona" />
</p>
{% endif %}

Expand Down

0 comments on commit 4489305

Please sign in to comment.