Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Translations of DTL stuff provided from another CB apps #305

Open
ztmr opened this Issue Jul 25, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

ztmr commented Jul 25, 2013

Scenario:

  • application A is a "framework" with tons of ErlyDTL tags and filters
  • application B is a "primary application" that uses these tags and filters having template_tag_modules/template_filter_modules in boss.config
  • the application B extends its "main" layout from a view defined in app A (like {% extends "../../deps/framework_app/src/view/layouts/portal.html" %})
  • content served by application A works fine
  • content served by application B works fine but the translation works only when the framework's language file is merged to the po-file of the application B

I would expect that the components delivered by another application would be translated just by the same application.

But at the other hand, I understand that application B simply uses "some custom DTL modules" without knowledge about their parent application, and thus with no idea where to get translations.

is there any workaround for this? The situation I've just tried to describe is not so comfortable...

Contributor

ztmr commented Jul 25, 2013

What if we change ErlyDTL so that it will be possible to append some kind of metadata to each of the tag/filter modules? CB would add something like {cb_parent_application, framework} and then use it for translation later.

More straightforward to implement would be to try to extract an application name from the tag/filter module and if it matched an existing application, use the translations from that app then. Otherwise it would fall back to the "current" application...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment