Adding .notranslate classes to haml files to have transifex better handling dynamic text. See issue #908

This commit is contained in:
CamilleM 2016-03-26 23:32:43 +01:00
parent ac7149fbe5
commit d11ea33cf0
7 changed files with 26 additions and 16 deletions

View file

@ -14,23 +14,26 @@
%p %p
- if @program.event_types.any? - if @program.event_types.any?
You can submit proposals for You can submit proposals for
= "#{event_types(@conference)}." %span.notranslate
= "#{event_types(@conference)}."
- if @program.tracks.any? - if @program.tracks.any?
Proposals should fit in one of the Proposals should fit in one of the
= "#{pluralize(@program.tracks.count, 'track')}:" %span.notranslate
= "#{tracks(@conference)}." = "#{pluralize(@program.tracks.count, 'track')}:"
= "#{tracks(@conference)}."
The submission period has begun The submission period has begun
%em %em.notranslate
= @program.cfp.start_date.strftime('%A, %B %-d. %Y') = @program.cfp.start_date.strftime('%A, %B %-d. %Y')
and closes and closes
%em %em.notranslate
= @program.cfp.end_date.strftime('%A, %B %-d. %Y.') = @program.cfp.end_date.strftime('%A, %B %-d. %Y.')
- if @program.cfp_open? - if @program.cfp_open?
That means you have only That means you have only
%b= pluralize(@program.cfp.remaining_days, 'day') %b.notranslate= pluralize(@program.cfp.remaining_days, 'day')
left! left!
Remember Remember
= @conference.short_title %span.notranslate
= @conference.short_title
will only be as good as the sessions you present. Submit early, submit often! will only be as good as the sessions you present. Submit early, submit often!
- else - else
The submission period is closed. The submission period is closed.

View file

@ -4,7 +4,8 @@
%h2.text-center %h2.text-center
Program Program
%p.lead.text-center %p.lead.text-center
= @conference.short_title %span.notranslate
= @conference.short_title
has the most awesome program ever! has the most awesome program ever!
- if @conference.splashpage and @conference.program.tracks.any? and @conference.splashpage.include_tracks - if @conference.splashpage and @conference.program.tracks.any? and @conference.splashpage.include_tracks
See rock-star speakers cover the topics of See rock-star speakers cover the topics of

View file

@ -8,7 +8,8 @@
%h2 Sponsors %h2 Sponsors
%p.lead %p.lead
whom without, whom without,
= @conference.short_title %span.notranslate
= @conference.short_title
wouldn't be possible! wouldn't be possible!
- @conference.sponsorship_levels.each do |sponsorship_level| - @conference.sponsorship_levels.each do |sponsorship_level|
-if sponsorship_level.sponsors.any? -if sponsorship_level.sponsors.any?

View file

@ -11,7 +11,8 @@
%p.text-right %p.text-right
%button{ type: 'button', class: 'btn btn-link btn-sm', 'data-toggle' => 'collapse', 'data-target' => '#antiquated', 'aria-expanded' => 'true', 'aria-controls' => 'antiquated'} %button{ type: 'button', class: 'btn btn-link btn-sm', 'data-toggle' => 'collapse', 'data-target' => '#antiquated', 'aria-expanded' => 'true', 'aria-controls' => 'antiquated'}
Older conferences Older conferences
= "(#{@antiquated.count})" %span.notranslate
= "(#{@antiquated.count})"
%i.fa.fa-chevron-right %i.fa.fa-chevron-right
%i.fa.fa-chevron-down{ style: 'display: none' } %i.fa.fa-chevron-down{ style: 'display: none' }
#antiquated.collapse #antiquated.collapse

View file

@ -37,7 +37,8 @@
= link_to(admin_conference_path(@conference.short_title)) do = link_to(admin_conference_path(@conference.short_title)) do
%span.fa.fa-cog %span.fa.fa-cog
Manage Manage
= @conference.short_title %span.notranslate
= @conference.short_title
- if can? :manage, User.new - if can? :manage, User.new
%li %li
= link_to(admin_users_path) do = link_to(admin_users_path) do

View file

@ -8,16 +8,17 @@
= "#{tracks(@conference)}." = "#{tracks(@conference)}."
- if @program.cfp_open? - if @program.cfp_open?
The submission period has begun The submission period has begun
%em %em.notranslate
= @program.cfp.start_date.strftime('%A, %B %-d. %Y') = @program.cfp.start_date.strftime('%A, %B %-d. %Y')
and closes and closes
%em %em.notranslate
= @program.cfp.end_date.strftime('%A, %B %-d. %Y.') = @program.cfp.end_date.strftime('%A, %B %-d. %Y.')
That means you have That means you have
%b= pluralize(@program.cfp.remaining_days, 'day') %b.notranslate= pluralize(@program.cfp.remaining_days, 'day')
left! left!
Remember Remember
= @conference.title %span.notranslate
= @conference.title
will only be as good as the content you present. Submit early, submit often! will only be as good as the content you present. Submit early, submit often!
-else -else
The submission period is closed now. The submission period is closed now.

View file

@ -2,7 +2,9 @@
.row .row
.col-md-12.page-header .col-md-12.page-header
%h1 %h1
= "My Proposals for #{@conference.title}" Proposals for
%span.notranslate
= @conference.title
.row .row
.col-md-12 .col-md-12