localize devise mailer + fix js bug in safari when uploading theme assets

This commit is contained in:
dinedine 2010-06-30 17:41:54 +02:00
parent a6bde2b8e5
commit 9797d6d137
11 changed files with 536 additions and 67 deletions

View File

@ -25,8 +25,8 @@
= f.custom_input :plain_text, :css => 'full', :with_label => false do
%code{ :class => (@asset.size && @asset.size > 40000 ? 'nude' : (@asset.content_type || 'stylesheet')) }
= f.text_area :plain_text
%li.more
= link_to t('.picker_link'), admin_theme_assets_path, :id => 'asset-picker-link'
.more
= link_to t('.picker_link'), admin_theme_assets_path, :id => 'asset-picker-link'
%span.alt
= t('admin.theme_assets.form.choose_file')

View File

@ -1,8 +0,0 @@
%p
Welcome
= @resource.email
\!
%p
You can confirm your account through the link below:
%p
= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token)

View File

@ -1,12 +0,0 @@
%p
Hello
= @resource.email
\!
%p
Someone has requested a link to change your password, and you can do this through the link below.
%p
= link_to 'Change my password', edit_admin_password_url(@resource, :reset_password_token => @resource.reset_password_token)
%p
If you didn't request this, please ignore this email.
%p
Your password won't change until you access the link above and create a new one.

View File

@ -1,10 +0,0 @@
%p
Hello
= @resource.email
\!
%p
Your account has been locked due to an excessive amount of unsuccessful sign in attempts.
%p
Click the link below to unlock your account:
%p
= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token)

View File

@ -119,7 +119,7 @@ Devise.setup do |config|
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "sessions/users/new". It's turned off by default because it's slower if you
# are using only default views.
# config.scoped_views = true
config.scoped_views = true
# By default, devise detects the role accessed based on the url. So whenever
# accessing "/users/sign_in", it knows you are accessing an User. This makes

View File

@ -19,3 +19,352 @@ fr:
login: Se connecter
send_password: Envoyer
change_password: Changer
fr:
admin:
buttons:
login: Se connecter
send_password: Envoyer
change_password: Mettre à jour
new_item: "+ ajouter"
messages:
confirm: "Êtes-vous sûr(e) ?"
shared:
header:
welcome: Bonjour, {{name}}
see: Voir le site web
logout: Se déconnecter
menu:
contents: Contenu
assets: Média
settings: Paramètres
pages: Pages
layouts: Gabarits
snippets: Snippets
account: Mon compte
site: Site
theme_assets: Fichiers Thème
footer:
developed_by: Service développé par
powered_by: et propulsé par
form_actions:
back: Retour sans sauvegarder
create: Créer
update: Mettre à jour
custom_fields:
edit:
title: Editer champ personnalisé
kind:
string: Texte
text: Zone de texte
category: Liste déroulante
boolean: Case à cocher
date: Date
file: Fichier
text_formatting:
none: Aucun
html: HTML
edit_field:
title: Editer champ
edit_category:
title: Editer options
help: Gèrer la liste des options de votre liste déroulante
collection_label: List des options
custom_form:
edit_categories: Editer options
delete_file: Supprimer fichier
sessions:
new:
title: Connexion
link: "J'ai oublié mon mot de passe"
email: "Email"
password: "Mot de passe"
passwords:
new:
title: "Mot de passe oublié"
link: "→ Retour page de connexion"
email: "Votre email"
edit:
title: Changer mon mot de passe
link: "→ Retour page de connexion"
password: "Votre email"
password_confirmation: "Confirmation nouveau mot de passe"
pages:
index:
title: Liste des pages
help: "Les pages sont organisées sous forme d'un arbre. Vous pouvez classes les pages ainsi que les dossiers."
no_items: "Il n'existe pas de page. Vous pouvez commencer par créer une <a href='{{url}}'>ici</a>."
new: nouvelle page
lastest_items: Dernières pages
new:
title: Nouvelle page
help: "Remplissez le formulaire ci-dessous pour créer votre page. Attention, par défaut, la page n'est pas publiée."
page:
updated_at: Mise à jour le
edit:
show: voir
help: "Le titre de la page est modifiable en cliquant dessus."
ask_for_title: "Veuillez entrer le nouveau titre"
messages:
successful_create: "La page a été créée avec succès."
successful_update: "La page a été mise à jour avec succès."
successful_destroy: "La page a été supprimée avec succès."
successful_sort: "Les pages ont été ordonnées avec succès."
failed_create: "La page n'a pas été créée."
failed_update: "La page n'a pas été mise à jour."
form:
expiration:
never: Jamais
hour: 1 heure
day: 1 jour
week: 1 semaine
month: 1 mois
# layouts:
# index:
# title: Listing layouts
# help: "Layouts give the look of a page (1, 2 or many columns)."
# no_items: "There are no layouts for now. Just click <a href=\"{{url}}\">here</a> to create the first one."
# new: new layout
# new:
# title: New layout
# help: "Fill in the form below to create your layout."
# edit:
# title: Editing layout
# help: "Fill in the form below to update your layout."
# new: new layout
# layout:
# updated_at: Updated at
# messages:
# successful_create: "Layout was successfully created."
# successful_update: "Layout was successfully updated."
# successful_destroy: "Layout was successfully deleted."
# failed_create: "Layout was not created."
# failed_update: "Layout was not updated."
#
# snippets:
# index:
# title: Listing snippets
# help: "Snippets are portion of HTML code which can be found at different places within the site (such as a footer)."
# no_items: "There are no snippets for now. Just click <a href=\"{{url}}\">here</a> to create the first one."
# new: new snippet
# new:
# title: New snippet
# help: "Fill in the form below to update your snippet."
# edit:
# title: Editing snippet
# help: "Fill in the form below to update your snippet."
# snippet:
# updated_at: Updated at
# messages:
# successful_create: "Snippet was successfully created."
# successful_update: "Snippet was successfully updated."
# successful_destroy: "Snippet was successfully deleted."
# failed_create: "Snippet was not created."
# failed_update: "Snippet was not updated."
#
# sites:
# new:
# title: New site
# help: "Fill in the form below to create your new site."
# messages:
# successful_create: "Site was successfully created."
# failed_create: "Site was not created."
#
# current_sites:
# edit:
# new_membership: add account
# help: "The site name can be updated by clicking it."
# ask_for_name: "Please type the new site name"
# messages:
# successful_update: "My site was successfully updated."
# failed_update: "My site was not updated."
#
# memberships:
# new:
# title: New membership
# help: "Please give the account email to add. If it does not exist, you will be redirected to the account creation form."
# messages:
# successful_create: "Membership was successfully created."
# failed_create: "Membership was not created."
#
# accounts:
# new:
# title: New account
# messages:
# successful_create: "Account was successfully created."
# failed_create: "Account was not created."
#
# my_accounts:
# edit:
# help: "Your name can be updated by clicking it."
# new_site: new site
# en: English
# fr: French
# ask_for_name: "Please type your new name"
# messages:
# successful_update: "My account was successfully updated."
# failed_update: "My account was not updated."
#
# theme_assets:
# index:
# title: Listing theme files
# help: "Theme assets represent files needed by layouts and snippets. If you need to manage an image gallery, go to the Assets section instead."
# new: new file
# css_and_js: Style and javascript
# images: Images
# no_items: "There are no files for now. Just click <a href=\"{{url}}\">here</a> to create the first one."
# new:
# title: New file
# help: "You have the choice to either upload any file or to copy/paste a stylesheet or a javascript in plain text."
# edit:
# title: "Editing {{file}}"
# help: "You can use it by copying/pasting the following url: {{url}}"
# form:
# picker_link: Insert a file into the code
# choose_file: Choose file
# choose_plain_text: Choose plain text
# images:
# title: Listing images
# no_items: "There are no files for now."
# messages:
# successful_create: "File was successfully created."
# successful_update: "File was successfully updated."
# successful_destroy: "File was successfully deleted."
# failed_create: "File was not created."
# failed_update: "File was not updated."
#
# asset_collections:
# index:
# title: Asset collections
# help: "The collection name can be updated by clicking it. You can customize assets in a collection by adding new fields."
# new: new collection
# no_items: "There are no collections for now. Just click <a href=\"{{url}}\">here</a> to create the first one."
# new:
# title: New collection
# help: "For now, just type a name. Other settings will come once the form is sent."
# edit:
# help: "The collection name can be updated by clicking it. You can customize assets in a collection by adding new fields."
# add_asset: add asset
# destroy: remove collection
# no_items: "There are no assets for now. Just click <a href=\"{{url}}\">here</a> to create the first one."
# ask_for_name: "Please type the new name"
# messages:
# successful_create: "Collection was successfully created."
# successful_update: "Collection was successfully updated."
# successful_destroy: "Collection was successfully deleted."
# failed_create: "Collection was not created."
# failed_update: "Collection was not updated."
#
# assets:
# new:
# title: New asset
# help: "Fill in the form below to create your asset."
# edit:
# title: Edit asset
# help: "Fill in the form below to update your asset."
# messages:
# successful_create: "Asset was successfully created."
# successful_update: "Asset was successfully updated."
# successful_destroy: "Asset was successfully deleted."
# failed_create: "Asset was not created."
# failed_update: "Asset was not updated."
#
# content_types:
# index:
# new: new model
# new:
# title: New model
# help: "Create your own data model (Projects, People, ...etc). Your model should have one field at least. The items created from this content type would have their first field mandatory."
# edit:
# title: Editing model
# help: "Your model should have one field at least. The items created from this content type would have their first field mandatory."
# show_items: show items
# new_item: new item
# form:
# order_by:
# updated_at: 'By "updated at" date'
# position_in_list: Manually
# messages:
# successful_create: "Model was successfully created."
# successful_update: "Model was successfully updated."
# successful_destroy: "Model was successfully deleted."
# failed_create: "Model was not created."
# failed_update: "Model was not updated."
#
# contents:
# index:
# title: 'Listing "{{type}}"'
# edit: edit model
# destroy: remove model
# download: download items
# new: new item
# category_noname: "No name"
# lastest_items: "Lastest items"
# updated_at: "Updated at"
# list:
# no_items: "There are no items for now. Just click <a href=\"{{url}}\">here</a> to create the first one."
# new:
# title: '{{type}} &mdash; new item'
# edit:
# title: '{{type}} &mdash; editing item'
# messages:
# successful_create: "Content was successfully created."
# successful_update: "Content was successfully updated."
# successful_destroy: "Content was successfully deleted."
# failed_create: "Content was not created."
# failed_update: "Content was not updated."
#
# formtastic:
# titles:
# information: General information
# meta: SEO Metadata
# code: Code
# credentials: Credentials
# language: Language
# sites: Sites
# access_points: Access points
# memberships: Accounts
# membership_email: Account email
# file: File
# preview: Preview
# options: Advanced options
# custom_fields: Custom fields
# other_fields: Other information
# presentation: Presentation
# attributes: Attributes
# labels:
# theme_asset:
# new:
# source: File
# edit:
# source: Replace file
# custom_fields:
# field:
# _alias: Alias
#
# hints:
# page:
# keywords: "Meta keywords used within the head tag of the page. They are separeted by an empty space. Required for SEO."
# description: "Meta description used within the head tag of the page. Required for SEO."
# published: "Only authenticated accounts can view unpublished pages."
# cache_expires_in: "Cache the page for better performance. Pressing shift-reload in the browser will regenerate the page."
# snippet:
# slug: "You need to know it in order to insert the snippet inside a page or a layout"
# site:
# domain_name: "ex: locomotiveapp.org"
# theme_asset:
# slug: "You do not need to add the extension file (.css or .js)"
# edit:
# source: "You can replace it by a file of the same extension"
# custom_fields:
# field:
# _alias: "Property available in liquid templates"
# hint: "Text displayed in the model form just below the field"
#

View File

@ -27,4 +27,129 @@ fr:
even: "doit être pair"
domain_taken: "{{value}} a été déjà pris"
missing_content_for_layout: "doit contenir le tag liquid 'content_for_layout'"
invalid_domain: "{{value}} n'est pas valide"
missing_content_for_layout: "doit contenir le tag liquid 'content_for_layout'"
needs_admin_account: "Un minimum d'un scompte admin est requis"
protected_page: "Vous ne pouvez pas supprimer les pages index et 404"
extname_changed: "Nouveau fichier n'a pas l'extension original"
array_too_short: "est trop petit (le nombre minimum d'éléments est {{count}})"
liquid_syntax_error: "Erreur de syntaxe dans les sections de page, veuillez vérifier la syntaxe"
attributes:
defaults:
pages:
index:
title: "Page d'accueil"
body: "Contenu de la page d'accueil"
"404":
title: "Page non trouvée"
body: "Contenu de la page d'erreur 404"
other:
body: "Le contenu va ici"
page_parts:
name: "Corps"
pagination:
previous: "&laquo; Précédent"
next: "Suivant &raquo;"
date:
formats:
default: "%d/%m/%Y"
short: "%e %b"
long: "%e %B %Y"
long_ordinal: "%e %B %Y"
only_day: "%e"
day_names: [dimanche, lundi, mardi, mercredi, jeudi, vendredi, samedi]
abbr_day_names: [dim, lun, mar, mer, jeu, ven, sam]
month_names: [~, janvier, février, mars, avril, mai, juin, juillet, août, septembre, octobre, novembre, décembre]
abbr_month_names: [~, jan., fév., mar., avr., mai, juin, juil., août, sept., oct., nov., déc.]
order: [ :day, :month, :year ]
pagination:
previous: "&laquo; Précédent"
next: "Suivant &raquo;"
time:
formats:
default: "%d %B %Y %H:%M"
time: "%H:%M"
short: "%d %b %H:%M"
long: "%A %d %B %Y %H:%M:%S %Z"
long_ordinal: "%A %d %B %Y %H:%M:%S %Z"
only_second: "%S"
am: 'am'
pm: 'pm'
datetime:
distance_in_words:
half_a_minute: "une demi-minute"
less_than_x_seconds:
zero: "moins d'une seconde"
one: "moins de 1 seconde"
other: "moins de {{count}} secondes"
x_seconds:
one: "1 seconde"
other: "{{count}} secondes"
less_than_x_minutes:
zero: "moins d'une minute"
one: "moins de 1 minute"
other: "moins de {{count}} minutes"
x_minutes:
one: "1 minute"
other: "{{count}} minutes"
about_x_hours:
one: "environ une heure"
other: "environ {{count}} heures"
x_days:
one: "1 jour"
other: "{{count}} jours"
about_x_months:
one: "environ un mois"
other: "environ {{count}} mois"
x_months:
one: "1 mois"
other: "{{count}} mois"
about_x_years:
one: "environ un an"
other: "environ {{count}} ans"
over_x_years:
one: "plus d'un an"
other: "plus de {{count}} ans"
prompts:
year: "Année"
month: "Mois"
day: "Jour"
hour: "Heure"
minute: "Minute"
second: "Seconde"
number:
format:
precision: 3
separator: ','
delimiter: ' '
currency:
format:
unit: '€'
precision: 2
format: '%n %u'
human:
format:
precision: 2
storage_units:
format: '%n %u'
units:
byte: 'Octet'
kb: 'ko'
mb: 'Mo'
gb: 'Go'
tb: 'To'
support:
array:
sentence_connector: 'et'
skip_last_comma: true
words_connector: ", "
two_words_connector: " et "
last_word_connector: " et "

View File

@ -7,30 +7,56 @@ en:
devise:
failure:
unauthenticated: 'You need to sign in or sign up before continuing.'
unconfirmed: 'You have to confirm your account before continuing.'
locked: 'Your account is locked.'
invalid: 'Invalid email or password.'
invalid_token: 'Invalid authentication token.'
timeout: 'Your session expired, please sign in again to continue.'
inactive: 'Your account was not activated yet.'
admin:
unauthenticated: 'You need to sign in or sign up before continuing.'
unconfirmed: 'You have to confirm your account before continuing.'
locked: 'Your account is locked.'
invalid: 'Invalid email or password.'
invalid_token: 'Invalid authentication token.'
timeout: 'Your session expired, please sign in again to continue.'
inactive: 'Your account was not activated yet.'
sessions:
signed_in: 'Signed in successfully.'
signed_out: 'Signed out successfully.'
admin:
signed_in: 'Signed in successfully.'
signed_out: 'Signed out successfully.'
passwords:
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
updated: 'Your password was changed successfully. You are now signed in.'
admin:
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
updated: 'Your password was changed successfully. You are now signed in.'
confirmations:
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
confirmed: 'Your account was successfully confirmed. You are now signed in.'
admin:
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
confirmed: 'Your account was successfully confirmed. You are now signed in.'
registrations:
signed_up: 'You have signed up successfully.'
updated: 'You updated your account successfully.'
destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
admin:
signed_up: 'You have signed up successfully.'
updated: 'You updated your account successfully.'
destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
unlocks:
send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
unlocked: 'Your account was successfully unlocked. You are now signed in.'
admin:
send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
unlocked: 'Your account was successfully unlocked. You are now signed in.'
mailer:
confirmation_instructions: 'Confirmation instructions'
reset_password_instructions: 'Reset password instructions'
unlock_instructions: 'Unlock Instructions'
admin:
confirmation_instructions: 'Confirmation instructions'
reset_password_instructions: 'Reset password instructions'
unlock_instructions: 'Unlock Instructions'
admin:
mailer:
common:
hello: Hello
confirmation_instructions:
you_can_confirm_your_account_through_the_link_below: "You can confirm your account through the link below:"
confirm_my_account: "Confirm my account"
reset_password_instructions:
reset_password_instruction: "Someone has requested a link to change your password, and you can do this through the link below:"
change_my_password: "Change my password"
wrong_request_instruction: "If you didn't request this, please ignore this email."
unchange_password_message: "Your password won't change until you access the link above and create a new one."
unlock_instructions:
locked_account_message: "Your account has been locked due to an excessive amount of unsuccessful sign in attempts."
unlock_account_instruction: "Click the link below to unlock your account:"
unlock_my_account: "Unlock my account"

