Translation improvements

This commit is contained in:
Godwin
2015-09-01 20:50:45 -07:00
parent e2af723370
commit dcfdc5e5ad
41 changed files with 1204 additions and 19416 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

+114 -33
View File
@@ -1,10 +1,12 @@
@import "bumbleberry";
@import "settings";
$zindex-base: 0;
html, body {
color: #333;
position: relative;
z-index: -1;
z-index: $zindex-base;
}
h1, h2, h3, h4, h5, label, button, .button, dt, th, nav.sub-menu {
@@ -300,7 +302,7 @@ input {
label {
position: absolute;
z-index: 2;
z-index: $zindex-base + 3;
font-size: 1em;
//float: left;
//@include font-family(primary);
@@ -332,7 +334,7 @@ input {
transparent 6px
);
label {
z-index: 0;
z-index: $zindex-base + 1;
@include _(transform, translateY(-100%) scale(1));
background-color: transparent;
color: #888;
@@ -345,7 +347,7 @@ input {
input {
margin: 0;
position: relative;
z-index: 1;
z-index: $zindex-base + 2;
padding: 0.15em 0.5em;
background-color: transparent;
border: 0;
@@ -384,7 +386,7 @@ input {
&:checked {
+ div input {
//display: block;
z-index: 1;
z-index: $zindex-base + 2;
@include _(opacity, 1);
}
}
@@ -400,7 +402,7 @@ input {
//display: none;
@include _(opacity, 0);
@include _(transition, opacity 250ms ease-in-out);
z-index: -1;
z-index: $zindex-base;
position: absolute;
width: auto;
margin: 0;
@@ -624,19 +626,29 @@ form {
width: 100%;
background-color: $white;
@include default-box-shadow(top, 2);
z-index: 1;
z-index: $zindex-base + 2;
.nav {
text-align: center;
clear: left;
overflow: auto;
background-color: $colour-3;
height: 2em;
span {
display: table-cell;
text-align: center;
width: 100%;
height: 100%;
vertical-align: middle;
}
a {
position: relative;
display: inline-block;
margin: 0;
padding: 1em 0;
display: table;
height: 100%;
overflow: hidden;
float: left;
font-weight: normal;
@include font-family(secondary);
@@ -691,7 +703,7 @@ form {
#main {
position: relative;
z-index: -1;
//z-index: $zindex-base;
max-width: (rems(68) - $sidebar-width) * 2;
background-color: $white;
padding-bottom: rems(2);
@@ -763,22 +775,23 @@ a.logo {
fill: #333;
}
.logo svg {
display: inline-block;
height: 1em;
width: 1em;
float: left;
}
.logo:hover svg.bb-icon-logo {
@include _(animation, active-logo 4s infinite);
}
}
.logo .icons {
display: inline-block;
height: 1em;
width: 1em;
float: left;
}
#banner {
clear: left;
figure {
position: relative;
width: 100%;
max-width: rems(60);
margin: 0;
@@ -801,7 +814,7 @@ $header-tilt: 8deg;
color: #EEE;
overflow: hidden;
position: relative;
z-index: -1;
z-index: $zindex-base;
rect {
fill: $colour-1;
@@ -837,7 +850,7 @@ $header-tilt: 8deg;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
z-index: $zindex-base;
background-size: inherit;
background-position: inherit;
-webkit-filter: saturate(25%);
@@ -853,7 +866,7 @@ $header-tilt: 8deg;
font-size: 3.5em;
margin: 0.25em 0.5em;
position: relative;
z-index: 1;
z-index: $zindex-base + 2;
@include _(text-shadow, 0 0 0.15em #000);
}
}
@@ -950,7 +963,7 @@ $header-tilt: 8deg;
border: 0.1em solid #DDD;
padding: 0.5em 0.5em 0.5em 2em;
text-align: center;
z-index: 1;
z-index: $zindex-base + 2;
margin-bottom: 0.5em;
a {
@@ -1005,7 +1018,7 @@ $header-tilt: 8deg;
position: fixed;
top: 0.5em;
left: -1em;
z-index: 11;
z-index: $zindex-base + 12;
color: #333;
font-size: 2em;
opacity: 0;
@@ -1022,7 +1035,7 @@ $header-tilt: 8deg;
padding: 1em 4em;
overflow: auto;
background-color: $white;
z-index: 10;
z-index: $zindex-base + 11;
@include _(transform, scale(0));
@include _(transform-origin, 6.25em _calc('100% - 2em', 98%));
@include _(transition, 250ms all ease-in-out);
@@ -1063,7 +1076,7 @@ $header-tilt: 8deg;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
z-index: $zindex-base + 2;
}
}
@@ -1124,13 +1137,20 @@ $header-tilt: 8deg;
height: rems(6);
.nav {
height: auto;
width: 80%;
clear: none;
padding-top: rems(1.5);
background-color: transparent;
overflow: visible;
span {
display: inline;
}
a {
display: inline-block;
overflow: visible;
padding: 0;
float: none;
width: auto;
@@ -1202,7 +1222,7 @@ $header-tilt: 8deg;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
z-index: $zindex-base + 2;
@include _(box-shadow, inset 0 -13rem 3em -4rem rgba(0, 0, 0, 0.8));
@include _(transition, opacity 250ms ease-in-out);
}
@@ -1267,7 +1287,7 @@ $header-tilt: 8deg;
top: 0;
right: 0;
left: $sidebar-width;
z-index: 1;
z-index: $zindex-base + 2;
}
figure {
@@ -1342,10 +1362,22 @@ $header-tilt: 8deg;
#footer {
position: fixed;
z-index: 1;
bottom: 0;
z-index: $zindex-base + 2;
width: 0;
overflow: visible;
padding: 0;
top: 0;
min-height: 42em;
height: 100%;
left: 0;
width: $sidebar-width;
footer {
position: absolute;
height: 3.5em;
width: $sidebar-width;
bottom: 0;
padding: 1em;
}
.github {
position: absolute;
@@ -1528,7 +1560,7 @@ $header-tilt: 8deg;
@include _(transition, transform 100ms ease-in-out);
&:hover {
z-index: 2;
z-index: $zindex-base + 3;
@include _(transform, scale(1.25));
}
}
@@ -1630,7 +1662,7 @@ $header-tilt: 8deg;
.value {
position: relative;
z-index: 1;
z-index: $zindex-base + 2;
}
.stat-with-label {
@@ -1717,7 +1749,7 @@ $header-tilt: 8deg;
@include _(transition, transform 150ms ease-in-out);
&:hover, &:focus, &:active {
z-index: 1;
z-index: $zindex-base + 2;
@include _(transform, scale(1.1));
}
@@ -1728,7 +1760,7 @@ $header-tilt: 8deg;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
z-index: $zindex-base + 2;
cursor: pointer;
@include _(box-shadow, inset 0em -2em 2em -1em $white);
}
@@ -1745,3 +1777,52 @@ $header-tilt: 8deg;
overflow: hidden;
opacity: 0;
}
@include keyframes(bouncy) {
from { transform: translateY(-0.25em); }
to { transform: translateY(0.25em); }
}
#lingua-franca-pointer {
$colour: $colour-2;
width: 0.6667em;
height: 1.25em;
background-color: $colour;
//border: 1px solid $white;
//opacity: 0.75;
z-index: 1000;
margin-left: -0.5em;
margin-top: -2em;
@include _(mix-blend-mode, multiply);
@include default-box-shadow(top, 2);
@include _(animation, bouncy 1s infinite alternate);
$twidth: 0.8em;
@include after {
content: '';
width: 0;
height: 0;
position: absolute;
border-style: solid;
border-color: $colour transparent transparent;
border-width: $twidth $twidth 0;
top: 100%;
left: -.4em;
}
&.up {
margin-top: 2em;
@include after {
top: auto;
bottom: 100%;
border-color: transparent transparent $colour;
border-width: 0 $twidth $twidth;
}
}
}
.translated-content {
//overflow: auto;
display: inherit;
}
+10 -12
View File
@@ -13,9 +13,9 @@ $bumbleberry-no-markup: true;
li {
display: inline-block;
float: left;
width: 25%;
padding: 1em;
min-width: 10em;
}
a {
@@ -135,6 +135,7 @@ $bumbleberry-no-markup: true;
font-size: 0.65em;
margin-bottom: 1em;
vertical-align: sub;
@include _(text-stroke, 0);
&.special {
background-color: $colour-4;
@@ -348,9 +349,9 @@ html #lingua-franca-translation-form {
@include _(transform, scale(0.75) translate(0, 0));
@include default-box-shadow(top, 2);
@include breakpoint(large) {
left: 8.75rem;
}
//@include breakpoint(large) {
// left: 8.75rem;
//}
}
@include after {
@@ -388,6 +389,9 @@ html #lingua-franca-translation-form {
}
#lingua-franca-translation-history .translation-diff-info,
#lingua-franca-translation-history .diff {
@include clearfix;
}
#lingua-franca-translation-history .diff ul {
list-style: none;
padding: 0;
@@ -430,12 +434,6 @@ html #lingua-franca-translation-form {
}
}
@include breakpoint(large) {
.lingua-franca-translations {
left: $sidebar-width;
}
.actions {
margin-top: 1em;
}
.actions {
margin-top: 1em;
}
+1 -1
View File
@@ -49,7 +49,7 @@ class ConferencesController < ApplicationController
@this_conference.info = params[:info]
@this_conference.save
redirect_to edit_conference_path @this_conference
redirect_to edit_conference_path(@this_conference)
end
def hosts
+25 -13
View File
@@ -384,6 +384,29 @@ module ApplicationHelper
end
end
def m(*args)
_(*args) { |t|
markdown(t).html_safe
}
end
def markdown(object, attribute = nil)
return '' unless object
content = attribute ? object.send(attribute.to_s) : object
@markdown ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML.new({
filter_html: true,
hard_wrap: true,
space_after_headers: true,
fenced_code_blocks: true,
link_attributes: { target: "_blank" }
}), {
autolink: true,
disable_indented_code_blocks: true,
superscript: true
})
@markdown.render(content)
end
def paragraph(object, attribute = nil)
return '' unless object
content = attribute ? object.send(attribute.to_s) : object
@@ -400,18 +423,7 @@ module ApplicationHelper
result = '<p>' + result + '</p>'
end
else
@markdown ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML.new({
filter_html: true,
hard_wrap: true,
space_after_headers: true,
fenced_code_blocks: true,
link_attributes: { target: "_blank" }
}), {
autolink: true,
disable_indented_code_blocks: true,
superscript: true
})
result = @markdown.render(content)
result = markdown(object, attribute)
end
result.html_safe
end
@@ -625,7 +637,7 @@ module ApplicationHelper
end
def nav_link(link, title)
link_to title, link, :class => (current_page?(link) ? 'current' : nil)
link_to "<span>#{title}</span>".html_safe, link, :class => (current_page?(link) ? 'current' : nil)
end
def date(date, format = :long)
+2 -2
View File
@@ -3,9 +3,9 @@
- style = nil
- cover = nil
- figure = nil
- if capable_of(:css_mixblendmode) || ENV['RAILS_ENV'] == 'test'
- if capable_of(:css_mixblendmode)
- cover = "<div class=\"cover\" style=\"background-image: url(#{image})\"></div>"
- elsif capable_of(:svg)
- elsif capable_of(:svg) && Rails.env != 'test'
- banner_image = 'application/banner_image.svg'
- else
- style = "background-image: url(#{image})"
@@ -2,4 +2,4 @@
= columns(medium: 12) do
%h2=_'articles.permission_denied.headings.confirmation_sent','Confirmation Sent'
= columns(medium: 6) do
=paragraph _('articles.permission_denied.paragraphs.confirmation_sent', :p)
=m('articles.permission_denied.paragraphs.confirmation_sent', :p)
@@ -3,4 +3,4 @@
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.email_confirm','Please confirm your email address'
= columns(medium: 12) do
=paragraph _('articles.conference_registration.paragraphs.email_confirm', :p)
=m('articles.conference_registration.paragraphs.email_confirm', :p)
+2 -2
View File
@@ -5,12 +5,12 @@
- if @email_sent == :yes
%p=_('articles.conference_registration.paragraphs.participants_emailed',"All participants of #{@this_conference.title} have been emailed.", :vars => {:conference_title => @this_conference.title})
- if @email_sent != :yes
=paragraph(_'articles.conference_registration.paragraphs.Email_Participants','This page is used to contact all participants. Text can be entered as [Markdown](http://daringfireball.net/projects/markdown/basics). Pressing \'test\' will send the email only to you, make sure you do this and use caution in general before pressing \'send\'')
=m('articles.conference_registration.paragraphs.Email_Participants','This page is used to contact all participants. Text can be entered as [Markdown](http://daringfireball.net/projects/markdown/basics). Pressing \'test\' will send the email only to you, make sure you do this and use caution in general before pressing \'send\'')
- if @email_sent == :yes || @email_sent == :preview
%h2=_'articles.conference_registration.headings.Preview'
.email-preview
%h3=@subject
=paragraph @content
=markdown @content
- if @email_sent != :yes
= form_tag broadcast_path(@this_conference.slug), class: 'composition' do
- if @email_sent == :preview
+21 -19
View File
@@ -1,19 +1,21 @@
%nav#main-nav
= link_to '/', :class => 'logo' do
= svg_sprite('icons', "bb-icon-logo", "Logo")
= svg_sprite('icons', "bb-icon-logo-text", "Logo Text")
.nav
= nav_link home_path, (@conference ? @conference.title : 'Bike!Bike!')
= nav_link about_path, (_'page_titles.About_BikeBike')
= nav_link policy_path, (_'page_titles.Safe_Space_Policy')
.actions
- if @conference.registration_open
- if params[:action] != 'register' && !@registration
= link_to register_path(@conference.slug), class: [:button, :register] do
=_'conference.actions.Register'
- else
= render 'shared/donate_button', :email_address => (@conference.paypal_email_address || @conference.email_address)
- if current_user
= form_tag :logout, class: :logout do
=hidden_field_tag :url, request.fullpath
=button_tag :Log_out
%nav
#main-nav
.inner-nav
= link_to '/', :class => 'logo' do
= svg_sprite('icons', "bb-icon-logo", "Logo")
= svg_sprite('icons', "bb-icon-logo-text", "Logo Text")
.nav
= nav_link home_path, (@conference ? @conference.title : 'Bike!Bike!')
= nav_link about_path, (_'page_titles.About_BikeBike')
= nav_link policy_path, (_'page_titles.Safe_Space_Policy')
.actions
- if @conference.registration_open
- if params[:action] != 'register' && !@registration
= link_to register_path(@conference.slug), class: [:button, :register] do
=_'conference.actions.Register'
- else
= render 'shared/donate_button', :email_address => (@conference.paypal_email_address || @conference.email_address)
- if current_user
= form_tag :logout, class: :logout do
=hidden_field_tag :url, request.fullpath
=button_tag :Log_out
+1 -1
View File
@@ -1 +1 @@
=paragraph @content
=markdown @content
+2 -2
View File
@@ -13,7 +13,7 @@
%li
=link_to view_workshop_path(@this_conference.slug, w.id) do
%h4=_!(w.title)
=paragraph _!(w.info)
=markdown _!(w.info)
= link_to (_'actions.workshops.create','New Workshop'), create_workshop_path(@this_conference.slug), class: :button
= row do
%ul.workshop-previews
@@ -23,4 +23,4 @@
= columns(medium: 6) do
=link_to view_workshop_path(@this_conference.slug, w.id) do
%h4=_!(w.title)
=paragraph _!(w.info)
=markdown _!(w.info)
+1 -1
View File
@@ -4,7 +4,7 @@
= form_tag save_workshop_path(@this_conference.slug), class: 'composition' do
= (hidden_field_tag :workshop_id, @workshop.id) if @workshop
= columns(medium: 12) do
=paragraph(_'articles.workshops.paragraphs.new_workshop','Please accurately describe your workshop in detail. This will help hosts decide if they wish to add it to the schedule and when it should best be scheduled. Enter normal text but if you want to get fancy you can use [Markdown](http://daringfireball.net/projects/markdown/basics).').html_safe
=m('articles.workshops.paragraphs.new_workshop','Please accurately describe your workshop in detail. This will help hosts decide if they wish to add it to the schedule and when it should best be scheduled. Enter normal text but if you want to get fancy you can use [Markdown](http://daringfireball.net/projects/markdown/basics).')
.text-field.input-field.big
= label_tag :title
= text_field_tag :title, @title, :required => true
+2 -2
View File
@@ -3,7 +3,7 @@
= row do
= columns(medium: 12) do
%h2=_!@workshop.title
=paragraph _!(@workshop.info) || ''
=markdown _!(@workshop.info) || ''
= columns(medium: 6) do
%h3=_'articles.workshops.headings.facilitators'
.facilitators
@@ -28,7 +28,7 @@
- if @workshop.notes
= columns(medium: 12) do
%h3=_'articles.workshops.headings.notes','Notes'
=paragraph _!(@workshop.notes)
=markdown _!(@workshop.notes)
= columns(medium: 12) do
.actions
= (link_to (_'actions.workshops.Edit'), edit_workshop_path(@this_conference.slug, @workshop.id), :class => 'button modify') if @workshop.can_edit?(current_user)