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

Refactor i18n #389

Merged
merged 2 commits into from
Mar 17, 2018
Merged

Refactor i18n #389

merged 2 commits into from
Mar 17, 2018

Conversation

tjguk
Copy link
Collaborator

@tjguk tjguk commented Mar 16, 2018

This is the small refactor of the i18n / gettext support so that it's part of the package import. Apart from a bit of tidiness, this means:

  • it no longer needs to be imported and initalised in app.py
  • logic.py can be imported independently (useful for testing); previously it implicitly relied on something importing gettext to start with and therefore...
  • conftest.py no longer needs to set up gettext for the tests to work

@tjguk tjguk mentioned this pull request Mar 16, 2018
@@ -1483,3 +1484,19 @@ def test_rename_tab_avoid_duplicating_other_tab_name():
'A file of that name is already '
'open in Mu.')
assert mock_tab.path == 'old.py'

def test_logic_independent_import_logic():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like pystyle is complaining about not having 2 blank lines between functions: E302 expected 2 blank lines, found 1.
Same for the one below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sigh; once again a reply hasn't made it through to GH)

Thanks; good catch. In short: I didn't run make check. I'll go back and rejig.

BTW I've never encountered a codebase which actually puts two blank lines between functions (except possibly to mollify nagging linters...)

@ntoll ntoll merged commit f520572 into mu-editor:master Mar 17, 2018
@ntoll
Copy link
Member

ntoll commented Mar 17, 2018

Thank you. I fixed the style issue before merging. ;-)

You mention not seeing the two line convention... These past few years, I've seen nothing but this convention. C'est la vie.

@tjguk
Copy link
Collaborator Author

tjguk commented Mar 17, 2018

Thanks

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 this pull request may close these issues.

3 participants