Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
6a17be7d
Commit
6a17be7d
authored
Feb 25, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide consistent way for setting page description
Issue #976 Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
ad20f88b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
weblate/html/base.html
weblate/html/base.html
+1
-7
weblate/trans/context_processors.py
weblate/trans/context_processors.py
+12
-0
No files found.
weblate/html/base.html
View file @
6a17be7d
...
@@ -13,9 +13,7 @@
...
@@ -13,9 +13,7 @@
<meta
name=
"copyright"
content=
"Copyright © 2003 - {{ current_year }} Michal Čihař"
/>
<meta
name=
"copyright"
content=
"Copyright © 2003 - {{ current_year }} Michal Čihař"
/>
<title>
{% include "title.html" %}
</title>
<title>
{% include "title.html" %}
</title>
{% if description %}
<meta
name=
"description"
content=
"{{ description }}"
/>
<meta
name=
"description"
content=
"{{ description }}"
/>
{% endif %}
{% compress css %}
{% compress css %}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'bootstrap/css/bootstrap.css' %}"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'bootstrap/css/bootstrap.css' %}"
/>
...
@@ -53,11 +51,7 @@
...
@@ -53,11 +51,7 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<meta
property=
"og:site_name"
content=
"{% if site_title %}{{ site_title }}{% else %}Weblate{% endif %}"
/>
<meta
property=
"og:site_name"
content=
"{% if site_title %}{{ site_title }}{% else %}Weblate{% endif %}"
/>
<meta
property=
"og:title"
content=
"{% if title %}{{ title }}{% else %}{% if object %}{{ object }}{% else %}{% if page_profile %}{{ page_profile.get_user_name }}{% else %}{% if site_title %}{{ site_title }}{% else %}Weblate{% endif %}{% endif %}{% endif %}{% endif %}"
/>
<meta
property=
"og:title"
content=
"{% if title %}{{ title }}{% else %}{% if object %}{{ object }}{% else %}{% if page_profile %}{{ page_profile.get_user_name }}{% else %}{% if site_title %}{{ site_title }}{% else %}Weblate{% endif %}{% endif %}{% endif %}{% endif %}"
/>
{% if offer_hosting %}
<meta
property=
"og:description"
content=
"{{ description }}"
/>
<meta
property=
"og:description"
content=
"{% trans "
Hosted
Weblate
,
the
place
to
translate
your
software
project
."
%}"
/>
{% else %}
<meta
property=
"og:description"
content=
"{% trans "
This
site
runs
Weblate
for
translating
various
software
projects
."
%}"
/>
{% endif %}
{% block extra_meta %}
{% block extra_meta %}
{% endblock %}
{% endblock %}
...
...
weblate/trans/context_processors.py
View file @
6a17be7d
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
from
datetime
import
datetime
from
datetime
import
datetime
from
django.utils.translation
import
ugettext
as
_
import
weblate
import
weblate
from
weblate
import
appsettings
from
weblate
import
appsettings
from
weblate.trans.site
import
get_site_url
from
weblate.trans.site
import
get_site_url
...
@@ -51,8 +53,18 @@ def weblate_context(request):
...
@@ -51,8 +53,18 @@ def weblate_context(request):
'subproject__project__name'
,
'subproject__name'
'subproject__project__name'
,
'subproject__name'
).
select_related
()
).
select_related
()
if
appsettings
.
OFFER_HOSTING
:
description
=
_
(
'Hosted Weblate, the place to translate your software project.'
)
else
:
description
=
_
(
'This site runs Weblate for translating various software projects.'
)
return
{
return
{
'version'
:
weblate
.
VERSION
,
'version'
:
weblate
.
VERSION
,
'description'
:
description
,
'weblate_url'
:
URL_BASE
%
weblate
.
VERSION
,
'weblate_url'
:
URL_BASE
%
weblate
.
VERSION
,
'donate_url'
:
URL_DONATE
%
weblate
.
VERSION
,
'donate_url'
:
URL_DONATE
%
weblate
.
VERSION
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment