Skip to content

Is it possible to translate actor provided steps? #184

@abner

Description

@abner

Threre is a channel where i would ask few questions about codecept to you?

I work as a System Analyst in the major Governament IT Company in Brasil, called SERPRO. Actually i'm working as a consultant in web frontend technologies (at this time AngularJS, Angular 2 [both Javascript and Typescript]) and yesterday casually i found the codecept project and quickly tried it and liked so much.

I would like to use the navigation helper methods in Brazillian Portuguese, so this tests scenarios will serve as our stories documentation too.

I just came out with this setup:

1 - In the codecept.json file i include a step file like this:

"include": {
    "Eu": "./e2e/steps/steps_file.js"
  },

Eu is I in portuguese

And in the steps_file i created proxy methods in portuguese just calling the corresponding methods:

 estouNaPagina: function(url) {
      return this.amOnPage(url);
 },

vejo: function(text) {
   return this.see(text);
},

naoEstouEmAplicacaoAngular: function() {
    return this.amOutsideAngularApp();
 }

There is some path into the codeceptjs to achieve the translation of all the helpers methods codecept already provides?

I was wondering if an approach like define a mapping json and run some generator to build the steps would be a good way of doing this.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions