Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Add IStringLocalizer.GetAllStrings method #22

Merged
merged 1 commit into from
May 28, 2015

Conversation

DamianEdwards
Copy link
Member

foreach (var name in resourceNames)
{
var value = GetStringSafely(name, culture);
yield return new LocalizedString(name, value ?? name, resourceNotFound: value == null);
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the function definition https://github.com/aspnet/Localization/blob/dev/src/Microsoft.Framework.Localization.Abstractions/LocalizedString.cs#L30 I don't think that we need the named parameter resourceNotFound while you didn't change the order of the parameters

Copy link
Member Author

Choose a reason for hiding this comment

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

We always tend to name args when we pass in bool or null values.

@muratg
Copy link

muratg commented May 21, 2015

I think we should do #23 in this PR.

@DamianEdwards
Copy link
Member Author

@muratg I added changes for #23

@DamianEdwards
Copy link
Member Author

@hishamco
Copy link
Contributor

👍

@DamianEdwards DamianEdwards force-pushed the damian/GetStringsMethod branch from 54540f9 to f830a15 Compare May 27, 2015 00:06
/// Gets all string resources including those for ancestor cultures.
/// </summary>
/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/>.</param>
/// <returns></returns>
Copy link
Contributor

Choose a reason for hiding this comment

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

<returns> should have some text. May be "The strings" like above?

@kirthik
Copy link
Contributor

kirthik commented May 27, 2015

:shipit:

1 similar comment
@muratg
Copy link

muratg commented May 28, 2015

:shipit:

…le impl:

- #18

Support not loading ancestor culture strings on IStringLocalizer.GetAllStrings:
- #23
@DamianEdwards DamianEdwards force-pushed the damian/GetStringsMethod branch from 20c6d18 to 1a47d19 Compare May 28, 2015 19:29
@DamianEdwards DamianEdwards merged commit 1a47d19 into dev May 28, 2015
@DamianEdwards DamianEdwards deleted the damian/GetStringsMethod branch December 12, 2015 01:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants