Skip to content

added german locale #13

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 app/controllers/pastes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def find_project
@project = @paste.project
elsif User.current.admin?
@pastes = Paste
else render_403
end

@pastes = @project.pastes if @project
Expand Down
6 changes: 6 additions & 0 deletions app/helpers/pastes_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,10 @@ def link_to_all_pastes
{ :controller => "pastes", :action => "index", :project_id => @project },
:class => "icon icon-multiple"
end

def link_to_new_paste
link_to_if_authorized "New paste", { :action => "new",
:project_id => @project }, :class => "icon icon-add"
end

end
4 changes: 4 additions & 0 deletions app/views/pastes/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
</style>
<% end %>

<div class="contextual">
<%= link_to_new_paste %>
</div>

<h2><%=h title %></h2>

<% if @pastes.empty? %>
Expand Down
20 changes: 20 additions & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# German strings go here for Rails i18n
de:
label_paste_plural: Snippets
label_paste_all: Snippets
label_paste_view_all: alle Snippets anzeigen
label_paste_link_here: "Link zu diesem Snippet : %{link}"
label_paste_syntax: "Syntax: %{lang}"
label_paste_new: Snippet erstellen
label_paste_edit: bearbeiten %{link}
field_title: Überschrift (optional)
field_lang: Syntax
field_text: Text
button_paste_submit: Einfügen
text_paste_update_or_make_new: %{update} or %{make_new}
button_paste_update: Textschnipsel ändern
button_paste_make_new: als neuen Snippet erstellen
notice_paste_created: erfolgreich veröffentlicht
notice_paste_updated: Änderungen veröffentlicht
notice_paste_destroyed: Snippet gelöscht
text_paste_delete_confirmation: Wollen Sie den Snippet löschen?
8 changes: 4 additions & 4 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
menu :project_menu, :pastes, { :controller => 'pastes', :action => 'index' },
:caption => :label_paste_plural, :after => :label_wiki,
:param => :project_id

menu :project_menu, :new_paste, { :controller => 'pastes', :action => 'new' },
:caption => :label_paste_new, :after => :label_paste_plural,
:param => :project_id
# removed new pasted link from project tab to link in pastes tab
# menu :project_menu, :new_paste, { :controller => 'pastes', :action => 'new' },
# :caption => :label_paste_new, :after => :label_paste_plural,
# :param => :project_id
end

Redmine::Activity.map do |activity|
Expand Down
2 changes: 0 additions & 2 deletions lang/en.yml

This file was deleted.