View File

@ -2,19 +2,19 @@ BOARD:
- refactoring admin crud (pages + layouts + snippets)
- refactor slugify method (use parameterize + create a module)
BACKLOG:
- localize application in French (tork)
- admin
- devise
- carrierwave
- localize devise emails
x default
x devise
x carrierwave
x localize devise emails
- admin
BACKLOG:
- theme assets: disable version if not image
- new custom field types:
- file
- belongs_to => association
- cucumber features for admin pages

View File

@ -38,7 +38,7 @@ var setupUploader = function() {
multipartParams[$('meta[name=csrf-param]').attr('content')] = $('meta[name=csrf-token]').attr('content');
var uploader = new plupload.Uploader({
runtimes : 'html5,flash',
runtimes : (jQuery.browser.webkit == true ? 'flash' : 'html5,flash'),
container: 'theme-images',
browse_button : 'upload-link',
max_file_size : '5mb',

View File

@ -146,10 +146,9 @@ form.formtastic fieldset ol li.code p.inline-errors {
background-image: none;
}
form.formtastic fieldset ol li.more { text-align: right; width: auto; margin-right: 20px; line-height: 0.6em; }
form.formtastic fieldset ol li.more a { text-decoration: none; color: #787A89; font-size: 0.7em; }
form.formtastic fieldset ol li.more a:hover { text-decoration: underline; }
form.formtastic fieldset ol .more { text-align: right; width: auto; margin: 10px 20px 0 0; line-height: 0.6em; }
form.formtastic fieldset ol .more a { text-decoration: none; color: #787A89; font-size: 0.7em; }
form.formtastic fieldset ol .more a:hover { text-decoration: underline; }
/*form.formtastic hr { border-top: 2px solid #ccc; }*/