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

translations Makefile recreates the translations even if this not important #87

Closed
Fadiabb opened this issue Feb 12, 2019 · 1 comment · Fixed by #90
Closed

translations Makefile recreates the translations even if this not important #87

Fadiabb opened this issue Feb 12, 2019 · 1 comment · Fixed by #90

Comments

@Fadiabb
Copy link
Contributor

Fadiabb commented Feb 12, 2019

Everytime translations is called triggers a new creation of .po files and thus a new translations.json file whithout checking if there are any updates in this files and if its necessary to create new ones.
this behavoir is inefficient since we initialze new files with the same content.

@Fadiabb
Copy link
Contributor Author

Fadiabb commented Feb 12, 2019

Solution

  • Change target translations to only be remade if one of
    the *.po files changes.Technically is only directly depends
    on these files

The following diff should improve this behavior:

--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,6 @@ translations: ./$(OUTPUT_DIR)/translations.json
              fi; \
      done;

-$(OUTPUT_DIR)/translations.json: clean /tmp/template.pot
+$(OUTPUT_DIR)/translations.json: $(LOCALE_FILES)
      mkdir -p $(OUTPUT_DIR)
      gettext-compile --output $@ $(LOCALE_FILES)

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

Successfully merging a pull request may close this issue.

1 participant