From da309f03b080a3b3215dcefdadd4bc6f82e26bbe Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Tue, 6 Jan 2009 15:55:29 +0100 Subject: [PATCH] Add missing method for gettext-string-converter. --- app/views/ordering/order.rhtml | 8 ++++---- config/app_config.yml.SAMPLE | 2 ++ config/initializers/gettext_helper.rb | 10 +++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/app/views/ordering/order.rhtml b/app/views/ordering/order.rhtml index 087d66d3..de0cf918 100644 --- a/app/views/ordering/order.rhtml +++ b/app/views/ordering/order.rhtml @@ -125,7 +125,7 @@ <%= button_to_function('-', "decreaseTolerance(#{i})") %> <% end -%> - <%= number_to_currency(article_total, :unit => "") %> <%= l18n.number.currency.format.unit %> + <%= number_to_currency(article_total, :unit => "") %> <%= L18n.number.currency.format.unit %> <% unless order_article.article.note.empty? -%> @@ -139,7 +139,7 @@ - <%=_ "Total amount" %>: <%= total %> <%= l18n.number.currency.format.unit %> + <%=_ "Total amount" %>: <%= total %> <%= L18n.number.currency.format.unit %> @@ -147,7 +147,7 @@ - <%=_ "New account balance"%>: <%= @order_group.account_balance - total %> <%= l18n.number.currency.format.unit %> + <%=_ "New account balance"%>: <%= @order_group.account_balance - total %> <%= L18n.number.currency.format.unit %> <%= link_to_top %> @@ -171,7 +171,7 @@ setGroupBalance(<%= @availableFunds %>); // localization - setDecimalSeparator("<%= l18n.number.currency.format.separator %>"); + setDecimalSeparator("<%= L18n.number.currency.format.separator %>"); // initialize javascript updateBalance(); diff --git a/config/app_config.yml.SAMPLE b/config/app_config.yml.SAMPLE index f9d566e2..5417df25 100644 --- a/config/app_config.yml.SAMPLE +++ b/config/app_config.yml.SAMPLE @@ -26,6 +26,7 @@ development: &defaults - benni@dresdener27.de sender_address: FoodSoft Error email_prefix: "[FoodSoft]" + # Access to sharedLists, the external article-database shared_lists: adapter: mysql @@ -35,6 +36,7 @@ development: &defaults password: encoding: utf8 socket: /opt/lampp/var/mysql/mysql.sock + # auto-units-conversion # this is used for automatic article-synchronization to handle different units # e.g. when foodcoop-unit should be 500g and supplier-unit is 1kg diff --git a/config/initializers/gettext_helper.rb b/config/initializers/gettext_helper.rb index 1de3983e..55514b58 100644 --- a/config/initializers/gettext_helper.rb +++ b/config/initializers/gettext_helper.rb @@ -1,5 +1,5 @@ # Remove this file, when every gettext-method <_("text to translate..")> -# is replaced by rails l18n method: l18n.name.name... +# is replaced by rails L18n method: L18n.name.name... module ActionView class Base @@ -7,4 +7,12 @@ module ActionView text end end +end + +module ActiveRecord + class Base + def _(text) + text + end + end end \ No newline at end of file