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

[Bug] /devel babel refresh in setup.py does not work #726

Closed
derpicknicker1 opened this issue Jan 17, 2015 · 3 comments
Closed

[Bug] /devel babel refresh in setup.py does not work #726

derpicknicker1 opened this issue Jan 17, 2015 · 3 comments

Comments

@derpicknicker1
Copy link
Contributor

While i was trying to refresh the translation files i found some issues in the automated refresh process.

The command to update the cataloges gets babel.cfg as input file. This should be the messages.pot file. so change Line 197 in setup.py to

self.babel_update_messages.input_file = I18N_POT_FILE

Now refresh works and *.po files are updated correctly. If you did a babel_refresh before, you have to revert the message.po files to the originals from branch. By using babel.cfg for updating the *.po files they get messed up. For example you can use the following command.

git checkout -- messages.po

An other issue is, that the plugins directory will not be searched for messages in *.js and *.jinja2 files. You have to add a few lines to babel.cfg to get them included.

[jinja2: src/octoprint/plugins/**.jinja2]
extensions=jinja2.ext.autoescape, jinja2.ext.with_

[javascript: src/octoprint/plugins/**.js]
extract_messages = gettext, ngettext

Now install setup.py babel_refresh should work fine.

I am using Version: 1.2.0-dev-405-gf52afb8-dirty (devel branch)
Logfiles N/A, not needed.

@GitIssueBot
Copy link

Hi @derpicknicker1,

It looks like there is some information missing from your ticket that will be needed in order to process it properly. Please take a look at the Contribution Guidelines and the page How to file a bug report on the project wiki, which will tell you exactly what your ticket has to contain in order to be processable.

If you did not intend to report a bug, please take special note of the title format to use as described in the Contribution Guidelines.

I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2015-01-31 18:20) I'll close this ticket so it doesn't clutter the bug tracker.

Best regards,
~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

@derpicknicker1
Copy link
Contributor Author

Version: Version: 1.2.0-dev-405-gf52afb8-dirty (devel branch)

Printer: Replicape

Firmware: redeem

Terminal Log: N/A

octoprint.log: N/A

I love cookies!!!

foosel added a commit that referenced this issue Jan 18, 2015
Thanks to @derpicknicker1 for report and suggested fix.

 Closes #726
@foosel
Copy link
Member

foosel commented Jan 18, 2015

Fixed in devel.

And big thanks again for that full blown analysis and suggested fix. Have you thought about actually turning stuff like this into pull requests so that you get properly credited in the commit log (trying to do my best here with mentioning).

@foosel foosel closed this as completed Jan 18, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants