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

Update translator.rb #13

Closed
wants to merge 1 commit into from
Closed

Update translator.rb #13

wants to merge 1 commit into from

Conversation

Ajmal
Copy link

@Ajmal Ajmal commented Nov 2, 2017

Add ability to translate text with html format https://tech.yandex.com/translate/doc/dg/reference/translate-docpage/

@@ -51,13 +51,14 @@ def detect(text)
lang == '' ? nil : lang
end

def translate(text, *lang)
def translate(text, *lang, format)
Copy link
Owner

Choose a reason for hiding this comment

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

you can provide default value 'plain' here

def translate(text, *lang, format = 'plain')

Copy link
Author

Choose a reason for hiding this comment

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

awesome, this is cleaner

@aegorov
Copy link
Owner

aegorov commented Nov 2, 2017

Hi, Ajmal!
Thank you for your pull request!
Can you:

  1. Fix comment in MR
  2. Provide some tests for this behavior
  3. Update REAMDE
    Then i can merge you code.

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.

None yet

2 participants