Skip to content
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

feat: add more custom template functions and predefined template variables #43

Open
mdreizin opened this issue Oct 5, 2017 · 2 comments
Milestone

Comments

@mdreizin
Copy link

mdreizin commented Oct 5, 2017

Currently compile_format doesn't have any template functions:

https://github.com/Smartling/smartling-cli/blob/master/compile_format.go#L38

It would be nice to have some useful ones:

https://github.com/Masterminds/sprig

In addition, it would be nice to have some predefined template variables:

  • Path - original file path
  • Name - original file name without extension
  • Dir - original file directory path
  • Base - original file name with extension
  • Ext - original file extension
  • Locale - project locale code value

EXAMPLE:

Please see https://github.com/Fitbit/smartling/blob/master/model/project_resource.go#L35

@dimitrystd
Copy link

Thanks for feedback. It makes sense and we will schedule this improvement.

@dimitrystd dimitrystd added this to the Batch #2 milestone Oct 9, 2017
@xzyfer
Copy link

xzyfer commented Jul 3, 2019

Is this being considered?

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

No branches or pull requests

3 participants