Skip to content

Commit 267db1a

Browse files
committed
Localization changes + documentation updates
1 parent faf2e90 commit 267db1a

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

docs/documentation/docs/controls/PeoplePicker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ The People picker control can be configured with the following properties:
7272
| webAbsoluteUrl | string | no | Specify the site URL on which you want to perform the user query call. Default is the current site URL. |
7373
| showHiddenInUI | boolean | no | Show users which are hidden from the UI. By default these users/groups hidden for the UI will not be shown. |
7474
| principleTypes | PrincipleType[] | no | Define which type of data you want to retrieve: User, SharePoint groups, Security groups. Multiple are possible. |
75+
| resultsMaximumNumber | number | no | Maximum number of suggestions to show in the full suggestion list. Default is 5. |
7576

7677
Enum `PrincipalType`
7778

src/controls/peoplepicker/PeoplePickerComponent.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
362362
*/
363363
public render(): React.ReactElement<IPeoplePickerProps> {
364364
const suggestionProps: IBasePickerSuggestionsProps = {
365-
suggestionsHeaderText: 'Suggested People',
366-
noResultsFoundText: 'No results found',
367-
loadingText: 'Loading',
365+
suggestionsHeaderText: strings.peoplePickerSuggestionsHeaderText,
366+
noResultsFoundText: strings.peoplePickerNoResultsFoundText,
367+
loadingText: strings.peoplePickerLoadingText,
368368
resultsMaximumNumber: this.props.resultsMaximumNumber ? this.props.resultsMaximumNumber : 5
369369
};
370370

src/loc/en-us.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,8 @@ define([], () => {
4949
peoplePickerComponentTooltipMessage: "People Picker",
5050
peoplePickerComponentErrorMessage: "People picker is mandatory",
5151
peoplePickerComponentTitleText: "Pick the user(s)",
52+
peoplePickerSuggestionsHeaderText: 'Suggested People',
53+
peoplePickerNoResultsFoundText: 'No results found',
54+
peoplePickerLoadingText: 'Loading'
5255
};
5356
});

src/loc/mystrings.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ declare interface IControlStrings {
22
peoplePickerComponentTooltipMessage: string;
33
peoplePickerComponentErrorMessage: string;
44
peoplePickerComponentTitleText: string;
5+
peoplePickerSuggestionsHeaderText: string;
6+
peoplePickerNoResultsFoundText: string;
7+
peoplePickerLoadingText: string;
8+
9+
510
SiteBreadcrumbLabel: string;
611
ListViewGroupEmptyLabel: string;
712
WebPartTitlePlaceholder: string;

src/webparts/controlsTest/components/ControlsTest.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
316316
defaultSelectedUsers={["[email protected]", "[email protected]"]}
317317
selectedItems={this._getPeoplePickerItems}
318318
showHiddenInUI={false}
319-
principleTypes={[PrincipalType.User]} />
319+
principleTypes={[PrincipalType.User]}
320+
resultsMaximumNumber={2} />
320321

321322
<PeoplePicker
322323
context={this.props.context}

0 commit comments

Comments
 (0)