Skip to content

Commit

Permalink
fix(admin-ui-plugin): Add Chinese to the default available languages
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Mar 26, 2020
1 parent 91cff38 commit 46ff932
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/admin-ui-plugin/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { LanguageCode } from '@vendure/core';
import path from 'path';

export const DEFAULT_APP_PATH = path.join(__dirname, '../admin-ui');
export const loggerCtx = 'AdminUiPlugin';
export const defaultLanguage = LanguageCode.en;
export const defaultAvailableLanguages = [LanguageCode.en, LanguageCode.es, LanguageCode.zh];
6 changes: 3 additions & 3 deletions packages/admin-ui-plugin/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import fs from 'fs-extra';
import { Server } from 'http';
import path from 'path';

import { DEFAULT_APP_PATH, loggerCtx } from './constants';
import { DEFAULT_APP_PATH, defaultAvailableLanguages, defaultLanguage, loggerCtx } from './constants';

/**
* @description
Expand Down Expand Up @@ -252,8 +252,8 @@ export class AdminUiPlugin implements OnVendureBootstrap, OnVendureClose {
'authTokenHeaderKey',
authOptions.authTokenHeaderKey || DEFAULT_AUTH_TOKEN_HEADER_KEY,
),
defaultLanguage: propOrDefault('defaultLanguage', LanguageCode.en),
availableLanguages: propOrDefault('availableLanguages', [LanguageCode.en, LanguageCode.es]),
defaultLanguage: propOrDefault('defaultLanguage', defaultLanguage),
availableLanguages: propOrDefault('availableLanguages', defaultAvailableLanguages),
};
}

Expand Down

0 comments on commit 46ff932

Please sign in to comment.