Permalink
Browse files

Localizing datepicker.

This localizes the jQuery datepicker used in admin views.
  • Loading branch information...
Thomas von Deyen authored and radar committed Apr 27, 2012
1 parent 9126da0 commit e5f168009b613c17c25cc5a8c3e32d789d9ab15d
Showing with 9 additions and 1 deletion.
  1. +7 −1 core/app/assets/javascripts/admin/admin.js.erb
  2. +2 −0 core/config/locales/en.yml
@@ -1,3 +1,4 @@
<%# encoding: utf-8 %>
//= require_self
/**
@@ -206,7 +207,12 @@ $(".observe_field").live('change', function() {
handle_date_picker_fields = function(){
$('.datepicker').datepicker({
dateFormat: 'yy/mm/dd',
dateFormat: "<%= ::I18n.t(:format, :scope => 'spree.date_picker', :default => 'yy/mm/dd') %>",
dayNames: ["<%= ::I18n.t(:day_names, :scope => :date).join('","') %>"],
dayNamesMin: ["<%= ::I18n.t(:abbr_day_names, :scope => :date).join('","') %>"],
monthNames: ["<%= ::I18n.t(:month_names, :scope => :date).join('","') %>"],
prevText: '<%= ::I18n.t(:previous) %>',
nextText: '<%= ::I18n.t(:next) %>',
showOn: "button",
buttonImage: "<%= asset_path 'datepicker/cal.gif' %>",
buttonImageOnly: true
@@ -942,6 +942,8 @@ en:
special_instructions: "Special Instructions"
spree:
date: Date
date_picker:
format: 'yy/mm/dd'
time: Time
spree_gateway_error_flash_for_checkout: "There was a problem with your payment information. Please check your information and try again."
spree_inventory_error_flash_for_insufficient_quantity: "An item in your cart has become unavailable."

0 comments on commit e5f1680

Please sign in to comment.