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
Add support to translations to codeceptjs #189
Conversation
… a translations file
…h the translated helper action names
@@ -0,0 +1,56 @@ | |||
|
|||
|
|||
module.exports = { |
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.
Suggestion: The explicit call to module.exports
is really necessary? I think that the translation file needs be a plain .json
file instead a .js
file
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.
Looks reasonable to me to have it as .json
but I don't see if it is necessary
Awesome @abner !! This is a amazing feature :) |
Wow! Really cool. |
Thank you. I will play a bit with that |
I have done some refactoring there #194 |
Ok, I have written small reference on using translations: http://codecept.io/reports/ Thanks! |
Hey @mfdeveloper @abner if you still use CodeceptJS please join or Slack. https://join.slack.com/t/codeceptjs/shared_invite/enQtMzA5OTM4NDM2MzA4LTNiMTE5YzNlMjQyNWYwZjAzODE3ZTI1MmVkYjY0YTYyNDZmMWJjM2VlODg3NTQzYzM2OGE5ZmIwODFjODk1MzI We have Portuguese channel as well! |
Hi, |
Added feature to allow define translations to the helpers actions and also to the default
I
actor.Added a folder translations where contributors would add translations for their own languagues.
The feature actually works like this: In your concept.json file you add a translation key with some of the name of a supported language or you can also point to a file in your project path.
Example
Using this will allow to write your steps in portuguese:
And the report to
codeceptjs run --steps
will showAcesso a tela de Login --
Testar se a tela de login está acessível
• Eu nao estou em aplicacao angular
• Eu estou na pagina "http://localhost:3000/"
• Eu vejo "My App"
✓ OK in 413ms
OK | 1 passed // 462ms