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

Enhancement: return a work in progress string instead of a placeholder in GetValue() #36

Open
gsgou opened this issue Nov 11, 2024 · 1 comment

Comments

@gsgou
Copy link

gsgou commented Nov 11, 2024

Hello,

I'd like to suggest a modification to the GetValue(string text) method in the LocalizationResourceManager.

Current Behavior:
The method throws a NullReferenceException or presents a placeholder when setup accordingly:
settings.SuppressTextNotFoundException(true, "Text:{0}");

when I use it in xaml like that:
xmlns:loc="clr-namespace:LocalizationResourceManager.Maui;assembly=LocalizationResourceManager.Maui"

Proposed Change:

In quick development cycles or MVPs and presentations usually one language is dominant for decisions and approvals.
Instead of showing the name of a key following some naming conventions, it might be more developer-friendly to return a declared work in progress key.

I believe this change would enhance the overall usability of the library. Your feedback on this suggestion would be greatly appreciated.

Thank you!

@SirJohnK
Copy link
Owner

Hi, @gsgou!

I am not sure I understand what you mean when you say declared work in progress key.

  • Do you want the placeholderText for the "Text not found" to be localized and retrieved from the ResourceManager?
  • Is not SuppressTextNotFoundException(true, "Work in progress! ({0})") or any other custom text enough?
  • If you do not require the actual placeholderText to be localized, I am not sure what you want?

I really appreciate that you take the time to make this a better library! 👍

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

No branches or pull requests

2 participants