Skip to content

Commit 8f1294c

Browse files
committed
Fix #2057 Affichage de la langue du lien en prévisualisation
- missing class to display flag on bookmarks during preview - missing flags in some contrib CSS - reorder langs in Redis to default to 'xx' (then 'fr', then sorted)
1 parent f546634 commit 8f1294c

File tree

5 files changed

+26
-4
lines changed

5 files changed

+26
-4
lines changed

app/assets/stylesheets/contrib/grayscale.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,6 +2311,11 @@ form#new_diary > p:nth-child(4) {
23112311
position: relative;
23122312
top: 2px;
23132313
}
2314+
*:not(.markItUpHeader) > ul > .link[lang="ee"]:before {
2315+
content: url("/images/langs/ee.png");
2316+
position: relative;
2317+
top: 2px;
2318+
}
23142319
*:not(.markItUpHeader) > ul > .link[lang="el"]:before {
23152320
content: url("/images/contrib/grayscale/flags/el.png");
23162321
position: relative;
@@ -2391,6 +2396,11 @@ form#new_diary > p:nth-child(4) {
23912396
position: relative;
23922397
top: 2px;
23932398
}
2399+
*:not(.markItUpHeader) > ul > .link[lang="wq"]:before {
2400+
content: url("/images/langs/wq.png");
2401+
position: relative;
2402+
top: 2px;
2403+
}
23942404
#phare .link,
23952405
#phare .meta,
23962406
#phare footer {

app/assets/stylesheets/contrib/kaiska-new.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,9 @@ li.link[lang="da"] {
763763
li.link[lang="de"] {
764764
list-style: url("/images/langs/de.png");
765765
}
766+
li.link[lang="ee"] {
767+
list-style: url("/images/langs/ee.png");
768+
}
766769
li.link[lang="el"] {
767770
list-style: url("/images/langs/el.png");
768771
}
@@ -811,6 +814,9 @@ li.link[lang="sv"] {
811814
li.link[lang="xx"] {
812815
list-style: url("/images/langs/xx.png");
813816
}
817+
li.link[lang="wq"] {
818+
list-style: url("/images/langs/wq.png");
819+
}
814820

815821
div.content a[href^="/wiki/"],
816822
div.content a[href^="//linuxfr.org/wiki/"] {

app/assets/stylesheets/contrib/solarized/langs.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ li.link[lang="da"] {
1515
li.link[lang="de"] {
1616
list-style-image: url("/images/langs/de.png");
1717
}
18+
li.link[lang="ee"] {
19+
list-style-image: url("/images/langs/ee.png");
20+
}
1821
li.link[lang="el"] {
1922
list-style-image: url("/images/langs/el.png");
2023
}
@@ -63,3 +66,6 @@ li.link[lang="sv"] {
6366
li.link[lang="xx"] {
6467
list-style-image: url("/images/langs/xx.png");
6568
}
69+
li.link[lang="wq"] {
70+
list-style-image: url("/images/langs/wq.png");
71+
}

app/views/bookmarks/_preview.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
- c.image = mini_avatar_img(preview.node.user)
44
- c.body = capture do
55
%ul
6-
%li{lang: preview.lang}= "#{link_to preview.link, preview.link, hreflang: preview.lang}".html_safe
6+
%li.link{lang: preview.lang}= "#{link_to preview.link, preview.link, hreflang: preview.lang}".html_safe

db/seeds.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
Logo.image = '/images/logos/linuxfr2_classic.png'
55

66
# Langs
7-
Lang['fr'] = 'Français'
7+
Lang['xx'] = '!? hmmm ?!' # default choice
8+
Lang['fr'] = 'Français' # main language, then others sorted
89
Lang['de'] = 'Allemand'
910
Lang['en'] = 'Anglais'
1011
Lang['eu'] = 'Basque'
1112
Lang['ct'] = 'Catalan'
1213
Lang['cn'] = 'Chinois'
14+
Lang['wq'] = 'Code/binaire'
1315
Lang['ko'] = 'Coréen'
1416
Lang['da'] = 'Danois'
1517
Lang['es'] = 'Espagnol'
@@ -24,8 +26,6 @@
2426
Lang['pt'] = 'Portugais'
2527
Lang['ru'] = 'Russe'
2628
Lang['sv'] = 'Suédois'
27-
Lang['xx'] = '!? hmmm ?!'
28-
Lang['wq'] = 'Code/binaire'
2929

3030
# Category
3131
%w(Autres Administration\ site Commentaires Feuilles\ de\ style\ (CSS) Dépêches Forums Journaux Modération Proposition Recherche Sondages Suivi Barre\ d’outils Tribune Wiki Avatars Étiquettes Vieux\ navigateurs Comptes\ utilisateurs Statistiques Rédaction Administration\ système À\ ranger\ quelque\ part Aide\ et\ documentation Notifications Syntaxe\ markdown API\ OAuth Images Flux\ Atom Epub Liens).each do |cat|

0 commit comments

Comments
 (0)