-
Notifications
You must be signed in to change notification settings - Fork 898
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
locale:po_to_json: add support for including catalogs from javascript plugins #17725
locale:po_to_json: add support for including catalogs from javascript plugins #17725
Conversation
lib/tasks/locale.rake
Outdated
lang_dir = File.join(plugin_dir, lang) | ||
Dir.mkdir(lang_dir) | ||
lang_file = "#{lang_dir}/#{url.split('/')[-1]}" | ||
system "curl -o #{lang_file} #{url}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably use system!
(from ManageIQ::Environment
)
Right now, all the urls create a file saying: "404: Not Found" and get happily ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. And also added an ensure
block at the end of the task (the file deletion part).
6350c2e
to
60bac82
Compare
Checked commit mzazrivec@60bac82 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 lib/tasks/locale.rake
|
Looks like it now handles failures just fine:
👍 |
Aand now that the files exist (ManageIQ/ui-components#327), confirmed I can see the strings in my |
Backported to Gaprindashvili via #17740 |
When creating gettext catalogs for javascript consumption, we need to merge catalogs from all ManageIQ plugins and convert the result into a json file. So far, we were only able to do that for regular rails engines (i.e. ManageIQ ruby plugins). As things are, we need to include javascript plugins (such as ui-compoments) into the equation as well.
This change makes it possible to download the gettext catalogs from plugins and include them into the merge & conversion process.
@himdel review please?
@miq-bot add_label gaprindashvili/yes