Skip to content

Added Resources for Romanian #3

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

Merged
merged 1 commit into from
Aug 21, 2013
Merged

Added Resources for Romanian #3

merged 1 commit into from
Aug 21, 2013

Conversation

vgrigoriu
Copy link
Contributor

I just added a new resx file, not sure why the csproj diff looks so drastic.

Correctly localizing humanized dates in Romanian is a bit more complicated, and would require changes in the code. The problem is that the template differs for numerals less than 20 and those larger than or equal to 20. For example, "5 days" is "5 zile", while "24 days" is "24 de zile". I'm not sure if other languages have the same characteristic (maybe with different values). I have a vague idea about how one might go about implementing something like that, but I'll need to sit on it a bit. It looks like some kind of locale-based logic would be needed. I'll let you know if I can come with something decent.

Let me know your thoughts.

Thanks,
Victor

@MehdiK
Copy link
Member

MehdiK commented Aug 19, 2013

Thanks @vgrigoriu for the PR. I will check it out soon.

I got what you mean about the issue. So what is that 'de'? Does that mean that it's over 20? Are there any other rules?

I will see what can be done.

@vgrigoriu
Copy link
Contributor Author

I'd say this version is good enough to stand on it's own. If I can come up with a good enough implementation of the more correct version I'll send you a separate PR.

Pe 19.08.2013, la 20:38, Mehdi Khalili [email protected] a scris:

Thanks @vgrigoriu for the PR. I will check it out soon.

So would this PR complete Romanian support or it is still work in progress and requires changes to the code?


Reply to this email directly or view it on GitHub.

@MehdiK MehdiK merged commit 395037a into Humanizr:master Aug 21, 2013
@MehdiK
Copy link
Member

MehdiK commented Aug 21, 2013

PR merged. Thanks.

Do you have any idea about how to code around the Romanian number thing? I could add a Configurator class, where you can configure how numbers should be dealt with by setting a callback function, that can take care of it. I would be more than happy to discuss alternative solutions.

@vgrigoriu
Copy link
Contributor Author

How about an abstract class named, say, DateTimeHumanizer, which contains the current logic, and subclasses with an attribute that specifies the culture the subclass can handle? The subclass will override various methods as needed. The current extension method will simply select and instantiate a subclass based on the current UI culture or its parent.

The issue I see with this approach is that we would need to use reflection, so performance would suffer.

What do you think?

@MehdiK
Copy link
Member

MehdiK commented Aug 27, 2013

Hey Victor,

Check out this commit. You should now be able to implement a Romanian Formatter implementing ILocaleAwareFormatter and change the Configurator class constructor to use your formatter when the current locale is Romanian.

This is just A solution. I would love to see what you come up with and take that in; but thought I'd kick the ball rolling with this based on the discussion we had before there are too many localized resources which there soon will be with your work on NumberToWords :)

clairernovotny pushed a commit that referenced this pull request May 7, 2025
[Fix After Rebase] Update Verified.txt
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