diff --git a/.gitignore b/.gitignore
index d26b8ce7..a3389c40 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
log/*.log
tmp/**/*
-config/*.yml
+config/app_config.yml
+config/database.yml
config/initializers/secret_token.rb
db/*.sqlite3
nbproject/
@@ -16,4 +17,4 @@ doc/app/
Capfile
config/deploy.rb
config/deploy/*
-.localeapp
\ No newline at end of file
+.localeapp
diff --git a/Gemfile b/Gemfile
index e80314ed..3be7cf8c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -9,24 +9,26 @@ gem "rails", '~> 3.2.9'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
-
+ gem 'less-rails'
+ gem 'uglifier', '>= 1.0.3'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
-
- gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'select2-rails'
gem 'bootstrap-datepicker-rails'
-
+gem 'rails-assets-listjs', '0.2.0.beta.4' # remember to maintain list.*.js plugins and template engines on update
+gem 'i18n-js', git: 'git://github.com/fnando/i18n-js.git' # to avoid US-ASCII js.erb error
+gem 'rails-i18n'
gem 'mysql2'
gem 'prawn'
gem 'haml-rails'
gem 'kaminari'
-gem 'client_side_validations'
gem 'simple_form'
+gem 'client_side_validations'
+gem 'client_side_validations-simple_form'
gem 'inherited_resources'
gem 'localize_input', git: "git://github.com/bennibu/localize_input.git"
gem 'wikicloth'
@@ -42,7 +44,7 @@ gem 'resque'
gem 'whenever', require: false # For defining cronjobs, see config/schedule.rb
group :production do
- gem 'exception_notification', require: 'exception_notifier'
+ gem 'exception_notification'
end
group :development do
diff --git a/Gemfile.lock b/Gemfile.lock
index c816b8c4..4c756a49 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -4,6 +4,13 @@ GIT
specs:
localize_input (0.1.0)
+GIT
+ remote: git://github.com/fnando/i18n-js.git
+ revision: eab4137f83777963f0ebe6960704a7f64fd8911d
+ specs:
+ i18n-js (2.1.2)
+ i18n
+
GIT
remote: git://github.com/technoweenie/acts_as_versioned.git
revision: 63b1fc8529d028fae632fe80ec0cb25df56cd76b
@@ -15,12 +22,12 @@ GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.0.2)
- actionmailer (3.2.13)
- actionpack (= 3.2.13)
- mail (~> 2.5.3)
- actionpack (3.2.13)
- activemodel (= 3.2.13)
- activesupport (= 3.2.13)
+ actionmailer (3.2.15)
+ actionpack (= 3.2.15)
+ mail (~> 2.5.4)
+ actionpack (3.2.15)
+ activemodel (= 3.2.15)
+ activesupport (= 3.2.15)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
@@ -28,31 +35,33 @@ GEM
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
- activemodel (3.2.13)
- activesupport (= 3.2.13)
+ activemodel (3.2.15)
+ activesupport (= 3.2.15)
builder (~> 3.0.0)
- activerecord (3.2.13)
- activemodel (= 3.2.13)
- activesupport (= 3.2.13)
+ activerecord (3.2.15)
+ activemodel (= 3.2.15)
+ activesupport (= 3.2.15)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.13)
- activemodel (= 3.2.13)
- activesupport (= 3.2.13)
- activesupport (3.2.13)
- i18n (= 0.6.1)
+ activeresource (3.2.15)
+ activemodel (= 3.2.15)
+ activesupport (= 3.2.15)
+ activesupport (3.2.15)
+ i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
- acts_as_tree (1.2.0)
+ acts_as_tree (1.4.0)
activerecord (>= 3.0.0)
+ afm (0.2.0)
arel (3.0.2)
- better_errors (0.2.0)
+ better_errors (1.0.1)
coderay (>= 1.0.0)
- erubis (>= 2.7.0)
- binding_of_caller (0.6.8)
- bootstrap-datepicker-rails (1.1.1.1)
+ erubis (>= 2.6.6)
+ binding_of_caller (0.7.2)
+ debug_inspector (>= 0.0.1)
+ bootstrap-datepicker-rails (1.1.1.8)
railties (>= 3.0)
builder (3.0.4)
- bullet (4.3.0)
+ bullet (4.6.0)
uniform_notifier
capistrano (2.13.5)
highline
@@ -70,72 +79,78 @@ GEM
xpath (~> 2.0)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
- chronic (0.9.0)
- client_side_validations (3.1.4)
- coderay (1.0.8)
+ chronic (0.10.2)
+ client_side_validations (3.2.6)
+ client_side_validations-simple_form (2.1.0)
+ client_side_validations (~> 3.2.5)
+ simple_form (~> 2.1.0)
+ coderay (1.1.0)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
- coffee-script-source (1.3.3)
- commonjs (0.2.6)
+ coffee-script-source (1.6.3)
+ commonjs (0.2.7)
daemons (1.1.9)
- database_cleaner (0.7.1)
+ database_cleaner (1.2.0)
+ debug_inspector (0.0.2)
diff-lcs (1.2.4)
erubis (2.7.0)
eventmachine (1.0.3)
- exception_notification (2.6.1)
+ exception_notification (4.0.1)
actionmailer (>= 3.0.4)
- execjs (1.4.0)
- multi_json (~> 1.0)
+ activesupport (>= 3.0.4)
+ execjs (2.0.2)
expression_parser (0.9.0)
factory_girl (4.2.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.2.1)
factory_girl (~> 4.2.0)
railties (>= 3.0.0)
- faker (1.1.2)
+ faker (1.2.0)
i18n (~> 0.5)
ffi (1.9.0)
- haml (3.1.7)
- haml-rails (0.3.5)
+ haml (4.0.3)
+ tilt
+ haml-rails (0.4)
actionpack (>= 3.1, < 4.1)
activesupport (>= 3.1, < 4.1)
- haml (~> 3.1)
+ haml (>= 3.1, < 4.1)
railties (>= 3.1, < 4.1)
- has_scope (0.5.1)
- hashery (2.0.1)
- highline (1.6.19)
+ has_scope (0.6.0.rc)
+ actionpack (>= 3.2, < 5)
+ activesupport (>= 3.2, < 5)
+ hashery (2.1.1)
+ highline (1.6.20)
hike (1.2.3)
- i18n (0.6.1)
+ i18n (0.6.5)
i18n-spec (0.4.0)
iso
- inherited_resources (1.3.1)
- has_scope (~> 0.5.0)
- responders (~> 0.6)
+ inherited_resources (1.4.1)
+ has_scope (~> 0.6.0.rc)
+ responders (~> 1.0.0.rc)
iso (0.2.0)
i18n
journey (1.0.4)
- jquery-rails (2.1.3)
- railties (>= 3.1.0, < 5.0)
- thor (~> 0.14)
- json (1.7.7)
+ jquery-rails (3.0.4)
+ railties (>= 3.0, < 5.0)
+ thor (>= 0.14, < 2.0)
+ json (1.8.1)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
- less (2.2.2)
- commonjs (~> 0.2.6)
- less-rails (2.2.3)
+ less (2.4.0)
+ commonjs (~> 0.2.7)
+ less-rails (2.4.2)
actionpack (>= 3.1)
- less (~> 2.2.0)
- libv8 (3.3.10.4)
- mail (2.5.3)
- i18n (>= 0.4.0)
+ less (~> 2.4.0)
+ libv8 (3.16.14.3)
+ mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mailcatcher (0.5.11)
+ mailcatcher (0.5.12)
activesupport (~> 3.0)
eventmachine (~> 1.0.0)
haml (>= 3.1, < 5)
@@ -149,24 +164,26 @@ GEM
activerecord (~> 3.1)
activesupport (~> 3.1)
polyamorous (~> 0.5.0)
- mime-types (1.21)
- mini_portile (0.5.1)
+ mime-types (1.25)
+ mini_portile (0.5.2)
mono_logger (1.1.0)
- multi_json (1.7.9)
- mysql2 (0.3.11)
- net-scp (1.1.1)
+ multi_json (1.8.2)
+ mysql2 (0.3.13)
+ net-scp (1.1.2)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
- net-ssh (2.6.7)
+ net-ssh (2.7.0)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
- pdf-reader (1.2.0)
+ pdf-reader (1.3.3)
Ascii85 (~> 1.0.0)
+ afm (~> 0.2.0)
hashery (~> 2.0)
ruby-rc4
+ ttfunk
polyamorous (0.5.0)
activerecord (~> 3.0)
polyglot (0.3.3)
@@ -178,47 +195,53 @@ GEM
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
- rack-protection (1.5.0)
+ rack-protection (1.5.1)
rack
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
- rails (3.2.13)
- actionmailer (= 3.2.13)
- actionpack (= 3.2.13)
- activerecord (= 3.2.13)
- activeresource (= 3.2.13)
- activesupport (= 3.2.13)
+ rails (3.2.15)
+ actionmailer (= 3.2.15)
+ actionpack (= 3.2.15)
+ activerecord (= 3.2.15)
+ activeresource (= 3.2.15)
+ activesupport (= 3.2.15)
bundler (~> 1.0)
- railties (= 3.2.13)
+ railties (= 3.2.15)
+ rails-assets-listjs (0.2.0.beta.4)
+ railties (>= 3.1)
+ rails-i18n (3.0.0)
+ i18n (~> 0.5)
+ rails (>= 3.0.0, < 4.0.0)
rails-settings-cached (0.2.4)
rails (>= 3.0.0)
- railties (3.2.13)
- actionpack (= 3.2.13)
- activesupport (= 3.2.13)
+ railties (3.2.15)
+ actionpack (= 3.2.15)
+ activesupport (= 3.2.15)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
- rake (10.0.3)
+ rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
- redis (3.0.4)
+ redis (3.0.5)
redis-namespace (1.3.1)
redis (~> 3.0.0)
- responders (0.9.3)
- railties (~> 3.1)
- resque (1.24.1)
+ ref (1.0.5)
+ responders (1.0.0)
+ railties (>= 3.2, < 5)
+ resque (1.25.1)
mono_logger (~> 1.0)
multi_json (~> 1.0)
redis-namespace (~> 1.2)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
- rspec-core (2.14.2)
- rspec-expectations (2.14.0)
+ rspec-core (2.14.6)
+ rspec-expectations (2.14.3)
diff-lcs (>= 1.1.3, < 2.0)
- rspec-mocks (2.14.1)
+ rspec-mocks (2.14.4)
rspec-rails (2.14.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
@@ -229,22 +252,22 @@ GEM
ruby-prof (0.13.0)
ruby-rc4 (0.1.5)
rubyzip (0.9.9)
- sass (3.2.1)
- sass-rails (3.2.5)
+ sass (3.2.12)
+ sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
- select2-rails (3.4.2)
- sass-rails
+ select2-rails (3.5.0)
thor (~> 0.14)
selenium-webdriver (2.35.1)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip (< 1.0.0)
websocket (~> 1.0.4)
- simple-navigation (3.9.0)
+ simple-navigation (3.11.0)
activesupport (>= 2.3.2)
- simple-navigation-bootstrap (0.0.4)
+ simple-navigation-bootstrap (1.0.0)
+ railties (>= 3.1)
simple-navigation (>= 3.7.0)
simple_form (2.1.0)
actionpack (~> 3.0)
@@ -253,10 +276,10 @@ GEM
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
- sinatra (1.3.6)
+ sinatra (1.4.4)
rack (~> 1.4)
- rack-protection (~> 1.3)
- tilt (~> 1.3, >= 1.3.3)
+ rack-protection (~> 1.4)
+ tilt (~> 1.3, >= 1.3.4)
skinny (0.2.3)
eventmachine (~> 1.0.0)
thin (~> 1.5.0)
@@ -265,33 +288,34 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.6)
- therubyracer (0.10.2)
- libv8 (~> 3.3.10)
+ sqlite3 (1.3.8)
+ therubyracer (0.12.0)
+ libv8 (~> 3.16.14.0)
+ ref
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
- thor (0.17.0)
+ thor (0.18.1)
tilt (1.4.1)
- treetop (1.4.12)
+ treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
ttfunk (1.0.3)
- twitter-bootstrap-rails (2.1.3)
+ twitter-bootstrap-rails (2.2.8)
actionpack (>= 3.1)
- less-rails (~> 2.2.3)
+ execjs
+ rails (>= 3.1)
railties (>= 3.1)
- therubyracer (~> 0.10.2)
- tzinfo (0.3.37)
- uglifier (1.3.0)
+ tzinfo (0.3.38)
+ uglifier (2.2.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
- uniform_notifier (1.1.1)
+ uniform_notifier (1.3.0)
vegas (0.1.11)
rack (>= 1.0.0)
websocket (1.0.7)
- whenever (0.8.1)
+ whenever (0.8.4)
activesupport (>= 2.3.4)
chronic (>= 0.6.3)
wikicloth (0.8.0)
@@ -314,6 +338,7 @@ DEPENDENCIES
capistrano-ext
capybara (~> 2.1.0)
client_side_validations
+ client_side_validations-simple_form
coffee-rails (~> 3.2.1)
daemons
database_cleaner
@@ -321,10 +346,12 @@ DEPENDENCIES
factory_girl_rails (~> 4.0)
faker
haml-rails
+ i18n-js!
i18n-spec
inherited_resources
jquery-rails
kaminari
+ less-rails
localize_input!
mailcatcher
meta_search
@@ -332,6 +359,8 @@ DEPENDENCIES
prawn
quiet_assets
rails (~> 3.2.9)
+ rails-assets-listjs (= 0.2.0.beta.4)
+ rails-i18n
rails-settings-cached (= 0.2.4)
resque
rspec-core
diff --git a/README.md b/README.md
index e7be634b..ffe83101 100644
--- a/README.md
+++ b/README.md
@@ -3,16 +3,30 @@ FoodSoft
[![Build Status](https://travis-ci.org/foodcoops/foodsoft.png)](https://travis-ci.org/foodcoops/foodsoft)
[![Code Climate](https://codeclimate.com/github/foodcoops/foodsoft.png)](https://codeclimate.com/github/foodcoops/foodsoft)
[![Dependency Status](https://gemnasium.com/foodcoops/foodsoft.png)](https://gemnasium.com/foodcoops/foodsoft)
-[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/foodcoops/foodsoft/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
+[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/foodcoops/foodsoft/trend.png)](https://bitdeli.com/foodcoops "Bitdeli Badge")
Web-based software to manage a non-profit food coop (product catalog, ordering, accounting, job scheduling).
+If you're a food coop considering to use foodsoft, please have a look at the [wiki page for foodcoops](https://github.com/foodcoops/foodsoft/wiki/For-foodcoops). When you'd like to experiment with or develop foodsoft, you can read [how to set it up](https://github.com/foodcoops/foodsoft/blob/master/doc/SETUP_DEVELOPMENT.md) on your own computer.
+
More information about using this software and contributing can be found on the [wiki](https://github.com/foodcoops/foodsoft/wiki).
-Install
---------
-Have a look at [DEVELOPMENT](https://github.com/foodcoops/foodsoft/blob/master/doc/DEVELOPMENT) (possibly outdated) and the (more recent) [Developing Guidelines](https://github.com/foodcoops/foodsoft/wiki/Developing-Guidelines) page on the wiki.
+Developing
+----------
+
+Get foodsoft [running locally](https://github.com/foodcoops/foodsoft/blob/master/doc/SETUP_DEVELOPMENT.md),
+then visit our [Developing Guidelines](https://github.com/foodcoops/foodsoft/wiki/Developing-Guidelines)
+page on the wiki.
+
+
+Deploying
+---------
+
+Setup foodsoft to [run in production](https://github.com/foodcoops/foodsoft/blob/master/doc/SETUP_PRODUCTION.md),
+and automate [deployment](https://github.com/foodcoops/foodsoft/blob/master/doc/DEPLOYMENT.md). This section is
+very much a work in progress.
+
License
-------
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index c6d6e36a..0517c896 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -1,5 +1,4 @@
//= require jquery
-//= require jquery-ui
//= require jquery_ujs
//= require select2
//= require twitter/bootstrap
@@ -7,8 +6,16 @@
//= require bootstrap-datepicker/core
//= require bootstrap-datepicker/locales/bootstrap-datepicker.de
//= require bootstrap-datepicker/locales/bootstrap-datepicker.nl
+//= require bootstrap-datepicker/locales/bootstrap-datepicker.fr
//= require jquery.observe_field
+//= require list
+//= require list.unlist
+//= require list.delay
+//= require list.reset
//= require rails.validations
+//= require rails.validations.simple_form
+//= require i18n
+//= require i18n/translations
//= require_self
//= require ordering
//= require stupidtable
@@ -30,19 +37,19 @@ $.fn.extend({
$(function() {
// Show/Hide a specific DOM element
- $('a[data-toggle-this]').live('click', function() {
+ $(document).on('click', 'a[data-toggle-this]', function() {
$($(this).data('toggle-this')).toggle();
return false;
});
// Remove this item from DOM
- $('a[data-remove-this]').live('click', function() {
+ $(document).on('click', 'a[data-remove-this]', function() {
$($(this).data('remove-this')).remove();
return false;
});
// Check/Uncheck a single checkbox
- $('[data-check-this]').live('click', function() {
+ $(document).on('click', '[data-check-this]', function() {
var checkbox = $($(this).data('check-this'));
checkbox.attr('checked', !checkbox.is(':checked'));
highlightRow(checkbox);
@@ -50,7 +57,7 @@ $(function() {
});
// Check/Uncheck all checkboxes for a specific form
- $('input[data-check-all]').live('click', function() {
+ $(document).on('click', 'input[data-check-all]', function() {
var status = $(this).is(':checked');
var context = $(this).data('check-all');
var elms = $('input[type="checkbox"]', context);
@@ -62,7 +69,7 @@ $(function() {
});
// Submit form when changing a select menu.
- $('form[data-submit-onchange] select').live('change', function() {
+ $(document).on('change', 'form[data-submit-onchange] select', function() {
var confirmMessage = $(this).children(':selected').data('confirm');
if (confirmMessage) {
if (confirm(confirmMessage)) {
@@ -95,7 +102,7 @@ $(function() {
});
// Remote paginations
- $('div.pagination[data-remote] a').live('click', function() {
+ $(document).on('click', 'div.pagination[data-remote] a', function() {
$.getScript($(this).attr('href'));
return false;
});
@@ -116,6 +123,20 @@ $(function() {
// Use bootstrap datepicker for dateinput
$('.datepicker').datepicker({format: 'yyyy-mm-dd', language: I18n.locale});
+
+ // bootstrap tooltips (for price)
+ // Extra options don't work when using selector, so override defaults
+ // https://github.com/twbs/bootstrap/issues/3875 . These can still be
+ // overridden per tooltip using data-placement attributes and the like.
+ $.extend($.fn.tooltip.defaults, {
+ html: true,
+ animation: false,
+ placement: 'left',
+ container: 'body'
+ });
+ $(document).tooltip({
+ selector: '[data-toggle~="tooltip"]',
+ });
// See stupidtable.js for initialization of local table sorting
});
@@ -142,3 +163,5 @@ function highlightRow(checkbox) {
function setHiddenId(text, li) {
$('hidden_id').value = li.id;
}
+
+
diff --git a/app/assets/javascripts/bootstrap.js.coffee b/app/assets/javascripts/bootstrap.js.coffee
index c9404a8e..94406798 100644
--- a/app/assets/javascripts/bootstrap.js.coffee
+++ b/app/assets/javascripts/bootstrap.js.coffee
@@ -1,4 +1,3 @@
jQuery ->
- $("a[rel=popover]").popover()
- $(".tooltip").tooltip()
- $("a[rel=tooltip]").tooltip()
\ No newline at end of file
+ $("a[rel~=popover], .has-popover").popover()
+ $("a[rel~=tooltip], .has-tooltip").tooltip()
diff --git a/app/assets/javascripts/list.delay.js b/app/assets/javascripts/list.delay.js
new file mode 100644
index 00000000..72ac425c
--- /dev/null
+++ b/app/assets/javascripts/list.delay.js
@@ -0,0 +1,50 @@
+// for use with listjs 0.2.0
+// https://github.com/javve/list.js
+
+(function(window, undefined) {
+
+window.List.prototype.plugins.delay = function(locals, options) {
+ var list = this;
+
+ this.searchTimeout = undefined;
+
+ var init = {
+ start: function(options) {
+ this.defaults(options);
+ this.callbacks(options);
+ this.onload(options);
+ },
+ defaults: function(options) {
+ options.delayedSearchClass = options.delayedSearchClass || 'delayed-search';
+ options.delayedSearchTime = options.delayedSearchTime || 500;
+ },
+ callbacks: function(options) {
+ $('.' + options.delayedSearchClass, list.listContainer).keyup(list.searchDelayStart);
+ },
+ onload: function(options) {
+ var initialSearchTerm = $('.' + options.delayedSearchClass, list.listContainer).val();
+ if('' != initialSearchTerm) {
+ list.search(initialSearchTerm);
+ }
+ }
+ };
+
+ this.searchDelayStart = function(searchString, columns) {
+ // TODO: if keycode corresponds to 'ENTER' ? skip delay
+ clearTimeout(list.searchTimeout);
+ list.searchTimeout = window.setTimeout(
+ function() {list.searchDelayEnd(searchString, columns)},
+ options.delayedSearchTime
+ );
+
+ $(list.listContainer).trigger('updateComing');
+ };
+
+ this.searchDelayEnd = function(searchString, columns) {
+ list.search(searchString, columns);
+ };
+
+ init.start(options);
+}
+
+})(window);
diff --git a/app/assets/javascripts/list.reset.js b/app/assets/javascripts/list.reset.js
new file mode 100644
index 00000000..9482f32c
--- /dev/null
+++ b/app/assets/javascripts/list.reset.js
@@ -0,0 +1,42 @@
+// for use with listjs 0.2.0
+// https://github.com/javve/list.js
+
+(function(window, undefined) {
+
+window.List.prototype.plugins.reset = function(locals, options) {
+ var list = this;
+
+ var init = {
+ start: function(options) {
+ this.defaults(options);
+ this.callbacks(options);
+ },
+ defaults: function(options) {
+ options.highlightClass = options.highlightClass || 'btn-primary';
+ options.resetSearchClass = options.resetSearchClass || 'reset-search';
+ options.resettableClass = options.resettableClass || 'resettable';
+ },
+ callbacks: function(options) {
+ $('.' + options.resetSearchClass, list.listContainer).click(list.resetSearch);
+ list.on('updated', list.highlightResetButton);
+
+ $(list.listContainer).on('updateComing', function() {
+ list.highlightResetButton(false);
+ });
+ }
+ };
+
+ this.highlightResetButton = function(highlightEnabled) {
+ highlightEnabled = (undefined === highlightEnabled) ? (list.searched) : (highlightEnabled);
+ $('.' + options.resetSearchClass, list.listContainer).toggleClass(options.highlightClass, highlightEnabled);
+ };
+
+ this.resetSearch = function() {
+ $('.' + options.resettableClass, list.listContainer).val('');
+ list.search('');
+ };
+
+ init.start(options);
+}
+
+})(window);
diff --git a/app/assets/javascripts/list.unlist.js b/app/assets/javascripts/list.unlist.js
new file mode 100644
index 00000000..b40cb98f
--- /dev/null
+++ b/app/assets/javascripts/list.unlist.js
@@ -0,0 +1,124 @@
+// for use with listjs 0.2.0
+// https://github.com/javve/list.js
+
+/*******************************************************************************
+********************************************************************************
+
+The following code is a modification of list.js. It was created by copy-pasting
+the original code with the copyright notice below.
+
+********************************************************************************
+*******************************************************************************/
+
+
+
+/*******************************************************************************
+Begin copyright notice of the original code
+*******************************************************************************/
+
+/*
+ListJS Beta 0.2.0
+By Jonny Strömberg (www.jonnystromberg.com, www.listjs.com)
+
+OBS. The API is not frozen. It MAY change!
+
+License (MIT)
+
+Copyright (c) 2011 Jonny Strömberg http://jonnystromberg.com
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/*******************************************************************************
+End copyright notice of the original code
+*******************************************************************************/
+
+
+
+(function(w, undefined) {
+/*******************************************************************************
+Begin copy-pasted and modified code
+*******************************************************************************/
+
+// * template engine which adds class 'unlisted' instead of removing from DOM
+// * especially useful in case of formulars
+// * uses jQuery's $
+w.List.prototype.templateEngines.unlist = function(list, settings) {
+ var h = w.ListJsHelpers;
+
+ // start with standard engine, override specific methods afterwards
+ this.superClass = w.List.prototype.templateEngines.standard;
+ this.superClass(list, settings);
+
+ // todo refer to listjs code instead of copy-pasting
+ var listSource = h.getByClass(settings.listClass, list.listContainer, true);
+ var templater = this;
+ var ensure = {
+ created: function(item) {
+ if(item.elm === undefined) {
+ templater.create(item);
+ }
+ }
+ };
+
+ var init = {
+ start: function(options) {
+ this.defaults(options);
+ this.callbacks(options);
+ },
+ defaults: function(options) {
+ options.listHeadingsClass = options.listHeadingsClass || 'list-heading';
+ },
+ callbacks: function(options) {
+ list.on('updated', templater.updateListHeadings);
+ }
+ };
+
+ this.show = function(item) {
+ ensure.created(item);
+ listSource.appendChild(item.elm); // append item (or move it to the end)
+ $(item.elm).removeClass('unlisted');
+ };
+ this.hide = function(item) {
+ ensure.created(item);
+ $(item.elm).addClass('unlisted');
+ listSource.appendChild(item.elm);
+ };
+ this.clear = function() {
+ $(listSource.childNodes).addClass('unlisted');
+ };
+
+ this.updateListHeadings = function() {
+ var headSel = '.' + settings.listHeadingsClass;
+
+ $(headSel, listSource).each(function() {
+ var listedCount = $(this).nextUntil(headSel, ':not(.unlisted)').length;
+ $(this).toggleClass('unlisted', 0==listedCount);
+ });
+ };
+
+ init.start(settings);
+};
+
+/*******************************************************************************
+End copy-pasted and modified code
+*******************************************************************************/
+})(window);
diff --git a/app/assets/javascripts/ordering.js b/app/assets/javascripts/ordering.js
index 159370f2..9c9a3d99 100644
--- a/app/assets/javascripts/ordering.js
+++ b/app/assets/javascripts/ordering.js
@@ -7,9 +7,6 @@
var modified = false // indicates if anything has been clicked on this page
var groupBalance = 0; // available group money
-var currencySeparator = "."; // default decimal separator
-var currencyPrecision = 2; // default digits behind comma
-var currencyUnit = "€"; // default currency
var minimumBalance = 0; // minimum group balance for the order to be succesful
var toleranceIsCostly = true; // default tolerance behaviour
var isStockit = false; // Wheter the order is from stock oder normal supplier
@@ -23,12 +20,6 @@ var toleranceOthers = new Array();
var itemsAllocated = new Array(); // how many items the group has been allocated and should definitely get
var quantityAvailable = new Array(); // stock_order. how many items are currently in stock
-function setCurrencyFormat(separator, precision, unit) {
- currencySeparator = separator;
- currencyPrecision = precision;
- currencyUnit = unit;
-}
-
function setToleranceBehaviour(value) {
toleranceIsCostly = value;
}
@@ -124,7 +115,7 @@ function update(item, quantity, tolerance) {
} else {
itemTotal[item] = price[item] * (Number(quantity));
}
- $('#price_' + item + '_display').html(asMoney(itemTotal[item]));
+ $('#price_' + item + '_display').html(I18n.l("currency", itemTotal[item]));
// update missing units
var missing_units = unit[item] - (((quantityOthers[item] + Number(quantity)) % unit[item]) + Number(tolerance) + toleranceOthers[item])
@@ -137,10 +128,6 @@ function update(item, quantity, tolerance) {
updateBalance();
}
-function asMoney(amount) {
- return String(amount.toFixed(currencyPrecision)).replace(/\./, currencySeparator) + ' ' + currencyUnit;
-}
-
function calcUnits(unitSize, quantity, tolerance) {
var units = Math.floor(quantity / unitSize)
var remainder = quantity % unitSize
@@ -158,10 +145,10 @@ function updateBalance() {
for (i in itemTotal) {
total += itemTotal[i];
}
- $('#total_price').html(asMoney(total));
+ $('#total_price').html(I18n.l("currency", total));
var balance = groupBalance - total;
- $('#new_balance').html(asMoney(balance));
- $('#total_balance').val(asMoney(balance));
+ $('#new_balance').html(I18n.l("currency", balance));
+ $('#total_balance').val(I18n.l("currency", balance));
// determine bgcolor and submit button state according to balance
var bgcolor = '';
if (balance < minimumBalance) {
@@ -191,6 +178,6 @@ $(function() {
});
$('a[data-confirm_switch_order]').click(function() {
- return (!modified || confirm('Änderungen an dieser Bestellung gehen verloren, wenn zu einer anderen Bestellung gewechselt wird. Möchtest Du trotzdem wechseln?'));
+ return (!modified || confirm(I18n.t('js.ordering.confirm_change')));
});
});
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 24a5b6c4..674a635c 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -3,4 +3,5 @@
*= require select2
*= require token-input-bootstrappy
*= require bootstrap-datepicker
+*= require list.unlist
*/
\ No newline at end of file
diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less
index 5d595bc2..6ad25972 100644
--- a/app/assets/stylesheets/bootstrap_and_overrides.css.less
+++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less
@@ -1,24 +1,23 @@
@import "twitter/bootstrap/bootstrap";
+@import "twitter/bootstrap/responsive";
body {
padding-top: 10px;
}
-@import "twitter/bootstrap/responsive";
-
// Set the correct sprite paths
-@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
-@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
+@iconSpritePath: image-url('twitter/bootstrap/glyphicons-halflings.png');
+@iconWhiteSpritePath: image-url('twitter/bootstrap/glyphicons-halflings-white.png');
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
-// Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not
-// have the proper paths. So for now we use the absolute path.
-@fontAwesomeEotPath: '/assets/fontawesome-webfont.eot';
-@fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff';
-@fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf';
-@fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg';
+@fontAwesomeEotPath: asset-url('fontawesome-webfont.eot');
+@fontAwesomeEotPath_iefix: asset-url('fontawesome-webfont.eot?#iefix');
+@fontAwesomeWoffPath: asset-url('fontawesome-webfont.woff');
+@fontAwesomeTtfPath: asset-url('fontawesome-webfont.ttf');
+@fontAwesomeSvgPath: asset-url('fontawesome-webfont.svg#fontawesomeregular');
+@import 'fontawesome/font-awesome';
-// Font Awesome
-@import "fontawesome";
+// Glyphicons
+//@import "twitter/bootstrap/sprites.less";
// Your custom LESS stylesheets goes here
//
@@ -26,7 +25,7 @@ body {
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
-// See http://twitter.github.com/bootstrap/less.html for their names and documentation
+// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
//
// Example:
// @linkColor: #ff0000;
@@ -238,3 +237,8 @@ tr.unavailable {
margin-bottom: 15px
}
}
+
+// allow buttons as input add-on (with proper height)
+.input-append button.add-on {
+ height: inherit;
+}
diff --git a/app/assets/stylesheets/list.unlist.css b/app/assets/stylesheets/list.unlist.css
new file mode 100644
index 00000000..9fad9603
--- /dev/null
+++ b/app/assets/stylesheets/list.unlist.css
@@ -0,0 +1,3 @@
+.list .unlisted:not(.no-unlist) {
+ display: none;
+}
\ No newline at end of file
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 96b2e510..9c77fe48 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -26,7 +26,7 @@ class ApplicationController < ActionController::Base
def deny_access
session[:return_to] = request.original_url
- redirect_to login_url, :alert => 'Access denied!'
+ redirect_to login_url, :alert => I18n.t('application.controller.error_denied')
end
private
@@ -37,7 +37,7 @@ class ApplicationController < ActionController::Base
# No user at all: redirect to login page.
session[:user_id] = nil
session[:return_to] = request.original_url
- redirect_to login_url, :alert => 'Authentication required!'
+ redirect_to login_url, :alert => I18n.t('application.controller.error_authn')
else
# We have an authenticated user, now check role...
# Roles gets the user through his memberships.
@@ -83,7 +83,7 @@ class ApplicationController < ActionController::Base
def authenticate_membership_or_admin
@group = Group.find(params[:id])
unless @group.member?(@current_user) or @current_user.role_admin?
- redirect_to root_path, alert: "Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!"
+ redirect_to root_path, alert: I18n.t('application.controller.error_members_only')
end
end
diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb
index b29fd594..c9dd1362 100644
--- a/app/controllers/articles_controller.rb
+++ b/app/controllers/articles_controller.rb
@@ -7,12 +7,12 @@ class ArticlesController < ApplicationController
sort = case params['sort']
when "name" then "articles.name"
when "unit" then "articles.unit"
- when "category" then "article_categories.name"
+ when "article_category" then "article_categories.name"
when "note" then "articles.note"
when "availability" then "articles.availability"
when "name_reverse" then "articles.name DESC"
when "unit_reverse" then "articles.unit DESC"
- when "category_reverse" then "article_categories.name DESC"
+ when "article_category_reverse" then "article_categories.name DESC"
when "note_reverse" then "articles.note DESC"
when "availability_reverse" then "articles.availability DESC"
end
diff --git a/app/controllers/finance/balancing_controller.rb b/app/controllers/finance/balancing_controller.rb
index 8528e4d3..8de1444c 100644
--- a/app/controllers/finance/balancing_controller.rb
+++ b/app/controllers/finance/balancing_controller.rb
@@ -10,7 +10,7 @@ class Finance::BalancingController < Finance::BaseController
flash.now.alert = t('finance.balancing.new.alert') if @order.closed?
@comments = @order.comments
- @articles = @order.order_articles.ordered.includes(:article, :article_price,
+ @articles = @order.order_articles.ordered_or_member.includes(:article, :article_price,
group_order_articles: {group_order: :ordergroup})
sort_param = params['sort'] || 'name'
diff --git a/app/controllers/finance/financial_transactions_controller.rb b/app/controllers/finance/financial_transactions_controller.rb
index a129a49d..8865958e 100644
--- a/app/controllers/finance/financial_transactions_controller.rb
+++ b/app/controllers/finance/financial_transactions_controller.rb
@@ -34,7 +34,7 @@ class Finance::FinancialTransactionsController < ApplicationController
@financial_transaction = FinancialTransaction.new(params[:financial_transaction])
@financial_transaction.user = current_user
@financial_transaction.add_transaction!
- redirect_to finance_ordergroup_transactions_url(@ordergroup), notice: t('finance.financial_transactions.create.notice')
+ redirect_to finance_ordergroup_transactions_url(@ordergroup), notice: I18n.t('finance.financial_transactions.controller.create.notice')
rescue ActiveRecord::RecordInvalid => error
flash.now[:alert] = error.message
render :action => :new
@@ -44,16 +44,16 @@ class Finance::FinancialTransactionsController < ApplicationController
end
def create_collection
- raise "Notiz wird benötigt!" if params[:note].blank?
+ raise I18n.t('finance.financial_transactions.controller.create_collection.error_note_required') if params[:note].blank?
params[:financial_transactions].each do |trans|
# ignore empty amount fields ...
unless trans[:amount].blank?
Ordergroup.find(trans[:ordergroup_id]).add_financial_transaction!(trans[:amount], params[:note], @current_user)
end
end
- redirect_to finance_ordergroups_url, notice: t('finance.create_collection.create.notice')
+ redirect_to finance_ordergroups_url, notice: I18n.t('finance.financial_transactions.controller.create_collection.notice')
rescue => error
- redirect_to finance_new_transaction_collection_url, alert: t('finance.create_collection.create.alert', error: error.to_s)
+ redirect_to finance_new_transaction_collection_url, alert: I18n.t('finance.financial_transactions.controller.create_collection.alert', error: error.to_s)
end
protected
diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb
index 3aab74c5..43ca5fdf 100644
--- a/app/controllers/login_controller.rb
+++ b/app/controllers/login_controller.rb
@@ -11,7 +11,7 @@ class LoginController < ApplicationController
# Sends an email to a user with the token that allows setting a new password through action "password".
def reset_password
if request.get? || params[:user].nil? # Catch for get request and give better error message.
- redirect_to forgot_password_url, alert: 'Ein Problem ist aufgetreten. Bitte erneut versuchen' and return
+ redirect_to forgot_password_url, alert: I18n.t('errors.general_again') and return
end
if (user = User.find_by_email(params[:user][:email]))
diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb
index 7fba518a..d52ae698 100644
--- a/app/controllers/orders_controller.rb
+++ b/app/controllers/orders_controller.rb
@@ -98,6 +98,8 @@ class OrdersController < ApplicationController
order = Order.find(params[:id])
order.finish!(@current_user)
redirect_to order, notice: I18n.t('orders.finish.notice')
+ rescue => error
+ redirect_to orders_url, alert: I18n.t('errors.general_msg', :msg => error.message)
end
# Renders the fax-text-file
@@ -107,9 +109,9 @@ class OrdersController < ApplicationController
supplier = order.supplier
contact = FoodsoftConfig[:contact].symbolize_keys
text = I18n.t('orders.fax.heading', :name => FoodsoftConfig[:name])
- text += "\n" + I18n.t('orders.fax.customer_number') + ': #{supplier.customer_number}' unless supplier.customer_number.blank?
+ text += "\n#{Supplier.human_attribute_name(:customer_number)}: #{supplier.customer_number}" unless supplier.customer_number.blank?
text += "\n" + I18n.t('orders.fax.delivery_day')
- text += "\n\n#{supplier.name}\n#{supplier.address}\n" + I18n.t('simple_form.labels.supplier.fax') + ": #{supplier.fax}\n\n"
+ text += "\n\n#{supplier.name}\n#{supplier.address}\n#{Supplier.human_attribute_name(:fax)}: #{supplier.fax}\n\n"
text += "****** " + I18n.t('orders.fax.to_address') + "\n\n"
text += "#{FoodsoftConfig[:name]}\n#{contact[:street]}\n#{contact[:zip_code]} #{contact[:city]}\n\n"
text += "****** " + I18n.t('orders.fax.articles') + "\n\n"
diff --git a/app/controllers/stockit_controller.rb b/app/controllers/stockit_controller.rb
index 3e3b43b2..475ac3a3 100644
--- a/app/controllers/stockit_controller.rb
+++ b/app/controllers/stockit_controller.rb
@@ -31,6 +31,11 @@ class StockitController < ApplicationController
end
end
+ def show
+ @stock_article = StockArticle.find(params[:id])
+ @stock_changes = @stock_article.stock_changes.order('stock_changes.created_at DESC')
+ end
+
def destroy
@article = StockArticle.find(params[:id])
@article.mark_as_deleted
@@ -55,9 +60,4 @@ class StockitController < ApplicationController
render :partial => 'form', :locals => {:stock_article => stock_article}
end
-
- def history
- @stock_article = StockArticle.undeleted.find(params[:stock_article_id])
- @stock_changes = @stock_article.stock_changes.order('stock_changes.created_at DESC').each {|s| s.readonly!}
- end
end
diff --git a/app/documents/order_fax.rb b/app/documents/order_fax.rb
index f2182944..766a784c 100644
--- a/app/documents/order_fax.rb
+++ b/app/documents/order_fax.rb
@@ -21,15 +21,15 @@ class OrderFax < OrderPdf
text "#{contact[:zip_code]} #{contact[:city]}", size: 9, align: :right
move_down 5
unless @order.supplier.try(:customer_number).blank?
- text "#{I18n.t('simple_form.labels.supplier.customer_number')}: #{@order.supplier[:customer_number]}", size: 9, align: :right
+ text "#{Supplier.human_attribute_name :customer_number}: #{@order.supplier[:customer_number]}", size: 9, align: :right
move_down 5
end
unless contact[:phone].blank?
- text "#{I18n.t('simple_form.labels.supplier.phone')}: #{contact[:phone]}", size: 9, align: :right
+ text "#{Supplier.human_attribute_name :phone}: #{contact[:phone]}", size: 9, align: :right
move_down 5
end
unless contact[:email].blank?
- text "#{I18n.t('simple_form.labels.supplier.email')}: #{contact[:email]}", size: 9, align: :right
+ text "#{Supplier.human_attribute_name :email}: #{contact[:email]}", size: 9, align: :right
end
end
@@ -40,7 +40,7 @@ class OrderFax < OrderPdf
text @order.supplier.try(:address).to_s
unless @order.supplier.try(:fax).blank?
move_down 5
- text "#{I18n.t('simple_form.labels.supplier.fax')}: #{@order.supplier[:fax]}"
+ text "#{Supplier.human_attribute_name :fax}: #{@order.supplier[:fax]}"
end
end
@@ -48,10 +48,10 @@ class OrderFax < OrderPdf
text Date.today.strftime(I18n.t('date.formats.default')), align: :right
move_down 10
- text "#{I18n.t('simple_form.labels.delivery.delivered_on')}:"
+ text "#{Delivery.human_attribute_name :delivered_on}:"
move_down 10
unless @order.supplier.try(:contact_person).blank?
- text "#{I18n.t('simple_form.labels.supplier.contact_person')}: #{@order.supplier[:contact_person]}"
+ text "#{Supplier.human_attribute_name :contact_person}: #{@order.supplier[:contact_person]}"
move_down 10
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 5709cca2..43a36fa5 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -73,6 +73,22 @@ module ApplicationHelper
link_to(text, url_for(url_options), html_options)
end
+
+ # Generates text for table heading for model attribute
+ # When the 'short' option is true, abbreviations will be used:
+ # When there is a non-empty model attribute 'foo', it looks for
+ # the model attribute translation 'foo_short' and use that as
+ # heading, with an acronym title of 'foo'.
+ # Other options are passed through to I18n.
+ def heading_helper(model, attribute, options = {})
+ i18nopts = options.select {|a| !['short'].include?(a) }
+ s = model.human_attribute_name(attribute, i18nopts)
+ if options[:short]
+ sshort = model.human_attribute_name("#{attribute}_short".to_sym, options.merge({defaults: ''}))
+ s = raw "#{sshort}" unless sshort.empty?
+ end
+ s
+ end
# Generates a link to the top of the website
def link_to_top
diff --git a/app/models/order.rb b/app/models/order.rb
index f4545d02..057c0768 100644
--- a/app/models/order.rb
+++ b/app/models/order.rb
@@ -155,7 +155,7 @@ class Order < ActiveRecord::Base
unless finished?
Order.transaction do
# set new order state (needed by notify_order_finished)
- update_attributes(:state => 'finished', :ends => Time.now, :updated_by => user)
+ update_attributes!(:state => 'finished', :ends => Time.now, :updated_by => user)
# Update order_articles. Save the current article_price to keep price consistency
# Also save results for each group_order_result
diff --git a/app/models/order_article.rb b/app/models/order_article.rb
index 85a0da79..bd90706b 100644
--- a/app/models/order_article.rb
+++ b/app/models/order_article.rb
@@ -12,7 +12,8 @@ class OrderArticle < ActiveRecord::Base
validate :article_and_price_exist
validates_uniqueness_of :article_id, scope: :order_id
- scope :ordered, :conditions => "units_to_order >= 1"
+ scope :ordered, :conditions => "units_to_order > 0"
+ scope :ordered_or_member, -> { includes(:group_order_articles).where("units_to_order > 0 OR group_order_articles.result > 0") }
before_create :init_from_balancing
after_destroy :update_ordergroup_prices
diff --git a/app/models/ordergroup.rb b/app/models/ordergroup.rb
index abc7e1ef..bf82afc4 100644
--- a/app/models/ordergroup.rb
+++ b/app/models/ordergroup.rb
@@ -66,7 +66,7 @@ class Ordergroup < Group
end
def avg_jobs_per_euro
- stats[:orders_sum] != 0 ? stats[:jobs_size].to_f / stats[:orders_sum].to_f : 0
+ stats[:jobs_size].to_f / stats[:orders_sum].to_f rescue 0
end
# This is the ordergroup job per euro performance
@@ -90,7 +90,7 @@ class Ordergroup < Group
# Global average
def self.avg_jobs_per_euro
stats = Ordergroup.pluck(:stats)
- stats.sum {|s| s[:jobs_size].to_f } / stats.sum {|s| s[:orders_sum].to_f }
+ stats.sum {|s| s[:jobs_size].to_f } / stats.sum {|s| s[:orders_sum].to_f } rescue 0
end
def account_updated
diff --git a/app/views/article_categories/index.html.haml b/app/views/article_categories/index.html.haml
index dc18f042..00bcc354 100644
--- a/app/views/article_categories/index.html.haml
+++ b/app/views/article_categories/index.html.haml
@@ -5,8 +5,8 @@
%table.table.table-striped
%thead
%tr
- %th= t('simple_form.labels.article_category.name')
- %th= t('simple_form.labels.article_category.description')
+ %th= heading_helper ArticleCategory, :name
+ %th= heading_helper ArticleCategory, :description
%th
%tbody
- @article_categories.each do |article_category|
diff --git a/app/views/articles/_articles.html.haml b/app/views/articles/_articles.html.haml
index fd00f23d..283abc53 100644
--- a/app/views/articles/_articles.html.haml
+++ b/app/views/articles/_articles.html.haml
@@ -6,16 +6,15 @@
%thead
%tr
%th
- %th= sort_link_helper t('simple_form.labels.article.name'), "name"
+ %th= sort_link_helper heading_helper(Article, :name), "name"
%th
- %th= sort_link_helper t('simple_form.labels.article.article_category'), "category"
- %th= sort_link_helper t('simple_form.labels.article.unit'), "unit"
- %th= sort_link_helper t('simple_form.labels.article.note'), "note"
- %th{:style => "width: 4em;"}
- %acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity_short'
- %th{:style => "width: 5em;"}= t '.price_netto'
- %th{:style => "width: 3.5em;"}= t 'simple_form.labels.defaults.tax'
- %th{:style => "width: 4em;"}= t 'simple_form.labels.defaults.deposit'
+ %th= sort_link_helper heading_helper(Article, :article_category), "article_category"
+ %th= sort_link_helper heading_helper(Article, :unit), "unit"
+ %th= sort_link_helper heading_helper(Article, :note), "note"
+ %th{:style => "width: 4em;"}= heading_helper Article, :unit_quantity, short: true
+ %th{:style => "width: 5em;"}= heading_helper Article, :price
+ %th{:style => "width: 3.5em;"}= heading_helper Article, :tax
+ %th{:style => "width: 4em;"}= heading_helper Article, :deposit
%th{:style => "width: 3em;"}
%tbody#listbody
diff --git a/app/views/articles/_edit_all_table.html.haml b/app/views/articles/_edit_all_table.html.haml
index bd9441f7..e7752792 100644
--- a/app/views/articles/_edit_all_table.html.haml
+++ b/app/views/articles/_edit_all_table.html.haml
@@ -1,20 +1,16 @@
%table.table
%thead
%tr
- %th
- %acronym{:title => t('.available_desc')}= t '.available_short'
- %th= t 'simple_form.labels.article.name'
- %th= t 'simple_form.labels.article.unit'
- %th
- %acronym{:title => t('.price_desc')}= t '.price_short'
- %th
- %acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity_short'
- %th
- %acronym{:title => t('.order_number_desc')}= t '.order_number_short'
- %th= t 'simple_form.labels.article.note'
- %th= t 'simple_form.labels.article.article_category'
- %th= t 'simple_form.labels.defaults.tax'
- %th= t 'simple_form.labels.defaults.deposit'
+ %th= heading_helper Article, :availability, short: true
+ %th= heading_helper Article, :name
+ %th= heading_helper Article, :unit
+ %th= heading_helper Article, :price, short: true
+ %th= heading_helper Article, :unit_quantity, short: true
+ %th= heading_helper Article, :order_number, short: true
+ %th= heading_helper Article, :note
+ %th= heading_helper Article, :article_category
+ %th= heading_helper Article, :tax
+ %th= heading_helper Article, :deposit
%tbody
- @articles.each_with_index do |article, index|
= fields_for "articles[#{article.id || index}]", article do |form|
diff --git a/app/views/articles/_import_search_results.haml b/app/views/articles/_import_search_results.haml
index 6d4c6720..254abca8 100644
--- a/app/views/articles/_import_search_results.haml
+++ b/app/views/articles/_import_search_results.haml
@@ -5,13 +5,13 @@
%table.table.table-striped
%thead
%tr
- %th= t 'simple_form.labels.article.name'
- %th= t 'simple_form.labels.article.origin'
- %th= t 'simple_form.labels.article.manufacturer'
- %th= t 'simple_form.labels.article.note'
- %th{:style => "width:4em"}= t 'simple_form.labels.defaults.price'
- %th= t 'simple_form.labels.article.unit'
- %th= t 'simple_form.labels.defaults.unit_quantity'
+ %th= heading_helper Article, :name
+ %th= heading_helper Article, :origin
+ %th= heading_helper Article, :manufacturer
+ %th= heading_helper Article, :note
+ %th{:style => "width:4em"}= heading_helper Article, :price
+ %th= heading_helper Article, :unit
+ %th= heading_helper Article, :unit_quantity, short: true
%th
%tbody
- for article in @articles
diff --git a/app/views/articles/sync.html.haml b/app/views/articles/sync.html.haml
index d740cb6e..58273178 100644
--- a/app/views/articles/sync.html.haml
+++ b/app/views/articles/sync.html.haml
@@ -1,4 +1,4 @@
-- title 'Artikel mit externer Datenbank synchronisieren'
+- title t('.title')
= form_tag update_synchronized_supplier_articles_path(@supplier) do
%h2= t '.outlist.title'
@@ -11,30 +11,28 @@
= hidden_field_tag "outlisted_articles[#{article.id}]", '1'
= article.name
- if article.in_open_order
- .alert
- Achtung, #{article.name} wird gerade in einer laufenden Bestellung verwendet. Bitte erst Bestellung anpassen.
+ .alert= t '.alert_used', article: article.name
- else
%i= t '.outlist.body_skip'
%hr/
%h2= t '.update.title'
%p
%i
- %b= @updated_articles.size
- = t '.update.update_msg'
- = t('.update.body').html_safe
+ = t '.update.update_msg', count: @updated_articles.size
+ = t '.update.body'
%table.table
%thead
%tr
- %th= t 'simple_form.labels.article.name'
- %th= t 'simple_form.labels.article.note'
- %th= t 'simple_form.labels.article.manufacturer'
- %th= t 'simple_form.labels.article.origin'
- %th= t 'simple_form.labels.article.unit'
- %th= t '.unit_quantity_short'
- %th= t '.price_short'
- %th= t 'simple_form.labels.defaults.tax'
- %th= t 'simple_form.labels.defaults.deposit'
- %th= t 'simple_form.labels.article.article_category'
+ %th= heading_helper Article, :name
+ %th= heading_helper Article, :note
+ %th= heading_helper Article, :manufacturer
+ %th= heading_helper Article, :origin
+ %th= heading_helper Article, :unit
+ %th= heading_helper Article, :unit_quantity, short: true
+ %th= heading_helper Article, :price
+ %th= heading_helper Article, :tax
+ %th= heading_helper Article, :deposit
+ %th= heading_helper Article, :article_category
%tbody
- @updated_articles.each do |updated_article, attrs|
- article = Article.find(updated_article.id)
diff --git a/app/views/articles/upload.html.haml b/app/views/articles/upload.html.haml
index 7cb5f4fb..6a8b4d50 100644
--- a/app/views/articles/upload.html.haml
+++ b/app/views/articles/upload.html.haml
@@ -2,19 +2,19 @@
= t('.body').html_safe
%pre
= [t('.fields.status'),
- t('simple_form.labels.defaults.order_number'),
- t('simple_form.labels.article.name'),
- t('simple_form.labels.article.note'),
- t('simple_form.labels.article.manufacturer'),
- t('simple_form.labels.article.origin'),
- t('simple_form.labels.article.unit'),
- t('simple_form.labels.defaults.price'),
- t('simple_form.labels.defaults.tax'),
- t('simple_form.labels.defaults.deposit'),
- t('simple_form.labels.defaults.unit_quantity'),
+ Article.human_attribute_name(:order_number),
+ Article.human_attribute_name(:name),
+ Article.human_attribute_name(:note),
+ Article.human_attribute_name(:manufacturer),
+ Article.human_attribute_name(:origin),
+ Article.human_attribute_name(:unit),
+ Article.human_attribute_name(:price),
+ Article.human_attribute_name(:tax),
+ Article.human_attribute_name(:deposit),
+ Article.human_attribute_name(:unit_quantity),
t('.fields.season_amount'),
t('.fields.season_price'),
- t('simple_form.labels.article.article_category')].join(" | ")
+ Article.human_attribute_name(:article_category)].join(" | ")
= form_for :articles, :url => parse_upload_supplier_articles_path(@supplier),
:html => { :multipart => true } do |f|
diff --git a/app/views/deliveries/_form.html.haml b/app/views/deliveries/_form.html.haml
index c1702708..3e1a3b6c 100644
--- a/app/views/deliveries/_form.html.haml
+++ b/app/views/deliveries/_form.html.haml
@@ -61,8 +61,6 @@
return true;
}
});
-
- enablePriceTooltips();
});
function mark_article_for_delivery(stock_article_id) {
@@ -80,14 +78,6 @@
return ( 0 == $('#stock_change_stock_article_' + stock_article_id).length );
}
- function enablePriceTooltips(context) {
- $('[data-toggle~="tooltip"]', context).tooltip({
- animation: false,
- html: true,
- placement: 'left'
- });
- }
-
= simple_form_for [@supplier, @delivery], validate: true do |f|
= f.error_notification
= base_errors f.object
diff --git a/app/views/deliveries/add_stock_change.js.erb b/app/views/deliveries/add_stock_change.js.erb
index 049e6233..2d01bc68 100644
--- a/app/views/deliveries/add_stock_change.js.erb
+++ b/app/views/deliveries/add_stock_change.js.erb
@@ -5,21 +5,18 @@
$('#stock_changes tr').removeClass('success');
+ var quantity = w.prompt('<%= j(t('.how_many_units', :unit => @stock_change.stock_article.unit, :name => @stock_change.stock_article.name)) %>');
+ if(null === quantity) {
+ return false;
+ }
+
var stock_change = $(
'<%= j(render(:partial => 'stock_change', :locals => {:stock_change => @stock_change})) %>'
).addClass('success');
- enablePriceTooltips(stock_change);
+ $('input.stock-change-quantity', stock_change).val(quantity);
$('#stock_changes').append(stock_change);
mark_article_for_delivery(<%= @stock_change.stock_article.id %>);
updateSort('#stock_changes');
- var quantity = w.prompt('<%= j(t('.how_many_units', :unit => @stock_change.stock_article.unit, :name => @stock_change.stock_article.name)) %>'); <%# how to properly escape here? %>
- if(null === quantity) {
- stock_change.remove();
- mark_article_for_delivery(<%= @stock_change.stock_article.id %>);
- return false;
- }
- $('input.stock-change-quantity', stock_change).val(quantity);
-
})(window);
diff --git a/app/views/deliveries/create_stock_article.js.erb b/app/views/deliveries/create_stock_article.js.erb
index 5e2893a9..cb9d0159 100644
--- a/app/views/deliveries/create_stock_article.js.erb
+++ b/app/views/deliveries/create_stock_article.js.erb
@@ -8,7 +8,6 @@ $('div.container-fluid').prepend(
var stock_article_for_adding = $(
'<%= j(render(:partial => 'stock_article_for_adding', :locals => {:article => @stock_article})) %>'
).addClass('success');
- enablePriceTooltips(stock_article_for_adding);
$('#stock_articles_for_adding tbody').append(stock_article_for_adding);
updateSort('#stock_articles_for_adding');
diff --git a/app/views/deliveries/index.html.haml b/app/views/deliveries/index.html.haml
index 16b0388b..423332b1 100644
--- a/app/views/deliveries/index.html.haml
+++ b/app/views/deliveries/index.html.haml
@@ -3,9 +3,9 @@
%table.table.table-striped
%thead
%tr
- %th= t 'simple_form.labels.delivery.delivered_on'
+ %th= heading_helper Delivery, :delivered_on
%th.numeric= t 'deliveries.invoice_amount'
- %th= t 'simple_form.labels.defaults.note'
+ %th= heading_helper Delivery, :note
%tbody
- for delivery in @deliveries
%tr
diff --git a/app/views/deliveries/show.html.haml b/app/views/deliveries/show.html.haml
index 05a39db6..d5df7fd5 100644
--- a/app/views/deliveries/show.html.haml
+++ b/app/views/deliveries/show.html.haml
@@ -1,16 +1,16 @@
- title t('.title')
%dl
- %dt= t 'simple_form.labels.delivery.supplier'
+ %dt= heading_helper Delivery, :supplier
%dd= @delivery.supplier.name
- %dt= t 'simple_form.labels.delivery.delivered_on'
+ %dt= heading_helper Delivery, :delivered_on
%dd= @delivery.delivered_on
%dt= t 'deliveries.invoice_amount'
%dd= link_to_invoice(@delivery)
- if @delivery.invoice
%dt= t 'deliveries.invoice_net_amount'
%dd= number_to_currency @delivery.invoice.net_amount
- %dt= t 'simple_form.labels.defaults.note'
+ %dt= heading_helper Delivery, :note
%dd= simple_format @delivery.note
%h2= t '.title_articles'
diff --git a/app/views/deliveries/update_stock_article.js.erb b/app/views/deliveries/update_stock_article.js.erb
index ef46636d..7b2d56d6 100644
--- a/app/views/deliveries/update_stock_article.js.erb
+++ b/app/views/deliveries/update_stock_article.js.erb
@@ -10,7 +10,6 @@ $('div.container-fluid').prepend(
var stock_article_for_adding = $(
'<%= j(render(:partial => 'stock_article_for_adding', :locals => {:article => @stock_article, :delivery => @delivery})) %>'
).addClass('success');
- enablePriceTooltips(stock_article_for_adding);
$('#stock_article_<%= @stock_article.id %>').replaceWith(stock_article_for_adding);
updateSort('#stock_articles_for_adding');
diff --git a/app/views/finance/financial_transactions/new_collection.html.haml b/app/views/finance/financial_transactions/new_collection.html.haml
index 324b118b..aaa67129 100644
--- a/app/views/finance/financial_transactions/new_collection.html.haml
+++ b/app/views/finance/financial_transactions/new_collection.html.haml
@@ -5,12 +5,12 @@
var ordergroup = "#{escape_javascript(render('ordergroup'))}"
$(function() {
- $('a[data-remove-transaction]').live('click', function() {
+ $(document).on('click', 'a[data-remove-transaction]', function() {
$(this).parents('tr').remove();
return false;
});
- $('a[data-add-transaction]').click(function() {
+ $(document).on('click', 'a[data-add-transaction]', function() {
$('#ordergroups').append(ordergroup);
return false;
});
diff --git a/app/views/finance/group_order_articles/_form.html.haml b/app/views/finance/group_order_articles/_form.html.haml
index f606e3ac..8b6d41a0 100644
--- a/app/views/finance/group_order_articles/_form.html.haml
+++ b/app/views/finance/group_order_articles/_form.html.haml
@@ -5,7 +5,7 @@
%h3= t('.amount_change_for', article: @order_article.article.name)
.modal-body
= form.input :ordergroup_id, as: :select, collection: Ordergroup.all.map { |g| [g.name, g.id] }
- = form.input :result, hint: "Einheit: #{@order_article.article.unit}"
+ = form.input :result, hint: I18n.t('.result_hint', unit: @order_article.article.unit)
.modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= form.submit t('ui.save'), class: 'btn btn-primary'
diff --git a/app/views/finance/invoices/_invoices.html.haml b/app/views/finance/invoices/_invoices.html.haml
index 1663c609..621a08fe 100644
--- a/app/views/finance/invoices/_invoices.html.haml
+++ b/app/views/finance/invoices/_invoices.html.haml
@@ -5,14 +5,14 @@
%table.table.table-striped
%thead
%tr
- %th= t 'simple_form.labels.invoice.number'
- %th= t 'simple_form.labels.invoice.supplier'
- %th= t 'simple_form.labels.invoice.date'
- %th= t 'simple_form.labels.invoice.paid_on'
- %th= t 'simple_form.labels.invoice.amount'
- %th= t 'simple_form.labels.invoice.delivery'
- %th= t 'simple_form.labels.invoice.order'
- %th= t 'simple_form.labels.invoice.note'
+ %th= heading_helper Invoice, :number
+ %th= heading_helper Invoice, :supplier
+ %th= heading_helper Invoice, :date
+ %th= heading_helper Invoice, :paid_on
+ %th= heading_helper Invoice, :amount
+ %th= heading_helper Invoice, :delivery
+ %th= heading_helper Invoice, :order
+ %th= heading_helper Invoice, :note
%th
%th
%tbody
diff --git a/app/views/finance/invoices/show.html.haml b/app/views/finance/invoices/show.html.haml
index 28bb4519..1106aa5c 100644
--- a/app/views/finance/invoices/show.html.haml
+++ b/app/views/finance/invoices/show.html.haml
@@ -1,38 +1,38 @@
- title t('.title', number: @invoice.number)
%p
- %b= t('simple_form.labels.invoice.supplier') + ':'
+ %b= heading_helper(Invoice, :supplier) + ':'
= @invoice.supplier.name
- if @invoice.delivery
%p
- %b= t('simple_form.labels.invoice.delivery') + ':'
+ %b= heading_helper(Invoice, :delivery) + ':'
= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
- if @invoice.order
%p
- %b= t('simple_form.labels.invoice.order') + ':'
+ %b= heading_helper(Invoice, :order) + ':'
= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_order'), @invoice.order)).html_safe
%p
- %b= t('simple_form.labels.invoice.number') + ':'
+ %b= heading_helper(Invoice, :number) + ':'
= @invoice.number
%p
- %b= t('simple_form.labels.invoice.date') + ':'
+ %b= heading_helper(Invoice, :date) + ':'
= @invoice.date
%p
- %b= t('simple_form.labels.invoice.paid_on') + ':'
+ %b= heading_helper(Invoice, :paid_on) + ':'
= @invoice.paid_on
%p
- %b= t('simple_form.labels.invoice.amount') + ':'
+ %b= heading_helper(Invoice, :amount) + ':'
= number_to_currency @invoice.amount
%p
- %b= t('simple_form.labels.invoice.deposit') + ':'
+ %b= heading_helper(Invoice, :deposit) + ':'
= number_to_currency @invoice.deposit
%p
- %b= t('simple_form.labels.invoice.deposit_credit') + ':'
+ %b= heading_helper(Invoice, :deposit_credit) + ':'
= number_to_currency @invoice.deposit_credit
%p
- %b= t('simple_form.labels.invoice.note') + ':'
+ %b= heading_helper(Invoice, :note) + ':'
=h @invoice.note
= link_to t('ui.edit'), edit_finance_invoice_path(@invoice)
diff --git a/app/views/finance/order_articles/_edit.html.haml b/app/views/finance/order_articles/_edit.html.haml
index 3c63807e..0dddf8cd 100644
--- a/app/views/finance/order_articles/_edit.html.haml
+++ b/app/views/finance/order_articles/_edit.html.haml
@@ -11,7 +11,7 @@
= f.input :unit
- if @order_article.article.is_a?(StockArticle)
- %div.alert Preise von Lagerartikeln können nicht geändert werden!
+ %div.alert= t '.stock_alert'
- else
= simple_fields_for :article_price, @order_article.article_price do |f|
= f.input :unit_quantity
diff --git a/app/views/foodcoop/users/_users.html.haml b/app/views/foodcoop/users/_users.html.haml
index b3d27b78..df39c742 100644
--- a/app/views/foodcoop/users/_users.html.haml
+++ b/app/views/foodcoop/users/_users.html.haml
@@ -5,12 +5,12 @@
%thead
%tr
- if FoodsoftConfig[:use_nick]
- %th= t 'simple_form.labels.user.nick'
- %th= t 'simple_form.labels.user.name'
- %th= t 'simple_form.labels.user.email'
- %th= t 'simple_form.labels.user.phone'
- %th= t 'simple_form.labels.user.ordergroup'
- %th= t 'simple_form.labels.user.workgroup', count: 3
+ %th= heading_helper User, :nick
+ %th= heading_helper User, :name
+ %th= heading_helper User, :email
+ %th= heading_helper User, :phone
+ %th= heading_helper User, :ordergroup
+ %th= heading_helper User, :workgroup, count: 3
%tbody
- for user in @users
%tr
diff --git a/app/views/group_orders/_form.html.haml b/app/views/group_orders/_form.html.haml
index 7cd97150..14ca9303 100644
--- a/app/views/group_orders/_form.html.haml
+++ b/app/views/group_orders/_form.html.haml
@@ -3,16 +3,20 @@
$(function() {
#{data_to_js(@ordering_data)}
setGroupBalance(#{@ordering_data[:available_funds]});
- setCurrencyFormat("#{t('number.currency.format.separator')}", #{t('number.currency.format.precision')}, "#{t('number.currency.format.unit')}");
setMinimumBalance(#{FoodsoftConfig[:minimum_balance] or 0});
setToleranceBehaviour(#{FoodsoftConfig[:tolerance_is_costly]});
setStockit(#{@order.stockit?});
+ // create List for search-feature (using list.js, http://listjs.com)
+ var listjsResetPlugin = ['reset', {highlightClass: 'btn-primary'}];
+ var listjsDelayPlugin = ['delay', {delayedSearchTime: 500}];
+ new List(document.body, { valueNames: ['name'], engine: 'unlist', plugins: [listjsResetPlugin, listjsDelayPlugin] });
});
- title t('.title'), false
.row-fluid
.well.pull-left
+ %button{type: "button", class: "close", data: {dismiss: 'alert'}}= '×'.html_safe
%h2= @order.name
%dl.dl-horizontal
- unless @order.note.blank?
@@ -35,8 +39,17 @@
%dd= number_to_currency(@ordering_data[:available_funds])
.well.pull-right
+ %button{type: "button", class: "close", data: {dismiss: 'alert'}}= '×'.html_safe
= render 'switch_order', current_order: @order
+.row-fluid
+ .well.clear
+ .form-search
+ .input-append
+ = text_field_tag :article, params[:article], placeholder: t('.search_article'), class: 'search-query delayed-search resettable'
+ %button.add-on.btn.reset-search{:type => :button, :title => t('.reset_article_search')}
+ %i.icon.icon-remove
+
= form_for @group_order do |f|
= f.hidden_field :lock_version
= f.hidden_field :order_id
@@ -59,9 +72,9 @@
%th(style="width:20px")= t '.available'
%th#col_required= t '.amount'
%th{style: "width:15px;"}= t '.sum'
- %tbody
+ %tbody.list
- @order.articles_grouped_by_category.each do |category, order_articles|
- %tr.article-category
+ %tr.list-heading.article-category
%td
= category
%i.icon-tag
diff --git a/app/views/invites/new.html.haml b/app/views/invites/new.html.haml
index eb9081cb..2332db00 100644
--- a/app/views/invites/new.html.haml
+++ b/app/views/invites/new.html.haml
@@ -4,4 +4,4 @@
= form.hidden_field :group_id
= form.input :email
= form.submit t('.action')
- = link_to t('.back'), :back
+ = link_to t('ui.or_cancel'), :back
diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml
index dfd5f2f5..b3a4e30c 100644
--- a/app/views/layouts/_header.html.haml
+++ b/app/views/layouts/_header.html.haml
@@ -22,7 +22,9 @@
Javascripts
\==================================================
/ Placed at the end of the document so the pages load faster
- :javascript
- I18n = {locale: '#{j(I18n.locale.to_s)}'}
= javascript_include_tag "application"
+ :javascript
+ I18n.defaultLocale = "#{I18n.default_locale}";
+ I18n.locale = "#{I18n.locale}";
+ I18n.fallbacks = true;
= yield(:javascript)
diff --git a/app/views/shared/_open_orders.html.haml b/app/views/shared/_open_orders.html.haml
index 62e86fa6..5c00c5f4 100644
--- a/app/views/shared/_open_orders.html.haml
+++ b/app/views/shared/_open_orders.html.haml
@@ -2,7 +2,7 @@
%h2= t '.title'
- if ordergroup.not_enough_apples?
.alert
- = t '.not_enough_apples'
+ = t '.not_enough_apples'
- unless Order.open.empty?
%table.table.table-striped
%thead
diff --git a/app/views/stock_takings/_stock_change.html.haml b/app/views/stock_takings/_stock_change.html.haml
index 616be369..3d27c1fa 100644
--- a/app/views/stock_takings/_stock_change.html.haml
+++ b/app/views/stock_takings/_stock_change.html.haml
@@ -3,5 +3,6 @@
= form.hidden_field :stock_article_id
= "Menge (#{stock_change.stock_article.quantity_available})"
= form.text_field :quantity, :size => 5, :autocomplete => 'off'
- %b= stock_change.stock_article.name
- = "(#{number_to_currency(stock_change.stock_article.price)} / #{stock_change.stock_article.unit})"
+ %span{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => stock_change.stock_article})}}
+ %b= stock_change.stock_article.name
+ = "(#{number_to_currency(stock_change.stock_article.price)} / #{stock_change.stock_article.unit})"
diff --git a/app/views/stockit/_form.html.haml b/app/views/stockit/_form.html.haml
index 8b96aea8..32e58623 100644
--- a/app/views/stockit/_form.html.haml
+++ b/app/views/stockit/_form.html.haml
@@ -11,7 +11,7 @@
%span.add-on %
= f.input :deposit
- else
- = f.input :price, :input_html => {:disabled => 'disabled'}, :hint => t('.form.price_hint')
+ = f.input :price, :input_html => {:disabled => 'disabled'}, :hint => t('.price_hint')
= f.association :article_category
.form-actions
= f.submit class: 'btn'
diff --git a/app/views/stockit/history.haml b/app/views/stockit/history.haml
deleted file mode 100644
index f4fe2b07..00000000
--- a/app/views/stockit/history.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-- title t('.stock_changes', :article_name => @stock_article.name)
-
-%table.table.table-hover#stock_changes
- %thead
- %tr
- %th= t '.datetime'
- %th= t '.reason'
- %th= t '.change_quantity'
- %th= t '.new_quantity'
- %tbody
- - reversed_history = @stock_article.quantity_history.reverse
- - @stock_changes.each_with_index do |stock_change, index|
- %tr
- %td= l stock_change.created_at
- %td= link_to_stock_change_reason(stock_change)
- %td= stock_change.quantity
- %td= reversed_history[index]
diff --git a/app/views/stockit/index.html.haml b/app/views/stockit/index.html.haml
index 477e5816..c2899d9e 100644
--- a/app/views/stockit/index.html.haml
+++ b/app/views/stockit/index.html.haml
@@ -45,7 +45,7 @@
%tbody
- for article in @stock_articles
%tr{:class => stock_article_classes(article), :id => "stockArticle-#{article.id}"}
- %td=h article.name
+ %td= link_to article.name, article
%td= article.quantity
%td= article.quantity - article.quantity_available
%th= article.quantity_available
@@ -56,7 +56,6 @@
%td= article.article_category.name
%td
= link_to t('ui.edit'), edit_stock_article_path(article), class: 'btn btn-mini'
- = link_to t('ui.history'), stock_article_history_path(article), class: 'btn btn-mini'
= link_to t('ui.delete'), article, :method => :delete, :confirm => t('.confirm_delete'),
class: 'btn btn-mini btn-danger', :remote => true
%p
diff --git a/app/views/stockit/show.html.haml b/app/views/stockit/show.html.haml
new file mode 100644
index 00000000..5f416bf9
--- /dev/null
+++ b/app/views/stockit/show.html.haml
@@ -0,0 +1,47 @@
+- title @stock_article.name
+
+.row-fluid
+ .span6
+ %dl.dl-horizontal
+ %dt= StockArticle.human_attribute_name 'supplier'
+ %dd= link_to @stock_article.supplier.name, @stock_article.supplier
+ %dt= StockArticle.human_attribute_name 'name'
+ %dd= @stock_article.name
+ %dt= StockArticle.human_attribute_name 'unit'
+ %dd= @stock_article.unit
+ %dt= StockArticle.human_attribute_name 'price'
+ %dd= number_to_currency @stock_article.price
+ %dt= StockArticle.human_attribute_name 'tax'
+ %dd= number_to_percentage @stock_article.tax
+ %dt= StockArticle.human_attribute_name 'deposit'
+ %dd= number_to_currency @stock_article.deposit
+ %dt= StockArticle.human_attribute_name 'fc_price'
+ %dd= number_to_currency @stock_article.fc_price
+ %dt= StockArticle.human_attribute_name 'article_category'
+ %dd= @stock_article.article_category.name
+ %dt= StockArticle.human_attribute_name 'note'
+ %dd= @stock_article.note
+ %dt= StockArticle.human_attribute_name 'quantity'
+ %dd= @stock_article.quantity
+ %dt= StockArticle.human_attribute_name 'quantity_available'
+ %dd= @stock_article.quantity_available
+ .form-actions
+ = link_to t('ui.edit'), edit_stock_article_path(@stock_article), class: 'btn'
+
+ .span6
+ %h2= t('.stock_changes')
+ %table.table.table-hover#stock_changes
+ %thead
+ %tr
+ %th= t '.datetime'
+ %th= t '.reason'
+ %th= t '.change_quantity'
+ %th= t '.new_quantity'
+ %tbody
+ - reversed_history = @stock_article.quantity_history.reverse
+ - @stock_changes.each_with_index do |stock_change, index|
+ %tr
+ %td= l stock_change.created_at
+ %td= link_to_stock_change_reason(stock_change)
+ %td= stock_change.quantity
+ %td= reversed_history[index]
diff --git a/app/views/suppliers/_form.haml b/app/views/suppliers/_form.haml
index 09047bc1..93de2a97 100644
--- a/app/views/suppliers/_form.haml
+++ b/app/views/suppliers/_form.haml
@@ -1,7 +1,7 @@
= simple_form_for @supplier do |f|
- if @supplier.shared_supplier
- .alert.alert-success
- = t 'suppliers.shared_supplier_note'
+ .alert.alert-info
+ = t 'suppliers.shared_supplier_note'
= f.hidden_field :shared_supplier_id
= f.input :name
= f.input :address
diff --git a/app/views/suppliers/index.haml b/app/views/suppliers/index.haml
index 2ea9ad27..e49c8f83 100644
--- a/app/views/suppliers/index.haml
+++ b/app/views/suppliers/index.haml
@@ -6,9 +6,9 @@
%table.table.table-striped
%thead
%tr
- %th= t 'simple_form.labels.supplier.name'
- %th= t 'simple_form.labels.supplier.phone'
- %th= t 'simple_form.labels.supplier.customer_number'
+ %th= heading_helper Supplier, :name
+ %th= heading_helper Supplier, :phone
+ %th= heading_helper Supplier, :customer_number, short: true
%th
%th
%th
diff --git a/app/views/suppliers/shared_suppliers.haml b/app/views/suppliers/shared_suppliers.haml
index 22cf67da..8e9c3eef 100644
--- a/app/views/suppliers/shared_suppliers.haml
+++ b/app/views/suppliers/shared_suppliers.haml
@@ -4,11 +4,11 @@
%table.table.table-striped
%thead
%tr
- %th= t 'simple_form.labels.supplier.name'
- %th= t 'simple_form.labels.supplier.address'
- %th= t 'simple_form.labels.supplier.note'
- %th= t 'simple_form.labels.supplier.delivery_days'
- %th= t 'simple_form.labels.supplier.is_subscribed'
+ %th= heading_helper Supplier, :name
+ %th= heading_helper Supplier, :address
+ %th= heading_helper Supplier, :note
+ %th= heading_helper Supplier, :delivery_days
+ %th= heading_helper Supplier, :is_subscribed
%tbody
- for shared_supplier in @shared_suppliers
%tr
diff --git a/app/views/suppliers/show.haml b/app/views/suppliers/show.haml
index 0a9417fe..fbc4e90a 100644
--- a/app/views/suppliers/show.haml
+++ b/app/views/suppliers/show.haml
@@ -4,32 +4,32 @@
.span6
- if shared_supplier = @supplier.shared_supplier
.alert.alert-info
- = t 'suppliers.shared_supplier_note'
+ = t 'suppliers.shared_supplier_note'
%dl.dl-horizontal
- %dt= t('simple_form.labels.supplier.address') + ':'
+ %dt= heading_helper(Supplier, :address) + ':'
%dd= @supplier.address
- %dt= t('simple_form.labels.supplier.phone') + ':'
+ %dt= heading_helper(Supplier, :phone) + ':'
%dd= @supplier.phone
- %dt= t('simple_form.labels.supplier.phone2') + ':'
+ %dt= heading_helper(Supplier, :phone2) + ':'
%dd= @supplier.phone2
- %dt= t('simple_form.labels.supplier.fax') + ':'
+ %dt= heading_helper(Supplier, :fax) + ':'
%dd= @supplier.fax
- %dt= t('simple_form.labels.supplier.email') + ':'
+ %dt= heading_helper(Supplier, :email) + ':'
%dd= @supplier.email
- %dt= t('simple_form.labels.supplier.url') + ':'
+ %dt= heading_helper(Supplier, :url) + ':'
%dd= link_to @supplier.url, @supplier.url
- %dt= t('simple_form.labels.supplier.contact_person') + ':'
+ %dt= heading_helper(Supplier, :contact_person) + ':'
%dd= @supplier.contact_person
- %dt= t('simple_form.labels.supplier.customer_number') + ':'
+ %dt= heading_helper(Supplier, :customer_number) + ':'
%dd= @supplier.customer_number
- %dt= t('simple_form.labels.supplier.delivery_days') + ':'
+ %dt= heading_helper(Supplier, :delivery_days) + ':'
%dd= @supplier.delivery_days
- %dt= t('simple_form.labels.supplier.order_howto') + ':'
+ %dt= heading_helper(Supplier, :order_howto) + ':'
%dd= @supplier.order_howto
- %dt= t('simple_form.labels.supplier.note') + ':'
+ %dt= heading_helper(Supplier, :note) + ':'
%dd= @supplier.note
- %dt= t('simple_form.labels.supplier.min_order_quantity') + ':'
+ %dt= heading_helper(Supplier, :min_order_quantity) + ':'
%dd= @supplier.min_order_quantity
.clearfix
@@ -43,8 +43,8 @@
%table.table.table-horizontal
%thead
%tr
- %th= t 'simple_form.labels.defaults.date'
- %th= t 'simple_form.labels.defaults.amount'
+ %th= heading_helper Delivery, :date
+ %th= heading_helper Delivery, :amount
%tbody
- for delivery in @deliveries
%tr
diff --git a/app/views/tasks/show.haml b/app/views/tasks/show.haml
index 8777d15d..86de92bf 100644
--- a/app/views/tasks/show.haml
+++ b/app/views/tasks/show.haml
@@ -3,22 +3,22 @@
%section
%dl.dl-horizontal
- %dt= t 'simple_form.labels.task.name'
+ %dt= Task.human_attribute_name(:name)
%dd= @task.name
- if @task.description.present?
- %dt= t 'simple_form.labels.defaults.description'
+ %dt= Task.human_attribute_name(:description)
%dd= simple_format(@task.description)
- if @task.due_date.present?
- %dt= t '.due_date'
+ %dt= Task.human_attribute_name(:due_date)
%dd
= format_date(@task.due_date)
- if @task.periodic?
%i.icon-repeat{title: t('tasks.repeated')}
- %dt= t 'simple_form.labels.task.duration'
+ %dt= Task.human_attribute_name(:duration)
%dd= t('.hours', count: @task.duration)
- %dt= t 'simple_form.labels.task.user_list'
+ %dt= Task.human_attribute_name(:user_list)
%dd= task_assignments(@task)
- %dt= t 'simple_form.labels.task.workgroup'
+ %dt= Task.human_attribute_name(:workgroup)
%dd
- if @task.workgroup
= link_to @task.workgroup.name, workgroup_tasks_path(workgroup_id: @task.workgroup_id)
@@ -30,7 +30,7 @@
- unless @task.done?
= link_to t('.mark_done'), set_done_task_path(@task), method: :post, class: 'btn'
= link_to t('ui.edit'), edit_task_path(@task), class: 'btn'
- = link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?",
+ = link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => t('.confirm_delete_single'),
class: 'btn btn-danger'
- if @task.periodic?
= link_to t('.delete_group'), task_path(@task, periodic: true), method: :delete,
diff --git a/config/application.rb b/config/application.rb
index 6d519277..2d8cf3ef 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -30,7 +30,8 @@ module Foodsoft
# config.time_zone = 'Central Time (US & Canada)'
# Internationalization.
- config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
+ config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '*.yml')]
+ config.i18n.available_locales = Pathname.glob(Rails.root.join('config', 'locales', '??{-*,}.yml')).map{|p| p.basename('.yml').to_s }
config.i18n.default_locale = :en
# Configure the default encoding used in templates for Ruby 1.9.
@@ -59,7 +60,8 @@ module Foodsoft
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
- # Do not enable database connection when precompiling assets
- config.assets.initialize_on_precompile = false
+ # It would be nice not to enable database connection when precompiling assets,
+ # but i18n-js requires initialization, that's why it's on.
+ config.assets.initialize_on_precompile = true
end
end
diff --git a/config/environments/development.rb.SAMPLE b/config/environments/development.rb.SAMPLE
index 826028ba..ac1781e6 100644
--- a/config/environments/development.rb.SAMPLE
+++ b/config/environments/development.rb.SAMPLE
@@ -35,6 +35,9 @@ Foodsoft::Application.configure do
# Expands the lines which load the assets
config.assets.debug = true
+ # Required for i18n-js
+ config.assets.initialize_on_precompile = true
+
# Configure hostname for action mailer
config.action_mailer.default_url_options = { host: 'localhost:3000' }
@@ -42,4 +45,4 @@ Foodsoft::Application.configure do
# Mailcatcher can be installed by gem install mailcatcher
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { address: "localhost", port: 1025 }
-end
\ No newline at end of file
+end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 30c06137..b67c0285 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -11,6 +11,9 @@ Foodsoft::Application.configure do
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
+ # Required for i18n-js
+ config.assets.initialize_on_precompile = true
+
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
diff --git a/config/i18n-js.yml b/config/i18n-js.yml
new file mode 100644
index 00000000..76af6fda
--- /dev/null
+++ b/config/i18n-js.yml
@@ -0,0 +1,4 @@
+# only serve selected strings for i18n-js to keep filesize down
+translations:
+- file: 'app/assets/javascripts/i18n/translations.js'
+ only: ['*.js.*', '*.number.*', '*.date.formats.*']
diff --git a/config/initializers/client_side_validations.rb b/config/initializers/client_side_validations.rb
index caf18378..95ff1644 100644
--- a/config/initializers/client_side_validations.rb
+++ b/config/initializers/client_side_validations.rb
@@ -1,7 +1,15 @@
# ClientSideValidations Initializer
-require 'client_side_validations/simple_form' if defined?(::SimpleForm)
-require 'client_side_validations/formtastic' if defined?(::Formtastic)
+# Uncomment to disable uniqueness validator, possible security issue
+# Disabled because of possible security issue and because of bug
+# https://github.com/bcardarella/client_side_validations/pull/532
+ClientSideValidations::Config.disabled_validators = [:uniqueness]
+
+# Uncomment to validate number format with current I18n locale
+# Foodsoft is currently using localize_input which is activated on certain
+# fields only, meaning we can't globally turn this on. The non-i18n number
+# format is still supported - so for now keep false.
+# ClientSideValidations::Config.number_format_with_locale = true
# Uncomment the following block if you want each input field to have the validation messages attached.
# ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
diff --git a/config/initializers/load_app_config.rb b/config/initializers/load_app_config.rb
index 1509536e..9501a48a 100644
--- a/config/initializers/load_app_config.rb
+++ b/config/initializers/load_app_config.rb
@@ -14,13 +14,15 @@ url_options.merge!({:port => FoodsoftConfig[:port]}) if FoodsoftConfig[:port]
Foodsoft::Application.configure do
config.action_mailer.default_url_options = url_options
- if Rails.env !~ /development|test/
+ if %w(production).include? Rails.env
# Configuration of the exception_notification plugin
# Mailadresses are set in config/app_config.yml
- config.middleware.use ExceptionNotifier,
- :email_prefix => FoodsoftConfig[:notification]['email_prefix'],
- :sender_address => FoodsoftConfig[:notification]['sender_address'],
- :exception_recipients => FoodsoftConfig[:notification]['error_recipients']
+ config.middleware.use ExceptionNotification::Rack,
+ :email => {
+ :email_prefix => FoodsoftConfig[:notification]['email_prefix'],
+ :sender_address => FoodsoftConfig[:notification]['sender_address'],
+ :exception_recipients => FoodsoftConfig[:notification]['error_recipients']
+ }
end
end
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 07a7f2f9..fc164a7c 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -1,98 +1,142 @@
de:
- activemodel:
- errors:
- format: ! '%{attribute} %{message}'
- general: Ein Problem ist aufgetreten.
- general_again: Ein Fehler ist aufgetreten. Bitte erneut versuchen.
- general_msg: ! 'Ein Fehler ist aufgetreten: %{msg}'
- messages:
- accepted: muss akzeptiert werden
- blank: muss ausgefüllt werden
- confirmation: stimmt nicht mit der Bestätigung überein
- empty: muss ausgefüllt werden
- equal_to: muss genau %{count} sein
- even: muss gerade sein
- exclusion: ist nicht verfügbar
- greater_than: muss größer als %{count} sein
- greater_than_or_equal_to: muss größer oder gleich %{count} sein
- inclusion: ist kein gültiger Wert
- invalid: ist nicht gültig
- less_than: muss kleiner als %{count} sein
- less_than_or_equal_to: muss kleiner oder gleich %{count} sein
- not_a_number: ist keine Zahl
- not_an_integer: muss ganzzahlig sein
- odd: muss ungerade sein
- record_invalid: ! 'Gültigkeitsprüfung ist fehlgeschlagen: %{errors}'
- taken: ist bereits vergeben
- taken_with_deleted: ist bereits vergeben (eine gelöschte Gruppe)
- too_long: ist zu lang (nicht mehr als %{count} Zeichen)
- too_short: ist zu kurz (nicht weniger als %{count} Zeichen)
- wrong_length: hat die falsche Länge (muss genau %{count} Zeichen haben)
- template:
- body: ! 'Bitte überprüfen Sie die folgenden Felder:'
- header:
- one: ! 'Konnte %{model} nicht speichern: ein Fehler.'
- other: ! 'Konnte %{model} nicht speichern: %{count} Fehler.'
activerecord:
attributes:
article:
article_category: Kategorie
availability: Artikel ist verfügbar?
+ availability_short: verf.
deposit: Pfand
fc_price: Endpreis
- fc_share: FC-Aufschlag
+ fc_price_short:
+ fc_share: FoodCoop-Aufschlag
+ fc_share_short: FC-Aufschlag
gross_price: Bruttopreis
+ manufacturer: Produzent
+ name: Name
+ note: Notiz
+ order_number: Bestellnummer
+ origin: Herkunft
price: Nettopreis
+ supplier: Lieferantin
tax: MwSt
unit: Einheit
unit_quantity: Gebindegröße
+ unit_quantity_short: GebGr
+ article_category:
+ description: Beschreibung
+ name: Name
+ delivery:
+ delivered_on: Lieferdatum
+ note: Notiz
+ supplier: Lieferantin
financial_transaction:
amount: Betrag
note: Notiz
+ group_order_article:
+ ordergroup_id: Bestellgruppe
+ result: Menge
+ invoice:
+ amount: Betrag
+ date: Rechnungsdatum
+ delivery: Lieferung
+ deposit: Pfand berechnet
+ deposit_credit: Pfand gutgeschrieben
+ note: Notiz
+ number: Nummer
+ order: Bestellung
+ paid_on: Bezahlt am
+ supplier: Lieferant
+ message:
+ body: Inhalt
+ group_id: Gruppe
+ private: Privat
+ recipient_tokens: Empfänger_innen
+ sent_to_all: An alle Mitglieder schicken
+ subject: Betreff
+ order:
+ ends: Endet am
+ note: Notiz
+ starts: Läuft vom
+ order_article:
+ units_to_order: Menge
+ update_current_price: Globalen Preis aktualisieren
+ order_comment:
+ text: Kommentiere diese Bestellung ...
+ ordergroup:
+ contact_address: Adresse
+ contact_person: Kontaktperson
+ contact_phone: Telefon
+ description: Beschreibung
+ ignore_apple_restriction: Bestellstop bei zu wenig Äpfeln ignorieren
+ name: Name
+ user_tokens: Mitglieder
+ page:
+ body: Inhalt
+ parent_id: Oberseite
+ title: Titel
stock_article:
price: Nettopreis
+ quantity: Lagerbestand
+ quantity_available: Verfügbarer Bestand
+ supplier: Lieferant
+ stock_taking:
+ date: Datum
+ note: Notiz
+ supplier:
+ address: Adresse
+ contact_person: Ansprechparter_in
+ customer_number: Kundennummer
+ customer_number_short: Kundennr.
+ delivery_days: Liefertage
+ email: Email
+ fax: FAX
+ is_subscribed: abonniert?
+ min_order_quantity: Mindestbestellmenge
+ name: Name
+ note: Notiz
+ order_howto: Howto Bestellen
+ phone: Telefon
+ phone2: Telefon 2
+ url: Homepage
+ task:
+ description: Beschreibung
+ done: Erledigt?
+ due_date: Wann erledigen?
+ duration: Dauer
+ name: Name
+ required_users: Anzahl
+ user_list: Verantwortliche
+ workgroup: Arbeitsgruppe
user:
+ email: Email
first_name: Vorname
+ last_name: Nachname
+ name: Name
+ nick: Benutzername
+ ordergroup: Bestellgruppe
password: Passwort
+ password_confirmation: Passwort wiederholen
+ phone: Telefon
+ workgroup:
+ one: Arbeitsgruppe
+ other: Arbeitsgruppen
+ workgroup:
+ description: Beschreibung
+ name: Name
+ next_weekly_tasks_number: Für wieviel Wochen im Voraus sollen Aufgaben erstellt werden?
+ role_admin: Administration
+ role_article_meta: Artikeldatenbank
+ role_finance: Finanzen
+ role_orders: Bestellverwaltung
+ role_suppliers: Lieferanten
+ user_tokens: Mitglieder
errors:
- format: ! '%{attribute} %{message}'
- general: Ein Problem ist aufgetreten.
- general_again: Ein Fehler ist aufgetreten. Bitte erneut versuchen.
- general_msg: ! 'Ein Fehler ist aufgetreten: %{msg}'
has_many_left: ist noch mit einem/r %{collection} verknüpft!
- messages:
- accepted: muss akzeptiert werden
- blank: muss ausgefüllt werden
- confirmation: stimmt nicht mit der Bestätigung überein
- empty: muss ausgefüllt werden
- equal_to: muss genau %{count} sein
- even: muss gerade sein
- exclusion: ist nicht verfügbar
- greater_than: muss größer als %{count} sein
- greater_than_or_equal_to: muss größer oder gleich %{count} sein
- inclusion: ist kein gültiger Wert
- invalid: ist nicht gültig
- less_than: muss kleiner als %{count} sein
- less_than_or_equal_to: muss kleiner oder gleich %{count} sein
- not_a_number: ist keine Zahl
- not_an_integer: muss ganzzahlig sein
- odd: muss ungerade sein
- record_invalid: ! 'Gültigkeitsprüfung ist fehlgeschlagen: %{errors}'
- taken: ist bereits vergeben
- taken_with_deleted: ist bereits vergeben (eine gelöschte Gruppe)
- too_long: ist zu lang (nicht mehr als %{count} Zeichen)
- too_short: ist zu kurz (nicht weniger als %{count} Zeichen)
- wrong_length: hat die falsche Länge (muss genau %{count} Zeichen haben)
models:
task:
attributes:
done:
exclusion: erledigte Aufgaben können nicht wöchentlich wiederholt werden
- template:
- body: ! 'Bitte überprüfen Sie die folgenden Felder:'
- header:
- one: ! 'Konnte %{model} nicht speichern: ein Fehler.'
- other: ! 'Konnte %{model} nicht speichern: %{count} Fehler.'
models:
article: Artikel
article_category: Artikelkategorie
@@ -212,6 +256,11 @@ de:
workgroups:
members: Mitglieder
name: Name
+ application:
+ controller:
+ error_authn:
+ error_denied:
+ error_members_only: Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!
article_categories:
create:
notice: Die Kategorie wurde gespeichert
@@ -305,18 +354,21 @@ de:
error_nosel: Du hast keine Artikel ausgewählt
parse_upload:
body:
Bitte überprufe die engelesenen Artikel.
Achtung, momentan gibt es keine Überprüfung auf doppelte Artikel.
+ title:
+ sync:
outlist:
+ alert_used: Achtung, %{article} wird gerade in einer laufenden Bestellung verwendet. Bitte erst Bestellung anpassen.
body: ! 'Folgende Artikel wurden ausgelistet und werden gelöscht:'
body_skip: Es müssen keine Artikel gelöscht werden.
title: Auslisten ...
price_short: Preis
- submit: Alle löschen/aktualisieren
+ submit: Alle synchronisieren
title: Artikel mit externer Datenbank synchronisieren
unit_quantity_short: GebGr
update:
- body: Jeder Artikel wird doppelt angezeigt. Die alten Werte sind grau und die Textfelder sind mit den aktuellen Werten vorausgefüllt.
Abweichungen zu den alten Artikeln sind gelb markiert.
+ body: ! 'Jeder Artikel wird doppelt angezeigt: die alten Werte sind grau und die Textfelder sind mit den aktuellen Werten vorausgefüllt. Abweichungen zu den alten Artikeln sind gelb markiert.'
title: Aktualisieren ...
- update_msg: ! 'Artikel müssen aktualisiert werden:'
+ update_msg: ! '%{count} Artikel müssen aktualisiert werden.'
upload:
body: Die Datei muss eine Textdatei mit der Endung '.csv' sein. Die erste Zeile wird beim Einlesen ignoriert.
Die Felder müssen mit einem Semikolon (';') getrennt und der Text mit doppelten Anführungszeichen ("Text...") umklammert werden.
Als Zeichensatz wird UTF-8 erwartet. Korrekte Reihenfolge der Spalten:
fields:
@@ -326,102 +378,6 @@ de:
file_label: Bitte wähle eine kompatible Datei aus
submit: Datei hochladen
title: ! '%{supplier} / Artikel hochladen'
- date:
- abbr_day_names:
- - So
- - Mo
- - Di
- - Mi
- - Do
- - Fr
- - Sa
- abbr_month_names:
- -
- - Jan
- - Feb
- - Mär
- - Apr
- - Mai
- - Jun
- - Jul
- - Aug
- - Sep
- - Okt
- - Nov
- - Dez
- day_names:
- - Sonntag
- - Montag
- - Dienstag
- - Mittwoch
- - Donnerstag
- - Freitag
- - Samstag
- formats:
- default: ! '%d.%m.%Y'
- long: ! '%e. %B %Y'
- short: ! '%e. %b'
- month_names:
- -
- - Januar
- - Februar
- - März
- - April
- - Mai
- - Juni
- - Juli
- - August
- - September
- - Oktober
- - November
- - Dezember
- order:
- - :day
- - :month
- - :year
- datetime:
- distance_in_words:
- about_x_hours:
- one: etwa eine Stunde
- other: etwa %{count} Stunden
- about_x_months:
- one: etwa ein Monat
- other: etwa %{count} Monate
- about_x_years:
- one: etwa ein Jahr
- other: etwa %{count} Jahre
- almost_x_years:
- one: fast ein Jahr
- other: fast %{count} Jahre
- half_a_minute: eine halbe Minute
- less_than_x_minutes:
- one: weniger als eine Minute
- other: weniger als %{count} Minuten
- less_than_x_seconds:
- one: weniger als eine Sekunde
- other: weniger als %{count} Sekunden
- over_x_years:
- one: mehr als ein Jahr
- other: mehr als %{count} Jahre
- x_days:
- one: ein Tag
- other: ! '%{count} Tage'
- x_minutes:
- one: eine Minute
- other: ! '%{count} Minuten'
- x_months:
- one: ein Monat
- other: ! '%{count} Monate'
- x_seconds:
- one: eine Sekunde
- other: ! '%{count} Sekunden'
- prompts:
- day: Tag
- hour: Stunden
- minute: Minuten
- month: Monat
- second: Sekunden
- year: Jahr
deliveries:
add_stock_change:
how_many_units: Wie viele Einheiten (%{unit}) des Artikels »%{name}« liefern?
@@ -521,38 +477,9 @@ de:
title: ! 'Sortiermatrix der Bestellung: %{name}, beendet am %{date}'
total: Insgesamt %{count} Artikel
errors:
- format: ! '%{attribute} %{message}'
general: Ein Problem ist aufgetreten.
general_again: Ein Fehler ist aufgetreten. Bitte erneut versuchen.
general_msg: ! 'Ein Fehler ist aufgetreten: %{msg}'
- messages:
- accepted: muss akzeptiert werden
- blank: muss ausgefüllt werden
- confirmation: stimmt nicht mit der Bestätigung überein
- empty: muss ausgefüllt werden
- equal_to: muss genau %{count} sein
- even: muss gerade sein
- exclusion: ist nicht verfügbar
- greater_than: muss größer als %{count} sein
- greater_than_or_equal_to: muss größer oder gleich %{count} sein
- inclusion: ist kein gültiger Wert
- invalid: ist nicht gültig
- less_than: muss kleiner als %{count} sein
- less_than_or_equal_to: muss kleiner oder gleich %{count} sein
- not_a_number: ist keine Zahl
- not_an_integer: muss ganzzahlig sein
- odd: muss ungerade sein
- record_invalid: ! 'Gültigkeitsprüfung ist fehlgeschlagen: %{errors}'
- taken: ist bereits vergeben
- taken_with_deleted: ist bereits vergeben (eine gelöschte Gruppe)
- too_long: ist zu lang (nicht mehr als %{count} Zeichen)
- too_short: ist zu kurz (nicht weniger als %{count} Zeichen)
- wrong_length: hat die falsche Länge (muss genau %{count} Zeichen haben)
- template:
- body: ! 'Bitte überprüfen Sie die folgenden Felder:'
- header:
- one: ! 'Konnte %{model} nicht speichern: ein Fehler.'
- other: ! 'Konnte %{model} nicht speichern: %{count} Fehler.'
feedback:
create:
notice: Das Feedback wurde erfolgreich verschickt. Vielen Dank!
@@ -644,11 +571,13 @@ de:
create:
notice: Rechnung wurde erstellt.
financial_transactions:
- create:
- notice: Die Transaktion wurde gespeichert.
- create_collection:
- alert: ! 'Ein Fehler ist aufgetreten: %{error}'
- notice: Alle Transaktionen wurden gespeichert.
+ controller:
+ create:
+ notice: Die Transaktion wurde gespeichert.
+ create_collection:
+ alert: ! 'Ein Fehler ist aufgetreten: %{error}'
+ error_note_required: Notiz wird benötigt!
+ notice: Alle Transaktionen wurden gespeichert.
index:
balance: ! 'Kontostand: %{balance}'
last_updated_at: (zuletzt aktualisiert vor %{when})
@@ -677,6 +606,7 @@ de:
group_order_articles:
form:
amount_change_for: Mengenänderung für %{article}
+ result_hint: ! 'Einheit: %{unit}'
index:
amount: Betrag
amount_fc: Betrag(FC)
@@ -712,6 +642,7 @@ de:
title: Rechnung %{number}
order_articles:
edit:
+ stock_alert: Preise von Lagerartikeln können nicht geändert werden!
title: Artikel aktualisieren
new:
title: Neuer gelieferter Artikel die Bestellung
@@ -787,6 +718,8 @@ de:
new_funds: Neuer Kontostand
note: Notiz
price: Preis
+ reset_article_search: Suche zurücksetzen
+ search_article: Artikel suchen...
sum: Summe
sum_amount: ! 'Gesamtbestellmenge bisher:'
supplier: Lieferant
@@ -875,15 +808,11 @@ de:
option_choose: Lieferantin/Lager auswählen
option_stock: Lager
order_pdf: PDF erstellen
- select:
- prompt: Bitte wählen
submit:
- create: ! '%{model} speichern'
invite:
create: Einladung verschicken
message:
create: Nachricht verschicken
- update: Änderungen speichern
tasks:
required_users: Es fehlen %{count} Mitstreiterinnen!
home:
@@ -971,9 +900,11 @@ de:
title: Person einladen
new:
action: Einlading abschicken
- back: oder zurück
body: Hier kannst du eine Person in die Gruppe %{group} einladen, die noch nicht Mitglied der Foodcoop ist.
success: Benutzerin wurde erfolgreich eingeladen.
+ js:
+ ordering:
+ confirm_change: Änderungen an dieser Bestellung gehen verloren, wenn zu einer anderen Bestellung gewechselt wird. Möchtest Du trotzdem wechseln?
layouts:
application1:
title: Foodsoft - %{title}
@@ -1218,57 +1149,6 @@ de:
home: Startseite
title: Wiki
workgroups: Arbeitsgruppen
- number:
- currency:
- format:
- delimiter: .
- format: ! '%n %u'
- precision: 2
- separator: ! ','
- significant: false
- strip_insignificant_zeros: false
- unit: €
- format:
- delimiter: .
- precision: 2
- separator: ! ','
- significant: false
- strip_insignificant_zeros: false
- human:
- decimal_units:
- format: ! '%n %u'
- units:
- billion:
- one: Milliarde
- other: Milliarden
- million: Millionen
- quadrillion:
- one: Billiarde
- other: Billiarden
- thousand: Tausend
- trillion: Billionen
- unit:
- format:
- delimiter:
- precision: 1
- significant: true
- strip_insignificant_zeros: true
- storage_units:
- format: ! '%n %u'
- units:
- byte:
- one: Byte
- other: Bytes
- gb: GB
- kb: KB
- mb: MB
- tb: TB
- percentage:
- format:
- delimiter:
- precision:
- format:
- delimiter:
ordergroups:
edit:
title: Bestellgruppe bearbeiten
@@ -1293,7 +1173,6 @@ de:
fax:
amount: Menge
articles: Artikel
- customer_number: Kundennummer
delivery_day: Liefertag
heading: Bestellung für %{name}
name: Name
@@ -1532,7 +1411,7 @@ de:
message:
private: Nachricht erscheint nicht im Foodsoft Posteingang
order_article:
- units_to_order: Anzahl gelieferter Gebinde
+ units_to_order: Wenn Du die Gesamtanzahl gelieferter Gebinde änderst, musst Du auch die individuelle Anzahl der einzelnen Bestellgruppen anpassen, indem Du auf den Artikelnamen klickst. Sie werden nicht automatisch neuberechnet und andernfalls werden den Bestellgruppen Artikel in Rechnung gestellt, die nicht geliefert wurden!
update_current_price: Ändert auch den Preis für aktuelle Bestellungen
stock_article:
copy_stock_article:
@@ -1547,74 +1426,6 @@ de:
required_users: Wieviel Benutzerinnen werden insgesamt benötigt?
tax: In Prozent, Standard sind 7,0
labels:
- article:
- article_category: Kategorie
- manufacturer: Produzent
- name: Name
- note: Notiz
- origin: Herkunft
- unit: Einheit
- article_category:
- description: Beschreibung
- name: Name
- defaults:
- amount: Betrag
- date: Datum
- deposit: Pfand
- description: Beschreibung
- email: E-Mail
- note: Notiz
- order_number: Bestellnummer
- ordergroup: Bestellgruppe
- password: Passwort
- password_confirmation: Passwort wiederholen
- phone: Telefon
- price: Preis (netto)
- tax: MwSt
- title: Titel
- unit_quantity: Gebindegröße
- user_tokens: Mitglieder
- delivery:
- delivered_on: Lieferdatum
- supplier: Lieferantin
- group_order_article:
- ordergroup_id: Bestellgruppe
- result: Menge
- invoice:
- amount: Betrag
- date: Rechnungsdatum
- delivery: Lieferung
- deposit: Pfand berechnet
- deposit_credit: Pfand gutgeschrieben
- note: Notiz
- number: Nummer
- order: Bestellung
- paid_on: Bezahlt am
- supplier: Lieferant
- message:
- body: Inhalt
- group_id: Gruppe
- private: Privat
- recipient_tokens: Empfänger_innen
- sent_to_all: An alle Mitglieder schicken
- subject: Betreff
- order:
- ends: Endet am
- starts: Läuft vom
- order_article:
- units_to_order: Menge
- update_current_price: Globalen Preis aktualisieren
- order_comment:
- text: Kommentiere diese Bestellung ...
- ordergroup:
- contact_address: Adresse
- contact_person: Kontaktperson
- contact_phone: Telefon
- ignore_apple_restriction: Bestellstop bei zu wenig Äpfeln ignorieren
- name: Name
- page:
- body: Inhalt
- parent_id: Oberseite
settings:
messages:
send_as_email: Bekomme Nachrichten als Emails.
@@ -1630,48 +1441,6 @@ de:
settings_group:
messages: Nachrichten
privacy: Privatsphäre
- stock_article:
- supplier: Lieferant
- supplier:
- address: Adresse
- contact_person: Ansprechparter_in
- customer_number: Kundennummer
- delivery_days: Liefertage
- email: Email
- fax: FAX
- is_subscribed: abonniert?
- min_order_quantity: Mindestbestellmenge
- name: Name
- note: Notiz
- order_howto: Howto Bestellen
- phone: Telefon
- phone2: Telefon 2
- url: Homepage
- task:
- done: Erledigt?
- due_date: Wann erledigen?
- duration: Dauer
- name: Name
- required_users: Anzahl
- user_list: Verantwortliche
- workgroup: Arbeitsgruppe
- user:
- email: Email
- last_name: Nachname
- name: Name
- nick: Benutzername
- ordergroup: Bestellgruppe
- phone: Telefon
- workgroup:
- one: Arbeitsgruppe
- other: Arbeitsgruppen
- workgroup:
- next_weekly_tasks_number: Für wieviel Wochen im Voraus sollen Aufgaben erstellt werden?
- role_admin: Administration
- role_article_meta: Artikeldatenbank
- role_finance: Finanzen
- role_orders: Bestellverwaltung
- role_suppliers: Lieferanten
'no': Nein
options:
settings:
@@ -1725,15 +1494,6 @@ de:
title: Lagerartikel bearbeiten
form:
price_hint: Um Chaos zu vermeiden können bis auf weiteres die Preise von angelegten Lagerartikeln nicht mehr verändert werden.
- history:
- change_quantity: Veränderung
- datetime: Zeitpunkt
- delivery: Lieferung
- new_quantity: Neuer Bestand
- order: Bestellung
- reason: Ereignis
- stock_changes: Verlauf anzeigen für »%{article_name}«
- stock_taking: Inventur
index:
article:
article: Artikel
@@ -1759,6 +1519,15 @@ de:
new:
search_text: ! 'Suche nache Artikeln aus allen Katalogen:'
title: Neuen Lagerartikel anlegen
+ show:
+ change_quantity: Veränderung
+ datetime: Zeitpunkt
+ delivery: Lieferung
+ new_quantity: Neuer Bestand
+ order: Bestellung
+ reason: Ereignis
+ stock_changes: Verlauf des Lagerbestands
+ stock_taking: Inventur
stock_create:
notice: Lagerartikel wurde gespeichert.
stock_update:
@@ -1794,11 +1563,6 @@ de:
show_deliveries: Zeige alle Lieferungen
update:
notice: Lieferant wurde aktualisiert
- support:
- array:
- last_word_connector: ! ' und '
- two_words_connector: ! ' und '
- words_connector: ! ', '
tasks:
accept:
notice: Du hast die Aufgabe übernommen
@@ -1854,8 +1618,8 @@ de:
show:
accept_task: Aufgabe übernehmen
confirm_delete_group: Diese und alle folgenden wöchentlichen Aufgaben wirklich löschen?
+ confirm_delete_single: Die Aufgabe wirklich löschen?
delete_group: Aufgabe und folgende löschen
- due_date: Fälligkeitsdatum
hours: ! '%{count}h'
mark_done: Als erledigt markieren
reject_task: Aufgabe ablehnen
@@ -1872,18 +1636,10 @@ de:
workgroup:
title: Aufgaben für %{workgroup}
title_all: Alle Aufgaben der Gruppe
- time:
- am: vormittags
- formats:
- default: ! '%A, %d. %B %Y, %H:%M Uhr'
- long: ! '%A, %d. %B %Y, %H:%M Uhr'
- short: ! '%d. %B, %H:%M Uhr'
- pm: nachmittags
ui:
close: Schließen
delete: Löschen
edit: Bearbeiten
- history: Verlauf anzeigen
marks:
close: ! '×'
success:
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 4d334b7c..391f27ba 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1,98 +1,142 @@
en:
- activemodel:
- errors:
- format: ! '%{attribute} %{message}'
- general: A problem has occured.
- general_again: A problem has occured. Please try again.
- general_msg: ! 'A problem has occured: %{msg}'
- messages:
- accepted: has to be accepted
- blank: has to be entered
- confirmation: does not match the confirmation
- empty: has to be entered
- equal_to: has to be exactly %{count}
- even: has to be an even number
- exclusion: is not available
- greater_than: has to be greater than %{count}
- greater_than_or_equal_to: has to be greater than or equal to %{count}
- inclusion: is not a valid value
- invalid: is invalid
- less_than: has to be less than %{count}
- less_than_or_equal_to: has to be less than or equal to %{count}
- not_a_number: is not a number
- not_an_integer: must be a whole number
- odd: must be odd
- record_invalid: ! 'validation failed: %{errors}'
- taken: is already taken
- taken_with_deleted: is already taken (deleted group)
- too_long: is too long (no more than %{count} characters)
- too_short: is too short (use more than %{count} characters)
- wrong_length: is the wrong length (has to have exactly %{count} characters)
- template:
- body: ! 'Please check the following fields:'
- header:
- one: ! 'Could not save %{model}: an error.'
- other: ! 'Could not save %{model}: %{count} errors.'
activerecord:
attributes:
article:
- article_category: article category
+ article_category: Category
availability: Is article available?
- deposit: deposit
- fc_price: FC price
- fc_share: FC share
- gross_price: gross price
- price: price
+ availability_short: avail.
+ deposit: Deposit
+ fc_price: FoodCoop price
+ fc_price_short: FC price
+ fc_share: FoodCoop margin
+ fc_share_short: FC margin
+ gross_price: Gross price
+ manufacturer: Manufacturer
+ name: Name
+ note: Note
+ order_number: Order number
+ origin: Origin
+ price: Price (net)
+ supplier: Supplier
tax: VAT
- unit: unit
- unit_quantity: unit quantity
+ unit: Unit
+ unit_quantity: Unit quantity
+ unit_quantity_short: U.Q.
+ article_category:
+ description: Description
+ name: Name
+ delivery:
+ delivered_on: Delivery date
+ note: Note
+ supplier: Supplier
financial_transaction:
amount: amount
note: note
+ group_order_article:
+ ordergroup_id: Ordergroup
+ result: Amount
+ invoice:
+ amount: Amount
+ date: Billing date
+ delivery: Delivery
+ deposit: Deposit charged
+ deposit_credit: Deposit returned
+ note: Note
+ number: Number
+ order: Order
+ paid_on: Paid on
+ supplier: Supplier
+ message:
+ body: Body
+ group_id: Group
+ private: Private
+ recipient_tokens: Recipients
+ sent_to_all: Send to all members
+ subject: Subject
+ order:
+ ends: Ends at
+ note: Note
+ starts: Starts at
+ order_article:
+ units_to_order: Amount of units
+ update_current_price: Globally update current price
+ order_comment:
+ text: Add comment to this order ...
+ ordergroup:
+ contact_address: Address
+ contact_person: Contact person
+ contact_phone: Phone
+ description: Description
+ ignore_apple_restriction: Ignore order stop by apple points restriction
+ name: Name
+ user_tokens: Members
+ page:
+ body: Body
+ parent_id: Parent page
+ title: Title
stock_article:
price: Price
+ quantity: Quantity
+ quantity_available: Available quantity
+ supplier: Supplier
+ stock_taking:
+ date: Date
+ note: Note
+ supplier:
+ address: Address
+ contact_person: Contact person
+ customer_number: Customer number
+ customer_number_short: Cust.nr.
+ delivery_days: Delivery days
+ email: Email
+ fax: Fax
+ is_subscribed: subscribed?
+ min_order_quantity: Minimum order quantity
+ name: Name
+ note: Note
+ order_howto: How to order
+ phone: Phone
+ phone2: Phone 2
+ url: Homepage
+ task:
+ description: Description
+ done: Done?
+ due_date: Due date
+ duration: Duration
+ name: Name
+ required_users: People required
+ user_list: Responsible user
+ workgroup: Workgroup
user:
+ email: Email
first_name: First name
+ last_name: Last name
+ name: Name
+ nick: Username
+ ordergroup: Ordergroup
password: Password
+ password_confirmation: Repeat password
+ phone: Telephone
+ workgroup:
+ one: Workgroup
+ other: Workgroups
+ workgroup:
+ description: Description
+ name: Name
+ next_weekly_tasks_number: For how many weeks in advance would you like to define tasks?
+ role_admin: Administration
+ role_article_meta: Article database
+ role_finance: Finances
+ role_orders: Order management
+ role_suppliers: Suppliers
+ user_tokens: Members
errors:
- format: ! '%{attribute} %{message}'
- general: A problem has occured.
- general_again: A problem has occured. Please try again.
- general_msg: ! 'A problem has occured: %{msg}'
has_many_left: is still associated with a %{collection}!
- messages:
- accepted: has to be accepted
- blank: has to be filled
- confirmation: does not match the confirmation
- empty: has to be entered
- equal_to: has to be exactly %{count}
- even: has to be an even number
- exclusion: is not available
- greater_than: has to be greater than %{count}
- greater_than_or_equal_to: has to be greater than or equal to %{count}
- inclusion: is not a valid value
- invalid: is invalid
- less_than: has to be less than %{count}
- less_than_or_equal_to: has to be less than or equal to %{count}
- not_a_number: is not a number
- not_an_integer: must be a whole number
- odd: must be odd
- record_invalid: ! 'validation failed: %{errors}'
- taken: is already taken
- taken_with_deleted: is already taken (deleted group)
- too_long: is too long (no more than %{count} characters)
- too_short: is too short (use more than %{count} characters)
- wrong_length: is the wrong length (has to have exactly %{count} characters)
models:
task:
attributes:
done:
exclusion: finished tasks may not be repeated weekly
- template:
- body: ! 'Please check the following fields:'
- header:
- one: ! 'Could not save %{model}: an error.'
- other: ! 'Could not save %{model}: %{count} errors.'
models:
article: Article
article_category: Article category
@@ -212,6 +256,11 @@ en:
workgroups:
members: members
name: name
+ application:
+ controller:
+ error_authn: Authentication required!
+ error_denied: Access denied!
+ error_members_only: This action is only available to members of the group!
article_categories:
create:
notice: Category was stored
@@ -305,20 +354,23 @@ en:
error_nosel: You have selected no articles
parse_upload:
body: Please verify the articles.
Warning, at the moment there is no check for duplicate articles.
+ title: Upload articles
+ sync:
outlist:
- body: ! 'The following articles were outlisted and deleted:'
+ alert_used: Warning, %{article} is used in an open order. Please remove it from the order first.
+ body: ! 'The following articles were removed from the list and will be deleted:'
body_skip: No articles to delete.
- title: Outlist ...
+ title: Remove from list ...
price_short: Price
- submit: Delete/update all
+ submit: Synchronize all
title: Synchronize articles with external database
- unit_quantity_short: unit quantity
+ unit_quantity_short: Unit quantity
update:
- body: ! 'Every article is shown twice. The old values are gray and the text fields contain the current values.
-
- Differences with the old articles are marked yellow.
'
+ body: ! 'Every article is shown twice: old values are gray, while the text fields contain updated values. Differences with the old articles are marked yellow.'
title: Update ...
- update_msg: ! 'Articles must be updated:'
+ update_msg:
+ one: One article needs to be updated.
+ other: ! '%{count} articles need to be updated.'
upload:
body: The file has to be a text file with the ending '.csv' The first line will be ignored when imported
The fields have to be separated with semicolons (';') and the text enclosed by double quotation marks ("text...").
As character set UTF-8 is demanded. Correct order of the column:
fields:
@@ -328,109 +380,13 @@ en:
file_label: Please choose a compatible file
submit: Upload file
title: ! '%{supplier} / upload articles'
- date:
- abbr_day_names:
- - Su
- - Mo
- - Tu
- - We
- - Th
- - Fr
- - Sa
- abbr_month_names:
- -
- - Jan
- - Feb
- - Mar
- - Apr
- - May
- - Jun
- - Jul
- - Aug
- - Sep
- - Oct
- - Nov
- - Dec
- day_names:
- - Sunday
- - Monday
- - Tuesday
- - Wednesday
- - Thursday
- - Friday
- - Saturday
- formats:
- default: ! '%d/%m/%Y'
- long: ! '%e %B %Y'
- short: ! '%e %b'
- month_names:
- -
- - January
- - February
- - March
- - April
- - May
- - June
- - July
- - August
- - September
- - October
- - November
- - December
- order:
- - :day
- - :month
- - :year
- datetime:
- distance_in_words:
- about_x_hours:
- one: about one hour
- other: about %{count} hours
- about_x_months:
- one: about one month
- other: about %{count} months
- about_x_years:
- one: about one year
- other: about %{count} years
- almost_x_years:
- one: almost one year
- other: almost %{count} years
- half_a_minute: half a minute
- less_than_x_minutes:
- one: less than one minute
- other: less then %{count} minutes
- less_than_x_seconds:
- one: less than a second
- other: less than %{count} seconds
- over_x_years:
- one: more then a year
- other: more than %{count} year
- x_days:
- one: one day
- other: ! '%{count} days'
- x_minutes:
- one: one minute
- other: ! '%{count} minutes'
- x_months:
- one: one month
- other: ! '%{count} months'
- x_seconds:
- one: eine Sekunde
- other: ! '%{count} seconds'
- prompts:
- day: day
- hour: hours
- minute: minutes
- month: months
- second: seconds
- year: years
deliveries:
add_stock_change:
how_many_units: ! 'How many units (%{unit}) to deliver? Stock article name: %{name}.'
create:
notice: Delivery was created. Please don’t forget to create invoice!
create_stock_article:
- notice: The new stock article »%{name}« was saved.
+ notice: The new stock article "%{name}" was saved.
destroy:
notice: Delivery was deleted.
edit:
@@ -478,7 +434,7 @@ en:
update:
notice: Delivery was updated.
update_stock_article:
- notice: The stock article »%{name}« was updated.
+ notice: The stock article "%{name}" was updated.
documents:
order_by_articles:
filename: Order %{name}-%{date} - by articles
@@ -525,38 +481,9 @@ en:
one: One article in total
other: ! '%{count} articles in total'
errors:
- format: ! '%{attribute} %{message}'
general: A problem has occured.
general_again: A problem has occured. Please try again.
general_msg: ! 'A problem has occured: %{msg}'
- messages:
- accepted: has to be accepted
- blank: has to be filled
- confirmation: does not match the confirmation
- empty: has to be entered
- equal_to: has to be exactly %{count}
- even: has to be an even number
- exclusion: is not available
- greater_than: has to be greater than %{count}
- greater_than_or_equal_to: has to be greater than or equal to %{count}
- inclusion: is not a valid value
- invalid: is invalid
- less_than: has to be less than %{count}
- less_than_or_equal_to: has to be less than or equal to %{count}
- not_a_number: is not a number
- not_an_integer: must be a whole number
- odd: must be odd
- record_invalid: ! 'validation failed: %{errors}'
- taken: is already taken
- taken_with_deleted: is already taken (deleted group)
- too_long: is too long (no more than %{count} characters)
- too_short: is too short (use more than %{count} characters)
- wrong_length: is the wrong length (has to have exactly %{count} characters)
- template:
- body: ! 'Please check the following fields:'
- header:
- one: ! 'Could not save %{model}: an error.'
- other: ! 'Could not save %{model}: %{count} errors.'
feedback:
create:
notice: Your feedback was sent successfully. Thanks a lot!
@@ -648,11 +575,13 @@ en:
create:
notice: Invoice was created
financial_transactions:
- create:
- notice: The transaction was saved.
- create_collection:
- alert: ! 'An error occured: %{error}'
- notice: All transactions were saved.
+ controller:
+ create:
+ notice: The transaction was saved.
+ create_collection:
+ alert: ! 'An error occured: %{error}'
+ error_note_required: Note is required!
+ notice: All transactions were saved.
index:
balance: ! 'Balance of account: %{balance}'
last_updated_at: (last updated %{when} ago)
@@ -681,6 +610,7 @@ en:
group_order_articles:
form:
amount_change_for: Change amount for %{article}
+ result_hint: ! 'Unit: %{unit}'
index:
amount: Amount
amount_fc: Amount(FC)
@@ -716,6 +646,7 @@ en:
title: Invoice %{number}
order_articles:
edit:
+ stock_alert:
title: Update article
new:
title: Add delivered article to order
@@ -791,6 +722,8 @@ en:
new_funds: New account balance
note: Note
price: Price
+ reset_article_search: Reset search
+ search_article: Search for article...
sum: Sum
sum_amount: Current amount
supplier: Supplier
@@ -880,15 +813,11 @@ en:
option_choose: Choose supplier/stock
option_stock: Stock
order_pdf: Create PDF
- select:
- prompt: please select
submit:
- create: save %{model}
invite:
create: send invitation
message:
create: send message
- update: save changes
tasks:
required_users: ! '%{count} members are still needed!'
home:
@@ -899,7 +828,7 @@ en:
warning: Warning, if you have less then %{threshold} of apple points, you are not allowed to place an order!
changes_saved: Changes saved.
index:
- due_date_format: ! '%A %d %b'
+ due_date_format: ! '%A %d %B'
messages:
title: Newest Messages
view_all: See all messages
@@ -976,9 +905,11 @@ en:
title: Invite person
new:
action: Send invite
- back: or go back
body: Here you can add a person to the group %{group}, who is not yet a member of the foodcoop.
success: User was invited successfully.
+ js:
+ ordering:
+ confirm_change: Modifications to this order will be lost when you change the order. Do you want to lose the changes you made and continue?
layouts:
application1:
title: Foodsoft - %{title}
@@ -1223,57 +1154,6 @@ en:
home: Home
title: Wiki
workgroups: Workgroups
- number:
- currency:
- format:
- delimiter: .
- format: ! '%n %u'
- precision: 2
- separator: .
- significant: false
- strip_insignificant_zeros: false
- unit: €
- format:
- delimiter: .
- precision: 2
- separator: ! ','
- significant: false
- strip_insignificant_zeros: false
- human:
- decimal_units:
- format: ! '%n %u'
- units:
- billion:
- one: billion
- other: billions
- million: million
- quadrillion:
- one: quadrillion
- other: quadrillions
- thousand: thousand
- trillion: trillion
- unit:
- format:
- delimiter:
- precision: 1
- significant: true
- strip_insignificant_zeros: true
- storage_units:
- format: ! '%n %u'
- units:
- byte:
- one: byte
- other: bytes
- gb: GB
- kb: KB
- mb: MB
- tb: TB
- percentage:
- format:
- delimiter:
- precision:
- format:
- delimiter:
ordergroups:
edit:
title: Edit ordergroups
@@ -1298,7 +1178,6 @@ en:
fax:
amount: Amount
articles: Articles
- customer_number: Customer number
delivery_day: Delivery day
heading: Order for %{name}
name: Name
@@ -1314,7 +1193,7 @@ en:
prices: Prices (net/FC)
select_all: Select all
stockit: In stock
- supplier: Supplier
+ supplier: Producer
title: Article
unit_quantity: Unit quantity
index:
@@ -1396,7 +1275,7 @@ en:
notice: Page was created
cshow:
error_noexist: Page doesn’t exist!
- redirect_notice: Redirected from %{page} ..
+ redirect_notice: Redirected from %{page} ...
destroy:
notice: The page '%{page}' and all subpages have been deleted successfully.
edit:
@@ -1537,7 +1416,7 @@ en:
message:
private: Message doesn’t show in Foodsoft mail inbox
order_article:
- units_to_order: Amount of delivered units
+ units_to_order: If you change the total amount of delivered units, you also have to change individual group amounts by clicking on the article name. They will not be automatically recalculated and so ordergroups may be accounted for articles that were not delivered!
update_current_price: Also update the price of the current order
stock_article:
copy_stock_article:
@@ -1552,74 +1431,6 @@ en:
required_users: How many users will be needed in total?
tax: In percentage, standard is 7,0
labels:
- article:
- article_category: Category
- manufacturer: Manufacturer
- name: Name
- note: Note
- origin: Origin
- unit: Unit
- article_category:
- description: Description
- name: Name
- defaults:
- amount: Amount
- date: Date
- deposit: Deposit
- description: Description
- email: Email
- note: Note
- order_number: Order number
- ordergroup: Ordergroup
- password: Password
- password_confirmation: Repeat password
- phone: Phone
- price: Price (net)
- tax: VAT
- title: Title
- unit_quantity: Unit quantity
- user_tokens: Members
- delivery:
- delivered_on: Delivery date
- supplier: Supplier
- group_order_article:
- ordergroup_id: Ordergroup
- result: Amount
- invoice:
- amount: Amount
- date: Billing date
- delivery: Delivery
- deposit: Deposit charged
- deposit_credit: Deposit returned
- note: Note
- number: Number
- order: Order
- paid_on: Paid on
- supplier: Supplier
- message:
- body: Body
- group_id: Group
- private: Private
- recipient_tokens: Recipients
- sent_to_all: Send to all members
- subject: Subject
- order:
- ends: Ends at
- starts: Starts at
- order_article:
- units_to_order: Amount of units
- update_current_price: Globally update current price
- order_comment:
- text: Add comment to this order ...
- ordergroup:
- contact_address: Address
- contact_person: Contact person
- contact_phone: Phone
- ignore_apple_restriction: Ignore order stop by apple points restriction
- name: Name
- page:
- body: Body
- parent_id: Parent page
settings:
messages:
send_as_email: Receive messages as emails.
@@ -1635,48 +1446,6 @@ en:
settings_group:
messages: Messages
privacy: Privacy
- stock_article:
- supplier: Supplier
- supplier:
- address: Address
- contact_person: Contact person
- customer_number: Customer ID
- delivery_days: Delivery days
- email: Email
- fax: Fax
- is_subscribed: subscribed?
- min_order_quantity: Minimum order quantity
- name: Name
- note: Note
- order_howto: How to order
- phone: Phone
- phone2: Phone 2
- url: Homepage
- task:
- done: Done?
- due_date: Due date
- duration: Duration
- name: Name
- required_users: People required
- user_list: Responsible user
- workgroup: Workgroup
- user:
- email: Email
- last_name: Last name
- name: Name
- nick: Username
- ordergroup: Ordergroup
- phone: Telephone
- workgroup:
- one: Workgroup
- other: Workgroups
- workgroup:
- next_weekly_tasks_number: For how many weeks in advance would you like to define tasks?
- role_admin: Administration
- role_article_meta: Article database
- role_finance: Finances
- role_orders: Order management
- role_suppliers: Suppliers
'no': 'No'
options:
settings:
@@ -1730,15 +1499,6 @@ en:
title: Edit stock articles
form:
price_hint: To avoid choas, it is not possible to edit the prices of already added stock articles until further notice.
- history:
- change_quantity: Change
- datetime: Time
- delivery: Delivery
- new_quantity: New quantity
- order: Order
- reason: Reason
- stock_changes: Stock quantity changes of ‘%{article_name}’
- stock_taking: Inventory
index:
article:
article: Article
@@ -1764,6 +1524,15 @@ en:
new:
search_text: ! 'Search for articles in all catalogues:'
title: Add new stock article
+ show:
+ change_quantity: Change
+ datetime: Time
+ delivery: Delivery
+ new_quantity: New quantity
+ order: Order
+ reason: Reason
+ stock_changes: Stock quantity changes
+ stock_taking: Inventory
stock_create:
notice: Stock article was created.
stock_update:
@@ -1799,11 +1568,6 @@ en:
show_deliveries: Show all deliveries
update:
notice: Supplier was updated
- support:
- array:
- last_word_connector: ! ' and '
- two_words_connector: ! ' and '
- words_connector: ! ', '
tasks:
accept:
notice: You have accepted the task
@@ -1859,15 +1623,15 @@ en:
show:
accept_task: Accept task
confirm_delete_group: Really delete this and all subsequent tasks?
+ confirm_delete_single: Are you sure you want to delete the task?
delete_group: Delete task and subsequent
- due_date: Due date
hours: ! '%{count}h'
mark_done: Mark task as done
reject_task: Reject task
title: Show task
update:
notice: Task has been updated
- notice_converted: Task has been updated and was converted to a regular task
+ notice_converted: Task has been updated and was converted to a non-repeating task.
user:
more: Nothing to do? %{tasks_link} are tasks for sure.
tasks_link: Here
@@ -1877,18 +1641,10 @@ en:
workgroup:
title: Tasks for %{workgroup}
title_all: All group tasks
- time:
- am: morning
- formats:
- default: ! '%A, %d %B %Y, %H:%M'
- long: ! '%A, %d %B %Y, %H:%M'
- short: ! '%d %B, %H:%M'
- pm: afternoon
ui:
close: Close
delete: Delete
edit: Edit
- history: Show history
marks:
close: ! '×'
success:
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index fe52e77e..d064380a 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -1,98 +1,142 @@
fr:
- activemodel:
- errors:
- format: ! '%{attribute} %{message}'
- general: Un problème a été rencontré.
- general_again: Une erreur s'est produite. Merci de réessayer.
- general_msg: ! 'Une erreur s''est produite: %{msg}'
- messages:
- accepted: doit obligatoirement être accepté
- blank: doit obligatoirement être complété
- confirmation: ne correspond pas avec le champ de confirmation
- empty: doit obligatoirement être complété
- equal_to: doit obligatoirement être égal à %{count}
- even: doit obligatoirement être pair
- exclusion: n'est pas disponible
- greater_than: doit obligatoirement être supérieur à %{count}
- greater_than_or_equal_to: doit obligatoirement être supérieur ou égal à %{count}
- inclusion: n'est pas une valeur valide
- invalid: n'est pas valide
- less_than: doit obligatoirement être inférieur à %{count}
- less_than_or_equal_to: doit obligatoirement être inférieur à %{count}
- not_a_number: n'est pas un nombre
- not_an_integer: doit être un nombre entier
- odd: doit obligatoirement être impair
- record_invalid: ! 'la vérification a échoué: %{errors}'
- taken: a déjà été attribué
- taken_with_deleted: a déjà été attribué (à une cellule supprimée depuis)
- too_long: est trop long (%{count} signes autorisés au maximum)
- too_short: est trop court (%{count} signes au minimum doivent être présents)
- wrong_length: n'est pas de la bonne longueur (exactement %{count} signes doivent être présents)
- template:
- body: ! 'Merci de contrôler le contenu des champs suivants:'
- header:
- one: ! '%{model} n''a pas pu être sauvegardé à cause de la présence d''une erreur.'
- other: ! '%{model} n''a pas pu être sauvegardé car %{count} erreurs ont été trouvées.'
activerecord:
attributes:
article:
- article_category: catégorie
+ article_category: Catégorie
availability: l'article est-il disponible?
- deposit: consigne
- fc_price: prix final
- fc_share: supplément boufcoop
- gross_price: prix brut
- price: prix net
+ availability_short:
+ deposit: Consigne
+ fc_price: Prix final
+ fc_price_short:
+ fc_share: Supplément boufcoop
+ fc_share_short:
+ gross_price: Prix brut
+ manufacturer: ProductRICE_eur
+ name: Nom
+ note: Note
+ order_number: ! 'Numéro '
+ origin: Lieu de production
+ price: Prix net
+ supplier:
tax: TVA
- unit: unité
- unit_quantity: unités par lot
+ unit: Unité
+ unit_quantity: Unités par lot
+ unit_quantity_short:
+ article_category:
+ description: Description
+ name: Nom
+ delivery:
+ delivered_on: Date de réapprovisionnement
+ note:
+ supplier: Fournisseuse_r
financial_transaction:
amount: montant
note: note
+ group_order_article:
+ ordergroup_id: Cellul
+ result: Quantité
+ invoice:
+ amount: Montant
+ date: Date de facturation
+ delivery: Réapprovisionnement
+ deposit: Consigne facturée
+ deposit_credit: Consigne remboursée
+ note: Note
+ number: Numéro
+ order: Commande
+ paid_on: Payée le
+ supplier: Fournisseuse_r
+ message:
+ body: Contenu
+ group_id: Cellule ou équipe
+ private: Privé
+ recipient_tokens: Destinataires
+ sent_to_all: Envoyer à tous les membres
+ subject: Sujet
+ order:
+ ends: Clôture le
+ note:
+ starts: Ouverture le
+ order_article:
+ units_to_order: Quantité
+ update_current_price: Mettre à jour le prix global
+ order_comment:
+ text: Commenter cette commande...
+ ordergroup:
+ contact_address: Adresse
+ contact_person: Personne à contacter
+ contact_phone: Téléphone
+ description: Description
+ ignore_apple_restriction: Pour cette cellule, ne pas bloquer les commandes en cas de manque de glands
+ name: Nom
+ user_tokens: Membres
+ page:
+ body: Contenu
+ parent_id: Page parente
+ title: Titre
stock_article:
price: Prix net
+ quantity:
+ quantity_available:
+ supplier: FournisseurE
+ stock_taking:
+ date:
+ note:
+ supplier:
+ address: Adresse
+ contact_person: Contact
+ customer_number: Numéro de client de la coop
+ customer_number_short:
+ delivery_days: Jours de livraison
+ email: Email
+ fax: Fa
+ is_subscribed: abonné?
+ min_order_quantity: Quantité minimale à commander
+ name: Nom
+ note: Note
+ order_howto: Comment commander
+ phone: Téléphone
+ phone2: Autre téléphone
+ url: Site web
+ task:
+ description: Description
+ done: Fait?
+ due_date: Echéance
+ duration: Durée
+ name: Nom
+ required_users: Nombre de personnes nécessaires
+ user_list: Responsables inscritEs
+ workgroup: Équipe
user:
+ email: Email
first_name: Prénom
+ last_name: Nom de famille
+ name: Nom
+ nick: Identifiant
+ ordergroup: Cellule
password: Mot de passe
+ password_confirmation: Confirmation du mot de passe
+ phone: Téléphone
+ workgroup:
+ one: Équipe
+ other: Équipes
+ workgroup:
+ description: Description
+ name: Nom
+ next_weekly_tasks_number: Combien de temps en avance les boulots doivent ils être annoncés sur le site?
+ role_admin: Administration
+ role_article_meta: Base de données des articles
+ role_finance: Trésorerie
+ role_orders: Gestion des commandes
+ role_suppliers: Contact avec les fournisseusEs_rs
+ user_tokens: Membres
errors:
- format: ! '%{attribute} %{message}'
- general: Une problème a été rencontré.
- general_again: Une erreur s'est produite. Merci de réessayer.
- general_msg: ! 'Un problème a été rencontré: %{msg}'
has_many_left: est encore associé à une %{collection}!
- messages:
- accepted: doit obligatoirement être accepté
- blank: doit obligatoirement être complété
- confirmation: ne correspond pas au champ de confirmation
- empty: doit obligatoirement être complété
- equal_to: doit obligatoirement être égal à %{count}
- even: doit être un nombre pair
- exclusion: n'est pas disponible
- greater_than: doit obligatoirement être supérieur à %{count}
- greater_than_or_equal_to: doit obligatoirement être supérieur ou égal à %{count}
- inclusion: n'est pas un valeur valide
- invalid: est invalide
- less_than: doit obligatoirement être inférieur à %{count}
- less_than_or_equal_to: doit obligatoirement être inférieur ou égal à %{count}
- not_a_number: n'est pas un nombre
- not_an_integer: doit obligatoirement être un nombre entier
- odd: doit obligaroirement être un nombre impair
- record_invalid: ! 'la vérification a échoué: %{errors}'
- taken: a déjà été attribué
- taken_with_deleted: a déjà été attribué (à une cellule supprimée depuis)
- too_long: est trop long (au maximum %{count} signes sont autorisés)
- too_short: est trop court (au minimum %{count} signes doivent être présents)
- wrong_length: n'a pas la bonne longueur (exactement %{count} signes doivent être présents)
models:
task:
attributes:
done:
exclusion: répétition hebdomadaire invalide pour un boulot déjà effectué
- template:
- body: ! 'Merci de vérifier le contenu des champs suivants:'
- header:
- one: ! '%{model} n''a pu être sauvegardé à cause de la présence d''une erreur.'
- other: ! '%{model} n''a pu être sauvegardé à cause de %{count} erreurs.'
models:
article: Article
article_category: la nouvelle catégorie
@@ -212,6 +256,11 @@ fr:
workgroups:
members: membres
name: nom
+ application:
+ controller:
+ error_authn:
+ error_denied:
+ error_members_only:
article_categories:
create:
notice: La catégorie a bien été définie.
@@ -307,7 +356,10 @@ fr:
body: ! 'Merci de vérifier les articles importés.
Attention, les doublons ne sont pas automatiquement détectés.
.'
+ title:
+ sync:
outlist:
+ alert_used:
body: ! 'Les articles suivants ne sont plus dans la liste et seront donc supprimés:'
body_skip: Aucun article à supprimer.
title: Exclure de la liste...
@@ -316,9 +368,9 @@ fr:
title: Synchroniser les articles avec la base de données extérieure
unit_quantity_short: U/L
update:
- body: Chaque article apparaît deux fois. Les anciennes données sont rappelées en gris, et les champs du formulaire ont été préremplis avec les nouvelles valeurs.
Les changements sont marqués en jaune.
+ body: ! 'Chaque article apparaît deux fois: les anciennes données sont rappelées en gris, et les champs du formulaire ont été préremplis avec les nouvelles valeurs. Les changements sont marqués en jaune.'
title: Mettre à jour...
- update_msg: ! 'Ces articles doivent être mis à jour:'
+ update_msg:
upload:
body: ! 'Le fichier doit être au format texte et son nom doit se terminer par l''extension ".csv". La première ligne sera ignorée lors de l''importation.
@@ -332,102 +384,6 @@ fr:
file_label: Merci de choisir un fichier compatible
submit: Transférer le fichier
title: ! '%{supplier} / Transférer les données sur l''article'
- date:
- abbr_day_names:
- - Lun
- - Mar
- - Mer
- - Jeu
- - Ven
- - Sam
- - Dim
- abbr_month_names:
- -
- - Janvier
- - Février
- - Mars
- - Avril
- - Mai
- - Juin
- - Juillet
- - Août
- - Septembre
- - Octobre
- - Novembre
- - Décembre
- day_names:
- - Dimanche
- - Lundi
- - Mardi
- - Mercredi
- - Jeudi
- - Vendredi
- - Samedi
- formats:
- default: ! '%d.%m.%Y'
- long: ! '%e.%B %Y'
- short: ! '%e. %b'
- month_names:
- -
- - Janvier
- - Février
- - Mars
- - Avril
- - Mai
- - Juin
- - Juillet
- - Août
- - Septembre
- - Octobre
- - Novembre
- - Décembre
- order:
- - :day
- - :month
- - :year
- datetime:
- distance_in_words:
- about_x_hours:
- one: environ une heure
- other: environ %{count} heures
- about_x_months:
- one: environ un mois
- other: environ %{count} mois
- about_x_years:
- one: environ un an
- other: environ %{count} ans
- almost_x_years:
- one: presque un an
- other: presque %{count} ans
- half_a_minute: une demi-minute
- less_than_x_minutes:
- one: moins d'une minute
- other: moins de %{count} minutes
- less_than_x_seconds:
- one: moins d'une seconde
- other: moins de %{count} secondes
- over_x_years:
- one: plus d'un an
- other: plus de %{count} ans
- x_days:
- one: un jour
- other: ! '%{count} jours'
- x_minutes:
- one: une minute
- other: ! '%{count} minutes'
- x_months:
- one: un mois
- other: ! '%{count} mois'
- x_seconds:
- one: une seconde
- other: ! '%{count} secondes'
- prompts:
- day: jour
- hour: heures
- minute: minute
- month: mois
- second: secondes
- year: an
deliveries:
add_stock_change:
how_many_units: Combien d unités (%{unit}) de l article %{name} doivent-elles être livrées?
@@ -488,6 +444,7 @@ fr:
filename: Commande %{name}-%{date} - Trier par
rows:
- Cellule
+ -
- Quantité
- Prix
title: ! 'Ordre des articles pour la commande: %{name}, close le %{date}'
@@ -495,6 +452,7 @@ fr:
filename: Commande %{name}-%{date} - Répartition par cellules
rows:
- Nom de l'article
+ - Commandée
- Quantité
- Prix unitaire
- Unités par lot
@@ -510,6 +468,7 @@ fr:
- Nom
- Nombre de lots
- Unité
+ - Prix/Unité
- Prix unitaire
total:
order_matrix:
@@ -526,38 +485,9 @@ fr:
one: Un seul article
other: ! '%{count} articles au total'
errors:
- format: ! '%{attribute} %{message}'
general: Un problème a été rencontré.
general_again: Une erreur s'est produite. Merci de réessayer.
general_msg: ! 'Une erreur s''est produite: %{msg}'
- messages:
- accepted: doit obligatoirement être accepté
- blank: doit obligatoirement être complété
- confirmation: ! ' ne correspond pas au champ de confirmatio'
- empty: doit obligatoirement être complété
- equal_to: doit obligatoirement être égal à %{count}
- even: doit obligatoirement être un nombre pair
- exclusion: n'est pas disponible
- greater_than: doit obligatoirement être supérieur à %{count}
- greater_than_or_equal_to: doit obligatoirement être supérieur ou égal à %{count}
- inclusion: n'est pas une valeur valide
- invalid: n'est pas valide
- less_than: doit obligatoirement être inférieur à %{count}
- less_than_or_equal_to: doit obligatoirement être inférieur ou égal à %{count}
- not_a_number: n'est pas un nombre
- not_an_integer: doit obligatoirement être un nombre entier
- odd: doit obligatoirement être un nombre impair
- record_invalid: ! 'La vérification a échoué: %{errors}'
- taken: a déjà été attribué
- taken_with_deleted: a déjà été attribué (à une cellule supprimée depuis)
- too_long: est trop long (au maximum %{count} signes sont autorisés)
- too_short: est trop court (au minimum %{count} signes doivent être présents)
- wrong_length: n'a pas la bonne longueur (exactement %{count} signes doivent être présents)
- template:
- body: ! 'Merci de contrôler le contenu des champs suivants:'
- header:
- one: ! '%{model} n''a pas pu être sauvegardé: une erreur trouvée.'
- other: ! '%{model} n''a pas pu être sauvegardé: %{count} erreurs trouvées.'
feedback:
create:
notice: Ton commentaire a été transmis avec succès. Merci
@@ -655,11 +585,13 @@ fr:
create:
notice: La facture a bien été définie.
financial_transactions:
- create:
- notice: La transaction a été sauvegardée.
- create_collection:
- alert: ! 'Une erreur s''est produite: %{error}'
- notice: Les transactions ont été sauvegardées.
+ controller:
+ create:
+ notice: La transaction a été sauvegardée.
+ create_collection:
+ alert: ! 'Une erreur s''est produite: %{error}'
+ error_note_required:
+ notice: Les transactions ont été sauvegardées.
index:
balance: ! 'Solde: %{balance}'
last_updated_at: (dernière mise à jour il y a %{when})
@@ -688,6 +620,7 @@ fr:
group_order_articles:
form:
amount_change_for: Modification de la quantité de %{article}
+ result_hint:
index:
amount: Montant
amount_fc: Montant(boufcoop)
@@ -723,6 +656,7 @@ fr:
title: Facture %{number}
order_articles:
edit:
+ stock_alert:
title: Mettre à jour la liste des article
new:
title:
@@ -802,6 +736,8 @@ fr:
new_funds: Nouveau solde
note: Note
price: Prix
+ reset_article_search:
+ search_article:
sum: Prix total
sum_amount: ! 'Quantité déjà commandée:'
supplier: Fourni par
@@ -892,15 +828,11 @@ fr:
option_choose: Choix d'unE fournisseusE_r
option_stock: Stock
order_pdf: Générer un PDF
- select:
- prompt: Faire un choix
submit:
- create: Définir %{model}
invite:
create: Envoyer une invitatio
message:
create: Envoyer un message
- update: Sauvergarder les modifications
tasks:
required_users: Il manque encore %{count} camarades!
home:
@@ -994,9 +926,11 @@ fr:
title: Engrainer une personne
new:
action: Engrainer!
- back: ou revenir en arrière
body: Sur cette page, tu peux engrainer une personne qui ne fait pas encore partie de la Boufcoop à rejoindre la cellule %{group}
success: La_le membre a été engrainéE avec succès!
+ js:
+ ordering:
+ confirm_change:
layouts:
application1:
title: Foodsoft - %{title}
@@ -1224,57 +1158,6 @@ fr:
home: Page d'accueil
title: Wiki
workgroups: Équipes
- number:
- currency:
- format:
- delimiter: .
- format: ! '%n %u'
- precision: 2
- separator: ! ','
- significant: false
- strip_insignificant_zeros: false
- unit: €
- format:
- delimiter: .
- precision: 2
- separator: ! ','
- significant: false
- strip_insignificant_zeros: false
- human:
- decimal_units:
- format: ! '%n %u'
- units:
- billion:
- one: milliard
- other: milliards
- million: millions
- quadrillion:
- one: billiard
- other: billiards
- thousand: mille
- trillion: billions
- unit:
- format:
- delimiter:
- precision: 1
- significant: true
- strip_insignificant_zeros: true
- storage_units:
- format: ! '%n %u'
- units:
- byte:
- one: Octet
- other: Octets
- gb: Go
- kb: kB
- mb: MB
- tb: TB
- percentage:
- format:
- delimiter:
- precision:
- format:
- delimiter:
ordergroups:
edit:
title: Modifier les cellules
@@ -1288,7 +1171,7 @@ fr:
article_count: ! 'Articles commandés:'
name: Nom
prices: Prix brut/net
- prices_sum: Totaux (des prix bruts/nets)
+ prices_sum: ! 'Totaux (des prix bruts/nets):'
unit_quantity: Unités par lots x Lots
units_full: Lots complet
units_ordered: Unités commandées
@@ -1299,7 +1182,6 @@ fr:
fax:
amount: Quantité
articles: Articles
- customer_number: Numéro de client de la coop
delivery_day: Jour de livraison
heading: Commande pour %{name}
name: Nom
@@ -1536,7 +1418,7 @@ fr:
message:
private: Le message n'apparaîtra pas dans la boîte de réception du Foodsoft
order_article:
- units_to_order: Nombre de lots livrés
+ units_to_order:
update_current_price: Modifie aussi le prix des commandes en cours
stock_article:
copy_stock_article:
@@ -1551,74 +1433,6 @@ fr:
required_users: De combien de personnes avons-nous besoin au total?
tax: En pourcentage, le standard est de 7,0
labels:
- article:
- article_category: Catégorie
- manufacturer: ProductRICE_eur
- name: Nom
- note: Note
- origin: Lieu de production
- unit: Unité
- article_category:
- description: Description
- name: Nom
- defaults:
- amount: Montant
- date: Date
- deposit: Consigne
- description: Description
- email: Email
- note: Note
- order_number: ! 'Numéro '
- ordergroup: Cellule
- password: Mot de passe
- password_confirmation: Confirmation du mot de passe
- phone: Téléphone
- price: Prix (net)
- tax: TVA
- title: Titre
- unit_quantity: Unités par lot
- user_tokens: Membres
- delivery:
- delivered_on: Date de réapprovisionnement
- supplier: Fournisseuse_r
- group_order_article:
- ordergroup_id: Cellul
- result: Quantité
- invoice:
- amount: Montant
- date: Date de facturation
- delivery: Réapprovisionnement
- deposit: Consigne facturée
- deposit_credit: Consigne remboursée
- note: Note
- number: Numéro
- order: Commande
- paid_on: Payée le
- supplier: Fournisseuse_r
- message:
- body: Contenu
- group_id: Cellule ou équipe
- private: Privé
- recipient_tokens: Destinataires
- sent_to_all: Envoyer à tous les membres
- subject: Sujet
- order:
- ends: Clôture le
- starts: Ouverture le
- order_article:
- units_to_order: Quantité
- update_current_price: Mettre à jour le prix global
- order_comment:
- text: Commenter cette commande...
- ordergroup:
- contact_address: Adresse
- contact_person: Personne à contacter
- contact_phone: Téléphone
- ignore_apple_restriction: Pour cette cellule, ne pas bloquer les commandes en cas de manque de glands
- name:
- page:
- body: Contenu
- parent_id: Page parente
settings:
messages:
send_as_email: Transmettre les messages de la boufcoop par email
@@ -1634,48 +1448,6 @@ fr:
settings_group:
messages: Messages
privacy: Confidentialité
- stock_article:
- supplier: FournisseurE
- supplier:
- address: Adresse
- contact_person: Contact
- customer_number: Numéro de client de la coop
- delivery_days: Jours de livraison
- email: Email
- fax: Fa
- is_subscribed: abonné?
- min_order_quantity: Quantité minimale à commander
- name: Nom
- note: Note
- order_howto: Comment commander
- phone: Téléphone
- phone2: Autre téléphone
- url: Site web
- task:
- done: Fait?
- due_date: Pour quand?
- duration: Durée
- name: Nom
- required_users: Nombre de personnes nécessaires
- user_list: Responsables inscritEs
- workgroup: Équipe
- user:
- email: Email
- last_name: Nom de famille
- name: Nom
- nick: Identifiant
- ordergroup: Cellule
- phone: Téléphone
- workgroup:
- one: Équipe
- other: Équipes
- workgroup:
- next_weekly_tasks_number: Combien de temps en avance les boulots doivent ils être annoncés sur le site?
- role_admin: Administration
- role_article_meta: Base de données des articles
- role_finance: Trésorerie
- role_orders: Gestion des commandes
- role_suppliers: Contact avec les fournisseusEs_rs
'no': Non
options:
settings:
@@ -1731,15 +1503,6 @@ fr:
title: Modifier l'article
form:
price_hint: Pour éviter que ça soit le bazar, les prix des articles en stock ne peuvent plus être modifiés.
- history:
- change_quantity: Modification
- datetime: Temps
- delivery: Réapprovisionnement
- new_quantity: Nouveau stock
- order: Commande
- reason: Raison
- stock_changes: Afficher l'historique pour "%{article_name}"
- stock_taking: Inventaire
index:
article:
article: Article
@@ -1765,6 +1528,15 @@ fr:
new:
search_text: ! 'Rechercher des articles dans tous les catalogues:'
title: Ajouter un article au stock
+ show:
+ change_quantity: Modification
+ datetime: Temps
+ delivery: Réapprovisionnement
+ new_quantity: Nouveau stock
+ order: Commande
+ reason: Raison
+ stock_changes: Afficher l'historique
+ stock_taking: Inventaire
stock_create:
notice: L'article a été sauvegardé.
stock_update:
@@ -1804,11 +1576,6 @@ fr:
show_deliveries: Afficher tous les réapprovisionnements
update:
notice: Les données du_de la fournisseurE ont été mises à jour
- support:
- array:
- last_word_connector: et
- two_words_connector: et
- words_connector: ! ','
tasks:
accept:
notice: Tu as accepté ce boulot
@@ -1868,8 +1635,8 @@ fr:
show:
accept_task: Te charger de ce boulot.
confirm_delete_group: Veux-tu vraiment supprimer ce boulot hebdomadaire?
+ confirm_delete_single:
delete_group: Supprimer ce boulot
- due_date: Echéance
hours: ! '%{count}h'
mark_done: Marquer comme effectué
reject_task: Refuser ce boulot
@@ -1886,18 +1653,10 @@ fr:
workgroup:
title: Agenda de l'%{workgroup}
title_all: Boulot prévu pour l'équipe
- time:
- am: le matin
- formats:
- default: ! '%A, %d. %B %Y, %Hh%M'
- long: ! '%A, %d. %B %Y, %Hh%M'
- short: ! '%d. %B, %Hh%M '
- pm: après-midi
ui:
close: Fermer
delete: Supprimer
edit: Modifier
- history: Afficher l'historique
marks:
close: ! '×'
success:
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index c2f0ee5b..2252563a 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -1,98 +1,142 @@
nl:
- activemodel:
- errors:
- format: ! '%{attribute} %{message}'
- general: Er is een probleem opgetreden.
- general_again: Een probleem is opgetreden. Graag opnieuw proberen.
- general_msg: ! 'Een probleem is opgetreden: %{msg}'
- messages:
- accepted: moet geaccepteerd worden
- blank: moet ingevuld worden
- confirmation: komt niet overeen
- empty: moet ingevuld worden
- equal_to: moet precies %{count} zijn
- even: moet even zijn
- exclusion: is niet beschikbaar
- greater_than: moet groter zijn dan %{count}
- greater_than_or_equal_to: moet groter dan of gelijk aan %{count} zijn
- inclusion: is geen geldige waarde
- invalid: is ongeldig
- less_than: moet minder zijn dan %{count}
- less_than_or_equal_to: moet minder dan of gelijk aan %{count} zijn
- not_a_number: is geen getal
- not_an_integer: moet een geheel getal zijn
- odd: moet oneven zijn
- record_invalid: ! 'geldigheidscontrole is mislukt: %{errors}'
- taken: bestaat al
- taken_with_deleted: bestaat al (verwijderde groep)
- too_long: is te lang (niet meer dan %{count} tekens)
- too_short: is te kort (niet minder dan %{count} tekens)
- wrong_length: heeft de verkeerde lengte (moet precies %{count} tekens hebben)
- template:
- body: ! 'Controleer de volgende velden:'
- header:
- one: ! 'Kon %{model} niet opslaan: één fout.'
- other: ! 'Kon %{model} niet opslaan: %{count} fouten.'
activerecord:
attributes:
article:
- article_category: categorie
+ article_category: Categorie
availability: Artikel leverbaar?
- deposit: statiegeld
- fc_price: prijs foodcoop
- fc_share: marge foodcoop
- gross_price: bruto prijs
- price: netto prijs
+ availability_short: leverb.
+ deposit: Statiegeld
+ fc_price: Foodcoop prijs
+ fc_price_short: FC prijs
+ fc_share: Foodcoop marge
+ fc_share_short: FC marge
+ gross_price: Bruto prijs
+ manufacturer: Producent
+ name: Naam
+ note: Notitie
+ order_number: Ordernummer
+ origin: Herkomst
+ price: Netto prijs
+ supplier: Leverancier
tax: BTW
- unit: eenheid
- unit_quantity: groothandelseenheid
+ unit: Eenheid
+ unit_quantity: Groothandelseenheid
+ unit_quantity_short: Gr.Eenh.
+ article_category:
+ description: Omschrijving
+ name: Naam
+ delivery:
+ delivered_on:
+ note:
+ supplier:
financial_transaction:
amount: bedrag
note: notitie
+ group_order_article:
+ ordergroup_id:
+ result:
+ invoice:
+ amount: Bedrag
+ date: Factuurdatum
+ delivery: Levering
+ deposit: Statiegeld in rekening gebracht
+ deposit_credit: Statiegeld teruggekregen
+ note: Notitie
+ number: Nummer
+ order: Bestelling
+ paid_on: Betaald op
+ supplier: Leverancier
+ message:
+ body:
+ group_id:
+ private:
+ recipient_tokens:
+ sent_to_all:
+ subject:
+ order:
+ ends: Eindigt op
+ note: Notitie
+ starts: Start op
+ order_article:
+ units_to_order:
+ update_current_price:
+ order_comment:
+ text: Commentaar voor deze bestelling toevoegen ...
+ ordergroup:
+ contact_address: Adres
+ contact_person: Contactpersoon
+ contact_phone: Telefoon
+ description: Omschrijving
+ ignore_apple_restriction:
+ name: Naam
+ user_tokens: Leden
+ page:
+ body:
+ parent_id:
+ title:
stock_article:
- price: prijs
+ price: Prijs
+ quantity: Aantal
+ quantity_available: Beschikbaar
+ supplier: Leverancier
+ stock_taking:
+ date:
+ note:
+ supplier:
+ address: Adres
+ contact_person: Contactpersoon
+ customer_number: Klantnummer
+ customer_number_short:
+ delivery_days: Bezorgdagen
+ email: Email
+ fax: Fax
+ is_subscribed: geabonneerd?
+ min_order_quantity: Minimale bestelhoeveelheid
+ name: Naam
+ note: Notitie
+ order_howto: Hoe te bestellen
+ phone: Telefoon
+ phone2: Telefoon 2
+ url: Homepage
+ task:
+ description:
+ done:
+ due_date:
+ duration:
+ name:
+ required_users:
+ user_list:
+ workgroup:
user:
+ email: Email
first_name: Voornaam
+ last_name: Achternaam
+ name: Naam
+ nick: Gebruikersnaam
+ ordergroup: Huishouden
password: Wachtwoord
+ password_confirmation: Wachtwoord herhalen
+ phone: Telefoon
+ workgroup:
+ one: Werkgroep
+ other: Werkgroepen
+ workgroup:
+ description: Omschrijving
+ name: Naam
+ next_weekly_tasks_number:
+ role_admin: Beheer
+ role_article_meta: Artikelen
+ role_finance: Financiën
+ role_orders: Bestellingen
+ role_suppliers: Leveranciers
+ user_tokens: Leden
errors:
- format: ! '%{attribute} %{message}'
- general: Er is een probleem opgetreden.
- general_again: Er is een probleem opgetreden. Probeer het opnieuw.
- general_msg: ! 'Er is een probleem opgetreden: %{msg}'
has_many_left: is nog met een %{collection} verbonden!
- messages:
- accepted: moet geaccepteerd worden
- blank: moet ingevuld worden
- confirmation: komt niet overeen
- empty: moet ingevuld worden
- equal_to: moet precies %{count} zijn
- even: moet even zijn
- exclusion: is niet beschikbaar
- greater_than: moet groter dan %{count} zijn
- greater_than_or_equal_to: moet groter zijn dan of gelijk aan %{count}
- inclusion: is geen geldige waarde
- invalid: is ongeldig
- less_than: moet kleiner izjn dan %{count}
- less_than_or_equal_to: moet kleiner zijn dan of gelijk aan %{count}
- not_a_number: is geen getal
- not_an_integer: moet een geheel getal zijn
- odd: moet oneven zijn
- record_invalid: ! 'geldigheidscontrole is mislukt: %{errors}'
- taken: bestaat al
- taken_with_deleted: bestaat al (verwijderde groep)
- too_long: is te lang (niet meer dan %{count} tekens)
- too_short: is te kort (niet minder dan %{count} tekens)
- wrong_length: heeft de verkeerde lengte (moet precies %{count} tekens zijn)
models:
task:
attributes:
done:
exclusion: gedane taken kunnen niet herhaald worden
- template:
- body: ! 'Controleer de volgende velden:'
- header:
- one: ! 'Kon %{model} niet opslaan: één foutmelding.'
- other: ! 'Kon %{model} niet opslaan: %{count} foutmeldingen.'
models:
article: Artikel
article_category: Categorie
@@ -212,6 +256,11 @@ nl:
workgroups:
members: leden
name: naam
+ application:
+ controller:
+ error_authn: Inloggen vereist.
+ error_denied: Geen toegang.
+ error_members_only: Deze actie is alleen beschikbaar voor leden van de groep!
article_categories:
create:
notice: Categorie is opgeslagen
@@ -305,22 +354,25 @@ nl:
error_nosel: Je hebt geen artikelen geselecteerd
parse_upload:
body:
Ingelezen artikelen graag controleren.
Let op, momenteel vind er geen controle op dubbele artikelen plaats.
+ title:
+ sync:
outlist:
- body: ! 'De volgende artikelen werden uit de lijst gehaald en worden gewist:'
- body_skip: Er zijn geen artikelen om te wissen.
+ alert_used:
+ body: ! 'De volgende artikelen zijn uit de lijst gehaald en worden verwijderd:'
+ body_skip: Er zijn geen artikelen om te verwijderen.
title: Uit de lijst halen ...
price_short: prijs
- submit: Alle wissen/bijwerken
+ submit: Alles synchroniseren
title: Artikelen met externe database synchroniseren
unit_quantity_short: Gr.Eenh.
update:
- body: ! 'Ieder artikel wordt tweemaal getoond. De oude waarden zijn grijs, en de tekstvelden bevatten de huidige waarden.
-
- Verschillen met de oude artikelen zijn geel gemarkeerd.
'
+ body: ! 'Ieder artikel wordt tweemaal getoond: oude waarden zijn grijs, en de tekstvelden bevatten de nieuwe waarden. Verschillen met de oude artikelen zijn geel gemarkeerd.'
title: Bijwerken ...
- update_msg: ! 'De volgende artikelen moeten bijgewerkt worden: '
+ update_msg:
+ one: Er moet éen artikel bijgewerkt worden.
+ other: Er moeten %{count} artikelen bijgewerkt worden.
upload:
- body:
+ body: Het bestand moet een utf-8 tekstbestand zijn met als extensie '.csv'. De eerste regel wordt overgeslagen.
Velden moeten met een puntkomma (';') gescheiden worden, en tekst mag tussen dubbele aanhalingstekstens ("Tekst...") staan.
Volgende van de kolommen:
fields:
season_amount:
season_price:
@@ -328,111 +380,15 @@ nl:
file_label: Graag een compatibel bestand uitkiezen
submit: Bestand uploaden
title: Artikelen uploaden voor %{supplier}
- date:
- abbr_day_names:
- - Zo
- - Ma
- - Di
- - Wo
- - Do
- - Vr
- - Za
- abbr_month_names:
- -
- - Jan
- - Feb
- - Mar
- - Apr
- - Mei
- - Jun
- - Jul
- - Aug
- - Sep
- - Okt
- - Nov
- - Dec
- day_names:
- - Zondag
- - Maandag
- - Dinsdag
- - Woensdag
- - Donderdag
- - Vrijdag
- - Zaterdag
- formats:
- default: ! '%d-%m-%Y'
- long: ! '%e %B %Y'
- short: ! '%e %b'
- month_names:
- -
- - Januari
- - Februari
- - Maart
- - April
- - Mei
- - Juni
- - Juli
- - Augustus
- - September
- - Oktober
- - November
- - December
- order:
- - :day
- - :month
- - :year
- datetime:
- distance_in_words:
- about_x_hours:
- one: ca. één uur
- other: ca. %{count} uur
- about_x_months:
- one: ca. één maand
- other: ca. %{count} maanden
- about_x_years:
- one: ca. één jaar
- other: ca. %{count} jaar
- almost_x_years:
- one: bijna één jaar
- other: bijna %{count} jaar
- half_a_minute: een halve minuut
- less_than_x_minutes:
- one: minder dan één minuut
- other: minder dan %{count} minuten
- less_than_x_seconds:
- one: minder dan een seconde
- other: minder dan %{count} seconden
- over_x_years:
- one: meer dan één jaar
- other: meer dan %{count} jaar
- x_days:
- one: één dag
- other: ! '%{count} dagen'
- x_minutes:
- one: één minuut
- other: ! '%{count} minuten'
- x_months:
- one: één maand
- other: ! '%{count} maanden'
- x_seconds:
- one: een seconde
- other: ! '%{count} seconden'
- prompts:
- day: dag
- hour: uren
- minute: minuten
- month: maanden
- second: seconden
- year: jaren
deliveries:
add_stock_change:
how_many_units:
create:
- notice:
+ notice: Levering is aangemaakt. Vergeet niet een factuur te maken!
create_stock_article:
- notice:
+ notice: Nieuw voorraadsartikel "%{name}" gemaakt.
destroy:
- notice:
+ notice: Levering is verwijdered.
edit:
title:
form:
@@ -476,7 +432,7 @@ nl:
remove_article:
suppliers_overview:
update:
- notice:
+ notice: Levering is bijgewerkt.
update_stock_article:
notice:
documents:
@@ -484,13 +440,15 @@ nl:
filename: Bestelling %{name}-%{date} - Artikellijst
rows:
- Huishouden
- - Hoeveelheid
+ - Besteld
+ - Ontvangen
- Prijs
title: ! 'Artikellijst van bestelling: %{name}, gesloten op %{date}'
order_by_groups:
filename: Bestelling %{name}-%{date} - Huishoudenslijst
rows:
- Artikel
+ - Besteld
- Hoeveelheid
- Prijs
- Gr.Eenh.
@@ -516,44 +474,9 @@ nl:
one: In totaal éen artikel
other: In totaal %{count} artikelen
errors:
- format: ! '%{attribute} %{message}'
general: Er is een probleem opgetreden.
general_again: Er is een fout opgetreden. Probeer het opnieuw.
general_msg: ! 'Er is een probleem opgetreden: %{msg}'
- messages:
- accepted: moet geaccepteerd worden
- blank: moet ingevuld worden
- confirmation: komt niet overeen met de bevestiging
- empty: moet ingevuld worden
- equal_to: moet precies %{count} zijn
- even: moet even zijn
- exclusion: moet even zijn
- greater_than: moet groter dan %{count} zijn
- greater_than_or_equal_to: moet groter dan of gelijk zijn aan %{count}
- inclusion: geen geldige waarde
- invalid: is ongeldig
- less_than: moet kleiner dan %{count} zijn
- less_than_or_equal_to: moet groter of gelijk aan %{count} zijn
- not_a_number: is geen getal
- not_an_integer: moet een geheel getal zijn
- odd: moet oneven zijn
- record_invalid:
- taken: is al in gebruik
- taken_with_deleted: is al in gebruik (verwijderde groep)
- too_long:
- one: is te lang (niet meer dan éen teken)
- other: is te lang (niet meer dan %{count} tekens)
- too_short:
- one: is te kort (niet minder dan éen teken)
- other: is te kort (niet minder dan %{count} tekens)
- wrong_length:
- one: heeft de verkeerde lengte (moet precies éen zijn)
- other: heeft de verkeerde lengte (moet precies %{count} tekens hebben)
- template:
- body: ! 'Controleer alsjeblieft de volgende velden:'
- header:
- one: ! 'Kon %{model} niet opslaan: éen fout gevonden.'
- other: ! 'Kon %{model} niet opslaan: %{count} fouten gevonden.'
feedback:
create:
notice: Bericht verstuurd. Vriendelijk bedankt!
@@ -645,11 +568,13 @@ nl:
create:
notice: Rekening is gemaakt
financial_transactions:
- create:
- notice: De transactie is opgeslagen.
- create_collection:
- alert:
- notice: Alle transacties zijn opgeslagen.
+ controller:
+ create:
+ notice: De transactie is opgeslagen.
+ create_collection:
+ alert:
+ error_note_required: Notitie ontbreekt.
+ notice: Alle transacties zijn opgeslagen.
index:
balance: ! 'Tegoed: %{balance}'
last_updated_at: (laatst bijgewerkt %{when} geleden)
@@ -668,8 +593,8 @@ nl:
sidebar:
title:
ordergroup:
- remove:
- remove_group:
+ remove: Verwijderen
+ remove_group: Huishouden verwijderen
transactions:
amount: Bedrag
date: Datum
@@ -678,6 +603,7 @@ nl:
group_order_articles:
form:
amount_change_for:
+ result_hint:
index:
amount: Bedrag
amount_fc: Bedrag(FC)
@@ -713,6 +639,7 @@ nl:
title: Factuur %{number}
order_articles:
edit:
+ stock_alert:
title: Artikel bijwerken
new:
title: Geleverd artikel aan bestelling toevoegen
@@ -788,6 +715,8 @@ nl:
new_funds: Nieuw tegoed
note: Notitie
price: Prijs
+ reset_article_search:
+ search_article:
sum: Som
sum_amount: ! 'Huidig totaalbedrag:'
supplier: Leverancier
@@ -855,8 +784,8 @@ nl:
remaining: nog %{remaining}
title: Lopende bestellingen
update:
- error_general:
- error_stale:
+ error_general: Er is een probleem opgetreden, de bestelling kon niet bijgewerkt worden.
+ error_stale: In de tussentijd heeft iemand anders ook bestelt, daarom kon je bestelling niet opgeslagen worden. Sorry!
notice: De bestelling is opgeslagen.
helpers:
application:
@@ -876,33 +805,29 @@ nl:
option_choose: Leverancier/voorraad kiezen
option_stock: Voorraad
order_pdf: PDF maken
- select:
- prompt: graag uitkiezen
submit:
- create: ! '%{model} opslaan'
invite:
create: uitnodiging versturen
message:
create: bericht versturen
- update: wijzigingen opslaan
tasks:
required_users: Nog %{count} leden nodig!
home:
apple_bar:
desc:
- more_info:
+ more_info: Meer informatie
points:
warning:
changes_saved: Wijzigingen opgeslagen.
index:
- due_date_format:
+ due_date_format: ! '%A %d %B'
messages:
- title:
- view_all:
+ title: Nieuwste berichten
+ view_all: Alle berichten bekijken
my_ordergroup:
- funds:
- last_update:
- title:
+ funds: ! '| Beschikbaar tegoed:'
+ last_update: Laatst gewijzigd %{when} geleden
+ title: Mijn huishouden
transactions:
amount: Bedrag
note: Notitie
@@ -913,13 +838,13 @@ nl:
ordergroup:
title:
tasks_move:
- action:
- desc:
- title:
+ action: Taken op je nemen/annuleren
+ desc: Je bent voor de volgende taken verantwoordelijk.
+ title: Taken op je nemen
tasks_open:
- action:
- desc:
- title:
+ action: open taken
+ desc: Er zijn %{size}
+ title: open taken
title: Beginpagina
your_tasks: Jouw taken
no_ordergroups: Jammergenoeg ben je niet aangesloten bij een huishouden.
@@ -928,7 +853,7 @@ nl:
description: Omschrijving
funds: ! 'Beschikbaar krediet:'
invite: Iemand uitnodigen
- people:
+ people: Personen
search: Zoeken ...
title: Mijn huishouden
ordergroup_cancelled: Je bent geen lid meer van de groep %{group}.
@@ -946,7 +871,7 @@ nl:
admin:
finances:
accounts: Tegoeden bijwerken
- settle:
+ settle: Bestelling afrekenen
title: Financiën
foodcoop: Foodcoop
members: Leden
@@ -966,20 +891,28 @@ nl:
write_message: Bericht schrijven
invites:
errors:
- already_member:
+ already_member: is al lid van de foodcoop.
modal_form:
- body:
- title:
+ body: Hier kun je iemand die nog geen lid is uitnodigen voor de groep%{group}.
Na aanmelding is hij of zij automatisch lid van deze groep.
+ title: Iemand uitnodigen
new:
- action:
- back:
- body:
- success:
+ action: Uitnodiging versturen
+ body: Hier kun je iemand die nog geen lid is, uitnodigen voor de groep %{group}.
+ success: Persoon is uitgenodigd.
+ js:
+ ordering:
+ confirm_change:
layouts:
application1:
title: Foodsoft - %{title}
email:
- footer:
+ footer: ! '--
+
+ Foodsoft: %{foodsoft}
+
+ Foodcoop-Homepage: %{foodcoop}
+
+ Help: %{help}'
foodsoft: Foodsoft
header:
feedback:
@@ -996,7 +929,7 @@ nl:
page: Pagina %{number}
login:
accept_invitation:
- body:
+ body: Je bent uitgenodigd als lid voor foodcoop %{foodcoop} in de groep %{group}.
Als je wilt meedoen, vul dan dit formulier in.
Natuurlijk zullen we je informatie niet delen met anderen. Je kunt zelf aangeven, welke informatie voor andere leden beschikbaar is (maar beheerders hebben daar altijd toegang toe).
submit: Foodsoft account aanmaken
title: Uitnodiging voor %{name}
controller:
@@ -1018,9 +951,9 @@ nl:
submit: Nieuw wachtwoord opslaan
title: Nieuw wachtwoord
mailer:
- dateformat:
+ dateformat: ! '%d %b'
feedback:
- header:
+ header: ! '%{user} schreef op %{date}:'
subject:
foodsoft_message:
footer:
@@ -1052,16 +985,34 @@ nl:
Vriendelijke groet van %{foodcoop}.'
reset_password:
- subject:
- text:
+ subject: Nieuw wachtwoord voor %{username}
+ text: ! 'Beste %{user},
+
+
+ Jij (of iemand anders) heeft een nieuw wachtwoord aangevraagd voor het foodcoop ordersysteem.
+
+ Ga naar de volgende pagina om een nieuw wachtwoord in te voeren: %{link}
+
+ Dit kan slechts éenmaal gedaan worden, en op zijn laatst op %{expires}.
+
+ Wanneer je je wachtwoord niet wilt veranderen, hoef je niets te doen; dan blijft je huidige wachtwoord geldig.
+
+
+ Groeten van je foodcoop!'
upcoming_tasks:
- nextweek:
- subject:
- text0:
- text1:
+ nextweek: ! 'Taken voor komende week:'
+ subject: Er is een taak te doen!
+ text0: ! 'Beste %{user},
+
+
+ Je bent opgegeven voor "%{task}". Deze taak is morgen te vervullen (%{when})!'
+ text1: ! 'Mijn taken: %{user_tasks_url}
+
+
+ Groeten van %{foodcoop}.'
messages:
create:
- notice:
+ notice: Bericht is opgeslagen en wordt verzonden.
index:
new:
title:
@@ -1074,32 +1025,32 @@ nl:
new:
list:
desc:
- mail:
+ mail: bijvoorbeeld door een email te sturen naar %{email}.
subscribe:
subscribe_msg:
wiki:
- no_user_found:
- search:
- search_user:
- title:
+ no_user_found: Geen gebruiker gevonden
+ search: Zoeken ...
+ search_user: Gebruiker zoeken
+ title: Nieuw bericht
show:
- all_messages:
- from:
- reply:
- sent_on:
- subject:
- title:
+ all_messages: Berichtenoverzicht
+ from: ! 'Van:'
+ reply: Antwoorden
+ sent_on: ! 'Verzonden:'
+ subject: ! 'Onderwerp:'
+ title: Bericht lezen
model:
delivery:
- each_stock_article_must_be_unique:
+ each_stock_article_must_be_unique: In een levering mag ieder voorraadsartikel maar een keer voorkomen.
membership:
- no_admin_delete:
+ no_admin_delete: Lidmaatschap kan niet beeindigd worden. Je bent de laatste administrator.
order_article:
- error_price:
+ error_price: moet ingevuld worden en een huidige prijs hebben
page:
- redirect:
+ redirect: Doorverwijzing naar [[%{title}]]...
user:
- no_ordergroup:
+ no_ordergroup: geen huishouden
navigation:
admin:
home: Overzicht
@@ -1134,104 +1085,52 @@ nl:
home: Begin
title: Wiki
workgroups: Werkgroepen
- number:
- currency:
- format:
- delimiter: ! ' '
- format: ! '%n %u'
- precision: 2
- separator: ! ','
- significant: false
- strip_insignificant_zeros: false
- unit: €
- format:
- delimiter: ! ','
- precision: 2
- separator: ! ' '
- significant: false
- strip_insignificant_zeros: false
- human:
- decimal_units:
- format: ! '%n %u'
- units:
- billion:
- one: miljard
- other: miljard
- million: miljoen
- quadrillion:
- one: biljard
- other: biljard
- thousand: duizend
- trillion: triljoen
- unit:
- format:
- delimiter:
- precision: 1
- significant: true
- strip_insignificant_zeros: true
- storage_units:
- format: ! '%n %u'
- units:
- byte:
- one: byte
- other: bytes
- gb: GB
- kb: KB
- mb: MB
- tb: TB
- percentage:
- format:
- delimiter:
- precision:
- format:
- delimiter:
ordergroups:
edit:
- title:
+ title: Huidhouden bewerken
index:
- title:
+ title: Huishoudens
model:
- error_single_group:
- invalid_balance:
+ error_single_group: ! '%{user} behoort al tot een ander huishouden'
+ invalid_balance: is geen geldig nummer
orders:
articles:
- article_count:
- name:
- prices:
- prices_sum:
- unit_quantity:
- units_full:
- units_ordered:
+ article_count: ! 'Bestelde artikelen:'
+ name: Naam
+ prices: Netto/bruto prijs
+ prices_sum: ! 'Totaal (netto/bruto prijs):'
+ unit_quantity: Groothandelseenheid
+ units_full: Volle eenheden
+ units_ordered: Bestelde eenheden
create:
- notice:
+ notice: De bestelling is aangemaakt.
edit:
- title:
+ title: Bestelling aanpassen
fax:
- amount:
- articles:
- customer_number:
- delivery_day:
- heading:
- name:
- number:
- to_address:
+ amount: Aantal
+ articles: Artikelen
+ delivery_day: Bezorgdag
+ heading: Bestelling voor %{name}
+ name: Naam
+ number: Nummer
+ to_address: Verzendadres
finish:
notice: De bestelling is gesloten.
form:
- ignore_warnings:
- name:
- note:
- origin:
- prices:
- select_all:
- stockit:
- supplier:
- title:
+ ignore_warnings: Waarschuwingen negeren
+ name: Naam
+ note: Notitie
+ origin: Herkomst
+ prices: Prijs (netto/FC)
+ select_all: Alles selecteren
+ stockit: Beschikbaar
+ supplier: Producent
+ title: Artikel
unit_quantity:
index:
- action_end:
- confirm_delete:
- confirm_end:
+ action_end: Sluiten
+ confirm_delete: Wil je de bestelling werkelijk verwijderen?
+ confirm_end: Wil je de bestelling %{order} werkelijk sluiten? Dit kun je niet ongedaan maken.
ended_orders: Gesloten bestellingen
ending:
new_order:
@@ -1244,7 +1143,7 @@ nl:
error_closed: Bestelling was al afgerekend
error_nosel:
error_starts_before_ends:
- notice_close:
+ notice_close: ! 'Bestelling: %{name}, tot %{ends}'
stock: Voorraad
warning_ordered:
warning_ordered_stock:
@@ -1252,11 +1151,11 @@ nl:
title:
orders:
ending:
- start:
+ start: Start
status:
- supplier:
+ supplier: Leverancier
show:
- action_end:
+ action_end: Sluiten!
amounts:
articles:
articles_ordered:
@@ -1288,7 +1187,7 @@ nl:
finished: gesloten
open: lopend
update:
- notice:
+ notice: De bestelling is bijgewerkt.
pages:
all:
new_page:
@@ -1302,12 +1201,12 @@ nl:
body:
title_toc:
create:
- notice:
+ notice: Pagina is gemaakt.
cshow:
error_noexist:
- redirect_notice:
+ redirect_notice: Doorverwezen van %{page} ...
destroy:
- notice:
+ notice: De pagina '%{page}' en alle subpagina's zijn verwijderd.
edit:
title:
error_stale_object:
@@ -1351,7 +1250,7 @@ nl:
versions:
title:
update:
- notice:
+ notice: Pagina is bijgewerkt.
version:
author:
date_format:
@@ -1394,11 +1293,11 @@ nl:
address: Adres
apple_limit:
contact: Contact
- deactivated:
- description:
+ deactivated: inactief
+ description: Beschrijving
members: Leden
- no_weekly_job:
- weekly_job:
+ no_weekly_job: geen wekelijkse taak ingesteld
+ weekly_job: wekelijkse taak
group_form_fields:
search: Zoeken ...
search_user: Gebruiker zoeken
@@ -1407,8 +1306,8 @@ nl:
loginInfo:
edit_profile: Profiel aanpassen
feedback:
- desc:
- title:
+ desc: Fout gevonden? Opmerking? Idee?
+ title: Feedback
help: Help
homepage_title: Foodcoop startpagina bezoeken
logout: Uitloggen
@@ -1436,7 +1335,7 @@ nl:
total_sum: Totaalsom
who_ordered: Wie heeft besteld?
workgroup_members:
- title:
+ title: Groepsleden
simple_form:
error_notification:
default_message:
@@ -1461,74 +1360,6 @@ nl:
required_users:
tax:
labels:
- article:
- article_category: Categorie
- manufacturer: Producent
- name: Naam
- note: Notitie
- origin: Herkomst
- unit: Eenheid
- article_category:
- description: Omschrijving
- name: Naam
- defaults:
- amount:
- date: Datum
- deposit: Statiegeld
- description: Omschrijving
- email: Email
- note: Notitie
- order_number: Bestelnummer
- ordergroup: Huishouden
- password: Wachtwoord
- password_confirmation: Wachtwoord herhalen
- phone: Telefoon
- price: Prijs (netto)
- tax: BTW
- title: Titel
- unit_quantity: Groothandelseenheid
- user_tokens: Leden
- delivery:
- delivered_on:
- supplier:
- group_order_article:
- ordergroup_id:
- result:
- invoice:
- amount: Bedrag
- date: Factuurdatum
- delivery: Levering
- deposit: Statiegeld in rekening gebracht
- deposit_credit: Statiegeld teruggekregen
- note: Notitie
- number: Nummer
- order: Bestelling
- paid_on: Betaald op
- supplier: Leverancier
- message:
- body:
- group_id:
- private:
- recipient_tokens:
- sent_to_all:
- subject:
- order:
- ends: Eindigt op
- starts: Start op
- order_article:
- units_to_order:
- update_current_price:
- order_comment:
- text:
- ordergroup:
- contact_address: Adres
- contact_person: Contactpersoon
- contact_phone: Telefoon
- ignore_apple_restriction:
- name:
- page:
- body:
- parent_id:
settings:
messages:
send_as_email: Berichten als emails ontvangen.
@@ -1544,48 +1375,6 @@ nl:
settings_group:
messages: Berichten
privacy: Privacy
- stock_article:
- supplier:
- supplier:
- address:
- contact_person:
- customer_number:
- delivery_days:
- email:
- fax:
- is_subscribed:
- min_order_quantity:
- name:
- note:
- order_howto:
- phone:
- phone2:
- url:
- task:
- done:
- due_date:
- duration:
- name:
- required_users:
- user_list:
- workgroup:
- user:
- email: Email
- last_name: Achternaam
- name: Naam
- nick: Gebruikersnaam
- ordergroup: Huishouden
- phone: Telefoon
- workgroup:
- one: Werkgroep
- other: Werkgroepen
- workgroup:
- next_weekly_tasks_number:
- role_admin:
- role_article_meta: Artikelbestand
- role_finance: Financiën
- role_orders:
- role_suppliers: Leveranciers
'no': Nee
options:
settings:
@@ -1601,7 +1390,7 @@ nl:
'yes': Ja
stock_takings:
create:
- notice:
+ notice: Inventarisatie is aangelegd.
edit:
title:
index:
@@ -1629,25 +1418,16 @@ nl:
date:
note:
update:
- notice:
+ notice: Inventarisatie is bijgewerkt.
stockit:
check:
not_empty:
destroy:
- notice:
+ notice: Artikel %{name} is verwijdered.
edit:
title:
form:
price_hint:
- history:
- change_quantity:
- datetime:
- delivery:
- new_quantity:
- order:
- reason:
- stock_changes:
- stock_taking:
index:
article:
article:
@@ -1673,15 +1453,24 @@ nl:
new:
search_text:
title:
+ show:
+ change_quantity:
+ datetime:
+ delivery:
+ new_quantity:
+ order:
+ reason:
+ stock_changes:
+ stock_taking:
stock_create:
- notice:
+ notice: Voorraadsartikel is opgeslagen.
stock_update:
- notice:
+ notice: Voorraadsartikel is bijgewerkt.
suppliers:
create:
- notice:
+ notice: Leverancier is aangemaakt.
destroy:
- notice:
+ notice: Leverancier is verwijderd
edit:
title:
index:
@@ -1707,15 +1496,10 @@ nl:
new_delivery:
show_deliveries:
update:
- notice:
- support:
- array:
- last_word_connector:
- two_words_connector:
- words_connector:
+ notice: Leverancier is bijgewerkt
tasks:
accept:
- notice:
+ notice: Je hebt de taak geaccepteerd
archive:
title:
archive_tasks:
@@ -1724,9 +1508,9 @@ nl:
task_format:
who:
create:
- notice:
+ notice: Taak is aangemaakt
destroy:
- notice:
+ notice: Taak is verwijderd
edit:
title:
warning_periodic:
@@ -1764,19 +1548,19 @@ nl:
title:
repeated:
set_done:
- notice:
+ notice: De status van de taak is aangepast
show:
accept_task:
confirm_delete_group:
+ confirm_delete_single:
delete_group:
- due_date:
hours:
mark_done:
reject_task:
title:
update:
- notice:
- notice_converted:
+ notice: Taak is bijgewerkt
+ notice_converted: Taak is bijgewerkt en omgezet naar een eenmalige taak.
user:
more:
tasks_link:
@@ -1786,18 +1570,10 @@ nl:
workgroup:
title:
title_all:
- time:
- am: morgen
- formats:
- default: ! '%A, %d %B %Y, %H:%M'
- long: ! '%A, %d %B %Y, %H:%M'
- short: ! '%d %B, %H:%M'
- pm: middag
ui:
close: Sluiten
delete: Verwijder
edit: Bewerk
- history:
marks:
close: ! '×'
success:
diff --git a/config/locales/overrides.yml b/config/locales/overrides.yml
new file mode 100644
index 00000000..e3442417
--- /dev/null
+++ b/config/locales/overrides.yml
@@ -0,0 +1,17 @@
+# This file contains overrides that do not go through localeapp.
+# If there's a key in one language, it forces presence in other languages
+# which means that we can't override in specific languages only. This file
+# makes that possible.
+en:
+ number:
+ currency:
+ format:
+ unit: ! '€ '
+nl:
+ number:
+ currency:
+ format:
+ delimiter: ! ' '
+ unit: ! '€ '
+ format:
+ delimiter: ! ' '
diff --git a/config/routes.rb b/config/routes.rb
index 0f96d7fa..533d2d97 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -97,8 +97,6 @@ Foodsoft::Application.routes.draw do
get :articles_search
get :fill_new_stock_article_form
end
-
- get :history
end
resources :suppliers do
diff --git a/doc/DEPLOYMENT.md b/doc/DEPLOYMENT.md
index 30f886a6..dad42aa3 100644
--- a/doc/DEPLOYMENT.md
+++ b/doc/DEPLOYMENT.md
@@ -20,4 +20,4 @@ Deploy to staging
bundle exec cap deploy
Deploy to production
- bundle exec cap production deploy
\ No newline at end of file
+ bundle exec cap production deploy
diff --git a/doc/DEVELOPMENT b/doc/DEVELOPMENT
deleted file mode 100644
index e2fecc18..00000000
--- a/doc/DEVELOPMENT
+++ /dev/null
@@ -1,96 +0,0 @@
-README for DEVELopment Project Setup
-====================================
-
-Gratulations, you have successfully cloned the foodsoft project
-from the git repository. Now you are only a few steps away from
-trying it out and then jumping into development. (This manual presumes
-you have ruby and rails setup.)
-
-(1) Configure datebase
-----------------------
-Create the database configuration from the default:
-
- cp config/database.yml.SAMPLE config/database.yml
-
-If you are fine with using a file-based sqlite database you are all set.
-The sqlite files (development/test/production) will reside in the "db" directory.
-Otherwise you would want to edit database.yml to suit your needs (MySQL whatever).
-
-
-(2) Configure development environment
--------------------------------------
-Again, you need to create your own copy of the default configuration:
-
- cp config/environments/development.rb.SAMPLE config/environments/development.rb
-
-Edit development.rb to specify your settings (at least the ActionMailer SMTP settings).
-If you just leave the file as is, emails will not work but everything else should be okay.
-
-
-(3) Foodsoft settings
----------------------
-You need to create your own copy of the foodsoft configuration settings:
-
- cp config/app_config.yml.SAMPLE config/app_config.yml
-
-Edit app_config.yml to suit your needs or just keep the defaults for now.
-
-
-(4) Secret Token
--------------------
-The user session are stored in cookies. Do avoid misusing the cookies and its sensitive information, rails
-will encrypt it with a token. So copy the config file
-
- cp config/initializers/secret_token.rb.SAMPLE config/initializers/secret_token.rb
-
-and modify the token!!
-
-
-(5) Required ruby and gems
--------------------
-We recommend to use rvm (https://rvm.beginrescueend.com/). Install rvm and get the latest ruby (>= 1.9.3).
-If installed you only need to install the gem bundler:
-
- gem install bundler
-
-After that you get the other gems easily with (from project root):
-
- bundle install
-
-
-(6) Create database (schema) and load defaults
---------------------------
- rake db:setup
-
-With this, you also get a ready to go user with username 'admin' and password 'secret'.
-
-
-(7) Try it out!
----------------
-Start the WEBrick server to try it out:
-
- bundle exec rails s
-
-
-(8) (optional) Get background jobs done
----------------------------------------
-We use for time intensive tasks a background job queue, at the moment resque with redis as key/value store.
-Install redis (in ubuntu the package redis-server works out of the box) and start the resque worker with:
-
- rake resque:work QUEUE=foodsoft_notifier
-
-To have look on the current queue, failed jobs etc start the resque server with
-
- resque-web
-
-
-(9) (optional) View mails in browser instead in your logs
----------------------------------------------------------
-We use mailcatcher in development mode to view all delivered mails in a browser interface.
-Just install mailcatcher with gem install mailcatcher and start the service with
-
- mailcatcher
-
-From now on you have a smpt server listening on 1025. To see the emails go to
-
- http://localhost:1080
\ No newline at end of file
diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP.md
similarity index 95%
rename from doc/README_FOR_APP
rename to doc/README_FOR_APP.md
index 79fdd74b..0f25c510 100644
--- a/doc/README_FOR_APP
+++ b/doc/README_FOR_APP.md
@@ -3,30 +3,30 @@ Run "rake doc:app" to generate API documentation for your models and controllers
= The Foodsoft
-is a Web-based software to manage a non-profit food coop (product catalog, ordering, accounting, job scheduling).
+is a Web-based software to manage a non-profit food coop (product catalog, ordering, accounting, job scheduling).
== Bestellen
-Das Bestellen ist der Hauptteil dieser Software und ein wenig kompliziert.
-Hier starte ich den Versuch die Programmlogik in Text umzusetzen und
+Das Bestellen ist der Hauptteil dieser Software und ein wenig kompliziert.
+Hier starte ich den Versuch die Programmlogik in Text umzusetzen und
verweise auf die enstprechenden Controller bzw. Modelle.
Der relevante Controller ist OrderingController.
=== Bestellung "in Netz stellen"
Darunter verstehen wir die Auswahl von Artikeln eines bestimmten Lieferanten fuer eine zeitlich begrenzte
Bestellung im Internet. Die relevanten Methoden sind OrdersController#newOrder und folgende.
-Jede Bestellung wird durch die Klasse Order abgebildet.
+Jede Bestellung wird durch die Klasse Order abgebildet.
Die zugehoerigen Artikel werden duch die Klasse OrderArticle mit den Artikeln verknuepft.
Dabei werden auch die Attribute quantity, tolerance und quantity_to_order gespeichert.
Diese Mengen repraesentieren die Gesamtbestellung, also alle Bestellgruppen.
=== Eine Bestellgruppe bestellt...
-Die Methode OrdersController#order schickt uns die Bestellenseite. Mit dieser Oberflaeche
+Die Methode OrdersController#order schickt uns die Bestellenseite. Mit dieser Oberflaeche
koennen die Bestellgruppena die vorher ausgewaehlten Artikel bestellen.
-Mittels den Buttons werden dabei live, also clientseitig, die Preise ermittelt
+Mittels den Buttons werden dabei live, also clientseitig, die Preise ermittelt
und der Gesamtpreis berechnet. Ist der Gesamtpreis groeßer als der aktuelle
-Gruppenkontostand, so wird die Preisspalte rot unterlegt und die Bestellung
+Gruppenkontostand, so wird die Preisspalte rot unterlegt und die Bestellung
kann nicht gespeichert werden.
=== (gruppen)-Bestellung wird gespeichert
@@ -67,27 +67,27 @@ Wir unterscheiden dehalb zwei Faelle:
Verringe Bestellung auf 2(1) um 19uhr.
=> Zeile mit created_on = 18uhr wird gelöscht und
in der Zeile mit created_on = 17uhr wird der Wert tolerance auf 1 gaendert.
-
+
=== Wer bekommt wieviel?
Diese Frage wird wie schon erwaehnt mittels der group_order_article_quantites -Tabelle
-geloest.
+geloest.
Beipspiel.
articel x mit unit_quantity = 5.
17uhr: gruppe a bestellt 2(3), weil sie auf jeden fall was von x bekommen will
18uhr: gruppe b bestellt 2(0)
19uhr: gruppe a faellt ein dass sie doch noch mehr braucht von x und aendert auf 4(1).
-
+
jetzt gibt es drei zeilen in der tabelle, die so aussehen:
(gruppe a), 2(1), 17uhr (wurde um 19uhr von 2(3) auf 2(1) geaendert)
(gruppe b), 2(0), 18uhr
(gruppe a), 2(0), 19uhr.
-
+
die zuteilung wird dann wie folgt ermittelt:
zeile 1: gruppe a bekommt 2
zeile 2: gruppe b bekommt 2
zeile 3: gruppe a bekommt 1, weil jetzt das gebinde schon voll ist.
-
+
Endstand: insg. Bestellt wurden 6(1)
Gruppe a bekommt 3 einheiten.
gruppe b bekommt 2 einheiten.
diff --git a/doc/SETUP_DEVELOPMENT.md b/doc/SETUP_DEVELOPMENT.md
new file mode 100644
index 00000000..18a2b16f
--- /dev/null
+++ b/doc/SETUP_DEVELOPMENT.md
@@ -0,0 +1,147 @@
+Getting foodsoft running for development
+========================================
+
+Gratulations, if you read this file locally, you have successfully cloned the
+foodsoft project from the git repository. Now you are only a few steps away
+from trying it out and then jumping into development.
+
+**System requirements**:
+[RVM](https://rvm.io/rvm/install),
+[Ruby 1.9.3](https://www.ruby-lang.org/en/downloads/) and
+[Bundler](http://bundler.io/).
+
+Getting started
+---------------
+
+0. Clone the repository from GitHub:
+ ```
+ git clone https://github.com/foodcoops/foodsoft.git
+ ```
+
+1. Install RVM and Ruby 1.9.3 (if you have not done so before):
+ ```
+ \curl -L https://get.rvm.io | bash
+ source ~/.rvm/scripts/rvm
+ rvm install 1.9.3
+ ```
+
+2. Install Ruby dependencies:
+ ```
+ bundle install
+ ```
+
+3. Setup your development environment:
+ ```
+ rake foodsoft:setup_development
+ ```
+ This will interactively prompt with several questions relating to your
+ required environment.
+
+4. Start rails by running:
+ ```
+ bundle exec rails s
+ ```
+
+5. Open your favorite browser and open the web application at:
+ ```
+ http://localhost:3000/
+ ```
+ You might want to watch a
+ [kitten video](https://www.youtube.com/watch?v=9Iq5yCoHp4o)
+ while it's loading.
+
+6. Login using the default credentials: `admin/secret`
+
+7. Change the admin password, just in case.
+
+8. Have phun!
+
+
+
+Manual configuration
+--------------------
+
+The rake task `foodsoft:setup_development` helps you to setup foodsoft.
+If you want to have more control, you can do these steps manually as
+explained here.
+
+
+1. **Configure datebase**
+
+ Create the database configuration from the default:
+ ```sh
+ cp config/database.yml.SQLite_SAMPLE config/database.yml
+ ```
+ If you are fine with using a file-based sqlite database you are all set.
+ The sqlite files (development/test/production) will reside in the "db"
+ directory. Otherwise you would want to copy one of the other
+ "database.yml.*_SAMPLE" files and edit database.yml to suit your needs.
+
+
+2. **Configure development environment**
+
+ Again, you need to create your own copy of the default configuration:
+ ```
+ cp config/environments/development.rb.SAMPLE config/environments/development.rb
+ ```
+
+ Edit development.rb to specify your settings (at least the ActionMailer SMTP
+ settings). If you just leave the file as is, emails will not work but
+ everything else should be okay.
+
+
+3. **Foodsoft settings**
+
+ You need to create your own copy of the foodsoft configuration settings:
+ ```
+ cp config/app_config.yml.SAMPLE config/app_config.yml
+ ```
+ Edit app_config.yml to suit your needs or just keep the defaults for now.
+
+
+4. **Secret token**
+
+ The user session are stored in cookies. Do avoid misusing the cookies and
+ its sensitive information, rails will encrypt it with a token. So copy the
+ config file
+ ```
+ cp config/initializers/secret_token.rb.SAMPLE config/initializers/secret_token.rb
+ ```
+ and modify the token!! You can run `bundle exec rake secret`
+
+
+5. **Create database (schema) and load defaults**
+ ```
+ rake db:setup
+ ```
+ With this, you also get a ready to go user with username 'admin' and
+ password 'secret'.
+
+
+6. (optional) Get **background jobs** done
+
+ We use for time intensive tasks a background job queue, at the moment resque
+ with redis as key/value store. Install redis (in ubuntu the package
+ redis-server works out of the box) and start the resque worker with:
+ ```
+ rake resque:work QUEUE=foodsoft_notifier
+ ```
+ To have look on the current queue, failed jobs etc start the resque server with
+ ```
+ resque-web
+ ```
+
+
+7. (optional) **View mails in browser** instead in your logs
+
+ We use mailcatcher in development mode to view all delivered mails in a
+ browser interface. Just install mailcatcher with gem install mailcatcher
+ and start the service with
+ ```
+ mailcatcher
+ ```
+ From now on you have a smtp server listening on 1025. To see the emails go to
+ ```
+ http://localhost:1080
+ ```
+
diff --git a/doc/SETUP_PRODUCTION.md b/doc/SETUP_PRODUCTION.md
new file mode 100644
index 00000000..58527034
--- /dev/null
+++ b/doc/SETUP_PRODUCTION.md
@@ -0,0 +1,11 @@
+Running foodsoft in production
+==============================
+
+As you might have noticed, documentation is scarce and insufficient. If you
+intend to deploy foodsoft in production, we would love to guide you through the
+process. You can contact the mailing list
+[foodsoft-discuss](http://foodsoft.51229.x6.nabble.com/foodsoft-discuss-f5.html),
+or mail some of us directly at
+[developers@foodcoop.nl](mailto:developers@foodcoop.nl) or foodsoft (at)
+foodcoops.net.
+
diff --git a/lib/tasks/foodsoft.rake b/lib/tasks/foodsoft.rake
index 04db66f9..1fdd2259 100644
--- a/lib/tasks/foodsoft.rake
+++ b/lib/tasks/foodsoft.rake
@@ -5,12 +5,12 @@ namespace :foodsoft do
task :notify_upcoming_tasks => :environment do
tasks = Task.where(done: false, due_date: 1.day.from_now.to_date)
for task in tasks
- puts "Send notifications for #{task.name} to .."
+ rake_say "Send notifications for #{task.name} to .."
for user in task.users
begin
Mailer.upcoming_tasks(user, task).deliver if user.settings.notify['upcoming_tasks'] == 1
rescue
- puts "deliver aborted for #{user.email}.."
+ rake_say "deliver aborted for #{user.email}.."
end
end
end
@@ -27,7 +27,7 @@ namespace :foodsoft do
begin
Mailer.not_enough_users_assigned(task, user).deliver
rescue
- puts "deliver aborted for #{user.email}"
+ rake_say "deliver aborted for #{user.email}"
end
end
end
@@ -47,3 +47,8 @@ namespace :foodsoft do
end
end
end
+
+# Helper
+def rake_say(message)
+ puts message unless Rake.application.options.silent
+end
diff --git a/lib/tasks/multicoops.rake b/lib/tasks/multicoops.rake
index 621a0d54..a14020b7 100644
--- a/lib/tasks/multicoops.rake
+++ b/lib/tasks/multicoops.rake
@@ -8,7 +8,7 @@ namespace :multicoops do
task :run => :environment do
task_to_run = ENV['TASK']
FoodsoftConfig.each_coop do |coop|
- puts "Run '#{task_to_run}' for #{coop}"
+ rake_say "Run '#{task_to_run}' for #{coop}"
Rake::Task[task_to_run].execute
end
end
@@ -17,8 +17,14 @@ namespace :multicoops do
task :run_single => :environment do
task_to_run = ENV['TASK']
FoodsoftConfig.select_foodcoop ENV['FOODCOOP']
- puts "Run '#{task_to_run}' for #{ENV['FOODCOOP']}"
+ rake_say "Run '#{task_to_run}' for #{ENV['FOODCOOP']}"
Rake::Task[task_to_run].execute
end
end
+
+
+# Helper
+def rake_say(message)
+ puts message unless Rake.application.options.silent
+end
diff --git a/public/.htaccess b/public/.htaccess
deleted file mode 100644
index d3c99834..00000000
--- a/public/.htaccess
+++ /dev/null
@@ -1,40 +0,0 @@
-# General Apache options
-AddHandler fastcgi-script .fcgi
-AddHandler cgi-script .cgi
-Options +FollowSymLinks +ExecCGI
-
-# If you don't want Rails to look in certain directories,
-# use the following rewrite rules so that Apache won't rewrite certain requests
-#
-# Example:
-# RewriteCond %{REQUEST_URI} ^/notrails.*
-# RewriteRule .* - [L]
-
-# Redirect all requests not available on the filesystem to Rails
-# By default the cgi dispatcher is used which is very slow
-#
-# For better performance replace the dispatcher with the fastcgi one
-#
-# Example:
-# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
-RewriteEngine On
-
-# If your Rails application is accessed via an Alias directive,
-# then you MUST also set the RewriteBase in this htaccess file.
-#
-# Example:
-# Alias /myrailsapp /path/to/myrailsapp/public
-# RewriteBase /myrailsapp
-
-RewriteRule ^$ index.html [QSA]
-RewriteRule ^([^.]+)$ $1.html [QSA]
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
-
-# In case Rails experiences terminal errors
-# Instead of displaying this message you can supply a file here which will be rendered instead
-#
-# Example:
-# ErrorDocument 500 /500.html
-
-ErrorDocument 500 "Application error
Rails application failed to start properly"
\ No newline at end of file
diff --git a/public/_index.html b/public/_index.html
deleted file mode 100644
index a2daab72..00000000
--- a/public/_index.html
+++ /dev/null
@@ -1,277 +0,0 @@
-
-
-
-
- Ruby on Rails: Welcome aboard
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Getting started
-
Here’s how to get rolling:
-
-
- -
-
Create your databases and edit config/database.yml
- Rails needs to know your login and password.
-
-
- -
-
Use script/generate to create your models and controllers
- To see all available options, run it without parameters.
-
-
- -
-
Set up a default route and remove or rename this file
- Routes are setup in config/routes.rb.
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/public/dispatch.cgi b/public/dispatch.cgi
deleted file mode 100755
index 3848806d..00000000
--- a/public/dispatch.cgi
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/ruby1.8
-
-require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
-
-# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
-# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
-require "dispatcher"
-
-ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
-Dispatcher.dispatch
\ No newline at end of file
diff --git a/public/dispatch.fcgi b/public/dispatch.fcgi
deleted file mode 100755
index 91c4ed57..00000000
--- a/public/dispatch.fcgi
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/ruby1.8
-#
-# You may specify the path to the FastCGI crash log (a log of unhandled
-# exceptions which forced the FastCGI instance to exit, great for debugging)
-# and the number of requests to process before running garbage collection.
-#
-# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
-# and the GC period is nil (turned off). A reasonable number of requests
-# could range from 10-100 depending on the memory footprint of your app.
-#
-# Example:
-# # Default log path, normal GC behavior.
-# RailsFCGIHandler.process!
-#
-# # Default log path, 50 requests between GC.
-# RailsFCGIHandler.process! nil, 50
-#
-# # Custom log path, normal GC behavior.
-# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
-#
-RAILS_ENV = "production"
-
-require File.dirname(__FILE__) + "/../config/environment"
-require 'fcgi_handler'
-
-RailsFCGIHandler.process!
diff --git a/public/dispatch.rb b/public/dispatch.rb
deleted file mode 100755
index 3848806d..00000000
--- a/public/dispatch.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/ruby1.8
-
-require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
-
-# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
-# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
-require "dispatcher"
-
-ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
-Dispatcher.dispatch
\ No newline at end of file
diff --git a/script/heroku_deploy b/script/heroku_deploy
index 7f55fecf..e1e0326b 100755
--- a/script/heroku_deploy
+++ b/script/heroku_deploy
@@ -38,6 +38,8 @@ if ! heroku apps | grep -q "^$APP\s"; then
heroku create "$APP" --region "$REGION"
heroku addons:add heroku-postgresql:dev --app "$APP"
heroku pg:promote `heroku config | grep 'HEROKU_POSTGRESQL_.*_URL' | cut -d: -f1`
+ # user-env-compile needed because config.assets.initialize_on_precompile is true
+ heroku labs:enable user-env-compile --app "$APP"
fi
heroku config:set RACK_ENV="${RAILS_ENV}" RAILS_ENV="${RAILS_ENV}" --app "$APP"
@@ -66,7 +68,7 @@ echo 'web: bundle exec unicorn -p $PORT -E $RACK_ENV' >Procfile
sed -i 's|\(#\s*\)\?\(config\.action_mailer\.raise_delivery_errors\)\s*=.*|\2 = false|' config/environments/${RAILS_ENV}.rb
sed -i 's|\(#\s*\)\?\(config\.action_mailer\.delivery_method\)\s*=.*|\2 = :smtp|' config/environments/${RAILS_ENV}.rb
# do not ignore deployment files
-sed -i 's|^\(config/\*.yml\)|#\1|' .gitignore
+sed -i 's|^\(config/.*\.yml\)|#\1|' .gitignore
sed -i 's|^\(config/initializers/secret_token.rb\)|#\1|' .gitignore
sed -i 's|^\(config/environments/development.rb\)|#\1|' .gitignore
# make sure we have a full configuration
@@ -85,6 +87,8 @@ else
Foodsoft::Application.config.secret_token = '`openssl rand -hex 128`'
EOF
fi
+# update Gemfile.lock after Gemfile updates (required by heroku)
+bundle install --quiet
# configure localeapp, manually to include environment
if [ "$LOCALEAPP_KEY" ]; then
cat >config/initializers/localeapp.rb <>Gemfile
# also do not cache so we get locale updates
sed -i 's|\(#\s*\)\?\(config\.cache_classes\)\s*=.*|\2 = false|' config/environments/${RAILS_ENV}.rb
+ bundle exec localeapp pull
fi
-# update Gemfile.lock after Gemfile updates (required by heroku)
-bundle install --quiet
# TODO add more extensive database seed
# and push = deploy
@@ -115,11 +118,9 @@ if !heroku run rake db:version >/dev/null 2>&1; then
else
heroku run rake db:migrate
fi
-# get full translations so update works
-[ "$LOCALEAPP_KEY" ] && heroku run localeapp pull
# restart just to be sure
-heroku ps:restart
+#heroku ps:restart
# return to original branch
git checkout -q "$ORIG_BRANCH" && git stash pop -q
diff --git a/spec/i18n_spec.rb b/spec/i18n_spec.rb
index e07d74b9..b760d124 100644
--- a/spec/i18n_spec.rb
+++ b/spec/i18n_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
require 'i18n-spec'
-Dir.glob('config/locales/*.yml').each do |locale_file|
+Dir.glob('config/locales/??{-*,}.yml').each do |locale_file|
describe "#{locale_file}" do
it_behaves_like 'a valid locale file', locale_file
# We're currently allowing both German and English as source language
diff --git a/spec/integration/balancing_spec.rb b/spec/integration/balancing_spec.rb
index 2bf860be..eba7973e 100644
--- a/spec/integration/balancing_spec.rb
+++ b/spec/integration/balancing_spec.rb
@@ -103,6 +103,23 @@ describe 'settling an order', :type => :feature do
expect(GroupOrderArticle.exists?(goa1.id)).to be_false
end
+ it 'keeps product when amount is set to zero' do
+ within("#order_article_#{oa.id}") do
+ click_link I18n.t('ui.edit')
+ end
+ within("#edit_order_article_#{oa.id}") do
+ fill_in :order_article_units_to_order, :with => 0
+ find('input[type="submit"]').click
+ end
+ expect(page).to have_selector("#order_article_#{oa.id}")
+ # make sure it still works after reloading
+ visit new_finance_order_path(order_id: order.id)
+ expect(page).to have_selector("#order_article_#{oa.id}")
+ expect(OrderArticle.exists?(oa.id)).to be_true
+ oa.reload
+ expect(oa.units_to_order).to eq(0)
+ end
+
end
end