Contextual tags is translated, for linux presentation day and libre en fête

This commit is contained in:
echarp 2019-04-21 18:09:31 +02:00
parent a3189a7d6a
commit 18ffb15da9
7 changed files with 19 additions and 40 deletions

3
.gitignore vendored
View File

@ -95,8 +95,5 @@ capybara-*html
# vendor/extensions dummy applications. # vendor/extensions dummy applications.
vendor/extensions/**/spec/dummy vendor/extensions/**/spec/dummy
# exuberant-ctags
tags
# session secret # session secret
config/initializers/secret_token.rb config/initializers/secret_token.rb

View File

@ -1,16 +1,6 @@
- set_event_meta - set_event_meta
- if @event.tags.any? { |t| t.name.include? 'libre-en-fete' } = render partial: '/tags/context', locals: { tags: @event.tag_list }
Cet événement s'inscrit dans le cadre de
%a(href='https://www.libre-en-fete.net')
= image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete',
style: 'vertical-align: middle'
- elsif @event.tags.any? { |t| t.name.include? 'linux-presentation-day' }
Cet événement s'inscrit dans le cadre de
%a(href='http://www.linux-presentation-day.org')
= image_tag 'linux-presentation-day.png',
width: '150', height: '75', alt: 'Linux presentation day',
style: 'vertical-align: middle'
%h2 %h2
- if @event.locality? - if @event.locality?

View File

@ -1,21 +1,7 @@
- if action_name == 'index' && controller_name != 'tags' - if action_name == 'index' && controller_name != 'tags'
.digest .digest
- if params[:tag].present? - if params[:tag].present?
%span.tag = render partial: '/tags/context', locals: { tags: params[:tag] }
- if params[:tag].include? 'libre-en-fete'
%a(href='https://www.libre-en-fete.net')
= image_tag 'lef.png', width: '180', height: '60',
alt: 'Libre en Fete', style: 'vertical-align: middle'
- elsif params[:tag].include? 'linux-presentation-day'
%a(href='http://www.linux-presentation-day.org')
= image_tag 'linux-presentation-day.png',
width: '150', height: '75', alt: 'Linux presentation day',
style: 'vertical-align: middle'
- else
%em.fa.fa-tag
= params[:tag]
%a(href="?tag=")
%em.fa.fa-times
- if params[:near].present? && params[:near][:location].present? && params[:near][:distance].present? - if params[:near].present? && params[:near][:location].present? && params[:near][:distance].present?
%span.near %span.near

View File

@ -0,0 +1,13 @@
-# Used in pages header, event.show and tag.show
- if tags.include? 'libre-en-fete'
= t '.link' if action_name == 'show'
%a(href='https://www.libre-en-fete.net')
= image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fête',
style: 'vertical-align: middle'
- elsif tags.include? 'linux-presentation-day'
= t '.link' if action_name == 'show'
%a(href='http://www.linux-presentation-day.org')
= image_tag 'linux-presentation-day.png', width: '150', height: '75',
alt: 'Linux presentation day', style: 'vertical-align: middle'

View File

@ -1,14 +1,4 @@
- if params[:id].include? 'libre-en-fete' = render partial: '/tags/context', locals: { tags: params[:id] }
Ces événements s'inscrivent dans le cadre de
%a(href='https://www.libre-en-fete.net')
= image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete',
style: 'vertical-align: middle'
- elsif params[:id].include? 'linux-presentation-day'
Ces événements s'inscrivent dans le cadre de
%a(href='http://www.linux-presentation-day.org')
= image_tag 'linux-presentation-day.png',
width: '150', height: '75', alt: 'Linux presentation day',
style: 'vertical-align: middle'
%h2 %h2
%em.fa.fa-tag %em.fa.fa-tag

View File

@ -160,6 +160,7 @@ it more readable or agreable."
zero: zero:
one: one event one: one event
other: "%{count} events" other: "%{count} events"
context: This event is part of
moderations: moderations:
index: index:
title: Events to moderate title: Events to moderate

View File

@ -173,6 +173,8 @@ lévènement pour la rendre plus complète, plus lisible ou plus attrayante."
zero: zero:
one: Un événement one: Un événement
other: "%{count} événements" other: "%{count} événements"
context:
link: Cet évènement s'inscrit dans le cadre de
moderations: moderations:
index: index:
title: Événements à modérer title: Événements à modérer