Skip to content

Commit

Permalink
796972 - changed '+New Something' to single string for translation, a…
Browse files Browse the repository at this point in the history
…nd clarified the 'total' string
  • Loading branch information
Tom McKay committed May 1, 2012
1 parent c7ba918 commit 67820f4
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/controllers/activation_keys_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ def panel_options
:title => _('Activation Keys'),
:col => ['name'],
:titles => [_('Name')],
:create => _('Key'),
:create => _('Key'),
:create_label => _('+ New Key'),
:name => controller_display_name,
:ajax_load => true,
:ajax_scroll => items_activation_keys_path(),
Expand Down
1 change: 1 addition & 0 deletions src/app/controllers/changesets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def setup_options
:col => ['name'],
:titles => [_('Name')],
:enable_create => false,
:create_label => _('+ New Changeset'),
:name => controller_display_name,
:accessor => :id,
:ajax_load => true,
Expand Down
1 change: 1 addition & 0 deletions src/app/controllers/filters_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def panel_options
:col => ['name'],
:titles => [_('Name')],
:create => _('Filter'),
:create_label => _('+ New Filter'),
:name => controller_display_name,
:ajax_scroll=>items_filters_path(),
:enable_create=> Filter.creatable?(current_organization),
Expand Down
3 changes: 2 additions & 1 deletion src/app/controllers/gpg_keys_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def panel_options
:title => _('GPG Keys'),
:col => ['name'],
:titles => [_('Name')],
:create => _('GPG Key'),
:create => _('GPG Key'),
:create_label => _('+ New GPG Key'),
:name => controller_display_name,
:ajax_load => true,
:ajax_scroll => items_gpg_keys_path(),
Expand Down
1 change: 1 addition & 0 deletions src/app/controllers/organizations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def setup_options
:col => ['name'],
:titles => [_('Name')],
:create => _('Organization'),
:create_label => _('+ New Organization'),
:name => controller_display_name,
:accessor => :cp_key,
:ajax_load => true,
Expand Down
1 change: 1 addition & 0 deletions src/app/controllers/providers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def panel_options
:col => ['name'],
:titles => [_('Name')],
:create => _('Provider'),
:create_label => _('+ New Provider'),
:name => controller_display_name,
:ajax_load => true,
:ajax_scroll=>items_providers_path(),
Expand Down
1 change: 1 addition & 0 deletions src/app/controllers/roles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def setup_options
:col => ['name'],
:titles => [_('Name')],
:create => _('Role'),
:create_label => _('+ New Role'),
:name => controller_display_name,
:ajax_load => true,
:list_partial => 'roles/list_roles',
Expand Down
1 change: 1 addition & 0 deletions src/app/controllers/sync_plans_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def setup_options
:col => ['name', 'interval'],
:titles => [_('Name'), _("Interval") ],
:create => _('Plan'),
:create_label => _('+ New Plan'),
:name => controller_display_name,
:ajax_load => true,
:ajax_scroll => items_sync_plans_path(),
Expand Down
2 changes: 2 additions & 0 deletions src/app/controllers/sync_schedules_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ def index
:col => ['name', 'plan_name'],
:col_titles => [_('Name'), _('Plan Name')],
:create => _('Plan'),
:create_label => _('+ New Plan'),
:name => _('product'),
:enable_create => false}

@plans_options = { :title => _('Select Plans to apply to selected Products'),
:col => ['name', 'interval'],
:col_titles => [_('Name'), _('Interval')],
:create => _('Plan'),
:create_label => _('+ New Plan'),
:name => _('plan'),
:hover_text_cb => :hover_format,
:enable_create => false,
Expand Down
1 change: 1 addition & 0 deletions src/app/controllers/system_templates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def setup_options
:col => ["name"],
:titles => [_('Name') ],
:create => _('Template'),
:create_label => _('+ New Template'),
:name => _('template'),
:create => _('Template'),
:ajax_scroll => items_system_templates_path(),
Expand Down
1 change: 1 addition & 0 deletions src/app/controllers/systems_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ def setup_options
:custom_rows => true,
:enable_create => AppConfig.katello? && System.registerable?(@environment, current_organization),
:create => _("System"),
:create_label => _('+ New System'),
:enable_sort => true,
:name => controller_display_name,
:list_partial => 'systems/list_systems',
Expand Down
1 change: 1 addition & 0 deletions src/app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ def setup_options
:col => ['username'],
:titles => [_('Username')],
:create => _('User'),
:create_label => _('+ New User'),
:name => controller_display_name,
:ajax_load => true,
:ajax_scroll => items_users_path(),
Expand Down
1 change: 1 addition & 0 deletions src/app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def two_panel(collection, options)
:name => options[:name],
:create => options[:create],
:enable_create => enable_create,
:create_label => options[:create_label] || nil,
:enable_sort => enable_sort,
:columns => options[:col],
:titles => options[:titles],
Expand Down
7 changes: 5 additions & 2 deletions src/app/views/common/_panel.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@
%h2.fl #{title}
- if enable_create
%a.fr#new{:href => "#", :class => (disable_create ? "disabled tipsify-west" : "block"), "data-ajax_url" => url_for(:action=> 'new'), :title => (disable_create if disable_create) }
#{_('+ New %s') % create}
- if !create_label.nil?
= create_label
-else
#{_('+ New %s') % create}
.arrow-right
%div.fl.clear#items_count
-# For translation purposes the string "Viewing 2 of 2 results (2 Total Users)" must be presented as a unit.
-# The javascript, though, needs the spans to update the values. Solution is this raw html.
= raw _("Viewing <span id=\"current_items_count\">0</span> of <span id=\"total_results_count\">0</span><span> results (<span id=\"total_items_count\">0</span> Total %s)</span>") % title
= raw _("Viewing %s of %s results (%s Total %s)") % ['<span id="current_items_count">0</span>', '<span id="total_results_count">0</span>', '<span id="total_items_count">0</span>', title]

- if url.nil?
%form#search_form.search{"data-url" => search_index_path()}
Expand Down

0 comments on commit 67820f4

Please sign in to comment.