-
Notifications
You must be signed in to change notification settings - Fork 297
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
Sync translation infrastructure from foreman_plugin_template #11193
base: master
Are you sure you want to change the base?
Conversation
This copies the Makefile from foreman_plugin_template to resolve an issue with the time stamp handling and pulling in new translations that made it past 50%. It also ignores action_names.rb since that's now considered a best practice. Generated files do not belong in git.
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.
@ianballou in the past we looked into this. Would you mind taking a look?
cc @sambible @chris1984 for visibility. We should merge this before we do the final pull with translations. Especially the .po.time_stamp
handling previously caused issues where some languages weren't updated and thus missed translations.
|
||
%.mo: %.po | ||
mkdir -p $(shell dirname $@)/LC_MESSAGES | ||
msgfmt -o $(shell dirname $@)/LC_MESSAGES/$(MOFILE) $< | ||
touch $(shell dirname $@)/LC_MESSAGES/$(MOFILE) |
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.
I have noticed that msgfmt
doesn't always update the timestamp, if there are no changes. Now I'm unsure if this is still an issue after the time_stamp handling is fixed.
commit-translation-files: $(POFILES) | ||
git add $(POFILES) $(POTFILE) $(ACTIONFILE) ../app/assets/javascripts/katello/locale | ||
mo-files: $(MOFILES) | ||
git add $(POFILES) $(POTFILE) $(JSFILES) ../locale/*/LC_MESSAGES |
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.
The ../locale/*/LC_MESSAGES
part adds the .mo
files and I think we ignore those here.
We'll get this reviewed soon. |
Tested with
Seems lots of new messages are picked up: https://www.jstoolset.com/diff/f830a909fc082b1d where left side file is the result from master and right side from this PR. Not sure why message on this line is not updated in the translation file with this PR. |
What are the changes introduced in this pull request?
This copies the Makefile from foreman_plugin_template to resolve an issue with the time stamp handling and pulling in new translations that made it past 50%. See theforeman/foreman_plugin_template#65 & theforeman/foreman_plugin_template#57 for that.
It also ignores action_names.rb since that's now considered a best practice. Generated files do not belong in git. See theforeman/foreman_plugin_template#64.
Considerations taken when implementing this change?
It's now a draft since I see some changes and we should investigate those. A PR helps to centralize that discussion.
What are the testing steps for this pull request?
Update translations per standard practice and see that everything is properly updated.