Skip to content

Commit

Permalink
fix(i18n): change default locale from en_US to en-US (#11103)
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb authored Aug 26, 2016
1 parent f25c976 commit b9647b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/@angular/core/src/application_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function _keyValueDiffersFactory() {
ViewUtils,
{provide: IterableDiffers, useFactory: _iterableDiffersFactory},
{provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory},
{provide: LOCALE_ID, useValue: 'en_US'},
{provide: LOCALE_ID, useValue: 'en-US'},

This comment has been minimized.

Copy link
@vicb

vicb Sep 5, 2016

Author Contributor

Why not ?

This comment has been minimized.

Copy link
@vdeturckheim

vdeturckheim Sep 5, 2016

@DaSchTour AFAIK, angular is a project sponsored by an US company named Google (you might have heard of them).
Please restrain yourself from such xenophobic general statements.

This comment has been minimized.

Copy link
@vdeturckheim

vdeturckheim Sep 5, 2016

the US centric view of US developers

You are making a general statement over a group of people based on their origin...

This comment has been minimized.

Copy link
@vdeturckheim

vdeturckheim Sep 5, 2016

You made my day !

This comment has been minimized.

Copy link
@laskoviymishka

laskoviymishka Sep 5, 2016

Contributor

Does this opaque token are supposed to re-register by end user to read actual browser locale?
Why not {provide: LOCALE_ID, useFactory: () => navigator.userLanguage || navigator.language || 'en-US'.

This comment has been minimized.

Copy link
@vicb

vicb Sep 6, 2016

Author Contributor

@laskoviymishka could you please create a proper feature request with your suggestion. Thanks.

]
})
export class ApplicationModule {
Expand Down
4 changes: 2 additions & 2 deletions modules/@angular/core/test/application_module_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, injec

export function main() {
describe('Application module', () => {
it('should set the default locale to "en_US"',
inject([LOCALE_ID], (defaultLocale: string) => { expect(defaultLocale).toEqual('en_US'); }));
it('should set the default locale to "en-US"',
inject([LOCALE_ID], (defaultLocale: string) => { expect(defaultLocale).toEqual('en-US'); }));
});
}

0 comments on commit b9647b7

Please sign in to comment.