Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9440bdd8
authored
Aug 03, 2018
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge request fixes
1 parent
cdf83bdf
Pipeline
#74
failed
in 0 seconds
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
code/moya-angular/src/app/app.module.ts
code/moya-angular/src/app/components/moya-locale/moya-locale.service.ts → code/moya-angular/src/app/components/moya-locale/locale.service.ts
code/moya-angular/src/app/components/moya-locale/moya-locale.component.ts
code/moya-angular/src/app/components/moya-locale/moya-locale.service.spec.ts
code/moya-angular/src/app/menu/left-menu/left-menu.component.ts
code/moya-angular/src/app/app.module.ts
View file @
9440bdd
import
{
UserService
}
from
'./shared/services/user.service'
;
import
{
ErrorInterceptor
}
from
'./shared/interceptors/error.interceptor'
;
import
{
MoyaLocaleService
}
from
'./components/moya-locale/moya-
locale.service'
;
import
{
LocaleService
}
from
'./components/moya-locale/
locale.service'
;
import
{
CacheService
}
from
'./shared/services/cache.service'
;
import
{
TranslateHttpLoader
}
from
'@ngx-translate/http-loader'
;
import
{
TranslateModule
,
TranslateLoader
}
from
'@ngx-translate/core'
;
...
...
@@ -49,7 +49,7 @@ import {ApolloModule} from "apollo-angular";
],
providers
:
[
CacheService
,
Moya
LocaleService
,
LocaleService
,
{
provide
:
HTTP_INTERCEPTORS
,
useClass
:
ErrorInterceptor
,
multi
:
true
},
UserService
,
...
...
code/moya-angular/src/app/components/moya-locale/
moya-
locale.service.ts
→
code/moya-angular/src/app/components/moya-locale/locale.service.ts
View file @
9440bdd
...
...
@@ -19,7 +19,7 @@ const LOCALSTORAGE_NAME = 'currently used locale code';
@
Injectable
()
export
class
Moya
LocaleService
{
export
class
LocaleService
{
selectedLocale
:
string
;
...
...
code/moya-angular/src/app/components/moya-locale/moya-locale.component.ts
View file @
9440bdd
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
DEFAULT_LOCALE
,
ENGLISH
,
FINNISH
,
MoyaLocaleService
,
SWEDISH
}
from
'./moya-
locale.service'
;
import
{
DEFAULT_LOCALE
,
ENGLISH
,
FINNISH
,
LocaleService
,
SWEDISH
}
from
'./
locale.service'
;
@
Component
({
selector
:
'moya-locale'
,
...
...
@@ -12,7 +12,7 @@ export class MoyaLocaleComponent implements OnInit {
svSelected
=
true
;
enSelected
=
true
;
constructor
(
private
localeService
:
Moya
LocaleService
)
{
}
constructor
(
private
localeService
:
LocaleService
)
{
}
ngOnInit
()
{
this
.
localeService
.
getUserLocale
().
subscribe
(
locale
=>
{
this
.
updateFlagStatus
(
locale
);
}
);
...
...
code/moya-angular/src/app/components/moya-locale/moya-locale.service.spec.ts
View file @
9440bdd
import
{
TestBed
,
inject
}
from
'@angular/core/testing'
;
import
{
MoyaLocaleService
}
from
'./moya-
locale.service'
;
import
{
LocaleService
}
from
'./
locale.service'
;
describe
(
'
Moya
LocaleService'
,
()
=>
{
describe
(
'LocaleService'
,
()
=>
{
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({
providers
:
[
Moya
LocaleService
]
providers
:
[
LocaleService
]
});
});
it
(
'should be created'
,
inject
([
MoyaLocaleService
],
(
service
:
Moya
LocaleService
)
=>
{
it
(
'should be created'
,
inject
([
LocaleService
],
(
service
:
LocaleService
)
=>
{
expect
(
service
).
toBeTruthy
();
}));
});
code/moya-angular/src/app/menu/left-menu/left-menu.component.ts
View file @
9440bdd
...
...
@@ -10,7 +10,7 @@ import {TranslatePipe} from "@ngx-translate/core";
styleUrls
:
[
'./left-menu.component.scss'
],
providers
:
[
TranslatePipe
]
})
export
class
LeftMenuComponent
implements
OnInit
{
export
class
LeftMenuComponent
{
menu
:
MenuGroup
[];
styleClass
:
string
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment