A quick deep dive into 'rake gettext:find'
FileTask looks at the timestamps of dependent files, and only executes the supplied block if any of the dependent files have a timestamp later than the file to update.
dependent_files = ["translations_template_file.pot"] file "file_to_update" => dependent_files do # update the file end
gettext:find was not doing anything
It turned out that gettext uses two FileTasks.
One to update the template:
files_needing_translations = ["file1.js", "file2.rb"] file "translations_template_file.pot" => files_needing_translations do # update the translations template file end
and another to update the PO file:
file "en-US/translation_file.po" => ["translations_template_file.pot"] do # update "en-US/translations.po" end
gettext:find did not do anything was because none of the
files needing translation were updated, thus no PO files were updated.
> touch one_of_the_files_that_gettext_looks_at.js > rake gettext:find