Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localize obsolete messages in protogeo #13580

Merged
merged 4 commits into from
Nov 30, 2022

Conversation

mjkkirschner
Copy link
Member

@mjkkirschner mjkkirschner commented Nov 29, 2022

Purpose

DYN-5249

This PR adds localization capabilities into the base class of our custom obsolete attribute types. This way it can be used from LibG.

This PR must be merged and ideally generate a nuget package before we can merge the related LibG PR which localizes most obsolete node messages.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Release Notes

Improves API for localizing obsolete node messages

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

{
if (resourceType == null)
Copy link
Member Author

Choose a reason for hiding this comment

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

this is moved to base class

Message = message;
}
}
[AttributeUsage(AttributeTargets.Method| AttributeTargets.Constructor | AttributeTargets.Property)]
Copy link
Member Author

Choose a reason for hiding this comment

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

can now be applied to more function types.

/// <param name="descriptionResourceID">resx id for this resource</param>
/// <param name="typeName">name of type that contains resource strings.</param>
/// <exception cref="ArgumentNullException"></exception>
public IsObsoleteAttribute(string descriptionResourceID, string typeName)
Copy link
Member Author

Choose a reason for hiding this comment

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

this is very useful for autogen because we can't reference the type inside the resource assembly in some situations - but we know the type name and assembly name.

@mjkkirschner mjkkirschner changed the title Localizedobsolete localize obsolete messages in protogeo Nov 30, 2022
Copy link
Contributor

@pinzart90 pinzart90 left a comment

Choose a reason for hiding this comment

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

LGTM

@mjkkirschner
Copy link
Member Author

test failure is the flaky one - I will file task to fix that.

@mjkkirschner mjkkirschner merged commit 607235e into DynamoDS:master Nov 30, 2022
mjkkirschner added a commit to mjkkirschner/Dynamo that referenced this pull request Dec 5, 2022
* move resx lookup to base class so libG can use it

* add new constructor for when we only know type name, but cant reference actual type

* can apply to different function types

* comments
aparajit-pratap pushed a commit that referenced this pull request Dec 5, 2022
* move resx lookup to base class so libG can use it

* add new constructor for when we only know type name, but cant reference actual type

* can apply to different function types

* comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants