-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: respect --cwd argument when generating/extracting translations #540
Conversation
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.
LGTM
i see there's actually an existing bug here - the CLI commands accept a --cwd
argument, so process.cwd()
is NOT always guaranteed to be the proper cwd. This function should probably accept paths
which includes the cwd
arg (defaulting to process.cwd()
) and use that instead - as is currently written, this change looks correct. Feel free to fix the larger issue if desired, but if we want to defer the bugfix (likely also in generate
as both were ported from https://github.com/dhis2/d2-i18n-generate / https://github.com/dhis2/d2-i18n-extract) we just can create an issue to follow up.
I'll update both |
## [6.1.1](v6.1.0...v6.1.1) (2021-04-27) ### Bug Fixes * respect --cwd argument when generating/extracting translations ([#540](#540)) ([280e02c](280e02c))
🎉 This PR is included in version 6.1.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Currently, when generating
i18n
strings (either as a result ofd2-app-scripts start
ord2-app-scripts extract
), a message in the format below is logged:This PR ensures that the path to
en.pot
logged is relative to the current working directory, resulting in the more consice: