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

[Code] Translation function not working correctly #422

Closed
htcfreek opened this issue Jul 6, 2021 · 16 comments
Closed

[Code] Translation function not working correctly #422

htcfreek opened this issue Jul 6, 2021 · 16 comments
Labels
bug Something isn't working

Comments

@htcfreek
Copy link
Contributor

htcfreek commented Jul 6, 2021

The translation function not working correctly and isn't parameterized very well.

See my hopefully working fix here: https://github.com/htcfreek/WhyNotWin11/commit/d55c4f51cced510b42e399f87283d0afff0ff30b

@micwoj92 micwoj92 added the bug Something isn't working label Jul 6, 2021
@Dragon1573
Copy link

I'm currently using v2.3.0.5. It's installed via my private Scoop Bucket. After installation, it only shows an English Interface for me when I lauch this application.

How can I switch to Simplified Chinese? I can't find any button for this language setting.

image

@micwoj92
Copy link
Collaborator

micwoj92 commented Jul 7, 2021 via email

@htcfreek
Copy link
Contributor Author

htcfreek commented Jul 7, 2021

@Dragon1573
Do you running a dev build?

For me in last build (Fork from yesterday evening German time.) I can't get the updated lang file to work.

@Dragon1573
Copy link

@micwoj92: Is your operating system in Simplified Chinese?

Yes, it is! I'm currently using:

  • Windows 10 Home China (家庭中文版) 21H1 (19043.1081)
  • Windows Feature Experience Pack 120.2212.3530.0.

And here are the system language configurations of my device. All of them are displayed in Simplified Chinese.

image

@Dragon1573
Copy link

@htcfreek: Do you running a dev build?

Sorry, I can't make sure which build (stable & dev) am I currently running. Maybe I'm currently running a stable version?

The Auto-Update features of that Scoop Bucket was enabled with GitHub Actions. According to my configurations, the latest version will be checked through the Releases page of this repository (currently v2.3.0.5) and the download link will be the same in GitHub Releases page (configured here).

@rcmaehl
Copy link
Owner

rcmaehl commented Jul 7, 2021

image
I'm unable to reproduce. When is it not working properly @htcfreek

@htcfreek
Copy link
Contributor Author

htcfreek commented Jul 7, 2021

image
I'm unable to reproduce. When is it not working properly @htcfreek

Let me make the PR and then you can check my branch. (I startet the non-cumpiled after adding strings on an English system.)

@htcfreek
Copy link
Contributor Author

htcfreek commented Jul 7, 2021

@rcmaehl
Which id does your language have? I found a 0407.lang and an empty 407.lang in %localappdata% folder yesterday.

If I am right it can be the problem that on integer trailing 0 gets lost. Then we should chang the input parameter to String.

@rcmaehl
Copy link
Owner

rcmaehl commented Jul 7, 2021

@rcmaehl
Which id does your language have? I found a 0407.lang and an empty 407.lang in %localappdata% folder yesterday.

If I am right it can be the problem that on integer trailing 0 gets lost. Then we should chang the input parameter to String.

0409 is English. I renamed 0408 to 0409 to test, but I'll install a locale pack to test if there's still an issue

@micwoj92
Copy link
Collaborator

micwoj92 commented Jul 7, 2021

@htcfreek

image

@htcfreek
Copy link
Contributor Author

htcfreek commented Jul 7, 2021

@htcfreek

image

So I have to fetch and metge into my main and from there into my feature branch?

@micwoj92
Copy link
Collaborator

micwoj92 commented Jul 7, 2021

No, you can do it directly into your feature branch, just go to that branch and then click on it, when there are conflicts it will show you editor where you can fix these.

@htcfreek htcfreek mentioned this issue Jul 8, 2021
9 tasks
@Dragon1573
Copy link

Reproduce steps

  1. First make sure a Powershell distribution is installed on your device. The following steps are based on it. The latest Powershell Core 7 (pwsh.exe should be included in your %PATH%) is recommended.
  2. Install the latest Scoop distribution.
  3. Attach my private bucket to Scoop.
  4. Install the latest WhyNotWin11 via Scoop.
  5. Launch the application after successful installation. The application will ONLY displayed in ENGLISH.

Solutions

After the succesful installation of WhyNotWin11, it creates an empty 0804.lang file with UTF-16 LE located in %LOCALAPPDATA%\WhyNotWin11\Langs.

Download and overwrite the 0804.lang file from this repository DOES solve the problem.

@Dragon1573
Copy link

I think it's my fault ≧ ﹏ ≦

I previously installed v2.2.x and v2.3.0.1, they release several resources to %LOCALAPPDATA%\WhyNotWin11. But this is the key point! In the JSON (un)install configuration file of my private Scoop Bucket, I didn't configure a step to remove the whole %LOCALAPPDATA%\WhyNotWin11 folder after uninstallation. These files will simply stored in my device as some "garbage files". When installing and launching a later version of WhyNotWin11, it will check if there already have those resources. The resources didn't refreshed by WhyNotWin11 and cause the previous problem.

I removed the whole folder and reinstall WhyNotWin11 v2.3.0.5 via Scoop again. Now all resources are correctly created and the interface is Simplified Chinese as I expected now. Thanks @micwoj92, @htcfreek and @rcmaehl a lot (✿◡‿◡)

@htcfreek
Copy link
Contributor Author

htcfreek commented Jul 8, 2021

@rcmaehl
Today it is working for me.

@htcfreek htcfreek closed this as completed Jul 9, 2021
@htcfreek
Copy link
Contributor Author

htcfreek commented Jul 9, 2021

I closed the issue because it's working at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants