aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlava Bacherikov <slava@bacher09.org>2012-08-27 00:43:31 +0300
committerSlava Bacherikov <slava@bacher09.org>2012-08-27 00:43:31 +0300
commit71598e8919ded1930fc08a00bb2f25dafd2e3e1d (patch)
tree521dab0f5bc190385f04f3f63b28ac569f561d09
parentFix typos (diff)
downloadgentoo-packages-71598e8919ded1930fc08a00bb2f25dafd2e3e1d.tar.gz
gentoo-packages-71598e8919ded1930fc08a00bb2f25dafd2e3e1d.tar.bz2
gentoo-packages-71598e8919ded1930fc08a00bb2f25dafd2e3e1d.zip
Add i18n to templates
-rw-r--r--gpackages/templates/arch_choice.html4
-rw-r--r--gpackages/templates/base.html12
-rw-r--r--gpackages/templates/categories.html6
-rw-r--r--gpackages/templates/filtering_view.html4
-rw-r--r--gpackages/templates/global_use.html6
-rw-r--r--gpackages/templates/herds.html8
-rw-r--r--gpackages/templates/includes/ebuild_table.html15
-rw-r--r--gpackages/templates/includes/ebuild_use_flag.html5
-rw-r--r--gpackages/templates/includes/package_object.html11
-rw-r--r--gpackages/templates/includes/portage_news_object.html9
-rw-r--r--gpackages/templates/includes/recent_ebuilds.html3
-rw-r--r--gpackages/templates/license_groups.html5
-rw-r--r--gpackages/templates/local_use.html7
-rw-r--r--gpackages/templates/maintainers.html7
-rw-r--r--gpackages/templates/repositories.html7
-rw-r--r--gpackages/templates/repository.html45
16 files changed, 82 insertions, 72 deletions
diff --git a/gpackages/templates/arch_choice.html b/gpackages/templates/arch_choice.html
index 1fc8403..d1c2526 100644
--- a/gpackages/templates/arch_choice.html
+++ b/gpackages/templates/arch_choice.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-
+{% load i18n %}
{% block content %}
<script>
// set default arches
@@ -26,7 +26,7 @@
{{ form.arches }}
</div>
</fieldset>
- <input type="submit" class="btn btn-primary" value="Submit" />
+ <input type="submit" class="btn btn-primary" value="{% trans 'Submit' %}" />
</form>
</div>
{% endblock content %}
diff --git a/gpackages/templates/base.html b/gpackages/templates/base.html
index bff6e17..f8a7651 100644
--- a/gpackages/templates/base.html
+++ b/gpackages/templates/base.html
@@ -38,7 +38,7 @@
<div class="nav-collapse">
<ul class="nav">
{% get_flatpages '/about/' as about_pages %}
- <li class="{% active_str '/' %}"><a href="/">Home</a></li>
+ <li class="{% active_str '/' %}"><a href="/">{% trans 'Home' %}</a></li>
{% active_link 'news' 'Portage News' %}
{% for about in about_pages %}<li class="{% active_str about.url %}"><a href="{{ about.url }}">{{ about.title }}</a></li>{% endfor %}
<li><a href="#contact">Contact</a></li>
@@ -89,15 +89,15 @@
<div class="well">
<div id="rightcontent">
<div>
- <span class="label label-info label-legend"> Last update</span>
+ <span class="label label-info label-legend">{% trans 'Last update' %}</span>
{% last_updated %}
</div><br/>
<div>
- <span class="label label-info label-legend">Legend</span>
+ <span class="label label-info label-legend">{% trans 'Legend' %}</span>
<ul class="legend left-bar-list">
- <li><span class="stable">+</span> - stable</li>
- <li><span class="unstable">~</span> - unstable</li>
- <li><span class="hardmask">M</span> - hardmask</li>
+ <li><span class="stable">+</span> - {% trans 'stable' %}</li>
+ <li><span class="unstable">~</span> - {% trans 'unstable' %}</li>
+ <li><span class="hardmask">M</span> - {% trans 'hardmask' %}</li>
</ul>
</div>
</div>
diff --git a/gpackages/templates/categories.html b/gpackages/templates/categories.html
index ebd2116..6cf972d 100644
--- a/gpackages/templates/categories.html
+++ b/gpackages/templates/categories.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load url from future %}
{% load cache %}
-
+{% load i18n %}
{% block content %}
{% cache 3600 categories_table %}
<table class='table table-striped table-hover'>
@@ -11,8 +11,8 @@
</colgroup>
<thead>
<tr>
- <th>Category</th>
- <th>Description</th>
+ <th>{% trans 'Category' %}</th>
+ <th>{% trans 'Description' %}</th>
</tr>
</thead>
<tbody>
diff --git a/gpackages/templates/filtering_view.html b/gpackages/templates/filtering_view.html
index d7a2f14..6909a0b 100644
--- a/gpackages/templates/filtering_view.html
+++ b/gpackages/templates/filtering_view.html
@@ -1,10 +1,10 @@
{% extends 'base.html' %}
-
+{% load i18n %}
{% block content %}
<div class="filter">
<form action="./" method="post" enctype="multipart/form-data">{% csrf_token %}
{{ form.as_ul }} <br />
- <input type="submit" value="Submit" />
+ <input type="submit" value="{% trans 'Submit' %}" />
</form>
</div>
{% endblock content %}
diff --git a/gpackages/templates/global_use.html b/gpackages/templates/global_use.html
index bc7354d..5f7f9ce 100644
--- a/gpackages/templates/global_use.html
+++ b/gpackages/templates/global_use.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load url from future %}
{% load cache %}
-
+{% load i18n %}
{% block content %}
{% cache 1800 global_use_table %}
<table class='table table-striped table-hover'>
@@ -11,8 +11,8 @@
</colgroup>
<thead>
<tr>
- <th>Use flag</th>
- <th>Description</th>
+ <th>{% trans 'Use flag' %}</th>
+ <th>{% trans 'Description' %}</th>
</tr>
</thead>
<tbody>
diff --git a/gpackages/templates/herds.html b/gpackages/templates/herds.html
index 45814ab..b470637 100644
--- a/gpackages/templates/herds.html
+++ b/gpackages/templates/herds.html
@@ -2,9 +2,9 @@
{% load packages %}
{% load url from future %}
{% load cache %}
+{% load i18n %}
{% block content %}
-
{% cache 1800 herds_table %}
<table class='table table-striped table-hover'>
<colgroup>
@@ -14,9 +14,9 @@
</colgroup>
<thead>
<tr>
- <th>Herd</th>
- <th>Email</th>
- <th>Description</th>
+ <th>{% trans 'Herd' %}</th>
+ <th>{% trans 'Email' %}</th>
+ <th>{% trans 'Description' %}</th>
</tr>
</thead>
<tbody>
diff --git a/gpackages/templates/includes/ebuild_table.html b/gpackages/templates/includes/ebuild_table.html
index 9a83fb0..eeb6698 100644
--- a/gpackages/templates/includes/ebuild_table.html
+++ b/gpackages/templates/includes/ebuild_table.html
@@ -1,12 +1,13 @@
{% load packages %}
+{% load i18n %}
<div class="tabbable">
<ul class="nav nav-tabs">
{% if package %}
- <li{% if table_items.changelog %} class="active"{% endif %}><a href="changelog" tab-id="changelog">Changelog</a></li>
+ <li{% if table_items.changelog %} class="active"{% endif %}><a href="changelog" tab-id="changelog">{% trans 'Changelog' %}</a></li>
{% endif %}
- <li{% if table_items.use_flags %} class="active"{% endif %}><a href="use_flags" tab-id="use_flags">Use flags</a></li>
- <li{% if table_items.licenses %} class="active"{% endif %}><a href="licenses" tab-id="licenses">Licenses</a></li>
- <li{% if table_items.dependences %} class="active"{% endif %}><a href="dependences" tab-id="dependences">Dependences</a></li>
+ <li{% if table_items.use_flags %} class="active"{% endif %}><a href="use_flags" tab-id="use_flags">{% trans 'Use flags' %}</a></li>
+ <li{% if table_items.licenses %} class="active"{% endif %}><a href="licenses" tab-id="licenses">{% trans 'Licenses' %}</a></li>
+ <li{% if table_items.dependences %} class="active"{% endif %}><a href="dependences" tab-id="dependences">{% trans 'Dependences' %}</a></li>
</ul>
<div class="tab-content">
{% if package %}
@@ -22,19 +23,19 @@
</div>
<div class="tab-pane{% if table_items.dependences %} active{% endif %}" id="dependences">
{% if ebuild.depend %}
- <h3>Depen</h3>
+ <h3>{% trans 'Depen' %}</h3>
<pre>
{{ ebuild.depend }}
</pre>
{% endif %}
{% if ebuild.rdepend %}
- <h3>Runtime Depen</h3>
+ <h3>{% trans 'Runtime Depen' %}</h3>
<pre>
{{ ebuild.rdepend }}
</pre>
{% endif %}
{% if ebuild.pdepend %}
- <h3>Post-Merge Depen</h3>
+ <h3>{% trans 'Post-Merge Depen' %}</h3>
<pre>
{{ ebuild.pdepend }}
</pre>
diff --git a/gpackages/templates/includes/ebuild_use_flag.html b/gpackages/templates/includes/ebuild_use_flag.html
index 065d892..7a94914 100644
--- a/gpackages/templates/includes/ebuild_use_flag.html
+++ b/gpackages/templates/includes/ebuild_use_flag.html
@@ -1,4 +1,5 @@
{% load url from future %}
+{% load i18n %}
<table class='table table-striped table-hover'>
<colgroup>
<col class="span1" >
@@ -6,8 +7,8 @@
</colgroup>
<thead>
<tr>
- <th class="nowrap">Use flag</th>
- <th>Description</th>
+ <th class="nowrap">{% trans 'Use flag' %}</th>
+ <th>{% trans 'Description' %}</th>
</tr>
</thead>
<tbody>
diff --git a/gpackages/templates/includes/package_object.html b/gpackages/templates/includes/package_object.html
index cc13439..d97a27d 100644
--- a/gpackages/templates/includes/package_object.html
+++ b/gpackages/templates/includes/package_object.html
@@ -1,6 +1,7 @@
{% spaceless %}
{% load url from future %}
{% load packages %}
+{% load i18n %}
<div class="well package-well package">
<div class="package-name">
<span><a href="{{ package.get_absolute_url }}">{{ package.cp }}</a>:: {{ package.repository.name }}</span>
@@ -16,7 +17,7 @@
{% with herds=package.herds.all maintainers=package.maintainers.all homepages=package.latest_ebuild.homepages.all %}
{% if herds or maintainers or homepages %}
<div style="padding-bottom: 10px; padding-top: 0px; margin-top: 0px;">
- <a href="#" class="trigger"><span class="trigger">+</span>Details</a>
+ <a href="#" class="trigger"><span class="trigger">+</span>{% trans 'Details' %}</a>
</div>
<div class="row-fluid details hide">
<table class="table table-striped table-hover">
@@ -27,7 +28,7 @@
<tbody>
{% if herds %}
<tr>
- <td>Herds:</td>
+ <td>{% trans 'Herds' %}:</td>
<td>
{% for herd in herds %}
<a href="{% url 'packages' herd=herd.name %}">{{ herd.name }}</a>{% if not forloop.last %},{% endif %}
@@ -37,7 +38,7 @@
{% endif %}
{% if maintainers %}
<tr>
- <td>Maintainers:</td>
+ <td>{% trans 'Maintainers' %}:</td>
<td>
{% for maintainer in maintainers %}
<a href="{% url 'packages' maintainer=maintainer.pk %}">{{ maintainer.name }}</a>{% if not forloop.last %},{% endif %}
@@ -47,7 +48,7 @@
{% endif %}
{% if homepages %}
<tr>
- <td>Homepages:</td>
+ <td>{% trans 'Homepages' %}:</td>
<td>
{% for homepage in homepages %}
<a href="{{ homepage.url }}">{{ homepage.url }}</a>{% if not forloop.last %},{% endif %}
@@ -63,7 +64,7 @@
{% endif %}
{% if package.changelog_url %}
<tr>
- <td>Changelog url</td>
+ <td>{% trans 'Changelog url' %}</td>
<td><a href="{{ package.changelog_url }}">{{ package.changelog_url }}</a></td>
</tr>
{% endif %}
diff --git a/gpackages/templates/includes/portage_news_object.html b/gpackages/templates/includes/portage_news_object.html
index fc03658..6919d5e 100644
--- a/gpackages/templates/includes/portage_news_object.html
+++ b/gpackages/templates/includes/portage_news_object.html
@@ -1,16 +1,17 @@
{% load url from future %}
+{% load i18n %}
<div class="news_item">
<h2><a href="{% url 'news_item' slug=news_item.name %}">{{ news_item.title }}</a></h2>
<p>{{ news_item.message_as_html|safe }}</p>
<div class="metadata" >
- <span>Date: {{ news_item.date }}</span>
- <span>Revision: {{ news_item.revision }}</span>
+ <span>{% trans 'Date' %}: {{ news_item.date }}</span>
+ <span>{% trans 'Revision' %}: {{ news_item.revision }}</span>
{% with authors=news_item.authors.all %}
<span>
{% if authors|length_is:"1" %}
- Author:
+ {% trans 'Author' %}:
{% else %}
- Authors:
+ {% trans 'Authors' %}:
{% endif %}
{% for author in authors %}
<a href="{% url 'packages' maintainer=author.pk %}">{{ author.name }}</a>
diff --git a/gpackages/templates/includes/recent_ebuilds.html b/gpackages/templates/includes/recent_ebuilds.html
index 3fc0c2a..368f6aa 100644
--- a/gpackages/templates/includes/recent_ebuilds.html
+++ b/gpackages/templates/includes/recent_ebuilds.html
@@ -1,7 +1,8 @@
{% spaceless %}
+{% load i18n %}
<div class="well">
<ul class="nav nav-list recent-ebuilds">
- <li class="nav-header">Recent Ebuilds</li>
+ <li class="nav-header">{% trans 'Recent Ebuilds' %}</li>
{% for ebuild in ebuilds %}
<li>
<a href="{{ ebuild.package.get_absolute_url }}">{{ ebuild.cpv_or_cpvr }}</a>
diff --git a/gpackages/templates/license_groups.html b/gpackages/templates/license_groups.html
index 080c7fc..8a31050 100644
--- a/gpackages/templates/license_groups.html
+++ b/gpackages/templates/license_groups.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load url from future %}
{% load cache %}
+{% load i18n %}
{% block content %}
{% cache 3600 license_groups %}
@@ -11,8 +12,8 @@
</colgroup>
<thead>
<tr>
- <th>License group</th>
- <th>Licenses</th>
+ <th>{% trans 'License group' %}</th>
+ <th>{% trans 'Licenses' %}</th>
</tr>
</thead>
<tbody>
diff --git a/gpackages/templates/local_use.html b/gpackages/templates/local_use.html
index af13bf0..94af890 100644
--- a/gpackages/templates/local_use.html
+++ b/gpackages/templates/local_use.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load url from future %}
+{% load i18n %}
{% block content %}
@@ -11,9 +12,9 @@
</colgroup>
<thead>
<tr>
- <th>Use flag</th>
- <th>Package</th>
- <th>Description</th>
+ <th>{% trans 'Use flag' %}</th>
+ <th>{% trans 'Package' %}</th>
+ <th>{% trans 'Description' %}</th>
</tr>
</thead>
<tbody>
diff --git a/gpackages/templates/maintainers.html b/gpackages/templates/maintainers.html
index e09db72..b337f18 100644
--- a/gpackages/templates/maintainers.html
+++ b/gpackages/templates/maintainers.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load url from future %}
+{% load i18n %}
{% load packages %}
{% load paginator %}
@@ -13,9 +14,9 @@
</colgroup>
<thead>
<tr>
- <th>Name</th>
- <th>Email</th>
- <th>Gentoo dev</th>
+ <th>{% trans 'Name' %}</th>
+ <th>{% trans 'Email' %}</th>
+ <th>{% trans 'Gentoo dev' %}</th>
</tr>
</thead>
<tbody>
diff --git a/gpackages/templates/repositories.html b/gpackages/templates/repositories.html
index 575be00..af253c6 100644
--- a/gpackages/templates/repositories.html
+++ b/gpackages/templates/repositories.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load url from future %}
{% load cache %}
+{% load i18n %}
{% block content %}
{% cache 300 repositories_table %}
@@ -12,9 +13,9 @@
</colgroup>
<thead>
<tr>
- <th>Repository</th>
- <th>Description</th>
- <th>Last updated</th>
+ <th>{% trans 'Repository' %}</th>
+ <th>{% trans 'Description' %}</th>
+ <th>{% trans 'Last updated' %}</th>
</tr>
</thead>
<tbody>
diff --git a/gpackages/templates/repository.html b/gpackages/templates/repository.html
index bbe6b0b..062326a 100644
--- a/gpackages/templates/repository.html
+++ b/gpackages/templates/repository.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load url from future %}
+{% load i18n %}
{% load packages %}
{% block content %}
@@ -14,44 +15,44 @@
<col class="span1" />
<col class="span1" />
</colgroup>
- <caption><h3>Options</h3></caption>
+ <caption><h3>{% trans 'Options' %}</h3></caption>
<thead>
<tr>
- <th>Name</th>
- <th>Value</th>
+ <th>{% trans 'Name' %}</th>
+ <th>{% trans 'Value' %}</th>
</tr>
</thead>
<tbody>
{% if repository.owner_name %}
<tr>
- <td class="nowrap">Owner name</td>
+ <td class="nowrap">{% trans 'Owner name' %}</td>
<td>{{ repository.owner_name }}</td>
</tr>
{% endif %}
{% if repository.owner_email %}
<tr>
- <td class="nowrap">Owner email</td>
+ <td class="nowrap">{% trans 'Owner email' %}</td>
<td><a href="{{ 'mailto:'|add:repository.owner_email|obfuscate }}">{{ repository.owner_email|obfuscate }}</a></td>
</tr>
{% endif %}
<tr>
- <td>Homepage</td>
+ <td>{% trans 'Homepage' %}</td>
<td><a href="{{ repository.homepage }}">{{ repository.homepage }}</a></td>
</tr>
<tr>
- <td>Quality</td>
+ <td>{% trans 'Quality' %}</td>
<td>{{ repository.get_quality_display }}</td>
</tr>
<tr>
- <td>Official</td>
+ <td>{% trans 'Official' %}</td>
<td>{% if repository.official %}<span class="bool-ok">&#10004; Yes</span>{% else %}<span class="bool-no">&#10005; No</span>{% endif %}</td>
</tr>
<tr>
- <td>Last Updated</td>
+ <td>{% trans 'Last Updated' %}</td>
<td>{{ repository.updated_datetime }}</td>
</tr>
<tr>
- <td>Created in database</td>
+ <td>{% trans 'Created in database' %}</td>
<td>{{ repository.created_datetime }}</td>
</tr>
</tbody>
@@ -63,32 +64,32 @@
<col class="span1" />
<col class="span1" />
</colgroup>
- <caption><h3>Stats</h3></caption>
+ <caption><h3>{% trans 'Stats' %}</h3></caption>
<thead>
<tr>
- <th>Name</th>
- <th>Value</th>
+ <th>{% trans 'Name' %}</th>
+ <th>{% trans 'Value' %}</th>
</tr>
</thead>
<tbody>
<tr>
- <td class="nowrap">Categories Count</td>
+ <td class="nowrap">{% trans 'Categories Count' %}</td>
<td>{{ repository.categories_count }}</td>
</tr>
<tr>
- <td class="nowrap">Maintainers Count</td>
+ <td class="nowrap">{% trans 'Maintainers Count' %}</td>
<td>{{ repository.maintainers_count }}</td>
</tr>
<tr>
- <td class="nowrap">Herds Count</td>
+ <td class="nowrap">{% trans 'Herds Count' %}</td>
<td>{{ repository.herds_count }}</td>
</tr>
<tr>
- <td class="nowrap">Packages Count</td>
+ <td class="nowrap">{% trans 'Packages Count' %}</td>
<td>{{ repository.packages_count }}</td>
</tr>
<tr>
- <td class="nowrap">Ebuilds Count</td>
+ <td class="nowrap">{% trans 'Ebuilds Count' %}</td>
<td>{{ repository.ebuilds_count }}</td>
</tr>
</tbody>
@@ -103,11 +104,11 @@
<col class="span1" />
<col class="span7" />
</colgroup>
- <caption><h3>Sources</h3></caption>
+ <caption><h3>{% trans 'Sources' %}</h3></caption>
<thead>
<tr>
- <th class="nowrap">Repository type</th>
- <th>URL</th>
+ <th class="nowrap">{% trans 'Repository type' %}</th>
+ <th>{% trans 'URL' %}</th>
</tr>
</thead>
<tbody>
@@ -124,7 +125,7 @@
{% with feeds=repository.repositoryfeedmodel_set.all %}
{% if feeds %}
<div>
- <h4>Feeds:</h4>
+ <h4>{% trans 'Feeds:' %}</h4>
<ul>
{% for feed in feeds %}
<li><a href="{{ feed.feed }}">{{ feed.feed }}</a></li>