foreman_theme_satellite 13.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +619 -0
  3. data/README.md +482 -0
  4. data/Rakefile +47 -0
  5. data/app/assets/images/foreman_theme_satellite/favicon.ico +0 -0
  6. data/app/assets/images/foreman_theme_satellite/header_logo.svg +836 -0
  7. data/app/assets/images/foreman_theme_satellite/login_bg.svg +384 -0
  8. data/app/assets/images/foreman_theme_satellite/login_logo.svg +840 -0
  9. data/app/assets/javascripts/foreman_theme_satellite/locale/en/foreman_theme_satellite.js +124 -0
  10. data/app/assets/javascripts/foreman_theme_satellite/theme_dashboard.js +17 -0
  11. data/app/assets/javascripts/foreman_theme_satellite/theme_ng_page_title.js +15 -0
  12. data/app/assets/stylesheets/foreman_theme_satellite/application_colors.css +12 -0
  13. data/app/assets/stylesheets/foreman_theme_satellite/bastion.scss +5 -0
  14. data/app/assets/stylesheets/foreman_theme_satellite/external_logout.scss +13 -0
  15. data/app/assets/stylesheets/foreman_theme_satellite/foreman_theme_satellite.css +1 -0
  16. data/app/assets/stylesheets/foreman_theme_satellite/login.scss +32 -0
  17. data/app/assets/stylesheets/foreman_theme_satellite/patternfly_and_overrides.scss +7 -0
  18. data/app/assets/stylesheets/foreman_theme_satellite/provisioning_templates.scss +3 -0
  19. data/app/assets/stylesheets/foreman_theme_satellite/theme.scss +14 -0
  20. data/app/assets/stylesheets/foreman_theme_satellite/topbar.scss +11 -0
  21. data/app/assets/stylesheets/foreman_theme_satellite/wizard.scss +14 -0
  22. data/app/controllers/concerns/documentation_controller_branding.rb +33 -0
  23. data/app/controllers/concerns/provisioning_templates_controller_branding.rb +94 -0
  24. data/app/helpers/provisioning_templates_helper_branding.rb +12 -0
  25. data/app/helpers/rhev_helper.rb +10 -0
  26. data/app/helpers/theme_application_helper.rb +17 -0
  27. data/app/helpers/theme_css_class_helper.rb +8 -0
  28. data/app/helpers/theme_discovery_helper.rb +10 -0
  29. data/app/helpers/theme_external_logout_helper.rb +10 -0
  30. data/app/helpers/theme_layout_helper.rb +18 -0
  31. data/app/helpers/theme_login_helper.rb +10 -0
  32. data/app/models/concerns/branch_info_branding.rb +9 -0
  33. data/app/models/concerns/deprecation_notification.rb +23 -0
  34. data/app/models/concerns/distributor_version.rb +7 -0
  35. data/app/models/concerns/gce.rb +7 -0
  36. data/app/models/concerns/openstack.rb +8 -0
  37. data/app/models/concerns/ovirt.rb +8 -0
  38. data/app/models/concerns/provisioning.rb +21 -0
  39. data/app/models/concerns/realm_theme.rb +18 -0
  40. data/app/models/concerns/satellite_packages.rb +8 -0
  41. data/app/models/concerns/setting_branding.rb +17 -0
  42. data/app/models/concerns/upstream_only_settings.rb +6 -0
  43. data/app/overrides/bootdisk_help_page.rb +44 -0
  44. data/app/overrides/layouts/base/theme_react_root.html.erb.deface +7 -0
  45. data/app/overrides/layouts/base/theme_resources.html.erb.deface +7 -0
  46. data/app/overrides/layouts/base/theme_style_resources.html.erb.deface +3 -0
  47. data/app/overrides/rhev.rb +14 -0
  48. data/app/overrides/satellite_name_override.rb +83 -0
  49. data/app/services/concerns/setting_registry_branding.rb +20 -0
  50. data/app/services/foreman_theme_satellite/renderer_methods.rb +22 -0
  51. data/app/views/api/v2/home/status_extensions.json.rabl +1 -0
  52. data/app/views/foreman_theme_satellite/_theme_client_side_branding.js.erb +63 -0
  53. data/app/views/foreman_theme_satellite/rhev/_form.erb +8 -0
  54. data/app/views/foreman_theme_satellite/rhev/_show.html.erb +6 -0
  55. data/db/migrate/20160404130619_remove_satellite_from_notification_name.rb +8 -0
  56. data/db/migrate/20161220092005_remove_satellite_from_notification_name_spell_correction.rb +24 -0
  57. data/db/migrate/20180516103339_update_idm_params.rb +19 -0
  58. data/db/migrate/20180605150932_deprecate_satellite_templates.rb +52 -0
  59. data/db/migrate/20181108171732_change_blog_url.rb +13 -0
  60. data/db/migrate/20201118090534_insights_param.rb +9 -0
  61. data/db/seeds.d/069-provisioning_templates_defaults.rb +24 -0
  62. data/db/seeds.d/850-global_parameters.rb +15 -0
  63. data/lib/foreman_theme_satellite/branded_words.rb +58 -0
  64. data/lib/foreman_theme_satellite/deprecated_templates.rb +9 -0
  65. data/lib/foreman_theme_satellite/documentation.rb +76 -0
  66. data/lib/foreman_theme_satellite/engine.rb +155 -0
  67. data/lib/foreman_theme_satellite/pry_rack.rb +12 -0
  68. data/lib/foreman_theme_satellite/replacer_repository.rb +57 -0
  69. data/lib/foreman_theme_satellite/rss_checker_branding.rb +11 -0
  70. data/lib/foreman_theme_satellite/version.rb +3 -0
  71. data/lib/foreman_theme_satellite.rb +4 -0
  72. data/lib/generators/foreman_theme_satellite/color_diff_generator.rb +32 -0
  73. data/lib/generators/foreman_theme_satellite/lib/color_changer.rb +25 -0
  74. data/lib/generators/foreman_theme_satellite/lib/css_compare.rb +85 -0
  75. data/lib/tasks/foreman_theme_satellite_tasks.rake +48 -0
  76. data/locale/Makefile +65 -0
  77. data/locale/en/foreman_theme_satellite.edit.po +152 -0
  78. data/locale/en/foreman_theme_satellite.po +286 -0
  79. data/locale/en/foreman_theme_satellite.po.time_stamp +0 -0
  80. data/locale/foreman_theme_satellite.pot +387 -0
  81. data/locale/gemspec.rb +2 -0
  82. data/package.json +31 -0
  83. data/webpack/index.js +5 -0
  84. metadata +226 -0
@@ -0,0 +1,155 @@
1
+ require 'fast_gettext'
2
+ require 'gettext_i18n_rails'
3
+ require 'rubygems'
4
+ require 'deface'
5
+
6
+ module ForemanThemeSatellite
7
+ class Engine < ::Rails::Engine
8
+ engine_name 'foreman_theme_satellite'
9
+
10
+ config.eager_load_paths += Dir["#{config.root}/app/overrides"]
11
+ config.eager_load_paths += Dir["#{config.root}/app/controllers/concerns"]
12
+ config.eager_load_paths += Dir["#{config.root}/app/helpers"]
13
+ config.eager_load_paths += Dir["#{config.root}/app/models/concerns"]
14
+ config.eager_load_paths += Dir["#{config.root}/app/services/concerns"]
15
+ config.eager_load_paths += Dir["#{config.root}/lib/foreman_theme_satellite"]
16
+
17
+ initializer 'foreman_theme_satellite.load_default_settings', :before => :load_config_initializers do |app|
18
+ SettingRegistry.prepend SettingRegistryBranding
19
+ end
20
+
21
+ initializer 'foreman_theme_satellite.register_plugin', :before=> :finisher_hook do |app|
22
+ Foreman::Plugin.register :foreman_theme_satellite do
23
+ requires_foreman '>= 3.7.0'
24
+ register_gettext
25
+
26
+ settings do
27
+ category(:provisioning) do
28
+ setting('show_unsupported_templates',
29
+ type: :boolean,
30
+ default: true,
31
+ description: N_('Show unsupported provisioning templates. '\
32
+ 'When enabled, all the avaiable templates will be shown. '\
33
+ 'When disabled, Red Hat supported templates will be shown only'),
34
+ full_name: N_('Show unsupported provisioning templates')
35
+ )
36
+ end
37
+ end
38
+
39
+ tests_to_skip ({
40
+ "ComputeResourceTest" => ["friendly provider name"],
41
+ "RealmIntegrationTest" => ["create new page"],
42
+ "SmartProxyIntegrationTest" => ["create new page", "index page"],
43
+ "TopBarIntegrationTest" => ["top bar links"],
44
+ "AboutIntegrationTest" => ["about page"],
45
+ "ComputeProfileIntegrationTest" => ["index page", "create new page", "edit page", "show page", "edit compute attribute page", "new compute attribute page"] ,
46
+
47
+ #the following tests are failing due to change in realms types
48
+ "Api::V2::RealmsControllerTest" => ["should create valid realm", "should update valid realm"],
49
+ "OrganizationTest" => ["should clone organization with all associations"],
50
+ "RealmTest" => ["realm can be assigned to locations"],
51
+ "LocationTest" => ["should clone location with all associations"]
52
+ })
53
+
54
+ extend_rabl_template 'api/v2/home/status', 'api/v2/home/status_extensions'
55
+ extend_template_helpers ForemanThemeSatellite::RendererMethods
56
+ end
57
+ end
58
+
59
+ initializer 'foreman_theme_satellite.load_app_instance_data' do |app|
60
+ ForemanThemeSatellite::Engine.paths['db/migrate'].existent.each do |path|
61
+ app.config.paths['db/migrate'] << path
62
+ end
63
+ end
64
+
65
+ initializer 'foreman_theme_satellite.gettext.branding', :before => :finisher_hook do |app|
66
+ require File.expand_path('replacer_repository', __dir__)
67
+ FastGettext.translation_repositories.each do |key, repo|
68
+ FastGettext.translation_repositories[key] = ::ForemanThemeSatellite::ReplacerRepository.new(repo)
69
+ end
70
+ end
71
+
72
+ initializer 'foreman_theme_satellite.rails_loading_workaround' do
73
+ # Without this, in production environment the module gets prepended too
74
+ # late and the extensions do not get applied
75
+ # the idea is stolen from https://github.com/theforeman/foreman_remote_execution/commit/2efd0a6eccfc19e282f453d5629cf46e729963eb
76
+ ProvisioningTemplatesHelper.prepend ProvisioningTemplatesHelperBranding
77
+ end
78
+
79
+ # Include concerns in this config.to_prepare block
80
+ config.to_prepare do
81
+ begin
82
+ # Include your monkey-patches over here
83
+ ::ForemanGoogle::GCE.send(:prepend, GCE::ClassMethods) if Foreman::Plugin.installed?("foreman_google")
84
+ require 'rss_checker_branding'
85
+ UINotifications::RssNotificationsChecker.send :prepend, RssCheckerBranding
86
+ Foreman::Model::Openstack.send :include, Openstack
87
+ Foreman::Model::Ovirt.send :include, Ovirt
88
+ Realm.send :include, RealmTheme
89
+ ProvisioningTemplate.send :include, Provisioning
90
+
91
+ # Skip katello initialization, if katello module is not present (dev environments)
92
+ if defined?(Katello::VERSION)
93
+ Katello::Ping.send :include, SatellitePackages
94
+ Katello::Glue::Provider.send :include, DistributorVersion
95
+ Katello::LayoutHelper.send :include, ThemeLayoutHelper
96
+ Katello::LayoutHelper.send :prepend, ThemeCssClassHelper
97
+ end
98
+
99
+ if defined?(ForemanRhCloud)
100
+ ForemanRhCloud::BranchInfo.send :prepend, BranchInfoBranding
101
+ end
102
+
103
+ UINotifications::StringParser.send :prepend, DeprecationNotification::StringParser
104
+ Notification.singleton_class.send :prepend, DeprecationNotification::Notification
105
+ LinksController.prepend DocumentationControllerBranding
106
+ ProvisioningTemplatesController.include ProvisioningTemplatesControllerBranding
107
+ ProvisioningTemplatesHelper.prepend ProvisioningTemplatesHelperBranding
108
+ Setting.singleton_class.send :prepend, SettingBranding::ClassMethods
109
+ LayoutHelper.send :prepend, ThemeCssClassHelper
110
+ rescue => e
111
+ Rails.logger.error "ForemanThemeSatellite: skipping engine hook (#{e})\n#{e.backtrace.join("\n")}"
112
+ end
113
+ end
114
+ end
115
+
116
+ METADATA_PATH = '/usr/share/satellite/metadata.yml'.freeze
117
+
118
+ def self.metadata_field(key, default)
119
+ value = ENV["SATELLITE_#{key.upcase}"]
120
+ return value if value
121
+
122
+ metadata_path = Rails.env.production? ? METADATA_PATH : "#{__dir__}/../../config/metadata.yml"
123
+
124
+ @metadata_yaml ||= File.exist?(metadata_path) ? YAML.load_file(metadata_path) : {}
125
+ @metadata_yaml.fetch(key, default)
126
+ end
127
+
128
+ def self.get_satellite_version
129
+ metadata_field('version', '6.13.0-development')
130
+ end
131
+
132
+ def self.get_satellite_short_version
133
+ Foreman::Version.new(SATELLITE_VERSION).short
134
+ end
135
+
136
+ def self.documentation_server
137
+ @documentation_server ||= metadata_field('documentation_server', 'https://access.redhat.com')
138
+ end
139
+
140
+ def self.documentation_version
141
+ @documentation_version ||= metadata_field('documentation_version', ForemanThemeSatellite::SATELLITE_SHORT_VERSION)
142
+ end
143
+
144
+ def self.documentation_root
145
+ @documentation_root ||= begin
146
+ "#{documentation_server}/documentation/en-us/red_hat_satellite/#{documentation_version}/html"
147
+ end
148
+ end
149
+
150
+ # this file indicates the satellite version that will be represented on the login page.
151
+ SATELLITE_VERSION = get_satellite_version
152
+
153
+ # this file indicates the satellite version that will be used on links to documentation.
154
+ SATELLITE_SHORT_VERSION = get_satellite_short_version
155
+ end
@@ -0,0 +1,12 @@
1
+ module ForemanThemeSatellite
2
+ class PryRack
3
+ def initialize(app)
4
+ @app = app
5
+ end
6
+
7
+ def call(env)
8
+ binding.pry
9
+ @app.call(env)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,57 @@
1
+ require 'fast_gettext'
2
+ require_relative 'branded_words'
3
+
4
+ module ForemanThemeSatellite
5
+ # This repository is a wrapper above other repository,
6
+ # it replaces branded words with their downstream counterparts.
7
+ class ReplacerRepository < ::FastGettext::TranslationRepository::Base
8
+ def initialize(old_repo)
9
+ @repo = old_repo
10
+ end
11
+
12
+ def pluralisation_rule
13
+ @repo.pluralisation_rule
14
+ end
15
+
16
+ def available_locales
17
+ @repo.available_locales
18
+ end
19
+
20
+ def [](key)
21
+ original = @repo[key]
22
+ val = original || key
23
+ return original unless val.is_a? String
24
+
25
+ val = val.dup if val
26
+
27
+ replaced = replace_string(val)
28
+
29
+ replaced == val ? original : replaced
30
+ end
31
+
32
+ def plural(*keys)
33
+ @repo.plural(*keys)
34
+ end
35
+
36
+ def reload
37
+ @repo.reload
38
+ end
39
+
40
+ private
41
+
42
+ # 'babcb'.split(/b/, -1) => ['', 'a', 'c', ''].join('z') => 'zazcz'
43
+ def replace_string(val)
44
+ return '' if val.empty?
45
+
46
+ ForemanThemeSatellite::FOREMAN_BRAND.each do |foreman_word, value|
47
+ parts = val.split(foreman_word, -1)
48
+ next if parts.size == 1 # no match, try the next word
49
+
50
+ parts = parts.map { |part| replace_string(part) }
51
+ return parts.join(value)
52
+ end
53
+
54
+ val # no match found at all
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ForemanThemeSatellite
4
+ module RssCheckerBranding
5
+ extend ActiveSupport::Concern
6
+
7
+ def rss_user_agent
8
+ "Satellite/#{ForemanThemeSatellite::SATELLITE_VERSION} (RSS notifications)"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ module ForemanThemeSatellite
2
+ VERSION = '13.1.0'.freeze
3
+ end
@@ -0,0 +1,4 @@
1
+ require 'foreman_theme_satellite/engine'
2
+
3
+ module ForemanThemeSatellite
4
+ end
@@ -0,0 +1,32 @@
1
+ require 'rails/generators'
2
+ require_relative 'lib/css_compare'
3
+ require_relative 'lib/color_changer'
4
+
5
+ module ForemanThemeSatellite
6
+ class ColorDiffGenerator < Rails::Generators::Base
7
+ class_option :destination_file, required: true
8
+ class_option :source_css, required: true
9
+
10
+ def create_color_diff
11
+ replaced = File.read(source_css)
12
+
13
+ replaced.gsub!(ForemanThemeSatellite::COLOR_REGEX) do |color|
14
+ ForemanThemeSatellite::COLOR_REPLACEMENT[color] || color
15
+ end
16
+
17
+ compare = CssCompare.new(left_filename: source_css, right_css: replaced)
18
+ diff_css = compare.to_css(compare.diff)
19
+ create_file(destination_file, diff_css)
20
+ end
21
+
22
+ private
23
+
24
+ def source_css
25
+ options['source_css']
26
+ end
27
+
28
+ def destination_file
29
+ options['destination_file']
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ForemanThemeSatellite
4
+ COLOR_REGEX = /#([0-9A-Fa-f]){3}((?=[^[:alnum:]])|([0-9A-Fa-f]){3,5})/i
5
+
6
+ # This color translation is copied from previous colors.scss file.
7
+ # When the same source color was translated to multiple destinations,
8
+ # one of the conflicting pairs was commented out and left for future
9
+ # reference.
10
+ # Each line is commented by the corresponding parameter name.
11
+ COLOR_REPLACEMENT = {
12
+ '#005c7e' => '#393F44', # $primary_color
13
+ '#0187b6' => '#5F666C', # $border_color
14
+ # '#005c7e' => '#CC0000', # $brand_color
15
+ '#0072a0' => '#474C51', # $primary_gradient_start
16
+ # '#0072a0' => '#393F44', # $primary_gradient_end
17
+ '#005b7e' => '#72757A', # $selected_gradient_start
18
+ # '#005b7e' => '#5c6165', # $hover_gradient_start
19
+ '#006289' => '#64686C', # $selected_gradient_end
20
+ # '#006289' => '#4b5053' # $hover_gradient_end
21
+ '#024d6c' => '#393F44', # $nav-pf-vertical-bg-color
22
+ '#026991' => '#474C51', # $nav-pf-vertical-active-bg-color
23
+ '#01749d' => '#202020' # $topbar-default-color
24
+ }.freeze
25
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+ require 'sass'
3
+
4
+ module ForemanThemeSatellite
5
+
6
+ # Semantically compares two css files.
7
+ # returns hash: rule => prop => value
8
+ class CssCompare
9
+ attr_reader :left, :right
10
+
11
+ def initialize(left_filename: nil, left_css: nil, right_filename: nil, right_css: nil)
12
+ @left = left_filename ? Sass::Engine.for_file(left_filename, syntax: :scss) : Sass::Engine.new(left_css, syntax: :scss)
13
+ @right = right_filename ? Sass::Engine.for_file(right_filename, syntax: :scss) : Sass::Engine.new(right_css, syntax: :scss)
14
+ end
15
+
16
+ def diff
17
+ result_hash = {}
18
+
19
+ right_hash = rules_hash(right)
20
+
21
+ rules_hash(left).each do |rule, props|
22
+ right_props = right_hash[rule]
23
+ unless props
24
+ result_hash[rule] = props
25
+ next
26
+ end
27
+
28
+ diffed_props = props_diff(props_hash(props), props_hash(right_props))
29
+
30
+ result_hash[rule] = diffed_props unless diffed_props.empty?
31
+ end
32
+
33
+ result_hash
34
+ end
35
+
36
+ def to_css(diff)
37
+ diff.map do |rule, props|
38
+ [
39
+ "#{rule} {",
40
+ to_properties_css(props, ' '),
41
+ '}'
42
+ ]
43
+ end.flatten.join("\n")
44
+ end
45
+
46
+ private
47
+
48
+ def rules_hash(engine)
49
+ root = engine.to_tree
50
+
51
+ Hash[
52
+ root.children.select { |c| c.is_a? Sass::Tree::RuleNode }.map do |c|
53
+ raise "Rule has too many names: #{c.to_sass}" if c.rule.length > 1
54
+ [c.rule[0], c.children]
55
+ end
56
+ ]
57
+ end
58
+
59
+ def props_hash(props)
60
+ Hash[
61
+ props.reject { |c| c.is_a? Sass::Tree::CommentNode }.map do |prop|
62
+ raise "property has too many names: #{prop.to_sass}" if prop.name.length > 1
63
+ [
64
+ prop.name[0],
65
+ (prop.value[0].is_a? String)? prop.value[0] : prop.value[0].to_sass
66
+ ]
67
+ end
68
+ ]
69
+ end
70
+
71
+ def props_diff(left, right)
72
+ right.reject { |k, v| left[k] == v }
73
+ end
74
+
75
+ def to_properties_css(props, indent)
76
+ props.map do |prop, val|
77
+ "#{indent}#{to_property_css(prop, val)}"
78
+ end.join("\n")
79
+ end
80
+
81
+ def to_property_css(property, value)
82
+ "#{property}: #{value};"
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,48 @@
1
+ require 'rake/testtask'
2
+
3
+ # Tasks
4
+ namespace :foreman_theme_satellite do
5
+ namespace :example do
6
+ desc 'Example Task'
7
+ task task: :environment do
8
+ # Task goes here
9
+ end
10
+ end
11
+ end
12
+
13
+ # Tests
14
+ namespace :test do
15
+ desc 'Test ForemanThemeSatellite'
16
+ Rake::TestTask.new(:foreman_theme_satellite) do |t|
17
+ test_dir = File.expand_path('../../test', __dir__)
18
+ t.libs << 'test'
19
+ t.libs << test_dir
20
+ t.pattern = "#{test_dir}/**/*_test.rb"
21
+ t.verbose = true
22
+ t.warning = false
23
+ end
24
+ end
25
+
26
+ namespace :foreman_theme_satellite do
27
+ task :rubocop do
28
+ begin
29
+ require 'rubocop/rake_task'
30
+ RuboCop::RakeTask.new(:rubocop_foreman_theme_satellite) do |task|
31
+ task.patterns = ["#{ForemanThemeSatellite::Engine.root}/app/**/*.rb",
32
+ "#{ForemanThemeSatellite::Engine.root}/lib/**/*.rb",
33
+ "#{ForemanThemeSatellite::Engine.root}/test/**/*.rb"]
34
+ end
35
+ rescue
36
+ puts 'Rubocop not loaded.'
37
+ end
38
+
39
+ Rake::Task['rubocop_foreman_theme_satellite'].invoke
40
+ end
41
+ end
42
+
43
+ Rake::Task[:test].enhance ['test:foreman_theme_satellite']
44
+
45
+ load 'tasks/jenkins.rake'
46
+ if Rake::Task.task_defined?(:'jenkins:unit')
47
+ Rake::Task['jenkins:unit'].enhance ['test:foreman_theme_satellite', 'foreman_theme_satellite:rubocop']
48
+ end
data/locale/Makefile ADDED
@@ -0,0 +1,65 @@
1
+ #
2
+ # Makefile for PO merging and MO generation. More info in the README.
3
+ #
4
+ # make all-mo (default) - generate MO files
5
+ # make check - check translations using translate-tool
6
+ # make tx-update - download and merge translations from Transifex
7
+ # make clean - clean everything
8
+ #
9
+ DOMAIN = $(shell ruby -rrubygems -e 'puts Gem::Specification::load(Dir.glob("../*.gemspec")[0]).name')
10
+ VERSION = $(shell ruby -rrubygems -e 'puts Gem::Specification::load(Dir.glob("../*.gemspec")[0]).version')
11
+ POTFILE = $(DOMAIN).pot
12
+ MOFILE = $(DOMAIN).mo
13
+ POFILES = $(shell find . -name '$(DOMAIN).po')
14
+ MOFILES = $(patsubst %.po,%.mo,$(POFILES))
15
+ POXFILES = $(patsubst %.po,%.pox,$(POFILES))
16
+ EDITFILES = $(patsubst %.po,%.edit.po,$(POFILES))
17
+ JSFILES = $(shell find ../app/assets/javascripts/*/locale -name '$(DOMAIN).js')
18
+
19
+ %.mo: %.po
20
+ mkdir -p $(shell dirname $@)/LC_MESSAGES
21
+ msgfmt -o $(shell dirname $@)/LC_MESSAGES/$(MOFILE) $<
22
+
23
+ # Generate MO files from PO files
24
+ all-mo: $(MOFILES)
25
+
26
+ # Check for malformed strings
27
+ %.pox: %.po
28
+ msgfmt -c $<
29
+ pofilter --nofuzzy -t variables -t blank -t urls -t emails -t long -t newlines \
30
+ -t endwhitespace -t endpunc -t puncspacing -t options -t printf -t validchars --gnome $< > $@
31
+ cat $@
32
+ ! grep -q msgid $@
33
+
34
+ %.edit.po:
35
+ touch $@
36
+
37
+ check: $(POXFILES)
38
+
39
+ # Unify duplicate translations
40
+ uniq-po:
41
+ for f in $(shell find ./ -name "*.po") ; do \
42
+ msguniq $$f -o $$f ; \
43
+ done
44
+
45
+ tx-pull: $(EDITFILES)
46
+ cd .. && tx pull -f
47
+ for f in $(EDITFILES) ; do \
48
+ sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
49
+ done
50
+
51
+ tx-update: tx-pull
52
+ @echo
53
+ @echo Run rake plugin:gettext[$(DOMAIN)] from the Foreman installation
54
+ @echo then run rake plugin:po_to_json[$(DOMAIN)] from the Foreman installation
55
+ @echo then run make -C locale mo-files to finish
56
+ @echo
57
+
58
+ build-mo-files: $(MOFILES)
59
+
60
+ mo-files: build-mo-files
61
+ git add $(POFILES) $(POTFILE) $(JSFILES) ../locale/*/LC_MESSAGES
62
+ git commit -m "i18n - pulling from tx"
63
+ @echo
64
+ @echo Changes commited!
65
+ @echo
@@ -0,0 +1,152 @@
1
+ # foreman_theme_satellite
2
+ #
3
+ # This file is distributed under the same license as foreman_theme_satellite.
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: version 0.0.1\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "PO-Revision-Date: 2014-08-20 08:54+0100\n"
10
+ "Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
11
+ "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
12
+ "Language: \n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+
18
+ #: ../app/helpers/provisioning_templates_helper_branding.rb:9
19
+ msgid "Supported by Red Hat"
20
+ msgstr ""
21
+
22
+ #: ../app/helpers/rhev_helper.rb:3
23
+ msgid "RHEV integration is deprecated."
24
+ msgstr ""
25
+
26
+ #: ../app/helpers/rhev_helper.rb:4
27
+ msgid "On August 31, 2022, Red Hat Virtualization entered the Maintenance Support Phase. The Maintenance Support Phase runs until August 31, 2024, followed by the Extended Life Phase, which runs until August 31, 2026."
28
+ msgstr ""
29
+
30
+ #: ../app/helpers/rhev_helper.rb:5
31
+ msgid "More information"
32
+ msgstr ""
33
+
34
+ #: ../app/helpers/theme_application_helper.rb:7
35
+ msgid "When editing a Template, you must assign a list of Operating Systems with which this Template can be used. Optionally, you can restrict a template to a list of Hostgroups or Environments."
36
+ msgstr ""
37
+
38
+ #: ../app/helpers/theme_application_helper.rb:8
39
+ msgid "When a Host requests a template (e.g. during provisioning), Foreman selects the optimal match from the available templates of that type, in the following order:"
40
+ msgstr ""
41
+
42
+ #: ../app/helpers/theme_application_helper.rb:10
43
+ msgid "Host group and Environment"
44
+ msgstr ""
45
+
46
+ #: ../app/helpers/theme_application_helper.rb:11
47
+ msgid "Host group only"
48
+ msgstr ""
49
+
50
+ #: ../app/helpers/theme_application_helper.rb:12
51
+ msgid "Environment only"
52
+ msgstr ""
53
+
54
+ #: ../app/helpers/theme_application_helper.rb:13
55
+ msgid "Operating system default"
56
+ msgstr ""
57
+
58
+ #: ../app/helpers/theme_application_helper.rb:15
59
+ msgid "The final entry, Operating System default, can be set by editing the %s page."
60
+ msgstr ""
61
+
62
+ #: ../app/helpers/theme_application_helper.rb:15
63
+ msgid "Operating System"
64
+ msgstr ""
65
+
66
+ #: ../app/overrides/satellite_name_override.rb:2
67
+ msgid "Version %{version}"
68
+ msgstr ""
69
+
70
+ #: ../app/overrides/satellite_name_override.rb:3
71
+ msgid "Support"
72
+ msgstr ""
73
+
74
+ #: ../app/overrides/satellite_name_override.rb:4
75
+ msgid "Customer portal"
76
+ msgstr ""
77
+
78
+ #: ../app/overrides/satellite_name_override.rb:5
79
+ msgid "Documentation"
80
+ msgstr ""
81
+
82
+ #: ../app/overrides/satellite_name_override.rb:6
83
+ msgid "Administering Red Hat Satellite"
84
+ msgstr ""
85
+
86
+ #: ../app/overrides/satellite_name_override.rb:7
87
+ msgid "Transitioning from Red Hat Satellite 5 to Red Hat Satellite 6"
88
+ msgstr ""
89
+
90
+ #: ../app/overrides/satellite_name_override.rb:8
91
+ msgid "API Guide"
92
+ msgstr ""
93
+
94
+ #: ../app/overrides/satellite_name_override.rb:9
95
+ msgid "Blog"
96
+ msgstr ""
97
+
98
+ #: ../app/overrides/satellite_name_override.rb:10
99
+ msgid "Red Hat Satellite Blog"
100
+ msgstr ""
101
+
102
+ #: ../app/overrides/satellite_name_override.rb:11
103
+ msgid "IRC"
104
+ msgstr ""
105
+
106
+ #: ../app/overrides/satellite_name_override.rb:12
107
+ msgid "You can find us on %{liberachat} (irc.libera.chat) in #redhat-satellite."
108
+ msgstr ""
109
+
110
+ #: ../app/overrides/satellite_name_override.rb:13
111
+ msgid "Version %{version} © %{year} Red Hat Inc."
112
+ msgstr ""
113
+
114
+ #: ../app/overrides/satellite_name_override.rb:14
115
+ msgid "Includes %{system} © 2009-%{year} Paul Kelly and Ohad Levy"
116
+ msgstr ""
117
+
118
+ #: ../app/overrides/satellite_name_override.rb:15
119
+ msgid "If you feel this is an error with Satellite 6 itself, please open a new issue with"
120
+ msgstr ""
121
+
122
+ #: ../app/overrides/satellite_name_override.rb:16
123
+ msgid "Satellite ticketing system"
124
+ msgstr ""
125
+
126
+ #: ../app/overrides/satellite_name_override.rb:17
127
+ msgid "You would probably need to attach the"
128
+ msgstr ""
129
+
130
+ #: ../app/overrides/satellite_name_override.rb:18
131
+ msgid "Full trace"
132
+ msgstr ""
133
+
134
+ #: ../app/overrides/satellite_name_override.rb:19
135
+ msgid "and relevant log entries."
136
+ msgstr ""
137
+
138
+ #: ../app/overrides/satellite_name_override.rb:20
139
+ msgid "(build: %{version})"
140
+ msgstr ""
141
+
142
+ #: ../lib/foreman_theme_satellite/engine.rb:45
143
+ msgid "Show unsupported provisioning templates. When enabled, all the avaiable templates will be shown. When disabled, Red Hat supported templates will be shown only"
144
+ msgstr ""
145
+
146
+ #: ../lib/foreman_theme_satellite/engine.rb:48
147
+ msgid "Show unsupported provisioning templates"
148
+ msgstr ""
149
+
150
+ #: gemspec.rb:2
151
+ msgid "Theme changes for Satellite 6."
152
+ msgstr ""