Humanizr / Humanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities
Other
8.7k stars 965 forks source link

Build scripts don't generate Kurdish (ku) dll resource #1160

Open ohmineer opened 2 years ago

ohmineer commented 2 years ago

Hi,

I am trying to pass tests to submit a PR. Following the comment found in issue #1156 (1156#issuecomment-1001682012), I can't either pass Kurdish tests when I run build.ps1 or build.cmd scripts. On the contrary, if I run the tests within Visual Studio's Test Explorer, everything turns green.

Test Explorer Test Explorer Localisation "ku" Tests

I have noticed that "ku" folder in output directory does not exists or is empty when projects are restored upon running scripts. What happens then is that translation requested to ResourceManager default to English language in runtime.

Test error when running scripts

This folder contains the corresponding dll when running tests in Visual Studio but I can't seem to understand the reason as there is no difference among "ku" resource file and the rest of localised files. Is anybody able to help with this?

Just in case it helps, dotnet --info produces this in my machine: image

Thanks in advance,

ohmineer commented 2 years ago

I figured out my problem. I installed Central Kurdish language in my system and now the script is executed successfully.

Green tests!!!

My system is configured in Spanish and no other languages appear in Windows configuration. For that reason, I am not sure why this action is needed for this specific language and not for others (Asian languages)

Language configuration in Windows 10

If any other user can confirm this is the solution, I would be happy to close this issue.

twwilliams commented 2 years ago

I don't think that having to install the Kurdish language pack in our development machines is a reasonable requirement, especially since it isn't needed for other languages.

Something must be different about the way the .ku localization has been implemented compared to all the other languages.

ohmineer commented 2 years ago

I understand your concerns. I suggested you try this while someone with more experience with the project can provide any insights on what could be happening. That feedback might help narrowing down the issue.

On the other hand, I reviewed the implementation of "ku" localisation. I can't see anything different. Just in case you can help, everything seems to start with this commit 2ba67c0e9fd15e1ade21819a02744960010e5131.

One final comment, I noticed a few Arabic fonts were installed in my system when I installed the language pack. You may want to try that as it looks less "harmful"...

Arabic fonts

I hope it helps...

neilboyd commented 2 years ago

See also #1177 and #1180

SimonCropp commented 9 months ago

also related https://github.com/dotnet/msbuild/issues/1454