angular-gettext icon indicating copy to clipboard operation
angular-gettext copied to clipboard

How to combine localized strings with e2e testing in Protractor?

Open jgonggrijp opened this issue 9 years ago • 1 comments

Suppose I have (index.html)

<h1 translate>Hello, world!</h1>

and (scenarios.js)

describe('index', function() {
    it('should say hello', function() {
        expect($('h1').getText()).toBe('Hello, world!');
    });
});

How do I ensure that this scenario is going to succeed for every developer, regardless of whether the locale of their browser is Dutch, French, Korean or English? Is there some kind of provision for this in angular-gettext?

jgonggrijp avatar Jun 29 '16 12:06 jgonggrijp

@jgonggrijp angular-gettext by itself does not do language detection. Which language it uses purely depends on how you initialise it with gettextCatalog.setCurrentLanguage().

rubenv avatar Jun 29 '16 12:06 rubenv