fix loc strings module name and config to bundle the strings.

This commit is contained in:
ysliu 2016-09-13 17:02:18 +08:00
parent 1a547030cc
commit 1a833f0f4e
23 changed files with 34 additions and 31 deletions

View File

@ -31,6 +31,9 @@
"react-dom/server": "node_modules/react-dom/dist/react-dom-server.min.js"
},
"localizedResources": {
"helloWorldStrings": "webparts/helloWorld/loc/{locale}.js"
"todoStep1Strings": "webparts/todo-step-1/loc/{locale}.js",
"todoStep2Strings": "webparts/todo-step-2/loc/{locale}.js",
"todoStep3Strings": "webparts/todo-step-3/loc/{locale}.js",
"todoStep4Strings": "webparts/todo-step-4/loc/{locale}.js"
}
}

View File

@ -11,7 +11,7 @@
"group": { "default": "Under Development" },
"title": { "default": "Todo step 1" },
"description": { "default": "Todo sample webpart step 1" },
"officeFabricIconFontName": "Page",
"officeFabricIconFontName": "BulletedList",
"properties": {
"description": "Todo"
}

View File

@ -6,7 +6,7 @@ import {
PropertyPaneTextField
} from '@microsoft/sp-client-preview';
import * as strings from 'todoStrings';
import * as strings from 'todoStep1Strings';
import Todo, { ITodoProps } from './components/Todo';
import { ITodoWebPartProps } from './ITodoWebPartProps';

View File

@ -1,10 +1,10 @@
declare interface ITodoStrings {
declare interface ITodoStep1Strings {
PropertyPaneDescription: string;
BasicGroupName: string;
DescriptionFieldLabel: string;
}
declare module 'todoStrings' {
const strings: ITodoStrings;
declare module 'todoStep1Strings' {
const strings: ITodoStep1Strings;
export = strings;
}

View File

@ -21,7 +21,7 @@ import {
import TodoForm from './TodoForm';
import TodoTabs from './TodoTabs';
import * as strings from 'todoStrings';
import * as strings from 'todoStep2Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -16,7 +16,7 @@ import {
ITodoTask,
ItemOperationCallback
} from '../ITodoWebPartProps';
import * as strings from 'todoStrings';
import * as strings from 'todoStep2Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -24,7 +24,7 @@ import {
ItemOperationCallback
} from '../ITodoWebPartProps';
import * as strings from 'todoStrings';
import * as strings from 'todoStep2Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -23,7 +23,7 @@ import {
import TodoList from './TodoList';
import * as strings from 'todoStrings';
import * as strings from 'todoStep2Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -1,4 +1,4 @@
declare interface ITodoStrings {
declare interface ITodoStep2Strings {
TodoListTitle: string;
TodoListTabNameAllTasks: string;
TodoListTabNameCompleted: string;
@ -33,7 +33,7 @@ declare interface ITodoStrings {
TitleEmptyErrorMessage: string;
}
declare module 'todoStrings' {
const strings: ITodoStrings;
declare module 'todoStep2Strings' {
const strings: ITodoStep2Strings;
export = strings;
}

View File

@ -39,7 +39,7 @@ import {
} from './ITodoWebPartProps';
import Todo, { ITodoProps } from './components/Todo';
import * as strings from 'todoStrings';
import * as strings from 'todoStep3Strings';
import styles from './style/Todo.module.scss';
/**

View File

@ -21,7 +21,7 @@ import {
import TodoForm from './TodoForm';
import TodoTabs from './TodoTabs';
import * as strings from 'todoStrings';
import * as strings from 'todoStep3Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -16,7 +16,7 @@ import {
ITodoTask,
ItemOperationCallback
} from '../ITodoWebPartProps';
import * as strings from 'todoStrings';
import * as strings from 'todoStep3Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -24,7 +24,7 @@ import {
ItemOperationCallback
} from '../ITodoWebPartProps';
import * as strings from 'todoStrings';
import * as strings from 'todoStep3Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -23,7 +23,7 @@ import {
import TodoList from './TodoList';
import * as strings from 'todoStrings';
import * as strings from 'todoStep3Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -14,7 +14,7 @@ import {
ITodoTaskList
} from '../ITodoWebPartProps';
import * as strings from 'todoStrings';
import * as strings from 'todoStep3Strings';
/**
* TodoDataProvider interact with current sharepoint site to accomplish

View File

@ -1,4 +1,4 @@
declare interface ITodoStrings {
declare interface ITodoStep3Strings {
TodoListTitle: string;
TodoListTabNameAllTasks: string;
TodoListTabNameCompleted: string;
@ -33,7 +33,7 @@ declare interface ITodoStrings {
TitleEmptyErrorMessage: string;
}
declare module 'todoStrings' {
const strings: ITodoStrings;
declare module 'todoStep3Strings' {
const strings: ITodoStep3Strings;
export = strings;
}

View File

@ -39,7 +39,7 @@ import {
} from './ITodoWebPartProps';
import Todo, { ITodoProps } from './components/Todo';
import * as strings from 'todoStrings';
import * as strings from 'todoStep4Strings';
import styles from './style/Todo.module.scss';
/**

View File

@ -21,7 +21,7 @@ import {
import TodoForm from './TodoForm';
import TodoTabs from './TodoTabs';
import * as strings from 'todoStrings';
import * as strings from 'todoStep4Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -16,7 +16,7 @@ import {
ITodoTask,
ItemOperationCallback
} from '../ITodoWebPartProps';
import * as strings from 'todoStrings';
import * as strings from 'todoStep4Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -24,7 +24,7 @@ import {
ItemOperationCallback
} from '../ITodoWebPartProps';
import * as strings from 'todoStrings';
import * as strings from 'todoStep4Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -23,7 +23,7 @@ import {
import TodoList from './TodoList';
import * as strings from 'todoStrings';
import * as strings from 'todoStep4Strings';
import styles from '../style/Todo.module.scss';
/**

View File

@ -14,7 +14,7 @@ import {
ITodoTaskList
} from '../ITodoWebPartProps';
import * as strings from 'todoStrings';
import * as strings from 'todoStep4Strings';
/**
* TodoDataProvider interact with current sharepoint site to accomplish

View File

@ -1,4 +1,4 @@
declare interface ITodoStrings {
declare interface ITodoStep4Strings {
TodoListTitle: string;
TodoListTabNameAllTasks: string;
TodoListTabNameCompleted: string;
@ -33,7 +33,7 @@ declare interface ITodoStrings {
TitleEmptyErrorMessage: string;
}
declare module 'todoStrings' {
const strings: ITodoStrings;
declare module 'todoStep4Strings' {
const strings: ITodoStep4Strings;
export = strings;
}