-
Notifications
You must be signed in to change notification settings - Fork 191
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
Added localization framework to mssql-cli #272
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.
Let's chat about this process. It's not clear to me why we need babel - seems a little complicated, so I'd like to understand how you see this process working.
c278bc4
to
fe9633f
Compare
The are some strings that need to be translated in main.py |
Same with mssql_cli.py. Are you planning on making a complete loc string pass in another PR? |
Is it possible to add a unit test to make sure all of this works? |
Unit test for testing localization is added. |
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.
Heading in the right direction.
What do you think about moving all localized strings to a type LocalizedString like we do for resource files on Windows?
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.
Approved with some nit issues to address before checkin.
@@ -120,8 +120,7 @@ def create_parser(): | |||
dest=u'multi_subnet_failover', | |||
action=u'store_true', | |||
default=False, | |||
help=u'If application is connecting to AlwaysOn AG on different subnets, setting this provides faster ' | |||
u'detection and connection to currently active server.') | |||
help=u'If application is connecting to AlwaysOn AG on different subnets, setting this provides faster detection and connection to currently active server.') |
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.
Let's revert this change as it's not related to loc.
|
||
## Localized Strings | ||
def goodbye(): | ||
return _(u'Goodbye!') |
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.
Add a newline?
@@ -169,6 +171,44 @@ def validate_actions(user_actions, valid_targets): | |||
sys.exit(1) | |||
|
|||
|
|||
def generate_mo(extraction_target_path, lang_name, trans_mappings, domain, localedir=None): |
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.
We should separate out the po and mo generation, but we can do this in another PR.
Added localization framework to mssql-cli.