One my projects has 100+ of templates, so they are organized into 2- or 3-level
directory structure:
/templates/base.tpl
/templates/one_dir/one_template.tpl
/templates/anothen_dir/sub_dir/_other.tpl
The problem is that mod_translation generates template only for
/templates/*.tpl, so dozens of templates in subdirs is skipped. This caused by
too-simple wildcard in z_module_indexer:scan_subdir/4:
limitation is near line 295:
Files = filelib:wildcard(Pattern),
where Pattern is string like "/.../templates/*.tpl" for this case.
One fat crunch (attached) is to use filelib:fold_files/5 with recursion=true:
filelib:fold_files(".../templates", ".*\.tpl", true, fun(F,Acc) -> [F | Acc]
end, []).
Original issue reported on code.google.com by hellla...@gmail.com on 16 Mar 2011 at 1:45
Original issue reported on code.google.com by
hellla...@gmail.com
on 16 Mar 2011 at 1:45