microsoft / winfile

Original Windows File Manager (winfile) with enhancements
MIT License
6.76k stars 699 forks source link

Switching Option of Full-Width Katakana and Half-Width Katakana #358

Open Takym opened 1 year ago

Takym commented 1 year ago

My PR #272 replaces all half-width katakanas with full-width katakanas because the full-width one is more readable. However, this software also shows how did it work in the 1990s. So, I think providing an option to switch is nice for users. The full-width one is for readability, and the half-width one is for learning the historical way.

Takym commented 1 year ago

The idea of using half-width katakanas instead of full-width is suggested in https://github.com/microsoft/winfile/pull/272#issuecomment-1310330939 Thanks

schinagl commented 1 year ago

The current e.g Explorer uses half or full width?

Takym commented 1 year ago

Currently, most of the software and documents use full-width. The half-width katakanas were introduced for legacy computers because Japanese characters are in large quantities.

tokomio-sun commented 1 year ago

I disagree with adding an option to switch between half-width and full-width katakanas. The reason is that maintaining two japanese-language resource files with little difference.

I think it is better to use full-width katakanas, because this branche's source codes are new Windows File Manager and no longer 90's (WindowsNT 4.0) version. (example OLE drag/drop support)

Takym commented 1 year ago

I think adding two variants (full-width and half-width katakanas) of language resources can be a low-maintenance cost by an automating tool like the one below: https://github.com/Takym/winfile/tree/Japanese_Hankaku/tools/ConvertFromFullWidthToHalfWidth This tool replaces all full-width katakanas with half-width. So, you only need to update the full-width one.

clzls commented 1 year ago

I think adding two variants (full-width and half-width katakanas) of language resources can be a low-maintenance cost by an automating tool like the one below: https://github.com/Takym/winfile/tree/Japanese_Hankaku/tools/ConvertFromFullWidthToHalfWidth This tool replaces all full-width katakanas with half-width. So, you only need to update the full-width one.

Besides the correctness, what about a PowerScript equivalence? 😄 (maybe 7.x only though. Add locale id of ja-JP for multilingual systems. But this code seems to be working only on computers with Japanese language pack installed...)

using namespace Microsoft.VisualBasic
[System.Text.Encoding]::RegisterProvider([System.Text.CodePagesEncodingProvider]::Instance)
[Strings]::StrConv('キャンセル取消すキャンセル', [VbStrConv]::Narrow, 0x0411)
Takym commented 1 year ago

@clzls

Besides the correctness, what about a PowerScript equivalence?

Yes, it seems good. I will port the conversion tool to PowerShell.

But this code seems to be working only on computers with Japanese language pack installed...

Thank you for telling me that Strings.StrConv does not work in non-Japanese environments. But I'm sorry, I have no idea how to fix it.

Takym commented 1 year ago

I have ported the conversion tool to PowerShell: https://github.com/Takym/winfile/blob/Japanese_Hankaku/tools/ConvertFromFullWidthToHalfWidth.ps1

I used the pwsh command to run PowerShell 7.3.

clzls commented 1 year ago

The idea of using half-width katakanas instead of full-width is suggested in #272 (comment) Thanks

I give up that thought now. Let's say hello to full-width Katakana, since original_plus or any customized fork would serve the needs, because one can easily make a fork with old-fashioned half-width Katakana themselves using the script.

Maybe it is the time to establish a community agreement for ja-JP translations based on this issue now. (Since everyone here now agree with it...?)

Thank you for telling me that Strings.StrConv does not work in non-Japanese environments. But I'm sorry, I have no idea how to fix it.

Windows Japanese language pack is nothing other than a regular dependency of the script. Done 😄 (I have Japanese language pack installed, and I'm in Chinese environment, it worked fine.)