Skip to content

Commit

Permalink
Ivan - Avoid english language as default
Browse files Browse the repository at this point in the history
  • Loading branch information
ivandiazwm committed Jun 28, 2017
1 parent 36bac5d commit fdbcbd6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/src/data/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default {
'TICKET_NUMBER': 'Ticket number',
'NEXT': 'Next',
'SEND_EMAIL_ON_NEW_TICKET': 'Send email on new ticket',
'STAFF_UPDATED': 'Staff member updated',
'STAFF_UPDATED': 'Staff member has been updated',
'UPDATE': 'Update',

'CHART_CREATE_TICKET': 'Tickets created',
Expand Down
4 changes: 0 additions & 4 deletions client/src/lib-app/session-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import date from 'lib-app/date';
class SessionStore {
constructor() {
this.storage = LocalStorage;

if (!this.getItem('language')) {
this.setItem('language', 'en');
}
}

createSession(userId, token) {
Expand Down
2 changes: 1 addition & 1 deletion client/src/reducers/config-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ConfigReducer extends Reducer {
onInitConfigs(state, payload) {
let currentLanguage = sessionStore.getItem('language');

if(!_.includes(payload.data.allowedLanguages, currentLanguage)) {
if(payload.data.allowedLanguages && !_.includes(payload.data.allowedLanguages, currentLanguage)) {
currentLanguage = payload.data.language;
}

Expand Down

0 comments on commit fdbcbd6

Please sign in to comment.