Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Root folder' and 'Admins' translations and modify some zh-CN translations #53

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9809046
adding spanish translation
marcosantoniocaro Jul 14, 2016
388eea3
adding spanish translation
marcosantoniocaro Jul 14, 2016
9487cba
adding spanish translations views
claudiocebpaz Aug 30, 2016
5d44ef3
Revert "adding spanish translations views"
marcosantoniocaro Aug 30, 2016
1232015
adding spanish translations views
marcosantoniocaro Aug 30, 2016
54a2d55
ignore .idea
924211739 Sep 14, 2016
21ca7ee
add username to share_link_email subject
924211739 Sep 14, 2016
7f4c44a
translate email and passworld and confirm_password
924211739 Sep 14, 2016
93ef1f6
modify some zh-CN translations and root_url in email template
924211739 Sep 14, 2016
2de03e3
update root_url in email template
924211739 Sep 14, 2016
145ef57
add 'Root folder' and 'Admins' translations and modify some zh-CN tra…
924211739 Sep 14, 2016
afbd652
Updated to Rails 4.2.7.1
mischa78 Oct 1, 2016
78a5869
Minimal Ruby version is 2.1.0 because of Paperclip
mischa78 Oct 1, 2016
47a5233
Merge pull request #52 from marcosantoniocaro/master
mischa78 Oct 1, 2016
227ea64
Added Spanish language contributors to list of contributors in README
mischa78 Oct 1, 2016
8b9af85
ignore .idea
924211739 Sep 14, 2016
9fa45f0
add username to share_link_email subject
924211739 Sep 14, 2016
54d74ff
translate email and passworld and confirm_password
924211739 Sep 14, 2016
281a4b7
modify some zh-CN translations and root_url in email template
924211739 Sep 14, 2016
b8cca72
update root_url in email template
924211739 Sep 14, 2016
2a8fea7
add 'Root folder' and 'Admins' translations and modify some zh-CN tra…
924211739 Sep 14, 2016
0da0c2f
Merge branch 'master' of github.com:wonderful60/boxroom
924211739 Oct 8, 2016
03637ea
delete .idea
924211739 Oct 8, 2016
e02eb4e
change double quotes to single quotes
924211739 Oct 8, 2016
1387634
Add 'Root folder' and 'Admins' spanish translations
924211739 Oct 8, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ db/*.sqlite3
log/*
tmp/*
uploads/*
.idea
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably does not apply to most people. Can you take it out?

2 changes: 1 addition & 1 deletion app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ def reset_password_email(user)

def share_link_email(share_link)
@share_link = share_link
mail(:to => share_link.user.email, :reply_to => share_link.user.email, :bcc => share_link.emails, :subject => t(:share_link_email_subject, :email => share_link.user.email))
mail(:to => share_link.user.email, :reply_to => share_link.user.email, :bcc => share_link.emails, :subject => t(:share_link_email_subject, :email => share_link.user.email+"("+share_link.user.name+")"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer it if you do it like this:

:email => "#{share_link.user.email} (#{share_link.user.name})"

end
end
4 changes: 2 additions & 2 deletions app/models/folder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ def has_children?
end

def self.root
@root_folder ||= find_by_name_and_parent_id('Root folder', nil)
@root_folder ||= find_by_name_and_parent_id(Folder.human_attribute_name("folder.root_folder"), nil)
Copy link
Owner

@mischa78 mischa78 Oct 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer single quotes. Could you please change that in all the human_attribute_name calls?

end

private

def check_for_parent
raise 'Folders must have a parent.' if parent.nil? && name != 'Root folder'
raise 'Folders must have a parent.' if parent.nil? && name != Folder.human_attribute_name("folder.root_folder")
end

def create_permissions
Expand Down
6 changes: 3 additions & 3 deletions app/models/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ class Group < ActiveRecord::Base
before_destroy :dont_destroy_admins

def admins_group?
name == 'Admins'
name == Group.human_attribute_name("group.admins")
end

def self.admins_group
where(:name => 'Admins').first
where(:name => Group.human_attribute_name("group.admins")).first
end

def self.all_except_admins
where.not(:name => 'Admins')
where.not(:name => Group.human_attribute_name("group.admins"))
end

private
Expand Down
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def clear_reset_password_token
end

def create_root_folder_and_admins_group
Folder.create(:name => 'Root folder')
groups << Group.create(:name => 'Admins')
Folder.create(:name => Folder.human_attribute_name("folder.root_folder"))
groups << Group.create(:name => Group.human_attribute_name("group.admins") )
end

def dont_destroy_admin
Expand Down
6 changes: 3 additions & 3 deletions app/views/admins/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<%= f.text_field :name, { :class => 'text_input' } %>
</p>
<p>
<%= f.label :email %>:<br>
<%= f.label :email, t(:email) %>:<br>
<%= f.text_field :email, { :class => 'text_input' } %>
</p>
<p>
<%= label_tag :password %>:<br>
<%= label_tag :password, t(:password) %>:<br>
<%= f.password_field :password, { :class => 'text_input' } %>
</p>
<p>
<%= label_tag :confirm_password %>:<br>
<%= label_tag :confirm_password, t(:confirm_password) %>:<br>
<%= f.password_field :password_confirmation, { :class => 'text_input' } %>
</p>
<p>
Expand Down
4 changes: 2 additions & 2 deletions app/views/clipboard/_clipboard_empty.zh-CN.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<h3>剪贴板是空的</h3>
<%= link_to '回去', '#', :class => 'back_link' %>用剪贴板按钮将文件或文件夹加到剪贴板
<h3>收藏夹是空的</h3>
<%= link_to '返回', '#', :class => 'back_link' %>用"加到收藏夹"按钮将文件或文件夹加到收藏夹
2 changes: 1 addition & 1 deletion app/views/user_mailer/reset_password_email.de.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Ihr altes Kennwort ist weiterhin gültig.

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/reset_password_email.en.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Your current password is still valid.

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/reset_password_email.fr.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Votre mot de passe actuel reste inchangé.

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/reset_password_email.it.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ La password corrente continuerà ad essere valida.

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
2 changes: 1 addition & 1 deletion app/views/user_mailer/reset_password_email.nl.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Uw huidige wachtwoord is nog steeds geldig.

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

10 changes: 5 additions & 5 deletions app/views/user_mailer/reset_password_email.zh-CN.text.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
亲爱的用户
亲爱的<%= @user.name %>

请用下面的网址重设您的Boxroom密码
请访问如下链接重置您的Boxroom密码

<%= edit_reset_password_url(@user.reset_password_token) %>

提醒一下,您的户头情况
顺便提醒一下,您的账户信息

用户名: <%= @user.name %>
邮箱: <%= @user.email %>

如果您不曾提交要求重设密码,请忽略这封信。您当前的密码仍然有效。
注:如果您不曾提交重设密码要求,请忽略此封封信,您当前的密码仍然有效。

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
2 changes: 1 addition & 1 deletion app/views/user_mailer/share_link_email.de.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Diese URL wird am <%= l @share_link.link_expires_at, :format => :long %> ablaufe

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/share_link_email.en.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ The URL above will expire at <%= l @share_link.link_expires_at, :format => :time

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
2 changes: 1 addition & 1 deletion app/views/user_mailer/share_link_email.fr.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Le lien ci-dessus expirera à <%= l @share_link.link_expires_at, :format => :tim

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/share_link_email.it.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ L'URL indicato sopra scadrà <%= l @share_link.link_expires_at, :format => :long

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/share_link_email.nl.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ De vervaldatum van bovenstaande URL is <%= l @share_link.link_expires_at, :forma

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

8 changes: 4 additions & 4 deletions app/views/user_mailer/share_link_email.zh-CN.text.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
亲爱的收件人:

<%= @share_link.user.email %> 与您共享了一个文件
<%= @share_link.user.email %> 与您分享了一个文件

<%= @share_link.user_file.attachment_file_name %> (<%= number_to_human_size(@share_link.user_file.attachment_file_size, :locale => I18n.locale) %>)

请用下面的链接下载文件
请使用如下链接下载文件

<%= share_link_url(:id => @share_link.link_token) %>

此链接会在<%= l @share_link.link_expires_at, :format => :time_only %><%= l @share_link.link_expires_at, :format => :date_only %>失效。
注:此链接会在<%= l @share_link.link_expires_at, :format => :date_only %> <%= l @share_link.link_expires_at, :format => :time_only %>失效。

<% unless @share_link.message.blank? -%>
=== <%= t(:shared_message) %>: ===
Expand All @@ -17,4 +17,4 @@

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/signup_email.de.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This is an invitation to sign up for Boxroom. Please use the following URL to si

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/signup_email.en.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This is an invitation to sign up for Boxroom. Please use the following URL to si

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/signup_email.fr.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Ceci est un mail d'invitation à Boxroom. Pour vous inscrire, veuillez utiliser

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/signup_email.it.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This is an invitation to sign up for Boxroom. Please use the following URL to si

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the last newline please.

2 changes: 1 addition & 1 deletion app/views/user_mailer/signup_email.nl.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Gebruik onderstaande URL om uw account aan te maken:

--
Boxroom
http://boxroomapp.com/
<%= root_url %>
4 changes: 2 additions & 2 deletions app/views/user_mailer/signup_email.zh-CN.text.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
亲爱的收件人,

此信邀请你注册Boxroom。请用下面的网址注册
此封邮件用于邀请您注册Boxroom,请访问如下链接进行注册

<%= edit_signup_url(@user.signup_token) %>
--
Boxroom
http://boxroomapp.com/
<%= root_url %>
2 changes: 1 addition & 1 deletion app/views/users/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<% if @user.is_admin -%>
<span class="disabled">
<%= hidden_field_tag 'user[group_ids][]', Group.admins_group.id %>
<input type="checkbox" checked="checked" disabled="disabled" /><label>Admins</label>
<input type="checkbox" checked="checked" disabled="disabled" /><label><%= Group.human_attribute_name("group.admins") %></label>
</span>
<%= f.collection_check_boxes :group_ids, Group.all_except_admins, :id, :name %>
<% else -%>
Expand Down
2 changes: 2 additions & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ de:
attributes:
folder:
name: Name
root_folder: Root folder
group:
name: Name
admins: Admins
share_link:
emails: E-Mail Adressen
expires_at: Läuft ab am
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@
attributes:
folder:
name: Name
root_folder: Root folder
group:
name: Name
admins: Admins
share_link:
emails: Email addresses
expires_at: Expires
Expand Down
5 changes: 5 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@
create: Créer un(e) %{model}
submit: Enregistrer ce(tte) %{model}
update: Modifier ce(tte) %{model}
attributes:
folder:
root_folder: Root folder
group:
admins: Admins
number:
currency:
format:
Expand Down
2 changes: 2 additions & 0 deletions config/locales/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@
attributes:
folder:
name: Nome
root_folder: Root folder
group:
name: Nome
admins: Admins
share_link:
emails: Indirizzo Email
expires_at: Scade
Expand Down
2 changes: 2 additions & 0 deletions config/locales/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ nl:
attributes:
folder:
name: Naam
root_folder: Root folder
group:
name: Naam
admins: Admins
share_link:
emails: E-mailadressen
expires_at: Vervaldatum
Expand Down
Loading