Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions app/assets/javascripts/application.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,7 @@ $("textarea, #form_answers input").keypress (event) ->
$(@).off event

# Add/Remove dynamically links in the news form
langs =
fr: "Français"
de: "Allemand"
en: "Anglais"
eu: "Basque"
ct: "Catalan"
cn: "Chinois"
ko: "Coréen"
da: "Danois"
es: "Espagnol"
ee: "Estonien"
fi: "Finnois"
el: "Grec"
it: "Italien"
ja: "Japonais"
nl: "Néerlandais"
no: "Norvégien"
pl: "Polonais"
pt: "Portugais"
ru: "Russe"
sv: "Suédois"
xx: "!? hmmm ?!"
wq: "Code/binaire"

$("#form_links").nested_fields "news", "link", "lien", "fieldset", title: "text", url: "url", lang: langs
$("#form_links").nested_fields "news", "link", "lien", "fieldset", title: "text", url: "url", lang: window.langs
$("#form_answers").nested_fields "poll", "answer", "choix", "p", answer: "text"

# Mask the contributors if they are too many
Expand Down
24 changes: 24 additions & 0 deletions app/assets/javascripts/lang.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Export langs as defined in rails
window.langs =
xx: "!? hmmm ?!" # default choice
fr: "Français" # main language, then others sorted
de: "Allemand"
en: "Anglais"
eu: "Basque"
ct: "Catalan"
cn: "Chinois"
wq: "Code/binaire"
ko: "Coréen"
da: "Danois"
es: "Espagnol"
ee: "Estonien"
fi: "Finnois"
el: "Grec"
it: "Italien"
ja: "Japonais"
nl: "Néerlandais"
no: "Norvégien"
pl: "Polonais"
pt: "Portugais"
ru: "Russe"
sv: "Suédois"
3 changes: 2 additions & 1 deletion app/assets/javascripts/redaction.coffee
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#= require lang
#= require push

$ = window.jQuery
Expand Down Expand Up @@ -49,7 +50,7 @@ class Redaction

innerHtmlForLink: (msg) ->
"""
<a href="/redirect/#{msg.id}" class="hit_counter">#{msg.title}</a> (#{msg.nb_clicks} clic#{if msg.nb_clicks > 1 then 's' else ''})
<a href="/redirect/#{msg.id}" class="hit_counter">#{msg.title}</a> (#{if msg.lang == 'fr' then '' else 'en ' + window.langs[msg.lang].toLowerCase() + ', '}#{msg.nb_clicks} clic#{if msg.nb_clicks > 1 then 's' else ''})
"""

htmlForLink: (msg) ->
Expand Down
67 changes: 0 additions & 67 deletions app/assets/stylesheets/common/langs.scss

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/stylesheets/contrib/RonRonnement-Classic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

@import "../common/ac";
@import "../common/generics";
@import "../common/langs";
@import "../common/markitup";
@import "../common/statistics";
@import "../common/doorkeeper";
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/contrib/RonRonnement-Sepia.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ $C_BD5: transparentize($C_BANDEAU, 0.17);

@import "common/ac";
@import "common/generics";
@import "common/langs";
@import "common/markitup";
@import "common/statistics";
@import "pygments/colorful";
Expand Down
104 changes: 0 additions & 104 deletions app/assets/stylesheets/contrib/grayscale.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2287,110 +2287,6 @@ form#new_diary > p:nth-child(4) {
.markItUp .link a {
background-image: url(/images/markitup/link.png);
}
*:not(.markItUpHeader) > ul > .link {
list-style: none;
margin-left: -14px;
}
:not(.markItUpHeader) > ul > .link[lang="cn"]:before {
content: url("/images/contrib/grayscale/flags/cn.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="ct"]:before {
content: url("/images/contrib/grayscale/flags/ct.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="da"]:before {
content: url("/images/contrib/grayscale/flags/da.png");
position: / images/contrib/grayscale/relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="de"]:before {
content: url("/images/contrib/grayscale/flags/de.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="el"]:before {
content: url("/images/contrib/grayscale/flags/el.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="en"]:before {
content: url("/images/contrib/grayscale/flags/en.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="es"]:before {
content: url("/images/contrib/grayscale/flags/es.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="eu"]:before {
content: url("/images/contrib/grayscale/flags/eu.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="fi"]:before {
content: url("/images/contrib/grayscale/flags/fi.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="fr"]:before {
content: url("/images/contrib/grayscale/flags/fr.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="it"]:before {
content: url("/images/contrib/grayscale/flags/it.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="ja"]:before {
content: url("/images/contrib/grayscale/flags/ja.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="ko"]:before {
content: url("/images/contrib/grayscale/flags/ko.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="nl"]:before {
content: url("/images/contrib/grayscale/flags/nl.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="no"]:before {
content: url("/images/contrib/grayscale/flags/no.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="pl"]:before {
content: url("/images/contrib/grayscale/flags/pl.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="pt"]:before {
content: url("/images/contrib/grayscale/flags/pt.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="ru"]:before {
content: url("/images/contrib/grayscale/flags/ru.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="sv"]:before {
content: url("/images/contrib/grayscale/flags/sv.png");
position: relative;
top: 2px;
}
*:not(.markItUpHeader) > ul > .link[lang="xx"]:before {
content: url("/images/contrib/grayscale/flags/xx.png");
position: relative;
top: 2px;
}
#phare .link,
#phare .meta,
#phare footer {
Expand Down
62 changes: 0 additions & 62 deletions app/assets/stylesheets/contrib/kaiska-new.scss
Original file line number Diff line number Diff line change
Expand Up @@ -750,68 +750,6 @@ div#moderation_box input#board_message {
width: 95%;
}

/* Langues */
li.link[lang="cn"] {
list-style: url("/images/langs/cn.png");
}
li.link[lang="ct"] {
list-style: url("/images/langs/ct.png");
}
li.link[lang="da"] {
list-style: url("/images/langs/da.png");
}
li.link[lang="de"] {
list-style: url("/images/langs/de.png");
}
li.link[lang="el"] {
list-style: url("/images/langs/el.png");
}
li.link[lang="en"] {
list-style: url("/images/langs/en.png");
}
li.link[lang="es"] {
list-style: url("/images/langs/es.png");
}
li.link[lang="eu"] {
list-style: url("/images/langs/eu.png");
}
li.link[lang="fi"] {
list-style: url("/images/langs/fi.png");
}
li.link[lang="fr"] {
list-style: url("/images/langs/fr.png");
}
li.link[lang="it"] {
list-style: url("/images/langs/it.png");
}
li.link[lang="ja"] {
list-style: url("/images/langs/ja.png");
}
li.link[lang="ko"] {
list-style: url("/images/langs/ko.png");
}
li.link[lang="nl"] {
list-style: url("/images/langs/nl.png");
}
li.link[lang="no"] {
list-style: url("/images/langs/no.png");
}
li.link[lang="pl"] {
list-style: url("/images/langs/pl.png");
}
li.link[lang="pt"] {
list-style: url("/images/langs/pt.png");
}
li.link[lang="ru"] {
list-style: url("/images/langs/ru.png");
}
li.link[lang="sv"] {
list-style: url("/images/langs/sv.png");
}
li.link[lang="xx"] {
list-style: url("/images/langs/xx.png");
}

div.content a[href^="/wiki/"],
div.content a[href^="//linuxfr.org/wiki/"] {
background: url("/images/contrib/kaiska/linuxfr.png") no-repeat;
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/contrib/nightgrey.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2112,4 +2112,3 @@ fieldset.link {
}

@import "../common/statistics";
@import "../common/langs";
Loading