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

Generate translations for actions only coming from the current plugin #735

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

adamruzicka
Copy link
Contributor

No description provided.

.uniq
.map { |n| %[_("#{n}")] }
.select { |action| src, = Object.const_source_location(action.to_s); src.start_with? @engine.root.to_s }
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, rubocop doesn't like semicolons :/

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I tested this out and in foreman_virt_who_configure (which depends on katello) it generates:

# Autogenerated!
_("Report")

@adamruzicka adamruzicka merged commit bc046bd into theforeman:master Nov 29, 2023
2 of 4 checks passed
@adamruzicka adamruzicka deleted the action-names branch November 29, 2023 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants