From 1e01b15187be2168538e62fb342d0207781f4c02 Mon Sep 17 00:00:00 2001 From: "vit.jonas@gmail.com" Date: Thu, 12 May 2011 06:53:40 +0000 Subject: [PATCH] * localized all dmsf controler views git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@36 5e329b0b-a2ee-ea63-e329-299493fc886d --- app/views/dmsf/_multi_upload.html.erb | 11 ++++++----- app/views/dmsf/_path.html.erb | 3 +-- config/locales/cs.yml | 9 ++++++++- config/locales/de.yml | 7 +++++++ config/locales/en-GB.yml | 7 +++++++ config/locales/en.yml | 7 +++++++ config/locales/es.yml | 6 ++++++ config/locales/fr.yml | 6 ++++++ config/locales/ru.yml | 6 ++++++ config/routes.rb | 6 ++++++ init.rb | 2 ++ 11 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 config/routes.rb diff --git a/app/views/dmsf/_multi_upload.html.erb b/app/views/dmsf/_multi_upload.html.erb index b650e92c..f58b7e79 100644 --- a/app/views/dmsf/_multi_upload.html.erb +++ b/app/views/dmsf/_multi_upload.html.erb @@ -3,14 +3,15 @@ :id => "uploadform", :method=>:post, :multipart => true) do %> <% if Setting.attachment_max_size.to_i >= 102400 %>
- File size: + <%= l(:label_file_size) %>:
<% end %> -

File Upload

+

<%= l(:heading_file_upload) %>

- <% if Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i > 0 %>There can be uploaded maximum of <%= Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i %> files at once.<% end %> - <% if Setting.attachment_max_size.to_i >= 2097151 %>To upload files greater than 2GB you must have 64b browser.<% end %> + <% max_file_upload = Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i %> + <%= l(:note_uploaded_maximum_files_at_once, :number => max_file_upload) if max_file_upload > 0 %> + <%= l(:note_upload_files_greater_than_two_gb) if Setting.attachment_max_size.to_i >= 2097151 %>
@@ -23,7 +24,7 @@ (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)

-<%= submit_tag("Upload") %> +<%= submit_tag(l(:submit_upload_files)) %>
<% end %> diff --git a/app/views/dmsf/_path.html.erb b/app/views/dmsf/_path.html.erb index 47bed373..d4d9cf58 100644 --- a/app/views/dmsf/_path.html.erb +++ b/app/views/dmsf/_path.html.erb @@ -3,7 +3,6 @@ / <%= link_to(h(path_element.name), {:controller => "dmsf", :action => "index", :id=> @project, :folder_id => path_element}) %> <% if path_element.notification %> - <%= image_tag("notify.png", :plugin => "redmine_dmsf", :alt => "Not. act.", - :title => "Notifications active") %> + <%= image_tag("notify.png", :plugin => "redmine_dmsf", :title => l(:title_notifications_active)) %> <% end %> <% end %> diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 370535f8..133f4897 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -60,7 +60,6 @@ cs: :submit_email: "Email" :title_send_checked_by_email: "Send checked by email" :link_user_preferences: "Your DMSF project preferences" - :heading_send_documents_by_email: "Send documents by email" :label_email_from: "From" :label_email_to: "To" @@ -69,3 +68,11 @@ cs: :label_email_documents: "Documents" :label_email_body: "Body" :label_email_send: "Send" + + :title_notifications_active: "Notifications active" + :label_file_size: "File size" + :heading_file_upload: "Upload" + :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." + :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." + :submit_upload_files: "Upload" + \ No newline at end of file diff --git a/config/locales/de.yml b/config/locales/de.yml index 9b809809..0a24a1cf 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -68,4 +68,11 @@ de: :label_email_documents: "Documents" :label_email_body: "Body" :label_email_send: "Send" + :title_notifications_active: "Notifications active" + :label_file_size: "File size" + :heading_file_upload: "Upload" + :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." + :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." + :submit_upload_files: "Upload" + \ No newline at end of file diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 6ccd2bbc..3a5068cf 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -68,4 +68,11 @@ en-GB: :label_email_documents: "Documents" :label_email_body: "Body" :label_email_send: "Send" + :title_notifications_active: "Notifications active" + :label_file_size: "File size" + :heading_file_upload: "Upload" + :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." + :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." + :submit_upload_files: "Upload" + \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index f35df991..cc9b2b79 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -68,4 +68,11 @@ en: :label_email_documents: "Documents" :label_email_body: "Body" :label_email_send: "Send" + :title_notifications_active: "Notifications active" + :label_file_size: "File size" + :heading_file_upload: "Upload" + :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." + :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." + :submit_upload_files: "Upload" + \ No newline at end of file diff --git a/config/locales/es.yml b/config/locales/es.yml index d7890a6a..1bf62dbd 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -68,4 +68,10 @@ es: :label_email_documents: "Documents" :label_email_body: "Body" :label_email_send: "Send" + :title_notifications_active: "Notifications active" + :label_file_size: "File size" + :heading_file_upload: "Upload" + :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." + :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." + :submit_upload_files: "Upload" \ No newline at end of file diff --git a/config/locales/fr.yml b/config/locales/fr.yml index b54e3524..f19bfb0e 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -68,4 +68,10 @@ fr: :label_email_documents: "Documents" :label_email_body: "Body" :label_email_send: "Send" + :title_notifications_active: "Notifications active" + :label_file_size: "File size" + :heading_file_upload: "Upload" + :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." + :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." + :submit_upload_files: "Upload" \ No newline at end of file diff --git a/config/locales/ru.yml b/config/locales/ru.yml index add32f9c..07517e28 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -68,4 +68,10 @@ ru: :label_email_documents: "Documents" :label_email_body: "Body" :label_email_send: "Send" + :title_notifications_active: "Notifications active" + :label_file_size: "File size" + :heading_file_upload: "Upload" + :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." + :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." + :submit_upload_files: "Upload" \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb new file mode 100644 index 00000000..01f89c73 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,6 @@ +ActionController::Routing::Routes.draw do |map| + map.resource :dmsf, :member => {:sync => :put} do |dmsf| + dmsf.resource :dmsf_detail, :as => 'detail' + dmsf.resource :dmsf_state, :as => 'state' + end +end diff --git a/init.rb b/init.rb index af700d3f..3ccaf090 100644 --- a/init.rb +++ b/init.rb @@ -26,6 +26,8 @@ Redmine::Plugin.register :redmine_dmsf do url "https://code.google.com/p/redmine-dmsf/" author_url "mailto:vit.jonas@kontron-czech.com" + requires_redmine :version_or_higher => '1.1.0' + settings :partial => 'settings/dmsf_settings', :default => { "dmsf_max_file_upload" => "0",