Skip to content

Conversation

@kara
Copy link
Contributor

@kara kara commented Apr 11, 2016

No description provided.

@kara kara added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Apr 11, 2016
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we care. Do we want to allow // i18n ( ph = "second" )?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we do. Probably would be less confusing for people. I'll update and add a test.

@vsavkin vsavkin added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 11, 2016
@kara kara added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Apr 11, 2016
@kara kara force-pushed the i18n branch 2 times, most recently from f74c3a2 to 47b508e Compare April 11, 2016 23:14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nitpick, so feel free to ignore it. It's better avoid reassigning parameters. It adds unnecessary mutability. It's harder to follow the flow of the computation. In this case it doesn't matter that much, but it may matter in other cases.

export function dedupePhName(usedNames: Map<string, number>, name: string): string {
  let duplicateNameCount = usedNames.get(name);
  if (isPresent(duplicateNameCount)) {
    usedNames.set(name, duplicateNameCount + 1);
    return `${name}_${duplicateNameCount}`;
  } else {
    usedNames.set(name, 1);
    return name;
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha! That's how I had it originally. I'll change it.

@vsavkin vsavkin added pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 12, 2016
@kara kara added the action: merge The PR is ready for merge by the caretaker label Apr 12, 2016
@kara kara deleted the i18n branch October 13, 2018 01:08
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants