From d448707b1a5721397f21a7731825e9777fac8ee4 Mon Sep 17 00:00:00 2001 From: wvengen Date: Thu, 12 Dec 2013 00:13:19 +0100 Subject: [PATCH] i18n cleanup (affects foodcoops#137) --- .../admin/ordergroups/_ordergroups.html.haml | 10 +-- app/views/admin/users/_users.html.haml | 10 +-- app/views/admin/users/show.html.haml | 8 +-- .../admin/workgroups/_workgroups.html.haml | 2 +- app/views/deliveries/_form.html.haml | 18 ++--- app/views/deliveries/show.html.haml | 8 +-- .../_edit_results_by_articles.html.haml | 10 +-- .../balancing/_group_order_articles.html.haml | 2 +- .../balancing/_order_article.html.haml | 4 +- app/views/finance/index.html.haml | 20 +++--- .../finance/invoices/_invoices.html.haml | 2 +- .../ordergroups/_ordergroups.html.haml | 6 +- .../ordergroups/_ordergroups.html.haml | 6 +- .../shared/_articles_by_groups.html.haml | 4 +- app/views/shared/_group.html.haml | 8 +-- config/locales/en.yml | 70 ++----------------- 16 files changed, 64 insertions(+), 124 deletions(-) diff --git a/app/views/admin/ordergroups/_ordergroups.html.haml b/app/views/admin/ordergroups/_ordergroups.html.haml index 54618b6f2..6670c05fc 100644 --- a/app/views/admin/ordergroups/_ordergroups.html.haml +++ b/app/views/admin/ordergroups/_ordergroups.html.haml @@ -4,11 +4,11 @@ %table.table.table-striped %thead %tr - %th= t '.name' - %th= t '.contact' - %th= t '.address' - %th= t '.members' - %th= t 'admin.actions' + %th= heading_helper Ordergroup, :name + %th= heading_helper Ordergroup, :contact + %th= heading_helper Ordergroup, :contact_address + %th= heading_helper Ordergroup, :user_tokens + %th= t 'ui.actions' %tbody - for ordergroup in @ordergroups %tr{:class => cycle('even','odd', :name => 'groups')} diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index 5fd16bf53..95d394647 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -5,12 +5,12 @@ %thead %tr - if FoodsoftConfig[:use_nick] - %th= t '.login' - %th= t '.name' - %th= t '.email' + %th= heading_helper User, :nick + %th= heading_helper User, :name + %th= heading_helper User, :email %th= t 'admin.access_to' - %th= t '.last_login' - %th(colspan="2")= t 'admin.actions' + %th= heading_helper User, :last_login + %th(colspan="2")= t 'ui.actions' %tbody - for user in @users %tr diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 2321ccdb7..21d03e0af 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -7,13 +7,13 @@ %p= t '.member_since', time: distance_of_time_in_words(Time.now, @user.created_on) %dl - if FoodsoftConfig[:use_nick] - %dt= t '.nick' + %dt= heading_helper User, :nick %dd= @user.nick - %dt= t '.name' + %dt= heading_helper User, :name %dd= h @user.name - %dt= t '.email' + %dt= heading_helper User, :email %dd= @user.email - %dt= t '.phone' + %dt= heading_helper User, :phone %dd= @user.phone %dt= t 'admin.access_to' %dd= format_roles(@user) diff --git a/app/views/admin/workgroups/_workgroups.html.haml b/app/views/admin/workgroups/_workgroups.html.haml index c7250e832..fd61b4638 100644 --- a/app/views/admin/workgroups/_workgroups.html.haml +++ b/app/views/admin/workgroups/_workgroups.html.haml @@ -7,7 +7,7 @@ %th= t '.name' %th= t '.members' %th= t 'admin.access_to' - %th= t 'admin.actions' + %th= t 'ui.actions' %tbody - for workgroup in @workgroups %tr diff --git a/app/views/deliveries/_form.html.haml b/app/views/deliveries/_form.html.haml index 3e1a3b6c2..9b4549fe2 100644 --- a/app/views/deliveries/_form.html.haml +++ b/app/views/deliveries/_form.html.haml @@ -87,11 +87,11 @@ %table#stock_articles_for_adding.table.table-hover.stupidtable %thead %tr - %th.default-sort{:data => {:sort => 'string'}}= t '.article' - %th= t '.price' - %th= t '.unit' - %th= t '.category' - %th= t '.actions' + %th.default-sort{:data => {:sort => 'string'}}= Article.model_name.human + %th= heading_helper StockArticle, :price + %th= heading_helper StockArticle, :unit + %th= heading_helper StockArticle, :article_category + %th= t 'ui.actions' %tfoot %tr %th{:colspan => 5} @@ -108,10 +108,10 @@ %thead %tr %th.default-sort{:data => {:sort => 'string'}}= t '.article' - %th= t '.price' - %th= t '.unit' - %th= t '.quantity' - %th= t '.actions' + %th= heading_helper StockArticle, :price + %th= heading_helper StockArticle, :unit + %th= heading_helper StockChange, :quantity + %th= t 'ui.actions' %tbody = f.simple_fields_for :stock_changes do |stock_change_form| = render :partial => 'stock_change_fields', :locals => {:f => stock_change_form} diff --git a/app/views/deliveries/show.html.haml b/app/views/deliveries/show.html.haml index d5df7fd5d..8f2cdeeee 100644 --- a/app/views/deliveries/show.html.haml +++ b/app/views/deliveries/show.html.haml @@ -17,10 +17,10 @@ %table.table.table-striped(style="width:500px") %thead %tr - %th= t '.article' - %th= t '.unit' - %th.numeric= t '.amount' - %th.numeric= t '.price' + %th= Article.model_name.human + %th= heading_helper StockArticle, :unit + %th.numeric= heading_helper StockChange, :quantity + %th.numeric= heading_helper Article, :price %th.numeric= t '.sum' %tbody - total_net, total_gross = 0,0 diff --git a/app/views/finance/balancing/_edit_results_by_articles.html.haml b/app/views/finance/balancing/_edit_results_by_articles.html.haml index 0ab5e81e5..ab77723e9 100644 --- a/app/views/finance/balancing/_edit_results_by_articles.html.haml +++ b/app/views/finance/balancing/_edit_results_by_articles.html.haml @@ -1,14 +1,14 @@ %table.ordered-articles.table.table-striped %thead %tr - %th= sort_link_helper t('.article'), "name" - %th= sort_link_helper t('.number'), "order_number" + %th= sort_link_helper Article.model_name.human, "name" + %th= sort_link_helper Article.human_attribute_name(:order_number_short), "order_number" %th= t('.amount') - %th= t('.amount_per_unit') + %th= heading_helper Article, :units %th= t('.net') %th= t('.gross') - %th= t('.tax') - %th= t('.refund') + %th= heading_helper Article, :tax + %th= heading_helper Article, :deposit %th{:colspan => "2"} = link_to t('.add_article'), new_finance_order_order_article_path(@order), remote: true, class: 'btn btn-small' diff --git a/app/views/finance/balancing/_group_order_articles.html.haml b/app/views/finance/balancing/_group_order_articles.html.haml index 6689cd95c..2658878b5 100644 --- a/app/views/finance/balancing/_group_order_articles.html.haml +++ b/app/views/finance/balancing/_group_order_articles.html.haml @@ -3,7 +3,7 @@ %thead %tr %td - %td{:style => "width:8em"}= t('.group') + %td{:style => "width:8em"}= Ordergroup.model_name.human %td= t('.units') %td= t('.total') %td{:colspan => "3",:style => "width:14em"} diff --git a/app/views/finance/balancing/_order_article.html.haml b/app/views/finance/balancing/_order_article.html.haml index 8bc4e2684..6512d0c4b 100644 --- a/app/views/finance/balancing/_order_article.html.haml +++ b/app/views/finance/balancing/_order_article.html.haml @@ -5,7 +5,7 @@ = order_article.units_to_order - unless order_article.ordered_quantities_equal_to_group_orders? %span{:style => "color:red;font-weight: bold"} ! -%td= order_article.price.unit_quantity.to_s + ' * ' + order_article.article.unit.to_s +%td #{order_article.price.unit_quantity} × #{order_article.article.unit} %td = number_to_currency(order_article.price.price, :unit => "") :plain @@ -16,7 +16,7 @@ :plain / = number_to_currency(order_article.total_gross_price, :unit => "") -%td= order_article.price.tax +%td #{order_article.price.tax}% %td= order_article.price.deposit %td = link_to t('ui.edit'), edit_finance_order_order_article_path(order_article.order, order_article), remote: true, diff --git a/app/views/finance/index.html.haml b/app/views/finance/index.html.haml index 731528bd2..e2d64811e 100644 --- a/app/views/finance/index.html.haml +++ b/app/views/finance/index.html.haml @@ -8,9 +8,9 @@ %table.table.table-striped %thead %tr - %th= t('.date') - %th.numeric= t('.amount') - %th= t('.supplier') + %th= heading_helper Invoice, :date + %th.numeric= heading_helper Invoice, :amount + %th= heading_helper Invoice, :supplier %th %tbody - for invoice in @unpaid_invoices @@ -26,10 +26,10 @@ %table.table.table-striped %thead %tr - %th= t('.date') - %th= t('.group') - %th= t('.note') - %th.numeric= t('.amount') + %th= heading_helper FinancialTransaction, :created_on + %th= heading_helper FinancialTransaction, :ordergroup + %th= heading_helper FinancialTransaction, :note + %th.numeric= heading_helper FinancialTransaction, :amount %tbody - @financial_transactions.each do |ft| %tr @@ -45,8 +45,8 @@ %table.table.table-striped %thead %tr - %th= t('.supplier') - %th= t('.end') + %th= heading_helper Order, :name + %th= t '.end' %th.numeric= t('.amount_fc') %th %tbody @@ -55,6 +55,6 @@ %td= order.name %td= format_date(order.ends) %td.numeric= number_to_currency(order.sum(:fc)) - %td= link_to t('.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-mini' + %td= link_to t('finance.balancing.orders.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-mini' - else = t('.everything_cleared') diff --git a/app/views/finance/invoices/_invoices.html.haml b/app/views/finance/invoices/_invoices.html.haml index 621a08fee..0d3920efc 100644 --- a/app/views/finance/invoices/_invoices.html.haml +++ b/app/views/finance/invoices/_invoices.html.haml @@ -23,7 +23,7 @@ %td= format_date invoice.date %td= format_date invoice.paid_on %td= number_to_currency invoice.amount - %td= link_to t('.delivery'), [invoice.supplier,invoice.delivery] if invoice.delivery + %td= link_to Delivery.model_name.human, [invoice.supplier,invoice.delivery] if invoice.delivery %td= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order %td= truncate(invoice.note) %td= link_to t('ui.edit'), edit_finance_invoice_path(invoice), class: 'btn btn-mini' diff --git a/app/views/finance/ordergroups/_ordergroups.html.haml b/app/views/finance/ordergroups/_ordergroups.html.haml index 4e67df731..058feceee 100644 --- a/app/views/finance/ordergroups/_ordergroups.html.haml +++ b/app/views/finance/ordergroups/_ordergroups.html.haml @@ -4,9 +4,9 @@ %table.table.table-striped %thead %tr - %th= sort_link_helper t('.name'), "name", :per_page => @per_page - %th= t '.contact' - %th.numeric= sort_link_helper t('.account_balance'), "account_balance", :per_page => @per_page + %th= sort_link_helper heading_helper(Ordergroup, :name), "name", :per_page => @per_page + %th= heading_helper Ordergroup, :contact + %th.numeric= sort_link_helper heading_helper(Ordergroup, :account_balance), "account_balance", :per_page => @per_page %th %tbody - for ordergroup in @ordergroups diff --git a/app/views/foodcoop/ordergroups/_ordergroups.html.haml b/app/views/foodcoop/ordergroups/_ordergroups.html.haml index 20fbd0c95..b8b34084b 100644 --- a/app/views/foodcoop/ordergroups/_ordergroups.html.haml +++ b/app/views/foodcoop/ordergroups/_ordergroups.html.haml @@ -5,9 +5,9 @@ %table.table.table-striped %thead %tr - %th= t '.name' - %th= t '.user' - %th= t '.last_ordered' + %th= heading_helper Ordergroup, :name + %th= heading_helper Ordergroup, :user_tokens + %th= heading_helper Ordergroup, :last_ordered %tbody - for ordergroup in @ordergroups diff --git a/app/views/shared/_articles_by_groups.html.haml b/app/views/shared/_articles_by_groups.html.haml index 9470fb490..b55c7c1cf 100644 --- a/app/views/shared/_articles_by_groups.html.haml +++ b/app/views/shared/_articles_by_groups.html.haml @@ -1,7 +1,7 @@ %table.table.table-hover %thead %tr - %th{:style => "width:40%"}= t '.name' + %th{:style => "width:40%"}= heading_helper Article, :name %th %acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered' %th @@ -10,7 +10,7 @@ %acronym{:title => t('.fc_price_desc')}= t '.fc_price' %th %acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity' - %th= t '.unit' + %th= heading_helper Article, :unit %th= t '.price' - for group_order in order.group_orders.ordered diff --git a/app/views/shared/_group.html.haml b/app/views/shared/_group.html.haml index ebd344058..3de9b38c2 100644 --- a/app/views/shared/_group.html.haml +++ b/app/views/shared/_group.html.haml @@ -1,14 +1,14 @@ %dl - %dt= t('.description') + ':' + %dt= heading_helper(Ordergroup, :description) + ':' %dd=h group.description - if group.is_a?(Ordergroup) and (@current_user.role_admin? or @current_user.role_finance?) - %dt= t('.contact') + ':' + %dt= heading_helper(Ordergroup, :contact) + ':' %dd=h group.contact - %dt= t('.address') + ':' + %dt= heading_helper(Ordergroup, :contact_address) + ':' %dd= link_to_gmaps group.contact_address %dt= t('.access') + ':' %dd= format_roles(group) - %dt= t('.members') + ':' + %dt= heading_helper(Ordergroup, :user_tokens) + ':' %dd - members = group.users = "(#{members.size})" diff --git a/config/locales/en.yml b/config/locales/en.yml index 2d80d0a71..a2c871788 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -15,6 +15,7 @@ en: name: Name note: Note order_number: Order number + order_number_short: Nr. origin: Origin price: Price (net) supplier: Supplier @@ -81,6 +82,7 @@ en: ordergroup: account_balance: Account balance available_funds: Available credit + contact: Contact contact_address: Address contact_person: Contact person contact_phone: Phone @@ -131,6 +133,7 @@ en: user: email: Email first_name: First name + last_login: Last login last_name: Last name name: Name nick: Username @@ -177,7 +180,6 @@ en: workgroup: Workgroup admin: access_to: access to - actions: Actions base: index: all_ordergroups: All ordergroups @@ -215,11 +217,6 @@ en: workgroup: workgroup new: title: Create ordergroup - ordergroups: - address: Address - contact: Contact - members: Members - name: Name show: confirm: Are you sure? edit: Edit group/members @@ -238,20 +235,11 @@ en: title: Create new user show: confirm: Do you really want to kick out %{user}? - email: Email groupabos: Group subscriptions member_since: Member since %{time} - name: Name - nick: Nick person: Person - phone: Phone preference: Preferences send_message: Send message - users: - email: email - last_login: last login - login: login - name: name workgroups: destroy: error: ! 'Workgroup could not be deleted: %{error}' @@ -339,15 +327,6 @@ en: submit: Update all articles title: Edit all articles from %{supplier} warning: ! 'Warning: all articles will be updated!' - edit_all_table: - available_desc: available - available_short: avail - order_number_desc: Order number - order_number_short: Ordernr. - price_desc: Net price - price_short: Price - unit_quantity_desc: Unit quantity - unit_quantity_short: Quantity form: title_edit: Edit article title_new: Add new article @@ -414,17 +393,11 @@ en: edit: title: Edit delivery form: - actions: Tasks - article: Article - category: Category create_from_blank: Create new article create_stock_article: Create stock article - price: Netprice - quantity: Quantity title_fill_quantities: 2. Set delivery quantities title_finish_delivery: 3. Finish delivery title_select_stock_articles: 1. Select stock articles - unit: Unit index: confirm_delete: Are you sure? new_delivery: ! 'Create new delivery for %{supplier} ' @@ -434,16 +407,12 @@ en: new: title: New delivery from %{supplier} show: - amount: Amount - article: Article - price: Netprice sum: Sum sum_diff: Gross - adjusted invoice amount sum_gross: Gross sum sum_net: Net sum title: Show delivery - title_articles: Article - unit: Unit + title_articles: Articles stock_article_for_adding: action_add_to_delivery: Add to delivery action_edit: Edit @@ -530,16 +499,10 @@ en: edit_results_by_articles: add_article: Add article amount: Amount - amount_per_unit: Unit quantity * Unit - article: Article gross: Gross net: Net - number: Nr. - refund: Deposit - tax: Tax group_order_articles: add_group: Add group - group: Group total: Total costs total_fc: Sum (FC-price) units: Units @@ -626,18 +589,12 @@ en: amount_change_for: Change amount for %{article} result_hint: ! 'Unit: %{unit}' index: - amount: Amount amount_fc: Amount(FC) - clear: To account - date: Date end: End everything_cleared: Great, everything is accounted... - group: Group last_transactions: Recent transactions - note: Note open_transactions: Unsettled orders show_all: show all - supplier: Supplier title: Finances unpaid_invoices: Unpaid invoices invoices: @@ -648,7 +605,6 @@ en: title: Invoices invoices: confirm_delete: Are you sure? - delivery: Delivery linked: This invoice is linked to %{what_link}. linked_delivery: a delivery linked_order: an order @@ -670,10 +626,7 @@ en: search_placeholder: Search ... title: Manage accounts ordergroups: - account_balance: Account balance account_statement: Account statement - contact: Contact - name: Name new_transaction: New transaction update: notice: Invoice was updated @@ -684,10 +637,6 @@ en: only_active: Only active groups only_active_desc: (have placed order at least once in the last 3 months) title: Ordergroups - ordergroups: - last_ordered: Last ordered - name: Name - user: Users users: index: body:

Here you can write a message to the members of your Foodcoop.

You have to approve in your %{profile_link} that your contact details are visible.

@@ -821,12 +770,8 @@ en: last_update: Last update was %{when} ago title: My ordergroup transactions: - amount: Amount - note: Note title: Last Transactions view: Show account statement - when: When - where: Who ordergroup: title: Engagement of your ordergroup tasks_move: @@ -1310,20 +1255,14 @@ en: articles_by_groups: fc_price: FC-Price fc_price_desc: Price including taxes, deposit and Foodcoop-charge - name: Name price: Total price - unit: Unit unit_quantity: Lot quantity unit_quantity_desc: How many units per lot. group: access: Access to activated: activated - address: Address apple_limit: Apple points order limit - contact: Contact deactivated: deactivated - description: Description - members: Members no_weekly_job: No weekly job defined weekly_job: Weekly job group_form_fields: @@ -1553,6 +1492,7 @@ en: title: Tasks for %{workgroup} title_all: All group tasks ui: + actions: Actions close: Close delete: Delete edit: Edit