Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
website
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Ask
website
Commits
efa2588d
Commit
efa2588d
authored
Sep 25, 2012
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Locate some string with a local javascript
parent
458e2833
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
0 deletions
+67
-0
forum/skins/light/media/js/l18n-it.js
forum/skins/light/media/js/l18n-it.js
+66
-0
forum/skins/light/templates/base_content.html
forum/skins/light/templates/base_content.html
+1
-0
No files found.
forum/skins/light/media/js/l18n-it.js
0 → 100644
View file @
efa2588d
/**
* Translate some string
*
**/
/* Markdonw translations */
function
locate_wmd
()
{
if
(
$
(
"
#wmd-button-bar
"
).
length
==
0
)
{
// exit if there's no wmd bar
return
;
}
help_button
=
$
(
"
#wmd-help-button a
"
)[
0
];
help_button
.
href
=
"
/markdown_help/
"
;
help_button
.
title
=
"
Aiuto su sintassi Markdown
"
;
buttons
=
Array
()
buttons
[
"
bold
"
]
=
[
"
Strong
"
,
"
Grassetto
"
]
buttons
[
"
italic
"
]
=
[
"
Emphasis
"
,
"
Corsivo
"
]
buttons
[
"
link
"
]
=
[
"
Hyperlink
"
,
"
Collegamento
"
]
buttons
[
"
quote
"
]
=
[
"
Blockquote
"
,
"
Citazione
"
]
buttons
[
"
code
"
]
=
[
"
Code Sample
"
,
"
Codice sorgente
"
]
buttons
[
"
image
"
]
=
[
"
Image
"
,
"
Immagine
"
]
buttons
[
"
olist
"
]
=
[
"
Numbered List
"
,
"
Elenco numerato
"
]
buttons
[
"
ulist
"
]
=
[
"
Bulleted List
"
,
"
Elenco puntato
"
]
buttons
[
"
heading
"
]
=
[
"
Heading
"
,
"
Titolo
"
]
buttons
[
"
hr
"
]
=
[
"
Horizontal Rule
"
,
"
Linea orizzontale
"
]
buttons
[
"
undo
"
]
=
[
"
Undo
"
,
"
Annulla
"
]
buttons
[
"
redo
"
]
=
[
"
Redo
"
,
"
Ripeti
"
]
for
(
key
in
buttons
)
{
id
=
"
#wmd-
"
+
key
+
"
-button
"
en
=
buttons
[
key
][
0
]
it
=
buttons
[
key
][
1
]
button
=
$
(
id
)[
0
]
button
.
title
=
button
.
title
.
replace
(
en
,
it
)
}
}
function
translate_string
(
id
,
en
,
it
)
{
if
(
$
(
id
).
length
<
1
)
return
;
element
=
$
(
$
(
id
)[
0
])
element
.
html
(
element
.
html
().
replace
(
en
,
it
))
}
$
(
window
).
load
(
function
()
{
t
=
translate_string
// When no related question are found
$
(
$
(
"
#ask-related-questions
"
)[
0
]).
bind
(
'
DOMSubtreeModified
'
,
function
()
{
t
(
"
#ask-related-questions div[align=center]
"
,
"
No questions like this have been found
"
,
"
Non è stata trovata alcuna domanda simile
"
)
})
locate_wmd
();
})
forum/skins/light/templates/base_content.html
View file @
efa2588d
...
@@ -68,6 +68,7 @@
...
@@ -68,6 +68,7 @@
{{ settings.CUSTOM_HEAD|or_preview:request|safe }}
{{ settings.CUSTOM_HEAD|or_preview:request|safe }}
{% endif %}
{% endif %}
{% block forejs %}{% endblock %}
{% block forejs %}{% endblock %}
<script
type=
"text/javascript"
src=
"{% media "
/
media
/
js
/
l18n-it
.
js
"
%}"
></script>
<link
rel=
"search"
type=
"application/opensearchdescription+xml"
href=
"{% url opensearch %}"
title=
"{{ settings.APP_SHORT_NAME }} Search"
/>
<link
rel=
"search"
type=
"application/opensearchdescription+xml"
href=
"{% url opensearch %}"
title=
"{{ settings.APP_SHORT_NAME }} Search"
/>
{% loadregistry head_content %}{% endloadregistry %}
{% loadregistry head_content %}{% endloadregistry %}
</head>
</head>
...
...
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