docs: remove gender prefixes from examples (#29972)

PR Close #29972
This commit is contained in:
janith 2019-04-18 13:09:56 +05:30 committed by Jason Aden
parent e58e5ec6a6
commit c79bffaacb
33 changed files with 42 additions and 42 deletions

View File

@ -67,8 +67,8 @@ describe('AngularJS to Angular Quick Reference Tests', function () {
testFavoriteHero('Magneta', 'No movie, sorry!');
});
it('should display a movie for Mr. Nice', function () {
testFavoriteHero('Mr. Nice', 'Excellent choice!');
it('should display a movie for Dr Nice', function () {
testFavoriteHero('Dr Nice', 'Excellent choice!');
});
function testImagesAreDisplayed(isDisplayed: boolean) {

View File

@ -18,12 +18,12 @@ export class MovieService {
approvalRating: .97
},
{
hero: 'Mr. Nice',
hero: 'Dr Nice',
imageurl: 'assets/images/villain.png',
movieId: 2,
mpaa: 'pg-13',
releaseDate: '2015-12-18T00:00:00',
title: 'No More Mr. Nice Guy',
title: 'No More Dr Nice',
price: 14.95,
starRating: 4.6,
approvalRating: .94

View File

@ -2,7 +2,7 @@
import { Hero } from './hero';
export const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -31,7 +31,7 @@ describe('Architecture', () => {
function heroTests() {
const targetHero: Hero = { id: 2, name: 'Mr. Nice' };
const targetHero: Hero = { id: 2, name: 'Dr Nice' };
it('has the right number of heroes', () => {
let page = getPageElts();

View File

@ -5,7 +5,7 @@ import { Hero } from './hero';
const HEROES = [
new Hero('Windstorm', 'Weather mastery'),
new Hero('Mr. Nice', 'Killing them with kindness'),
new Hero('Dr Nice', 'Killing them with kindness'),
new Hero('Magneta', 'Manipulates metallic objects')
];

View File

@ -13,7 +13,7 @@ describe('Component Communication Cookbook Tests', function () {
describe('Parent-to-child communication', function() {
// #docregion parent-to-child
// ...
let _heroNames = ['Mr. IQ', 'Magneta', 'Bombasto'];
let _heroNames = ['Dr IQ', 'Magneta', 'Bombasto'];
let _masterName = 'Master';
it('should pass properties to children properly', function () {
@ -36,7 +36,7 @@ describe('Component Communication Cookbook Tests', function () {
// ...
it('should display trimmed, non-empty names', function () {
let _nonEmptyNameIndex = 0;
let _nonEmptyName = '"Mr. IQ"';
let _nonEmptyName = '"Dr IQ"';
let parent = element.all(by.tagName('app-name-parent')).get(0);
let hero = parent.all(by.tagName('app-name-child')).get(_nonEmptyNameIndex);

View File

@ -3,7 +3,7 @@ export class Hero {
}
export const HEROES = [
{name: 'Mr. IQ'},
{name: 'Dr IQ'},
{name: 'Magneta'},
{name: 'Bombasto'}
];

View File

@ -9,7 +9,7 @@ import { Component } from '@angular/core';
`
})
export class NameParentComponent {
// Displays 'Mr. IQ', '<no name set>', 'Bombasto'
names = ['Mr. IQ', ' ', ' Bombasto '];
// Displays 'Dr IQ', '<no name set>', 'Bombasto'
names = ['Dr IQ', ' ', ' Bombasto '];
}
// #enddocregion

View File

@ -15,7 +15,7 @@ import { Component } from '@angular/core';
export class VoteTakerComponent {
agreed = 0;
disagreed = 0;
voters = ['Mr. IQ', 'Ms. Universe', 'Bombasto'];
voters = ['Narco', 'Celeritas', 'Bombasto'];
onVoted(agreed: boolean) {
agreed ? this.agreed++ : this.disagreed++;

View File

@ -23,8 +23,8 @@ describe('Dependency Injection Cookbook', function () {
expect(sortedHeroes).toBeDefined();
});
it('Mr. Nice should be in sorted heroes', function () {
let sortedHero = element.all(by.xpath('//sorted-heroes/[text()="Mr. Nice" and position()=2]')).get(0);
it('Dr Nice should be in sorted heroes', function () {
let sortedHero = element.all(by.xpath('//sorted-heroes/[text()="Dr Nice" and position()=2]')).get(0);
expect(sortedHero).toBeDefined();
});
@ -60,7 +60,7 @@ describe('Dependency Injection Cookbook', function () {
it('should render Hero-of-the-Month runner-ups', function () {
let runnersUp = element(by.id('rups1')).getText();
expect(runnersUp).toContain('RubberMan, Mr. Nice');
expect(runnersUp).toContain('RubberMan, Dr Nice');
});
it('should render DateLogger log entry in Hero-of-the-Month', function () {

View File

@ -11,7 +11,7 @@ export class HeroService {
private heroes: Array<Hero> = [
new Hero(1, 'RubberMan', 'Hero of many talents', '123-456-7899'),
new Hero(2, 'Magma', 'Hero of all trades', '555-555-5555'),
new Hero(3, 'Mr. Nice', 'The name says it all', '111-222-3333')
new Hero(3, 'Dr Nice', 'The name says it all', '111-222-3333')
];
getHeroById(id: number): Hero {

View File

@ -29,10 +29,10 @@ export class StorageComponent implements OnInit {
}
setSession() {
this.sessionStorageService.set('hero', 'Mr. Nice - Session');
this.sessionStorageService.set('hero', 'Dr Nice - Session');
}
setLocal() {
this.localStorageService.set('hero', 'Mr. Nice - Local');
this.localStorageService.set('hero', 'Dr Nice - Local');
}
}

View File

@ -56,7 +56,7 @@ describe('Dependency Injection Tests', function () {
});
it('Hero displays as expected', function () {
expectedMsg = 'Mr. Nice';
expectedMsg = 'Dr Nice';
expect(element(by.css('#hero')).getText()).toEqual(expectedMsg);
});

View File

@ -2,7 +2,7 @@
import { Hero } from './hero';
export const HEROES: Hero[] = [
{ id: 11, isSecret: false, name: 'Mr. Nice' },
{ id: 11, isSecret: false, name: 'Dr Nice' },
{ id: 12, isSecret: false, name: 'Narco' },
{ id: 13, isSecret: false, name: 'Bombasto' },
{ id: 14, isSecret: false, name: 'Celeritas' },

View File

@ -4,7 +4,7 @@ export class Hero {
}
export const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' }

View File

@ -36,7 +36,7 @@ describe('Http Tests', function() {
describe('Heroes', () => {
it('retrieves the list of heroes at startup', () => {
expect(page.heroesListItems.count()).toBe(4);
expect(page.heroesListItems.get(0).getText()).toContain('Mr. Nice');
expect(page.heroesListItems.get(0).getText()).toContain('Dr Nice');
checkLogForMessage('GET "api/heroes"');
});

View File

@ -3,7 +3,7 @@ import { InMemoryDbService } from 'angular-in-memory-web-api';
export class InMemoryDataService implements InMemoryDbService {
createDb() {
const heroes = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -6,7 +6,7 @@ export class Hero {
}
export const heroes: Hero[] = [
{ id: 1, name: 'Mr. Nice', emotion: 'happy' },
{ id: 1, name: 'Dr Nice', emotion: 'happy' },
{ id: 2, name: 'Narco', emotion: 'sad' },
{ id: 3, name: 'Windstorm', emotion: 'confused' },
{ id: 4, name: 'Magneta' }

View File

@ -1,7 +1,7 @@
import { Hero } from './hero';
export const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -10,12 +10,12 @@ describe('Structural Directives', function () {
it('first div should show hero name with *ngIf', function () {
const allDivs = element.all(by.tagName('div'));
expect(allDivs.get(0).getText()).toEqual('Mr. Nice');
expect(allDivs.get(0).getText()).toEqual('Dr Nice');
});
it('first li should show hero name with *ngFor', function () {
const allLis = element.all(by.tagName('li'));
expect(allLis.get(0).getText()).toEqual('Mr. Nice');
expect(allLis.get(0).getText()).toEqual('Dr Nice');
});
it('ngSwitch have two <happy-hero> instances', function () {

View File

@ -6,7 +6,7 @@ export class Hero {
}
export const heroes: Hero[] = [
{ id: 1, name: 'Mr. Nice', emotion: 'happy'},
{ id: 1, name: 'Dr Nice', emotion: 'happy'},
{ id: 2, name: 'Narco', emotion: 'sad' },
{ id: 3, name: 'Windstorm', emotion: 'confused' },
{ id: 4, name: 'Magneta'}

View File

@ -10,7 +10,7 @@ export class Hero {
'http://www.imdb.com/title/tt0065832/',
325
),
new Hero(1, 'Mr. Nice', 'happy'),
new Hero(1, 'Dr Nice', 'happy'),
new Hero(2, 'Narco', 'sad' ),
new Hero(3, 'Windstorm', 'confused' ),
new Hero(4, 'Magneta')

View File

@ -9,7 +9,7 @@ const maxQuotes = Infinity; // 0;
export class InMemoryDataService implements InMemoryDbService {
createDb() {
const heroes = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -1,7 +1,7 @@
import { Hero } from './hero';
export const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -1,7 +1,7 @@
import { Hero } from './hero';
export const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -2,7 +2,7 @@
import { Hero } from './hero';
export const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -2,7 +2,7 @@
import { Hero } from './hero';
export const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -9,7 +9,7 @@ import { Injectable } from '@angular/core';
export class InMemoryDataService implements InMemoryDbService {
createDb() {
const heroes = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -2,7 +2,7 @@
import { Hero } from './hero';
export const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -3,7 +3,7 @@ import { InMemoryDbService } from 'angular-in-memory-web-api';
export class InMemoryDataService implements InMemoryDbService {
createDb() {
const heroes = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -1,7 +1,7 @@
import { Hero } from './hero';
export const HEROES: Hero[] = [
{ id: 11, name: 'Mr. Nice' },
{ id: 11, name: 'Dr Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },

View File

@ -475,7 +475,7 @@ The browser refreshes and the app is working again.
You can click a hero in the dashboard or in the heroes list and navigate to that hero's detail view.
If you paste `localhost:4200/detail/11` in the browser address bar,
the router navigates to the detail view for the hero with `id: 11`, "Mr. Nice".
the router navigates to the detail view for the hero with `id: 11`, "Dr Nice".
{@a goback}

View File

@ -243,7 +243,7 @@ describe('Collector', () => {
version: METADATA_VERSION,
metadata: {
HEROES: [
{'id': 11, 'name': 'Mr. Nice', '$quoted$': ['id', 'name']},
{'id': 11, 'name': 'Dr Nice', '$quoted$': ['id', 'name']},
{'id': 12, 'name': 'Narco', '$quoted$': ['id', 'name']},
{'id': 13, 'name': 'Bombasto', '$quoted$': ['id', 'name']},
{'id': 14, 'name': 'Celeritas', '$quoted$': ['id', 'name']},
@ -1221,7 +1221,7 @@ const FILES: Directory = {
import {Hero as Hero} from './hero';
export const HEROES: Hero[] = [
{"id": 11, "name": "Mr. Nice"},
{"id": 11, "name": "Dr Nice"},
{"id": 12, "name": "Narco"},
{"id": 13, "name": "Bombasto"},
{"id": 14, "name": "Celeritas"},